Skip to content

Commit 332c9c2

Browse files
Remove support for RELATED_IMAGE_UBI, RELATED_IMAGE_DATABASE and RELATED_IMAGE_METRICSEXPORTER env vars (#1412)
1 parent 25113b6 commit 332c9c2

38 files changed

+19
-219
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
44
- (Bugfix) Fix make manifests-crd-file command
55
- (Improvement) Allow tcp:// and ssl:// protocols in endpoints for members
6-
- (Maintenance) Reorganize package imports / move common code to separate repos
6+
- (Maintenance) Reorganize package imports / move common code to separate repos
7+
- (Maintenance) Remove support for RELATED_IMAGE_UBI, RELATED_IMAGE_DATABASE and RELATED_IMAGE_METRICSEXPORTER env vars
78

89
## [1.2.33](https://github.com/arangodb/kube-arangodb/tree/1.2.33) (2023-09-27)
910
- (Maintenance) Bump golang.org/x/net to v0.13.0

chart/kube-arangodb/templates/deployment.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,6 @@ spec:
133133
valueFrom:
134134
fieldRef:
135135
fieldPath: status.podIP
136-
- name: RELATED_IMAGE_UBI
137-
value: "{{ .Values.operator.images.base }}"
138-
- name: RELATED_IMAGE_METRICSEXPORTER
139-
value: "{{ .Values.operator.images.metricsExporter }}"
140-
- name: RELATED_IMAGE_DATABASE
141-
value: "{{ .Values.operator.images.arango }}"
142136
{{- if .Values.operator.features.apps }}
143137
- name: ARANGOJOB_SA_NAME
144138
value: "{{ template "kube-arangodb.operatorName" . }}-job"

chart/kube-arangodb/values.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ operator:
3232
backup: false
3333
apps: false
3434
k8sToK8sClusterSync: false
35-
images:
36-
base: alpine:3.11
37-
metricsExporter: arangodb/arangodb-exporter:0.1.7
38-
arango: arangodb/arangodb:latest
3935
tolerations: []
4036
rbac:
4137
enabled: true

cmd/cmd.go

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ import (
4747
"k8s.io/client-go/tools/record"
4848

4949
"github.com/arangodb/kube-arangodb/pkg/api"
50-
deploymentApi "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
5150
"github.com/arangodb/kube-arangodb/pkg/crd"
5251
agencyConfig "github.com/arangodb/kube-arangodb/pkg/deployment/agency/config"
5352
"github.com/arangodb/kube-arangodb/pkg/deployment/features"
@@ -72,23 +71,16 @@ import (
7271
)
7372

7473
const (
75-
defaultServerHost = "0.0.0.0"
76-
defaultServerPort = 8528
77-
defaultAPIHTTPPort = 8628
78-
defaultAPIGRPCPort = 8728
79-
defaultLogLevel = "debug"
80-
defaultAdminSecretName = "arangodb-operator-dashboard"
81-
defaultAPIJWTSecretName = "arangodb-operator-api-jwt"
82-
defaultAPIJWTKeySecretName = "arangodb-operator-api-jwt-key"
83-
defaultAlpineImage = "alpine:3.7"
84-
defaultMetricsExporterImage = "arangodb/arangodb-exporter:0.1.6"
85-
defaultArangoImage = "arangodb/arangodb:latest"
86-
defaultShutdownDelay = 2 * time.Second
87-
defaultShutdownTimeout = 30 * time.Second
88-
89-
UBIImageEnv util.EnvironmentVariable = "RELATED_IMAGE_UBI"
90-
ArangoImageEnv util.EnvironmentVariable = "RELATED_IMAGE_DATABASE"
91-
MetricsExporterImageEnv util.EnvironmentVariable = "RELATED_IMAGE_METRICSEXPORTER"
74+
defaultServerHost = "0.0.0.0"
75+
defaultServerPort = 8528
76+
defaultAPIHTTPPort = 8628
77+
defaultAPIGRPCPort = 8728
78+
defaultLogLevel = "debug"
79+
defaultAdminSecretName = "arangodb-operator-dashboard"
80+
defaultAPIJWTSecretName = "arangodb-operator-api-jwt"
81+
defaultAPIJWTKeySecretName = "arangodb-operator-api-jwt-key"
82+
defaultShutdownDelay = 2 * time.Second
83+
defaultShutdownTimeout = 30 * time.Second
9284
)
9385

9486
var (
@@ -134,8 +126,6 @@ var (
134126

135127
scalingIntegrationEnabled bool
136128

137-
alpineImage, metricsExporterImage, arangoImage string
138-
139129
reconciliationDelay time.Duration
140130

141131
singleMode bool
@@ -184,6 +174,7 @@ var (
184174
)
185175

186176
func init() {
177+
var deprecatedStr string
187178

188179
f := cmdMain.Flags()
189180
f.StringVar(&serverOptions.host, "server.host", defaultServerHost, "Host to listen on")
@@ -207,10 +198,12 @@ func init() {
207198
f.BoolVar(&operatorOptions.enableK2KClusterSync, "operator.k2k-cluster-sync", false, "Enable to run the ListSimple operator")
208199
f.MarkDeprecated("operator.k2k-cluster-sync", "Enabled within deployment operator")
209200
f.BoolVar(&operatorOptions.versionOnly, "operator.version", false, "Enable only version endpoint in Operator")
210-
f.StringVar(&operatorOptions.alpineImage, "operator.alpine-image", UBIImageEnv.GetOrDefault(defaultAlpineImage), "Docker image used for alpine containers")
201+
f.StringVar(&deprecatedStr, "operator.alpine-image", "alpine:3.7", "Docker image used for alpine containers")
211202
f.MarkDeprecated("operator.alpine-image", "Value is not used anymore")
212-
f.StringVar(&operatorOptions.metricsExporterImage, "operator.metrics-exporter-image", MetricsExporterImageEnv.GetOrDefault(defaultMetricsExporterImage), "Docker image used for metrics containers by default")
213-
f.StringVar(&operatorOptions.arangoImage, "operator.arango-image", ArangoImageEnv.GetOrDefault(defaultArangoImage), "Docker image used for arango by default")
203+
f.StringVar(&deprecatedStr, "operator.metrics-exporter-image", "arangodb/arangodb-exporter:0.1.6", "Docker image used for metrics containers by default")
204+
f.MarkDeprecated("operator.metrics-exporter-image", "Value is not used anymore")
205+
f.StringVar(&deprecatedStr, "operator.arango-image", "arangodb/arangodb:latest", "Docker image used for arango by default")
206+
f.MarkDeprecated("operator.arango-image", "Value is not used anymore")
214207
f.BoolVar(&chaosOptions.allowed, "chaos.allowed", false, "Set to allow chaos in deployments. Only activated when allowed and enabled in deployment")
215208
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")
216209
f.StringVar(&operatorOptions.scope, "scope", scope.DefaultScope.String(), "Define scope on which Operator works. Legacy - pre 1.1.0 scope with limited cluster access")
@@ -273,8 +266,6 @@ func executeMain(cmd *cobra.Command, args []string) {
273266

274267
go monitorMemoryLimit()
275268

276-
deploymentApi.DefaultImage = operatorOptions.arangoImage
277-
278269
globals.GetGlobalTimeouts().Kubernetes().Set(operatorTimeouts.k8s)
279270
globals.GetGlobalTimeouts().ArangoD().Set(operatorTimeouts.arangoD)
280271
globals.GetGlobalTimeouts().Agency().Set(operatorTimeouts.agency)
@@ -530,7 +521,6 @@ func newOperatorConfigAndDeps(id, namespace, name string) (operator.Config, oper
530521
EnableK2KClusterSync: operatorOptions.enableK2KClusterSync,
531522
AllowChaos: chaosOptions.allowed,
532523
ScalingIntegrationEnabled: operatorOptions.scalingIntegrationEnabled,
533-
ArangoImage: operatorOptions.arangoImage,
534524
SingleMode: operatorOptions.singleMode,
535525
Scope: scope,
536526
ReconciliationDelay: operatorOptions.reconciliationDelay,

manifests/arango-all.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -847,12 +847,6 @@ spec:
847847
valueFrom:
848848
fieldRef:
849849
fieldPath: status.podIP
850-
- name: RELATED_IMAGE_UBI
851-
value: "alpine:3.11"
852-
- name: RELATED_IMAGE_METRICSEXPORTER
853-
value: "arangodb/arangodb-exporter:0.1.7"
854-
- name: RELATED_IMAGE_DATABASE
855-
value: "arangodb/arangodb:latest"
856850
- name: ARANGOJOB_SA_NAME
857851
value: "arango-all-operator-job"
858852
ports:

manifests/arango-apps.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,6 @@ spec:
317317
valueFrom:
318318
fieldRef:
319319
fieldPath: status.podIP
320-
- name: RELATED_IMAGE_UBI
321-
value: "alpine:3.11"
322-
- name: RELATED_IMAGE_METRICSEXPORTER
323-
value: "arangodb/arangodb-exporter:0.1.7"
324-
- name: RELATED_IMAGE_DATABASE
325-
value: "arangodb/arangodb:latest"
326320
- name: ARANGOJOB_SA_NAME
327321
value: "arango-apps-operator-job"
328322
ports:

manifests/arango-backup.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,6 @@ spec:
265265
valueFrom:
266266
fieldRef:
267267
fieldPath: status.podIP
268-
- name: RELATED_IMAGE_UBI
269-
value: "alpine:3.11"
270-
- name: RELATED_IMAGE_METRICSEXPORTER
271-
value: "arangodb/arangodb-exporter:0.1.7"
272-
- name: RELATED_IMAGE_DATABASE
273-
value: "arangodb/arangodb:latest"
274268
ports:
275269
- name: metrics
276270
containerPort: 8528

manifests/arango-deployment-replication.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,6 @@ spec:
262262
valueFrom:
263263
fieldRef:
264264
fieldPath: status.podIP
265-
- name: RELATED_IMAGE_UBI
266-
value: "alpine:3.11"
267-
- name: RELATED_IMAGE_METRICSEXPORTER
268-
value: "arangodb/arangodb-exporter:0.1.7"
269-
- name: RELATED_IMAGE_DATABASE
270-
value: "arangodb/arangodb:latest"
271265
ports:
272266
- name: metrics
273267
containerPort: 8528

manifests/arango-deployment.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -315,12 +315,6 @@ spec:
315315
valueFrom:
316316
fieldRef:
317317
fieldPath: status.podIP
318-
- name: RELATED_IMAGE_UBI
319-
value: "alpine:3.11"
320-
- name: RELATED_IMAGE_METRICSEXPORTER
321-
value: "arangodb/arangodb-exporter:0.1.7"
322-
- name: RELATED_IMAGE_DATABASE
323-
value: "arangodb/arangodb:latest"
324318
ports:
325319
- name: metrics
326320
containerPort: 8528

manifests/arango-k2kclustersync.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,6 @@ spec:
262262
valueFrom:
263263
fieldRef:
264264
fieldPath: status.podIP
265-
- name: RELATED_IMAGE_UBI
266-
value: "alpine:3.11"
267-
- name: RELATED_IMAGE_METRICSEXPORTER
268-
value: "arangodb/arangodb-exporter:0.1.7"
269-
- name: RELATED_IMAGE_DATABASE
270-
value: "arangodb/arangodb:latest"
271265
ports:
272266
- name: metrics
273267
containerPort: 8528

0 commit comments

Comments
 (0)