Skip to content

Commit

Permalink
Merge pull request #98 from yjinjo/master
Browse files Browse the repository at this point in the history
Release Helm Chart 1.0.1
  • Loading branch information
yjinjo authored Dec 19, 2024
2 parents 6b41196 + ccedc0e commit e9f7d7d
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 33 deletions.
4 changes: 2 additions & 2 deletions deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
67 changes: 38 additions & 29 deletions deploy/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
6 changes: 4 additions & 2 deletions deploy/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ namespace: cloudforet
image:
name: cloudforet/cfctl
version: latest
pullPolicy: IfNotPresent

imagePullPolicy: IfNotPresent
replicas: 1

resources: {}
Expand All @@ -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:
Expand Down

0 comments on commit e9f7d7d

Please sign in to comment.