Skip to content

Commit

Permalink
helm: generate new chart
Browse files Browse the repository at this point in the history
This commit is a breaking change due to values.yaml changed
  • Loading branch information
giautm committed Nov 28, 2023
1 parent beae9d7 commit ed2186a
Show file tree
Hide file tree
Showing 8 changed files with 778 additions and 99 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ $(HELMIFY): $(LOCALBIN)

.PHONY: helm
helm: manifests kustomize license helmify
$(KUSTOMIZE) build config/helm | $(HELMIFY) -crd-dir charts/atlas-operator
$(KUSTOMIZE) build config/helm | $(HELMIFY) -crd-dir -generate-defaults -image-pull-secrets charts/atlas-operator

.PHONY: cli-gen
cli-gen: generate manifests helm license
345 changes: 345 additions & 0 deletions charts/atlas-operator/crds/atlasmigration-crd.yaml

Large diffs are not rendered by default.

378 changes: 378 additions & 0 deletions charts/atlas-operator/crds/atlasschema-crd.yaml

Large diffs are not rendered by default.

51 changes: 18 additions & 33 deletions charts/atlas-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "atlas-operator.fullname" . }}
name: {{ include "atlas-operator.fullname" . }}-controller-manager
labels:
app.kubernetes.io/component: manager
app.kubernetes.io/created-by: atlas-operator
app.kubernetes.io/part-of: atlas-operator
control-plane: controller-manager
{{- include "atlas-operator.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
replicas: {{ .Values.controllerManager.replicas }}
selector:
matchLabels:
control-plane: controller-manager
Expand All @@ -19,15 +19,18 @@ spec:
labels:
control-plane: controller-manager
{{- include "atlas-operator.selectorLabels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
kubectl.kubernetes.io/default-container: manager
{{- end }}
spec:
containers:
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
- args: {{- toYaml .Values.controllerManager.manager.args | nindent 8 }}
command:
- /manager
env:
- name: KUBERNETES_CLUSTER_DOMAIN
value: {{ quote .Values.kubernetesClusterDomain }}
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag
| default .Chart.AppVersion }}
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -41,30 +44,12 @@ spec:
port: 8081
initialDelaySeconds: 5
periodSeconds: 10
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.containerSecurityContext | nindent 12 }}
env:
- name: PREWARM_DEVDB
value: "{{ .Values.prewarmDevDB }}"
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10
}}
securityContext: {{- toYaml .Values.controllerManager.manager.containerSecurityContext
| nindent 10 }}
imagePullSecrets: {{ .Values.imagePullSecrets | default list | toJson }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
serviceAccountName: {{ include "atlas-operator.serviceAccountName" . }}
terminationGracePeriodSeconds: 10
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
runAsNonRoot: true
serviceAccountName: {{ include "atlas-operator.fullname" . }}-controller-manager
terminationGracePeriodSeconds: 10
12 changes: 5 additions & 7 deletions charts/atlas-operator/templates/leader-election-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "atlas-operator.leaderElectionRole" . }}
name: {{ include "atlas-operator.fullname" . }}-leader-election-role
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: atlas-operator
Expand Down Expand Up @@ -44,7 +43,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "atlas-operator.leaderElectionRole" . }}-binding
name: {{ include "atlas-operator.fullname" . }}-leader-election-rolebinding
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: atlas-operator
Expand All @@ -53,9 +52,8 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: '{{ include "atlas-operator.leaderElectionRole" . }}'
name: '{{ include "atlas-operator.fullname" . }}-leader-election-role'
subjects:
- kind: ServiceAccount
name: '{{ include "atlas-operator.serviceAccountName" . }}'
namespace: '{{ .Release.Namespace }}'
{{- end }}
name: '{{ include "atlas-operator.fullname" . }}-controller-manager'
namespace: '{{ .Release.Namespace }}'
12 changes: 5 additions & 7 deletions charts/atlas-operator/templates/manager-rbac.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "atlas-operator.managerRoleName" . }}
name: {{ include "atlas-operator.fullname" . }}-manager-role
labels:
{{- include "atlas-operator.labels" . | nindent 4 }}
rules:
Expand Down Expand Up @@ -100,7 +99,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "atlas-operator.managerRoleName" . }}-binding
name: {{ include "atlas-operator.fullname" . }}-manager-rolebinding
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: atlas-operator
Expand All @@ -109,9 +108,8 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: '{{ include "atlas-operator.managerRoleName" . }}'
name: '{{ include "atlas-operator.fullname" . }}-manager-role'
subjects:
- kind: ServiceAccount
name: '{{ include "atlas-operator.serviceAccountName" . }}'
namespace: '{{ .Release.Namespace }}'
{{- end }}
name: '{{ include "atlas-operator.fullname" . }}-controller-manager'
namespace: '{{ .Release.Namespace }}'
8 changes: 2 additions & 6 deletions charts/atlas-operator/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "atlas-operator.serviceAccountName" . }}
name: {{ include "atlas-operator.fullname" . }}-controller-manager
labels:
app.kubernetes.io/component: rbac
app.kubernetes.io/created-by: atlas-operator
app.kubernetes.io/part-of: atlas-operator
{{- include "atlas-operator.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
{{- toYaml .Values.controllerManager.serviceAccount.annotations | nindent 4 }}
69 changes: 24 additions & 45 deletions charts/atlas-operator/values.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,25 @@
# Default values for atlas-operator.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: arigaio/atlas-operator
pullPolicy: IfNotPresent
tag: ""

rbac:
create: true

controllerManager:
manager:
args:
- --leader-elect
containerSecurityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
runAsUser: 1000
image:
repository: arigaio/atlas-operator
tag: latest
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 10m
memory: 64Mi
replicas: 1
serviceAccount:
annotations: {}
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
create: true
annotations: {}
name: ""

podAnnotations: {}

podSecurityContext:
runAsNonRoot: true

securityContext:
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL

resources: {}

nodeSelector: {}

tolerations: []

affinity: {}

# By default, the operator will recreate devdb pods after migration
# Set this to true to keep the devdb pods around.
prewarmDevDB: true
kubernetesClusterDomain: cluster.local

0 comments on commit ed2186a

Please sign in to comment.