Skip to content

Commit

Permalink
fix: update common chart version to 0.2.10 and refactor deployment en…
Browse files Browse the repository at this point in the history
…vironment variables

On-behalf-of: @SAP angel.kafazov@sap.com
Signed-off-by: Angel Kafazov <akafazov@cst-bg.net>
  • Loading branch information
akafazov committed Feb 12, 2025
1 parent f7ecab7 commit a1d5b74
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 83 deletions.
Binary file modified charts/account-operator/charts/common-0.2.8.tgz
Binary file not shown.
8 changes: 3 additions & 5 deletions charts/common/templates/_deploymentHelpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ ports:
{{- end}}

{{- define "common.sentry" }}
{{- if and (hasKey .Values "global") (hasKey .Values.global "sentry") (hasKey .Values.global.sentry "enabled") (eq .Values.global.sentry.enabled true) }}
{{- if eq (include "common.getKeyValue" (dict "Values" .Values "key" "global.sentry.enabled")) "true" -}}
- name: REGION
value: {{ .Values.region }}
- name: ENVIRONMENT
value: {{ .Values.environment }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.sentry.environment | default .Values.environment }}
- name: IMAGE_TAG
value: "{{ .Values.image.tag }}"
value: "{{ .Chart.AppVersion }}"
- name: IMAGE_NAME
value: "{{ .Values.image.name }}"
{{- end }}
Expand All @@ -60,9 +60,7 @@ ports:
{{- define "common.basicEnvironment" }}
- name: LOG_LEVEL
value: {{ (.Values.log).level | default "info" }}
{{- include "common.sentry" . }}
- name: DIRECTIVES_AUTHORIZATION_ENABLED
value: "{{ ((.Values.directives).authorization).enabled | default false }}"
{{ include "common.sentry" . }}
{{- end }}
{{- define "common.basicService" }}
- name: PORT
Expand Down
Binary file modified charts/common/test-chart/charts/common-0.2.10.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions charts/common/test-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ spec:
spec:
{{ include "common.container.securityContext" . | nindent 6 }}
containers:
image: {{ include "common.image" . }}
- image: {{ include "common.image" . }}
imagePullPolicy: {{ include "common.imagePullPolicy" . }}
name: manager
ports:
{{ include "common.PortsMetricsHealth" . | nindent 10 }}
{{ include "common.operatorHealthAndReadyness" . | nindent 10 }}
{{ include "common.resources" . | nindent 10 }}
env:
{{- include "common.basicEnvironment" . | nindent 10 }}
{{- include "common.basicEnvironment" . | nindent 12 }}
terminationGracePeriodSeconds: {{ include "common.terminationGracePeriodSeconds" .}}
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,6 @@ test name override:
env:
- name: LOG_LEVEL
value: info
- name: DIRECTIVES_AUTHORIZATION_ENABLED
value: "false"
image: my-image:0.1.0
imagePullPolicy: IfNotPresent
livenessProbe:
failureThreshold: 1
httpGet:
path: /healthz
port: 8081
periodSeconds: 10
name: manager
ports:
- containerPort: 8080
name: metrics
protocol: TCP
- containerPort: 8081
name: health-port
protocol: TCP
readinessProbe:
httpGet:
path: /readyz
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
cpu: 100m
memory: 512Mi
requests:
cpu: 40m
memory: 50Mi
startupProbe:
failureThreshold: 30
httpGet:
path: /readyz
port: 8081
periodSeconds: 10
securityContext:
readOnlyRootFilesystem: true
runAsNonRoot: true
seccompProfile:
type: RuntimeDefault
terminationGracePeriodSeconds: 10
test sentry enabled:
1: |
apiVersion: apps/v1
kind: Deployment
metadata:
name: RELEASE-NAME-test-chart
spec:
revisionHistoryLimit: 3
selector:
matchLabels:
service: RELEASE-NAME-test-chart
template:
spec:
containers:
env:
- name: LOG_LEVEL
value: info
- name: REGION
value: null
- name: ENVIRONMENT
value: test
- name: SENTRY_ENVIRONMENT
value: test
- name: IMAGE_TAG
value: ""
- name: IMAGE_NAME
value: my-image
- name: DIRECTIVES_AUTHORIZATION_ENABLED
value: "false"
image: my-image:0.1.0
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down Expand Up @@ -145,8 +73,6 @@ test tag default:
env:
- name: LOG_LEVEL
value: info
- name: DIRECTIVES_AUTHORIZATION_ENABLED
value: "false"
image: test-chart:0.1.0
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down Expand Up @@ -205,8 +131,6 @@ test tag override:
env:
- name: LOG_LEVEL
value: info
- name: DIRECTIVES_AUTHORIZATION_ENABLED
value: "false"
image: test-chart:1.0.0
imagePullPolicy: IfNotPresent
livenessProbe:
Expand Down

0 comments on commit a1d5b74

Please sign in to comment.