Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): add service values #290

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ helm install my-sealed-secrets-web bakito/sealed-secrets-web --version 3.1.6
| sealedSecrets.namespace | string | `"sealed-secrets"` | Namespace of the sealed secrets service |
| sealedSecrets.serviceName | string | `"sealed-secrets"` | Name of the sealed secrets service |
| service.annotations | object | `{}` | Service annotations |
| service.clusterIP | string | `""` | Kubernetes Service clusterIP |
| service.loadBalancerIP | string | `""` | Kubernetes Service loadBalancerIP |
| service.loadBalancerSourceRanges | list | `[]` | Kubernetes Service loadBalancerSourceRanges |
| service.nodePort | string | `nil` | Kubernetes Service Nodeport |
| service.port | int | `80` | Service port |
| service.type | string | `"ClusterIP"` | Sets the type of the Service |
| serviceAccount.automountServiceAccountToken | bool | `true` | Automatically mount the service account token |
Expand Down
15 changes: 15 additions & 0 deletions chart/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,26 @@ metadata:
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }}
clusterIP: {{ .Values.service.clusterIP }}
{{- end }}
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
{{- end }}
{{ if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerSourceRanges))) }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{ end }}
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
{{- end }}
ports:
- port: {{ .Values.service.port }}
targetPort: http
protocol: TCP
name: http
{{- if and (or (eq .Values.service.type "NodePort") (eq .Values.service.type "LoadBalancer")) (not (empty .Values.service.nodePort)) }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
selector:
app.kubernetes.io/name: {{ include "sealed-secrets-web.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
8 changes: 8 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ service:
port: 80
# -- Service annotations
annotations: {}
# -- Kubernetes Service clusterIP
clusterIP: ""
# -- Kubernetes Service loadBalancerIP
loadBalancerIP: ""
# -- Kubernetes Service loadBalancerSourceRanges
loadBalancerSourceRanges: []
# -- Kubernetes Service Nodeport
nodePort: null

ingress:
# -- Enable ingress support
Expand Down