From ccedc0eb008004eb69c4cedd556fef4de1e86569 Mon Sep 17 00:00:00 2001 From: Youngjin Jo Date: Thu, 19 Dec 2024 14:26:38 +0900 Subject: [PATCH] build: release 1.0.1 Signed-off-by: Youngjin Jo --- deploy/helm/Chart.yaml | 4 +- deploy/helm/templates/deployment.yaml | 67 +++++++++++++++------------ deploy/helm/values.yaml | 6 ++- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/deploy/helm/Chart.yaml b/deploy/helm/Chart.yaml index 34cd426..cd1ee09 100644 --- a/deploy/helm/Chart.yaml +++ b/deploy/helm/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: cfctl description: A cfctl chart for Kubernetes type: application -version: 1.0.0 -appVersion: 1.0.7 +version: 1.0.1 +appVersion: 1.x.y diff --git a/deploy/helm/templates/deployment.yaml b/deploy/helm/templates/deployment.yaml index 0c34dad..c9b80ce 100644 --- a/deploy/helm/templates/deployment.yaml +++ b/deploy/helm/templates/deployment.yaml @@ -3,55 +3,64 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Values.name }} - namespace: {{ .Values.namespace | default .Release.Namespace }} labels: - {{- include "cfctl.labels" . | nindent 4 }} + spaceone.service: {{ .Values.name }} + name: {{ .Values.name }} + namespace: {{ .Values.global.namespace | default .Release.Namespace }} spec: replicas: {{ .Values.replicas }} + revisionHistoryLimit: 3 selector: matchLabels: - {{- include "cfctl.selectorLabels" . | nindent 6 }} + spaceone.service: {{ .Values.name }} template: metadata: + annotations: + spaceone.deployment.tool: helm labels: - {{- include "cfctl.selectorLabels" . | nindent 8 }} +{{ include "spaceone.labels" . | indent 8 }} + spaceone.service: {{ .Values.name }} spec: +{{- if .Values.serviceAccountName }} + serviceAccountName: {{ .Values.serviceAccountName }} +{{- end }} + terminationGracePeriodSeconds: {{ .Values.gracePeriod }} +{{- if .Values.imagePullSecrets}} {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - securityContext: - {{- toYaml .Values.securityContext | nindent 8 }} +{{- end}} containers: - name: {{ .Values.name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - volumeMounts: - - name: config - mountPath: {{ .Values.configPath }} - - name: data - mountPath: /data + image: {{ .Values.image.name }}:{{ .Values.image.version }} + imagePullPolicy: {{ .Values.imagePullPolicy }} +{{- if .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.env }} + {{- toYaml .Values.resources | nindent 12 }} +{{- end }} +{{- if .Values.env }} env: - {{- toYaml . | nindent 12 }} - {{- end }} +{{- toYaml .Values.env | nindent 12 }} +{{- end }} + volumeMounts: + - name: cfctl-data + mountPath: /root/.spaceone/ + - name: environment-conf + mountPath: /root/default.yaml + subPath: default.yaml + readOnly: true volumes: - - name: config + - name: environment-conf configMap: - name: {{ .Values.name }}-config - - name: data - {{- if .Values.persistence.enabled }} + name: {{ .Values.name }}-environment-conf +{{ if .Values.pvc.storageClassName }} + - name: cfctl-data persistentVolumeClaim: - claimName: {{ .Values.name }}-data - {{- else }} + claimName: {{ .Release.Namespace }}-cfctl-pvc +{{ else }} + - name: cfctl-data emptyDir: {} - {{- end }} +{{- end }} {{- end }} diff --git a/deploy/helm/values.yaml b/deploy/helm/values.yaml index 4e75015..f0f28fb 100644 --- a/deploy/helm/values.yaml +++ b/deploy/helm/values.yaml @@ -5,8 +5,7 @@ namespace: cloudforet image: name: cloudforet/cfctl version: latest - pullPolicy: IfNotPresent - +imagePullPolicy: IfNotPresent replicas: 1 resources: {} @@ -26,6 +25,9 @@ resources: {} # - name: key # value: value +pod: + spec: {} + pvc: storageClassName: null # You must specify a storage class name. Otherwise, the cfctl pod will use empty volume. accessModes: