Skip to content

Commit

Permalink
support annotations on services
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Nov 1, 2022
1 parent c3694cd commit 64368c6
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions manifests/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,23 @@ spec:
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: daemon-port
containerPort: {{ .Values.daemonPort }}
- name: client-port
containerPort: {{ .Values.clientPort }}
{{- range .Values.ports }}
- name: {{ .name }}
containerPort: {{ .containerPort }}
{{- end }}
env:
- name: "SSH_PORT_LISTEN_DAEMON"
value: "{{ .Values.daemonPort }}"
- name: "SSH_PORT_LISTEN_CLIENT"
value: "{{ .Values.clientPort }}"
- name: "USE_PROXY_PROTOCOL"
value: "0"
- name: "SSH_KEYS_PATH"
value: "/etc/tmate-ssh-server/keys"
{{- range .Values.env }}
- name: {{ .name | quote }}
value: {{ .value | quote }}
Expand Down
4 changes: 4 additions & 0 deletions manifests/templates/tmate-server-loadbalancer-client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: v1
kind: Service
metadata:
name: tmate-server-lb-client
{{- with .Values.clientAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
# https://cloud.google.com/kubernetes-engine/docs/concepts/service-load-balancer-parameters#fw_ip_address
{{- with .Values.loadBalancerSourceRanges }}
Expand Down
4 changes: 4 additions & 0 deletions manifests/templates/tmate-server-loadbalancer-daemon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: v1
kind: Service
metadata:
name: tmate-server-lb
{{- with .Values.daemonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
# https://cloud.google.com/kubernetes-engine/docs/concepts/service-load-balancer-parameters#fw_ip_address
ports:
Expand Down
7 changes: 7 additions & 0 deletions manifests/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ service:
type: ClusterIP
port: 80


daemonPort: 2200
clientPort: 2201

clientAnnotations: {}
daemonAnnotations: {}

ingress:
enabled: false
className: ""
Expand Down

0 comments on commit 64368c6

Please sign in to comment.