Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maintenance] Remove support for RELATED_IMAGE_xxx env vars | GT-486 #1412

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- (Bugfix) Fix make manifests-crd-file command
- (Improvement) Allow tcp:// and ssl:// protocols in endpoints for members
- (Maintenance) Reorganize package imports / move common code to separate repos
- (Maintenance) Reorganize package imports / move common code to separate repos
- (Maintenance) Remove support for RELATED_IMAGE_UBI, RELATED_IMAGE_DATABASE and RELATED_IMAGE_METRICSEXPORTER env vars

## [1.2.33](https://github.com/arangodb/kube-arangodb/tree/1.2.33) (2023-09-27)
- (Maintenance) Bump golang.org/x/net to v0.13.0
Expand Down
6 changes: 0 additions & 6 deletions chart/kube-arangodb/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "{{ .Values.operator.images.base }}"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "{{ .Values.operator.images.metricsExporter }}"
- name: RELATED_IMAGE_DATABASE
value: "{{ .Values.operator.images.arango }}"
{{- if .Values.operator.features.apps }}
- name: ARANGOJOB_SA_NAME
value: "{{ template "kube-arangodb.operatorName" . }}-job"
Expand Down
4 changes: 0 additions & 4 deletions chart/kube-arangodb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ operator:
backup: false
apps: false
k8sToK8sClusterSync: false
images:
base: alpine:3.11
metricsExporter: arangodb/arangodb-exporter:0.1.7
arango: arangodb/arangodb:latest
tolerations: []
rbac:
enabled: true
Expand Down
42 changes: 16 additions & 26 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ import (
"k8s.io/client-go/tools/record"

"github.com/arangodb/kube-arangodb/pkg/api"
deploymentApi "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
"github.com/arangodb/kube-arangodb/pkg/crd"
agencyConfig "github.com/arangodb/kube-arangodb/pkg/deployment/agency/config"
"github.com/arangodb/kube-arangodb/pkg/deployment/features"
Expand All @@ -72,23 +71,16 @@ import (
)

const (
defaultServerHost = "0.0.0.0"
defaultServerPort = 8528
defaultAPIHTTPPort = 8628
defaultAPIGRPCPort = 8728
defaultLogLevel = "debug"
defaultAdminSecretName = "arangodb-operator-dashboard"
defaultAPIJWTSecretName = "arangodb-operator-api-jwt"
defaultAPIJWTKeySecretName = "arangodb-operator-api-jwt-key"
defaultAlpineImage = "alpine:3.7"
defaultMetricsExporterImage = "arangodb/arangodb-exporter:0.1.6"
defaultArangoImage = "arangodb/arangodb:latest"
defaultShutdownDelay = 2 * time.Second
defaultShutdownTimeout = 30 * time.Second

UBIImageEnv util.EnvironmentVariable = "RELATED_IMAGE_UBI"
ArangoImageEnv util.EnvironmentVariable = "RELATED_IMAGE_DATABASE"
MetricsExporterImageEnv util.EnvironmentVariable = "RELATED_IMAGE_METRICSEXPORTER"
defaultServerHost = "0.0.0.0"
defaultServerPort = 8528
defaultAPIHTTPPort = 8628
defaultAPIGRPCPort = 8728
defaultLogLevel = "debug"
defaultAdminSecretName = "arangodb-operator-dashboard"
defaultAPIJWTSecretName = "arangodb-operator-api-jwt"
defaultAPIJWTKeySecretName = "arangodb-operator-api-jwt-key"
defaultShutdownDelay = 2 * time.Second
defaultShutdownTimeout = 30 * time.Second
)

var (
Expand Down Expand Up @@ -134,8 +126,6 @@ var (

scalingIntegrationEnabled bool

alpineImage, metricsExporterImage, arangoImage string

reconciliationDelay time.Duration

singleMode bool
Expand Down Expand Up @@ -184,6 +174,7 @@ var (
)

func init() {
var deprecatedStr string

f := cmdMain.Flags()
f.StringVar(&serverOptions.host, "server.host", defaultServerHost, "Host to listen on")
Expand All @@ -207,10 +198,12 @@ func init() {
f.BoolVar(&operatorOptions.enableK2KClusterSync, "operator.k2k-cluster-sync", false, "Enable to run the ListSimple operator")
f.MarkDeprecated("operator.k2k-cluster-sync", "Enabled within deployment operator")
f.BoolVar(&operatorOptions.versionOnly, "operator.version", false, "Enable only version endpoint in Operator")
f.StringVar(&operatorOptions.alpineImage, "operator.alpine-image", UBIImageEnv.GetOrDefault(defaultAlpineImage), "Docker image used for alpine containers")
f.StringVar(&deprecatedStr, "operator.alpine-image", "alpine:3.7", "Docker image used for alpine containers")
f.MarkDeprecated("operator.alpine-image", "Value is not used anymore")
f.StringVar(&operatorOptions.metricsExporterImage, "operator.metrics-exporter-image", MetricsExporterImageEnv.GetOrDefault(defaultMetricsExporterImage), "Docker image used for metrics containers by default")
f.StringVar(&operatorOptions.arangoImage, "operator.arango-image", ArangoImageEnv.GetOrDefault(defaultArangoImage), "Docker image used for arango by default")
f.StringVar(&deprecatedStr, "operator.metrics-exporter-image", "arangodb/arangodb-exporter:0.1.6", "Docker image used for metrics containers by default")
f.MarkDeprecated("operator.metrics-exporter-image", "Value is not used anymore")
f.StringVar(&deprecatedStr, "operator.arango-image", "arangodb/arangodb:latest", "Docker image used for arango by default")
f.MarkDeprecated("operator.arango-image", "Value is not used anymore")
f.BoolVar(&chaosOptions.allowed, "chaos.allowed", false, "Set to allow chaos in deployments. Only activated when allowed and enabled in deployment")
f.BoolVar(&operatorOptions.singleMode, "mode.single", false, "Enable single mode in Operator. WARNING: There should be only one replica of Operator, otherwise Operator can take unexpected actions")
f.StringVar(&operatorOptions.scope, "scope", scope.DefaultScope.String(), "Define scope on which Operator works. Legacy - pre 1.1.0 scope with limited cluster access")
Expand Down Expand Up @@ -273,8 +266,6 @@ func executeMain(cmd *cobra.Command, args []string) {

go monitorMemoryLimit()

deploymentApi.DefaultImage = operatorOptions.arangoImage

globals.GetGlobalTimeouts().Kubernetes().Set(operatorTimeouts.k8s)
globals.GetGlobalTimeouts().ArangoD().Set(operatorTimeouts.arangoD)
globals.GetGlobalTimeouts().Agency().Set(operatorTimeouts.agency)
Expand Down Expand Up @@ -530,7 +521,6 @@ func newOperatorConfigAndDeps(id, namespace, name string) (operator.Config, oper
EnableK2KClusterSync: operatorOptions.enableK2KClusterSync,
AllowChaos: chaosOptions.allowed,
ScalingIntegrationEnabled: operatorOptions.scalingIntegrationEnabled,
ArangoImage: operatorOptions.arangoImage,
SingleMode: operatorOptions.singleMode,
Scope: scope,
ReconciliationDelay: operatorOptions.reconciliationDelay,
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -847,12 +847,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
- name: ARANGOJOB_SA_NAME
value: "arango-all-operator-job"
ports:
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
- name: ARANGOJOB_SA_NAME
value: "arango-apps-operator-job"
ports:
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-deployment-replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-k2kclustersync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/arango-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -847,12 +847,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
- name: ARANGOJOB_SA_NAME
value: "arango-all-operator-job"
ports:
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
- name: ARANGOJOB_SA_NAME
value: "arango-apps-operator-job"
ports:
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-backup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-deployment-replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-k2kclustersync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/enterprise-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
6 changes: 0 additions & 6 deletions manifests/kustomize-enterprise/all/enterprise-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -847,12 +847,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
- name: ARANGOJOB_SA_NAME
value: "arango-all-operator-job"
ports:
Expand Down
6 changes: 0 additions & 6 deletions manifests/kustomize-enterprise/apps/enterprise-apps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
- name: ARANGOJOB_SA_NAME
value: "arango-apps-operator-job"
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,6 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: RELATED_IMAGE_UBI
value: "alpine:3.11"
- name: RELATED_IMAGE_METRICSEXPORTER
value: "arangodb/arangodb-exporter:0.1.7"
- name: RELATED_IMAGE_DATABASE
value: "arangodb/arangodb:latest"
ports:
- name: metrics
containerPort: 8528
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- enterprise-k2kclustersync.yaml
Loading