Skip to content

Commit 14bde0b

Browse files
authored
Add service annotations to coderd service (#134)
* Add service annotations to coderd service * Remove appProtocol from coderd service
1 parent a7901ee commit 14bde0b

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa
2525
| certs | object | Certificate that will be mounted inside Coder services. | `{"secret":{"key":"","name":""}}` |
2626
| certs.secret.key | string | Key pointing to a certificate in the secret. | `""` |
2727
| certs.secret.name | string | Name of the secret. | `""` |
28-
| coderd | object | Primary service responsible for all things Coder! | `{"builtinProviderServiceAccount":{"annotations":{},"labels":{}},"devurlsHost":"","image":"","podSecurityContext":{"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}},"satellite":{"accessURL":"","enable":false,"primaryURL":""},"securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceSpec":{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"},"tls":{"devurlsHostSecretName":"","hostSecretName":""},"trustProxyIP":false}` |
28+
| coderd | object | Primary service responsible for all things Coder! | `{"builtinProviderServiceAccount":{"annotations":{},"labels":{}},"devurlsHost":"","image":"","oidc":{"enableRefresh":false,"redirectOptions":{}},"podSecurityContext":{"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"replicas":1,"resources":{"limits":{"cpu":"250m","memory":"512Mi"},"requests":{"cpu":"250m","memory":"512Mi"}},"satellite":{"accessURL":"","enable":false,"primaryURL":""},"securityContext":{"allowPrivilegeEscalation":false,"readOnlyRootFilesystem":true,"seccompProfile":{"type":"RuntimeDefault"}},"serviceAnnotations":{},"serviceSpec":{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"},"superAdmin":{"passwordSecret":{"key":"password","name":""}},"tls":{"devurlsHostSecretName":"","hostSecretName":""},"trustProxyIP":false}` |
2929
| coderd.builtinProviderServiceAccount | object | Customize the built-in Kubernetes provider service account. | `{"annotations":{},"labels":{}}` |
3030
| coderd.builtinProviderServiceAccount.annotations | object | A KV mapping of annotations. See: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | `{}` |
3131
| coderd.builtinProviderServiceAccount.labels | object | Add labels to the service account used for the built-in provider. | `{}` |
@@ -45,11 +45,14 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa
4545
| coderd.securityContext.allowPrivilegeEscalation | bool | Controls whether the container can gain additional privileges, such as escalating to root. It is recommended to leave this setting disabled in production. | `false` |
4646
| coderd.securityContext.readOnlyRootFilesystem | bool | Mounts the container's root filesystem as read-only. It is recommended to leave this setting enabled in production. This will override the same setting in the pod | `true` |
4747
| coderd.securityContext.seccompProfile | object | Sets the seccomp profile for the migration and runtime containers. | `{"type":"RuntimeDefault"}` |
48+
| coderd.serviceAnnotations | object | Extra annotations to apply to the coderd service. | `{}` |
4849
| coderd.serviceSpec | object | Specification to inject for the coderd service. See: https://kubernetes.io/docs/concepts/services-networking/service/ | `{"externalTrafficPolicy":"Local","loadBalancerIP":"","loadBalancerSourceRanges":[],"type":"LoadBalancer"}` |
4950
| coderd.serviceSpec.externalTrafficPolicy | string | Set the traffic policy for the service. See: https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip | `"Local"` |
5051
| coderd.serviceSpec.loadBalancerIP | string | Set the external IP address of the Ingress service. | `""` |
5152
| coderd.serviceSpec.loadBalancerSourceRanges | list | Traffic through the LoadBalancer will be restricted to the specified client IPs. This field will be ignored if the cloud provider does not support this feature. | `[]` |
5253
| coderd.serviceSpec.type | string | Set the type of Service. See: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | `"LoadBalancer"` |
54+
| coderd.superAdmin.passwordSecret.key | string | The key of the secret that contains the super admin password. | `"password"` |
55+
| coderd.superAdmin.passwordSecret.name | string | Name of a secret that should be used to determine the password for the super admin account. The password should be contained in the field `password`, or the manually specified one. | `""` |
5356
| coderd.tls | object | TLS configuration for coderd. These options will override dashboard configuration. | `{"devurlsHostSecretName":"","hostSecretName":""}` |
5457
| coderd.tls.devurlsHostSecretName | string | The secret to use for DevURL TLS. | `""` |
5558
| coderd.tls.hostSecretName | string | The secret to use for TLS. | `""` |
@@ -75,7 +78,7 @@ View [our docs](https://coder.com/docs/setup/installation) for detailed installa
7578
| postgres.port | string | Port of the external PostgreSQL instance. | `""` |
7679
| postgres.sslMode | string | Provides variable levels of protection for the PostgreSQL connection. For acceptable values, see: https://www.postgresql.org/docs/9.1/libpq-ssl.html | `"require"` |
7780
| postgres.user | string | User of the external PostgreSQL instance. | `""` |
78-
| services | object | Kubernetes Service configuration that applies to Coder services. | `{"annotations":{},"clusterDomainSuffix":".svc.cluster.local","nodeSelector":{"kubernetes.io/arch":"amd64","kubernetes.io/os":"linux"},"tolerations":[],"type":"ClusterIP"}` |
81+
| services | object | Kubernetes Service configuration that applies to Coder services. | `{"annotations":{},"clusterDomainSuffix":".svc.cluster.local","nodeSelector":{"kubernetes.io/arch":"amd64","kubernetes.io/os":"linux"},"tolerations":[],"type":"ClusterIP"}` |
7982
| services.annotations | object | A KV mapping of annotations. See: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | `{}` |
8083
| services.clusterDomainSuffix | string | Custom domain suffix for DNS resolution in your cluster. See: https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/ | `".svc.cluster.local"` |
8184
| services.nodeSelector | object | See: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector | `{"kubernetes.io/arch":"amd64","kubernetes.io/os":"linux"}` |

templates/coderd.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ metadata:
240240
name: {{ include "coder.serviceName" . }}
241241
{{- end }}
242242
namespace: {{ .Release.Namespace | quote }}
243+
annotations:
244+
{{- range $key, $value := .Values.coderd.serviceAnnotations }}
245+
{{ $key }}: {{ $value | quote }}
246+
{{- end }}
243247
spec:
244248
{{ toYaml .Values.coderd.serviceSpec | indent 2 }}
245249
selector:
@@ -249,12 +253,10 @@ spec:
249253
port: 80
250254
targetPort: 8080
251255
protocol: TCP
252-
appProtocol: http
253256
- name: tcp-{{ include "coder.serviceName" . }}-https
254257
port: 443
255258
targetPort: 8443
256259
protocol: TCP
257-
appProtocol: https
258260
{{- else }}
259261
---
260262
apiVersion: v1

values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ coderd:
44
image: ""
55
# coderd.replicas -- The number of Kubernetes Pod replicas.
66
replicas: 1
7+
78
# coderd.serviceSpec -- Specification to inject for the coderd service. See:
89
# https://kubernetes.io/docs/concepts/services-networking/service/
910
serviceSpec:
@@ -20,6 +21,8 @@ coderd:
2021
# will be restricted to the specified client IPs. This field will be ignored if
2122
# the cloud provider does not support this feature.
2223
loadBalancerSourceRanges: []
24+
# coderd.serviceAnnotations -- Extra annotations to apply to the coderd service.
25+
serviceAnnotations: {}
2326

2427
# coderd.trustProxyIP -- Whether Coder should trust X-Real-IP and/or
2528
# X-Forwarded-For headers from your reverse proxy. This should only be turned
@@ -190,7 +193,7 @@ postgres:
190193
cpu: "250m"
191194
memory: "1Gi"
192195

193-
# services -- Kubernetes Service configuration that applies to Coder services.
196+
# services -- Kubernetes Service configuration that applies to Coder services.
194197
services:
195198
# services.annotations -- A KV mapping of annotations. See:
196199
# https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/

0 commit comments

Comments
 (0)