Skip to content

Commit 9888bee

Browse files
committed
chore(passport): canonical charts naming
1 parent 470371c commit 9888bee

8 files changed

Lines changed: 39 additions & 39 deletions

.drone/drone.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ steps:
117117
- name: generate chart
118118
commands:
119119
- IMAGE_TAG=$([ ! -z $DRONE_TAG ] && echo \"${DRONE_TAG:1}\" || echo \"canary\")
120-
- sed -i "s/image_tag:\ \"canary\"/image_tag:\ $IMAGE_TAG/g" charts/passport/values.yaml
120+
- sed -i "s/imageTag:\ \"canary\"/imageTag:\ $IMAGE_TAG/g" charts/passport/values.yaml
121121
- helm package charts/passport --version ${DRONE_TAG:-v1.0.0}
122122
- curl -u $CHARTMUSEUM_USERNAME:$CHARTMUSEUM_PASSWORD -F chart=@passport-${DRONE_TAG:-v1.0.0}.tgz "$CHARTMUSEUM_API/api/$([ -z $DRONE_TAG ] && echo testing || echo stable)/charts"
123123
environment:

charts/passport/templates/passport-certificate.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{{- if eq .Values.global.passport_location "on-cluster" }}
2-
{{- if .Values.global.cert_manager_enabled }}
1+
{{- if eq .Values.global.passportLocation "on-cluster" }}
2+
{{- if .Values.global.certManagerEnabled }}
33
apiVersion: cert-manager.io/v1
44
kind: Certificate
55
metadata:
@@ -10,7 +10,7 @@ spec:
1010
name: drycc-cluster-issuer
1111
kind: ClusterIssuer
1212
dnsNames:
13-
- drycc-passport.{{ .Values.global.platform_domain }}
13+
- drycc-passport.{{ .Values.global.platformDomain }}
1414
privateKey:
1515
rotationPolicy: Always
1616
{{- end }}

charts/passport/templates/passport-deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{{- if eq .Values.global.passport_location "on-cluster" }}
1+
{{- if eq .Values.global.passportLocation "on-cluster" }}
22
apiVersion: apps/v1
33
kind: Deployment
44
metadata:
55
name: drycc-passport
66
labels:
77
heritage: drycc
88
annotations:
9-
component.drycc.cc/version: {{ .Values.image_tag }}
9+
component.drycc.cc/version: {{ .Values.imageTag }}
1010
spec:
1111
replicas: {{ .Values.replicas }}
1212
strategy:
@@ -26,7 +26,7 @@ spec:
2626
initContainers:
2727
- name: drycc-passport-init
2828
image: docker.io/drycc/python-dev:latest
29-
imagePullPolicy: {{.Values.image_pull_policy}}
29+
imagePullPolicy: {{.Values.imagePullPolicy}}
3030
command:
3131
- netcat
3232
- -v
@@ -35,8 +35,8 @@ spec:
3535
{{- include "passport.envs" . | indent 8 }}
3636
containers:
3737
- name: drycc-passport
38-
image: {{.Values.image_registry}}/{{.Values.image_org}}/passport:{{.Values.image_tag}}
39-
imagePullPolicy: {{.Values.image_pull_policy}}
38+
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/passport:{{.Values.imageTag}}
39+
imagePullPolicy: {{.Values.imagePullPolicy}}
4040
livenessProbe:
4141
httpGet:
4242
path: /healthz
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if eq .Values.global.passport_location "on-cluster" }}
1+
{{- if eq .Values.global.passportLocation "on-cluster" }}
22
apiVersion: networking.k8s.io/v1
33
kind: Ingress
44
metadata:
@@ -10,16 +10,16 @@ metadata:
1010
heritage: "{{ .Release.Service }}"
1111
annotations:
1212
kubernetes.io/tls-acme: "true"
13-
{{- if not (eq .Values.global.ingress_class "") }}
14-
kubernetes.io/ingress.class: "{{ .Values.global.ingress_class }}"
13+
{{- if not (eq .Values.global.ingressClass "") }}
14+
kubernetes.io/ingress.class: "{{ .Values.global.ingressClass }}"
1515
{{ end }}
1616
spec:
1717
rules:
18-
- host: drycc-passport.{{ .Values.global.platform_domain }}
18+
- host: drycc-passport.{{ .Values.global.platformDomain }}
1919
http:
2020
paths:
2121
- pathType: Prefix
22-
{{- if eq .Values.global.ingress_class "gce" "alb" }}
22+
{{- if eq .Values.global.ingressClass "gce" "alb" }}
2323
path: /*
2424
{{- else }}{{/* Has annotations but ingress class is not "gce" nor "alb" */}}
2525
path: /
@@ -29,10 +29,10 @@ spec:
2929
name: drycc-passport
3030
port:
3131
number: 80
32-
{{ if .Values.global.cert_manager_enabled }}
32+
{{ if .Values.global.certManagerEnabled }}
3333
tls:
3434
- secretName: drycc-passport-certificate-auto
3535
hosts:
36-
- drycc-passport.{{ .Values.global.platform_domain }}
36+
- drycc-passport.{{ .Values.global.platformDomain }}
3737
{{- end }}
3838
{{- end }}

