Skip to content

Commit

Permalink
fix(helm): multiples fixes in deployment mode
Browse files Browse the repository at this point in the history
  • Loading branch information
fredleger committed Apr 2, 2024
1 parent c5a81d1 commit d4397dd
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 10 deletions.
1 change: 1 addition & 0 deletions helm/chart/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*-local-values.yaml
1 change: 1 addition & 0 deletions helm/chart/.helmignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@
.idea/
*.tmproj
.vscode/
*-local-values.yaml
2 changes: 1 addition & 1 deletion helm/chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: chart
name: ovh-snapshoter
description: A Helm chart for ovh-snapshoter

# A chart can be either an 'application' or a 'library' chart.
Expand Down
8 changes: 8 additions & 0 deletions helm/chart/ci/autoscaling-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
deployment:
enabled: true
autoscaling:
enabled: true
minReplicas: 1
maxReplicas: 3
targetCPUUtilizationPercentage: 50
targetMemoryUtilizationPercentage: 50
2 changes: 2 additions & 0 deletions helm/chart/ci/deployment-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deployment:
enabled: true
2 changes: 2 additions & 0 deletions helm/chart/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
name: {{ include "chart.fullname" . }}
data:
{{- with .Values.config }}
CLEANUP: {{ .cleanup | default "false" | quote }}
DRY_RUN: {{ .dryRun | default "false" | quote }}
OS_AUTH_URL: {{ .osAuthUrl | quote }}
OS_IDENTITY_API_VERSION: {{ .osIdentityApiVersion | quote }}
OS_PROJECT_DOMAIN_NAME: {{ .osProjectDomainName | quote }}
Expand Down
8 changes: 4 additions & 4 deletions helm/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ spec:
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
configMapRef:
name: {{ include "chart.fullname" . }}
secretRef:
name: {{ include "chart.fullname" . }}
- configMapRef:
name: {{ include "chart.fullname" . }}
- secretRef:
name: {{ include "chart.fullname" . }}
command:
- tail
- -f
Expand Down
4 changes: 2 additions & 2 deletions helm/chart/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: {{ include "chart.fullname" . }}
type: Opaque
data:
OS_PASSWORD: {{ .Values.osPassword | default "password" | b64enc }}
OS_USERNAME: {{ .Values.osUsername | default "user" | b64enc }}
OS_PASSWORD: {{ .Values.config.osPassword | default "password" | b64enc }}
OS_USERNAME: {{ .Values.config.osUsername | default "user" | b64enc }}
8 changes: 5 additions & 3 deletions helm/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ replicaCount: 1

image:
registry: harbor.hoverkraft.cloud
repository: ovh-snapshoter
repository: ovh-snapshoter/app
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
Expand All @@ -16,6 +16,8 @@ nameOverride: ""
fullnameOverride: ""

config:
cleanup: "true"
dryRun: "false"
osAuthUrl: https://auth.cloud.ovh.net/v3
osIdentityApiVersion: 3
osPassword: ""
Expand Down Expand Up @@ -93,8 +95,8 @@ resources: {}
# cpu: 100m
# memory: 128Mi

# autoscaling:
# enabled: false
autoscaling:
enabled: false
# minReplicas: 1
# maxReplicas: 100
# targetCPUUtilizationPercentage: 80
Expand Down

0 comments on commit d4397dd

Please sign in to comment.