Skip to content

Commit 9232dac

Browse files
committed
fix: add default values for config.signInUrl
1 parent 1cfe52f commit 9232dac

File tree

2 files changed

+27
-100
lines changed

2 files changed

+27
-100
lines changed

chart/templates/custom-errors.yaml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,69 @@
1-
{{- if .Values.customErrors }}
21
apiVersion: networking.k8s.io/v1
32
kind: Ingress
43
metadata:
5-
name: {{ .Values.customErrorsName }}
4+
name: {{ .Release.Name }}
5+
labels:
6+
app: {{ .Release.Name }}
67
spec:
7-
ingressClassName: '{{ index .Values "oauth2-proxy" "ingress" "ingressClassName" }}'
8+
ingressClassName: {{ .Values.ingress.className }}
89
tls:
910
- hosts:
10-
- '{{ index .Values "oauth2-proxy" "ingress" "hostname" }}'
11+
- '{{ .Values.ingress.hostname }}'
1112
secretName: ndslabs-tls
1213
rules:
13-
- host: '{{ index .Values "oauth2-proxy" "ingress" "hostname" }}'
14+
- host: '{{ .Values.ingress.hostname }}'
1415
http:
1516
paths:
1617
- path: /401.html
1718
pathType: Prefix
1819
backend:
1920
service:
20-
name: {{ .Values.customErrorsName }}
21+
name: {{ .Release.Name }}
2122
port:
2223
number: 80
2324
- path: /env.js
2425
pathType: Prefix
2526
backend:
2627
service:
27-
name: {{ .Values.customErrorsName }}
28+
name: {{ .Release.Name }}
2829
port:
2930
number: 80
3031
---
3132
apiVersion: v1
3233
kind: Service
3334
metadata:
34-
name: {{ .Values.customErrorsName }}
35+
name: {{ .Release.Name }}
3536
spec:
37+
type: {{ .Values.service.type }}
3638
selector:
37-
app: {{ .Values.customErrorsName }}
39+
app: {{ .Release.Name }}
3840
ports:
3941
- protocol: TCP
40-
port: 80
42+
port: {{ .Values.service.port }}
4143
targetPort: 80
4244
---
4345
apiVersion: apps/v1
4446
kind: Deployment
4547
metadata:
46-
name: {{ .Values.customErrorsName }}
48+
name: {{ .Release.Name }}
4749
labels:
48-
app: {{ .Values.customErrorsName }}
50+
app: {{ .Release.Name }}
4951
spec:
50-
replicas: 1
52+
replicas: {{ .Values.replicaCount }}
5153
selector:
5254
matchLabels:
53-
app: {{ .Values.customErrorsName }}
55+
app: {{ .Release.Name }}
5456
template:
5557
metadata:
5658
labels:
57-
app: {{ .Values.customErrorsName }}
59+
app: {{ .Release.Name }}
5860
spec:
5961
containers:
6062
- name: nginx
61-
image: moleculemaker/custom-errors
62-
imagePullPolicy: Always
63+
image: {{ .Values.image.repository }}
64+
imagePullPolicy: {{ .Values.image.pullPolicy }}
6365
env:
6466
- name: SIGN_IN_URL
65-
value: {{ .Values.customErrorsSignInUrl }}
67+
value: {{ .Values.config.signInUrl }}
6668
ports:
6769
- containerPort: 80
68-
{{- end }}

chart/values.yaml

Lines changed: 7 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -4,95 +4,21 @@
44

55
replicaCount: 1
66

7+
config:
8+
# URL where we should route user to sign in (e.g. /oauth2/start?rd=<redirect-url>)
9+
signInUrl: ""
10+
711
image:
812
repository: ndslabs/custom-errors
913
pullPolicy: IfNotPresent
10-
# Overrides the image tag whose default is the chart appVersion.
11-
tag: ""
12-
13-
imagePullSecrets: []
14-
nameOverride: ""
15-
fullnameOverride: ""
16-
17-
serviceAccount:
18-
# Specifies whether a service account should be created
19-
create: true
20-
# Automatically mount a ServiceAccount's API credentials?
21-
automount: true
22-
# Annotations to add to the service account
23-
annotations: {}
24-
# The name of the service account to use.
25-
# If not set and create is true, a name is generated using the fullname template
26-
name: ""
27-
28-
podAnnotations: {}
29-
podLabels: {}
30-
31-
podSecurityContext: {}
32-
# fsGroup: 2000
33-
34-
securityContext: {}
35-
# capabilities:
36-
# drop:
37-
# - ALL
38-
# readOnlyRootFilesystem: true
39-
# runAsNonRoot: true
40-
# runAsUser: 1000
4114

4215
service:
4316
type: ClusterIP
4417
port: 80
4518

4619
ingress:
47-
enabled: false
4820
className: ""
49-
annotations: {}
50-
# kubernetes.io/ingress.class: nginx
51-
# kubernetes.io/tls-acme: "true"
52-
hosts:
53-
- host: chart-example.local
54-
paths:
55-
- path: /
56-
pathType: ImplementationSpecific
57-
tls: []
58-
# - secretName: chart-example-tls
59-
# hosts:
60-
# - chart-example.local
61-
62-
resources: {}
63-
# We usually recommend not to specify default resources and to leave this as a conscious
64-
# choice for the user. This also increases chances charts run on environments with little
65-
# resources, such as Minikube. If you do want to specify resources, uncomment the following
66-
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
67-
# limits:
68-
# cpu: 100m
69-
# memory: 128Mi
70-
# requests:
71-
# cpu: 100m
72-
# memory: 128Mi
73-
74-
autoscaling:
75-
enabled: false
76-
minReplicas: 1
77-
maxReplicas: 100
78-
targetCPUUtilizationPercentage: 80
79-
# targetMemoryUtilizationPercentage: 80
80-
81-
# Additional volumes on the output Deployment definition.
82-
volumes: []
83-
# - name: foo
84-
# secret:
85-
# secretName: mysecret
86-
# optional: false
87-
88-
# Additional volumeMounts on the output Deployment definition.
89-
volumeMounts: []
90-
# - name: foo
91-
# mountPath: "/etc/foo"
92-
# readOnly: true
93-
94-
nodeSelector: {}
95-
96-
tolerations: []
21+
hostname: ""
22+
tlsSecretName: "ndslabs-tls"
23+
9724

98-
affinity: {}

0 commit comments

Comments
 (0)