charts/passport/templates/passport-secret-creds.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if eq .Values.global.passport_location "on-cluster" }}
1+
{{- if eq .Values.global.passportLocation "on-cluster" }}
22
apiVersion: v1
33
kind: Secret
44
metadata:
@@ -8,13 +8,13 @@ metadata:
88
annotations:
99
"helm.sh/hook": pre-install
1010
data:
11-
{{- if (.Values.database_url) }}
12-
database-url: {{ .Values.database_url | b64enc }}
11+
{{- if (.Values.databaseUrl) }}
12+
database-url: {{ .Values.databaseUrl | b64enc }}
1313
{{- end }}
1414
django-secret-key: {{ randAscii 64 | b64enc }}
1515
social-auth-drycc-controller-key: {{ randAlphaNum 40 | b64enc }}
1616
social-auth-drycc-controller-secret: {{ randAlphaNum 64 | b64enc }}
17-
{{- if eq .Values.global.grafana_location "on-cluster" }}
17+
{{- if eq .Values.global.grafanaLocation "on-cluster" }}
1818
social-auth-drycc-grafana-key: {{ randAlphaNum 40 | b64enc }}
1919
social-auth-drycc-grafana-secret: {{ randAlphaNum 64 | b64enc }}
2020
{{- end }}

charts/passport/templates/passport-service-account.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if eq .Values.global.passport_location "on-cluster" }}
1+
{{- if eq .Values.global.passportLocation "on-cluster" }}
22
apiVersion: v1
33
kind: ServiceAccount
44
metadata:

charts/passport/templates/passport-service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if eq .Values.global.passport_location "on-cluster" }}
1+
{{- if eq .Values.global.passportLocation "on-cluster" }}
22
apiVersion: v1
33
kind: Service
44
metadata:

charts/passport/values.yaml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
image_org: "drycc"
2-
image_pull_policy: "Always"
3-
image_tag: "canary"
4-
image_registry: "docker.io"
1+
imageOrg: "drycc"
2+
imagePullPolicy: "Always"
3+
imageTag: "canary"
4+
imageRegistry: "docker.io"
55
# Set passport deployment replicas
66
replicas: 1
7-
# limits_cpu: "100m"
8-
# limits_memory: "50Mi"
7+
# limitsCpu: "100m"
8+
# limitsMemory: "50Mi"
99
## Configuring this will no longer use the built-in database component
10-
database_url: ""
10+
databaseUrl: ""
1111
# Any custom controller environment variables
1212
# can be specified as key-value pairs under environment
1313
# this is usually a non required setting.
@@ -42,9 +42,9 @@ environment:
4242
# EMAIL_USE_TLS: ""
4343
# EMAIL_USE_SSL: ""
4444
# Used to create Django admin users
45-
admin_username: "admin"
46-
admin_password: "admin"
47-
admin_email: "admin@email.com"
45+
adminUsername: "admin"
46+
adminPassword: "admin"
47+
adminEmail: "admin@email.com"
4848

4949
redis:
5050
replicas: 1
@@ -55,7 +55,7 @@ global:
5555
# Valid values are:
5656
# - on-cluster: Run Grafana within the Kubernetes cluster
5757
# - off-cluster: Grafana is running outside of the cluster
58-
grafana_location: "on-cluster"
58+
grafanaLocation: "on-cluster"
5959

6060
# Admin email, used for each component to send email to administrator
6161
email: "drycc@drycc.cc"
@@ -66,19 +66,19 @@ global:
6666
# automatically; backups are sent to object storage
6767
# configured above)
6868
# - off-cluster: Run PostgreSQL outside the Kubernetes cluster (configure in database section)
69-
database_location: "on-cluster"
69+
databaseLocation: "on-cluster"
7070

7171
# Please check `kubernetes.io/ingress.class`
72-
ingress_class: ""
72+
ingressClass: ""
7373
# A domain name consists of one or more parts.
7474
# Periods (.) are used to separate these parts.
7575
# Each part must be 1 to 63 characters in length and can contain lowercase letters, digits, and hyphens (-).
7676
# It must start and end with a lowercase letter or digit.
77-
cluster_domain: "cluster.local"
77+
clusterDomain: "cluster.local"
7878
# The public resolvable hostname to build your cluster with.
7979
#
8080
# This will be the hostname that is used to build endpoints such as "drycc.$HOSTNAME"
81-
platform_domain: ""
81+
platformDomain: ""
8282
# Whether cert_passport is enabled to automatically generate passport certificates
83-
cert_manager_enabled: true
84-
passport_location: "on-cluster"
83+
certManagerEnabled: true
84+
passportLocation: "on-cluster"

0 commit comments

Comments
 (0)