Align rallly chart with repo conventions (batch 3)
- Rename the Deployment (and its labels/selector/pod template/container)
to {{ .Release.Name }}-{{ .Chart.Name }}-deployment per the naming
scheme; the Service selector follows.
- Move the hardcoded pod/container security contexts into values
(rallly.securityContext.pod / .container), defaults unchanged; the
bogus null entry under capabilities.add becomes an empty list.
- Ingress standard: ingress.className value (default nginx) and
ingress.annotations merged with the cert-manager annotation;
domain/clusterIssuer stay required, TLS secret name already conformed.
- Add the tpl-rendered rallly.env value (value/secretKeyRef/
configMapKeyRef forms), appended to the built-in env.
- Major bump 3.1.2+up4.12.3 -> 4.0.0+up4.12.3 (deployment rename
replaces the Deployment on upgrade: selector is immutable).
This commit is contained in:
5 files changed
+58
-23
No files matched your search
+1
-1
@@ -5,7 +5,7 @@ icon: https://raw.githubusercontent.com/lukevella/rallly/main/apps/landing/publi
|
|||||||
|
|
||||||
type: application
|
type: application
|
||||||
|
|
||||||
version: 3.1.2+up4.12.3
|
version: 4.0.0+up4.12.3
|
||||||
appVersion: "4.12.3"
|
appVersion: "4.12.3"
|
||||||
|
|
||||||
maintainers:
|
maintainers:
|
||||||
|
|||||||
@@ -1,29 +1,25 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Release.Name }}-{{ .Chart.Name }}
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Release.Name }}-{{ .Chart.Name }}
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
spec:
|
spec:
|
||||||
replicas: {{ include "rallly.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.rallly.replicas) }}
|
replicas: {{ include "rallly.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.rallly.replicas) }}
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: {{ .Release.Name }}-{{ .Chart.Name }}
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ .Release.Name }}-{{ .Chart.Name }}
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
labels:
|
labels:
|
||||||
app: {{ .Release.Name }}-{{ .Chart.Name }}
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
spec:
|
spec:
|
||||||
automountServiceAccountToken: false
|
automountServiceAccountToken: false
|
||||||
securityContext:
|
securityContext:
|
||||||
runAsNonRoot: true
|
{{- toYaml .Values.rallly.securityContext.pod | nindent 8 }}
|
||||||
runAsUser: 20000
|
|
||||||
runAsGroup: 1000
|
|
||||||
fsGroup: 1000
|
|
||||||
fsGroupChangePolicy: Always
|
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Release.Name }}-{{ .Chart.Name }}
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
image: "lukevella/rallly:{{ .Chart.AppVersion }}"
|
image: "lukevella/rallly:{{ .Chart.AppVersion }}"
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
env:
|
env:
|
||||||
@@ -120,6 +116,26 @@ spec:
|
|||||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-database-secret
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-database-secret
|
||||||
key: database-url
|
key: database-url
|
||||||
# TODO: Add Storage Configuration
|
# TODO: Add Storage Configuration
|
||||||
|
{{- range $value := .Values.rallly.env }}
|
||||||
|
{{- if $value.value }}
|
||||||
|
- name: {{ $value.name }}
|
||||||
|
value: {{ tpl $value.value $ }}
|
||||||
|
{{- else if $value.valueFrom }}
|
||||||
|
{{- if $value.valueFrom.secretKeyRef }}
|
||||||
|
- name: {{ $value.name }}
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: {{ tpl $value.valueFrom.secretKeyRef.name $ }}
|
||||||
|
key: {{ tpl $value.valueFrom.secretKeyRef.key $ }}
|
||||||
|
{{- else if $value.valueFrom.configMapKeyRef }}
|
||||||
|
- name: {{ $value.name }}
|
||||||
|
valueFrom:
|
||||||
|
configMapKeyRef:
|
||||||
|
name: {{ tpl $value.valueFrom.configMapKeyRef.name $ }}
|
||||||
|
key: {{ tpl $value.valueFrom.configMapKeyRef.key $ }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
@@ -133,12 +149,5 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
{{- include "rallly.resources" .Values.rallly.resources | nindent 12 }}
|
{{- include "rallly.resources" .Values.rallly.resources | nindent 12 }}
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
{{- toYaml .Values.rallly.securityContext.container | nindent 12 }}
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
runAsNonRoot: true
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
add:
|
|
||||||
-
|
|
||||||
restartPolicy: Always
|
restartPolicy: Always
|
||||||
@@ -3,9 +3,12 @@ kind: Ingress
|
|||||||
metadata:
|
metadata:
|
||||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-ingress
|
||||||
annotations:
|
annotations:
|
||||||
cert-manager.io/cluster-issuer: {{ required "A Cluster-Issuer must be provided" .Values.ingress.clusterIssuer}}
|
cert-manager.io/cluster-issuer: {{ required "A Cluster-Issuer must be provided" .Values.ingress.clusterIssuer }}
|
||||||
|
{{- with .Values.ingress.annotations }}
|
||||||
|
{{- toYaml . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: {{ .Values.ingress.className }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
- host: {{ required "A Domain/Host must be provided" .Values.ingress.domain }}
|
||||||
http:
|
http:
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ metadata:
|
|||||||
name: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: {{ .Release.Name }}-{{ .Chart.Name }}
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-deployment
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
|
|||||||
@@ -23,6 +23,25 @@ rallly:
|
|||||||
pictureClaimPath: 'picture'
|
pictureClaimPath: 'picture'
|
||||||
emailClaimPath: 'email'
|
emailClaimPath: 'email'
|
||||||
nameClaimPath: 'name'
|
nameClaimPath: 'name'
|
||||||
|
securityContext:
|
||||||
|
pod:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 20000
|
||||||
|
runAsGroup: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
fsGroupChangePolicy: Always
|
||||||
|
container:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
runAsNonRoot: true
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
add: []
|
||||||
|
# Extra environment variables, appended to the ones the chart always sets.
|
||||||
|
# Values are rendered through tpl; value, secretKeyRef and configMapKeyRef
|
||||||
|
# forms are supported.
|
||||||
|
env: []
|
||||||
resources:
|
resources:
|
||||||
# Limits are optional: memory and ephemeral-storage limits default to
|
# Limits are optional: memory and ephemeral-storage limits default to
|
||||||
# limitFactor x the request, an explicitly set limit always wins, and a
|
# limitFactor x the request, an explicitly set limit always wins, and a
|
||||||
@@ -59,3 +78,7 @@ rallly:
|
|||||||
ingress:
|
ingress:
|
||||||
clusterIssuer: null
|
clusterIssuer: null
|
||||||
domain: null
|
domain: null
|
||||||
|
className: nginx
|
||||||
|
# Extra annotations for the Ingress; merged with the cert-manager
|
||||||
|
# cluster-issuer annotation the chart always sets.
|
||||||
|
annotations: {}
|
||||||
Reference in new issue
Block a user