From af711e451ea2c6c2e16f0a2926856bbbbde3e433 Mon Sep 17 00:00:00 2001 From: Sarah Roberts Date: Mon, 3 Jun 2024 23:16:50 -0700 Subject: [PATCH] removed the nats-configurator init container --- k8s/app-exposer.yml | 174 +++++++++++++++++++++----------------------- 1 file changed, 81 insertions(+), 93 deletions(-) diff --git a/k8s/app-exposer.yml b/k8s/app-exposer.yml index d7cb56c..fbd76b7 100644 --- a/k8s/app-exposer.yml +++ b/k8s/app-exposer.yml @@ -17,13 +17,13 @@ spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - - labelSelector: - matchExpressions: - - key: de-app - operator: In - values: - - app-exposer - topologyKey: kubernetes.io/hostname + - labelSelector: + matchExpressions: + - key: de-app + operator: In + values: + - app-exposer + topologyKey: kubernetes.io/hostname restartPolicy: Always volumes: - name: localtime @@ -47,92 +47,81 @@ spec: - name: nats-services-creds secret: secretName: nats-services-creds - - name: nats-configuration - emptyDir: {} - initContainers: - - name: nats-configurator - image: harbor.cyverse.org/de/nats-configurator - env: - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - volumeMounts: - - name: nats-configuration - mountPath: /etc/cyverse/de/env containers: - - name: app-exposer - image: harbor.cyverse.org/de/app-exposer - resources: - requests: - cpu: "1m" - memory: "128Mi" - limits: - cpu: "100m" - memory: "256Mi" - args: - - --namespace - - "$(APP_EXPOSER_NAMESPACE)" - - --user-suffix - - "@$(USER_SUFFIX)" - - --log-level - - debug - env: - - name: APP_EXPOSER_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: CLUSTER - value: "1" - - name: USER_SUFFIX - valueFrom: - secretKeyRef: - name: configs - key: USER_SUFFIX - - name: OTEL_TRACES_EXPORTER - valueFrom: - secretKeyRef: - name: configs - key: OTEL_TRACES_EXPORTER - - name: OTEL_EXPORTER_JAEGER_ENDPOINT - valueFrom: - secretKeyRef: - name: configs - key: OTEL_EXPORTER_JAEGER_HTTP_ENDPOINT - ports: - - name: listen-port - containerPort: 60000 - volumeMounts: - - name: localtime - mountPath: /etc/localtime - readOnly: true - - name: timezone - mountPath: /etc/timezone - subPath: timezone - - name: service-configs - mountPath: /etc/cyverse/de/configs - readOnly: true - - name: nats-client-tls - mountPath: /etc/nats/tls - readOnly: true - - name: nats-services-creds - mountPath: /etc/nats/creds - readOnly: true - - name: nats-configuration - mountPath: /etc/cyverse/de/env - readOnly: true - livenessProbe: - httpGet: - path: / - port: 60000 - initialDelaySeconds: 5 - periodSeconds: 5 - readinessProbe: - httpGet: - path: / - port: 60000 - initialDelaySeconds: 5 - periodSeconds: 5 + - name: app-exposer + image: harbor.cyverse.org/de/app-exposer + resources: + requests: + cpu: "1m" + memory: "128Mi" + limits: + cpu: "100m" + memory: "256Mi" + args: + - --namespace + - "$(APP_EXPOSER_NAMESPACE)" + - --user-suffix + - "@$(USER_SUFFIX)" + - --log-level + - debug + env: + - name: APP_EXPOSER_NAMESPACE + valueFrom: + fieldRef: + fieldPath: metadata.namespace + - name: CLUSTER + value: "1" + - name: USER_SUFFIX + valueFrom: + secretKeyRef: + name: configs + key: USER_SUFFIX + - name: OTEL_TRACES_EXPORTER + valueFrom: + secretKeyRef: + name: configs + key: OTEL_TRACES_EXPORTER + - name: OTEL_EXPORTER_JAEGER_ENDPOINT + valueFrom: + secretKeyRef: + name: configs + key: OTEL_EXPORTER_JAEGER_HTTP_ENDPOINT + - name: DISCOENV_NATS_CLUSTER + valueFrom: + secretKeyRef: + name: configs + key: NATS_URLS + ports: + - name: listen-port + containerPort: 60000 + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: timezone + mountPath: /etc/timezone + subPath: timezone + - name: service-configs + mountPath: /etc/cyverse/de/configs + readOnly: true + - name: nats-client-tls + mountPath: /etc/nats/tls + readOnly: true + - name: nats-services-creds + mountPath: /etc/nats/creds + readOnly: true + livenessProbe: + httpGet: + path: / + port: 60000 + initialDelaySeconds: 5 + periodSeconds: 5 + readinessProbe: + httpGet: + path: / + port: 60000 + initialDelaySeconds: 5 + periodSeconds: 5 --- apiVersion: v1 kind: Service @@ -165,4 +154,3 @@ spec: # - POST # - http://app-exposer/vice/apply-labels # restartPolicy: OnFailure -