mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-12 05:33:11 +01:00
chore: review
Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
This commit is contained in:
parent
6067121c67
commit
53be5ae896
@ -336,7 +336,15 @@ func InjectPluginSidecarPodSpec(
|
||||
if spec.Containers[i].Name == mainContainerName {
|
||||
volumeMounts = spec.Containers[i].VolumeMounts
|
||||
mainContainerFound = true
|
||||
} else if spec.Containers[i].Name == sidecar.Name {
|
||||
}
|
||||
}
|
||||
|
||||
if !mainContainerFound {
|
||||
return errors.New("main container not found")
|
||||
}
|
||||
|
||||
for i := range spec.InitContainers {
|
||||
if spec.InitContainers[i].Name == sidecar.Name {
|
||||
sidecarContainerFound = true
|
||||
}
|
||||
}
|
||||
@ -346,10 +354,6 @@ func InjectPluginSidecarPodSpec(
|
||||
return nil
|
||||
}
|
||||
|
||||
if !mainContainerFound {
|
||||
return errors.New("main container not found")
|
||||
}
|
||||
|
||||
// Do not modify the passed sidecar definition
|
||||
if injectMainContainerVolumes {
|
||||
sidecar.VolumeMounts = append(sidecar.VolumeMounts, volumeMounts...)
|
||||
|
||||
@ -13,8 +13,8 @@ MYTMPDIR="$(mktemp -d)"
|
||||
trap 'rm -rf -- "$MYTMPDIR"' EXIT
|
||||
|
||||
current_context=$(kubectl config view --raw -o json | jq -r '."current-context"' | sed "s/kind-//")
|
||||
operator_image=$(KIND_CLUSTER_NAME="$current_context" KO_DOCKER_REPO=kind.local ko build -BP ./cmd/operator)
|
||||
instance_image=$(KIND_CLUSTER_NAME="$current_context" KO_DOCKER_REPO=kind.local KO_DEFAULTBASEIMAGE="ghcr.io/cloudnative-pg/postgresql:17.0" ko build -BP ./cmd/instance)
|
||||
operator_image=$(KIND_CLUSTER_NAME="$current_context" KO_DOCKER_REPO=kind.local ko build -BP ./cmd/manager)
|
||||
instance_image=$(KIND_CLUSTER_NAME="$current_context" KO_DOCKER_REPO=kind.local KO_DEFAULTBASEIMAGE="ghcr.io/cloudnative-pg/postgresql:17.0" ko build -BP ./cmd/manager)
|
||||
|
||||
# Now we deploy the plugin inside the `cnpg-system` workspace
|
||||
(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user