mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
chore: set default requests/limits in helm chart (#16844)
closes #16825 - my first commit from across the pond 😄 --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@ -117,6 +117,14 @@ var testCases = []testCase{
|
|||||||
name: "securitycontext",
|
name: "securitycontext",
|
||||||
expectedError: "",
|
expectedError: "",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "custom_resources",
|
||||||
|
expectedError: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "partial_resources",
|
||||||
|
expectedError: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type testCase struct {
|
type testCase struct {
|
||||||
|
@ -181,7 +181,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -181,7 +181,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -181,7 +181,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -181,7 +181,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/command.golden
vendored
8
helm/coder/tests/testdata/command.golden
vendored
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -180,7 +180,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -180,7 +180,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
201
helm/coder/tests/testdata/custom_resources.golden
vendored
Normal file
201
helm/coder/tests/testdata/custom_resources.golden
vendored
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-workspace-perms
|
||||||
|
namespace: default
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder"
|
||||||
|
namespace: default
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: coder
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: "0.1.0"
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
annotations:
|
||||||
|
{}
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
sessionAffinity: None
|
||||||
|
ports:
|
||||||
|
- name: "http"
|
||||||
|
port: 80
|
||||||
|
targetPort: "http"
|
||||||
|
protocol: TCP
|
||||||
|
nodePort:
|
||||||
|
externalTrafficPolicy: "Cluster"
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app.kubernetes.io/instance
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- coder
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
weight: 1
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- server
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_HTTP_ADDRESS
|
||||||
|
value: 0.0.0.0:8080
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_ACCESS_URL
|
||||||
|
value: http://coder.default.svc.cluster.local
|
||||||
|
- name: KUBE_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: CODER_DERP_SERVER_RELAY_URL
|
||||||
|
value: http://$(KUBE_POD_IP):8080
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
name: coder
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 4000m
|
||||||
|
memory: 8192Mi
|
||||||
|
requests:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2048Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder
|
||||||
|
terminationGracePeriodSeconds: 60
|
||||||
|
volumes: []
|
10
helm/coder/tests/testdata/custom_resources.yaml
vendored
Normal file
10
helm/coder/tests/testdata/custom_resources.yaml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
coder:
|
||||||
|
image:
|
||||||
|
tag: latest
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 4000m
|
||||||
|
memory: 8192Mi
|
||||||
|
requests:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2048Mi
|
201
helm/coder/tests/testdata/custom_resources_coder.golden
vendored
Normal file
201
helm/coder/tests/testdata/custom_resources_coder.golden
vendored
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: coder
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-workspace-perms
|
||||||
|
namespace: coder
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder"
|
||||||
|
namespace: coder
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: coder
|
||||||
|
namespace: coder
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: "0.1.0"
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
annotations:
|
||||||
|
{}
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
sessionAffinity: None
|
||||||
|
ports:
|
||||||
|
- name: "http"
|
||||||
|
port: 80
|
||||||
|
targetPort: "http"
|
||||||
|
protocol: TCP
|
||||||
|
nodePort:
|
||||||
|
externalTrafficPolicy: "Cluster"
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: coder
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app.kubernetes.io/instance
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- coder
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
weight: 1
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- server
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_HTTP_ADDRESS
|
||||||
|
value: 0.0.0.0:8080
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_ACCESS_URL
|
||||||
|
value: http://coder.coder.svc.cluster.local
|
||||||
|
- name: KUBE_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: CODER_DERP_SERVER_RELAY_URL
|
||||||
|
value: http://$(KUBE_POD_IP):8080
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
name: coder
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 4000m
|
||||||
|
memory: 8192Mi
|
||||||
|
requests:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2048Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder
|
||||||
|
terminationGracePeriodSeconds: 60
|
||||||
|
volumes: []
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/env_from.golden
vendored
8
helm/coder/tests/testdata/env_from.golden
vendored
@ -191,7 +191,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -191,7 +191,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -188,7 +188,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -188,7 +188,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -187,7 +187,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -187,7 +187,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
198
helm/coder/tests/testdata/partial_resources.golden
vendored
Normal file
198
helm/coder/tests/testdata/partial_resources.golden
vendored
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-workspace-perms
|
||||||
|
namespace: default
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder"
|
||||||
|
namespace: default
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: coder
|
||||||
|
namespace: default
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: "0.1.0"
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
annotations:
|
||||||
|
{}
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
sessionAffinity: None
|
||||||
|
ports:
|
||||||
|
- name: "http"
|
||||||
|
port: 80
|
||||||
|
targetPort: "http"
|
||||||
|
protocol: TCP
|
||||||
|
nodePort:
|
||||||
|
externalTrafficPolicy: "Cluster"
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app.kubernetes.io/instance
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- coder
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
weight: 1
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- server
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_HTTP_ADDRESS
|
||||||
|
value: 0.0.0.0:8080
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_ACCESS_URL
|
||||||
|
value: http://coder.default.svc.cluster.local
|
||||||
|
- name: KUBE_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: CODER_DERP_SERVER_RELAY_URL
|
||||||
|
value: http://$(KUBE_POD_IP):8080
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
name: coder
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1500m
|
||||||
|
memory: 3072Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder
|
||||||
|
terminationGracePeriodSeconds: 60
|
||||||
|
volumes: []
|
7
helm/coder/tests/testdata/partial_resources.yaml
vendored
Normal file
7
helm/coder/tests/testdata/partial_resources.yaml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
coder:
|
||||||
|
image:
|
||||||
|
tag: latest
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1500m
|
||||||
|
memory: 3072Mi
|
198
helm/coder/tests/testdata/partial_resources_coder.golden
vendored
Normal file
198
helm/coder/tests/testdata/partial_resources_coder.golden
vendored
Normal file
@ -0,0 +1,198 @@
|
|||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: coder
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-workspace-perms
|
||||||
|
namespace: coder
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder"
|
||||||
|
namespace: coder
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder/templates/service.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: coder
|
||||||
|
namespace: coder
|
||||||
|
labels:
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: "0.1.0"
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
annotations:
|
||||||
|
{}
|
||||||
|
spec:
|
||||||
|
type: LoadBalancer
|
||||||
|
sessionAffinity: None
|
||||||
|
ports:
|
||||||
|
- name: "http"
|
||||||
|
port: 80
|
||||||
|
targetPort: "http"
|
||||||
|
protocol: TCP
|
||||||
|
nodePort:
|
||||||
|
externalTrafficPolicy: "Cluster"
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
---
|
||||||
|
# Source: coder/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
name: coder
|
||||||
|
namespace: coder
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder
|
||||||
|
app.kubernetes.io/part-of: coder
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-0.1.0
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
podAntiAffinity:
|
||||||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
- podAffinityTerm:
|
||||||
|
labelSelector:
|
||||||
|
matchExpressions:
|
||||||
|
- key: app.kubernetes.io/instance
|
||||||
|
operator: In
|
||||||
|
values:
|
||||||
|
- coder
|
||||||
|
topologyKey: kubernetes.io/hostname
|
||||||
|
weight: 1
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- server
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_HTTP_ADDRESS
|
||||||
|
value: 0.0.0.0:8080
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_ACCESS_URL
|
||||||
|
value: http://coder.coder.svc.cluster.local
|
||||||
|
- name: KUBE_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
|
- name: CODER_DERP_SERVER_RELAY_URL
|
||||||
|
value: http://$(KUBE_POD_IP):8080
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
name: coder
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
name: http
|
||||||
|
protocol: TCP
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /healthz
|
||||||
|
port: http
|
||||||
|
scheme: HTTP
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1500m
|
||||||
|
memory: 3072Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder
|
||||||
|
terminationGracePeriodSeconds: 60
|
||||||
|
volumes: []
|
8
helm/coder/tests/testdata/prometheus.golden
vendored
8
helm/coder/tests/testdata/prometheus.golden
vendored
@ -183,7 +183,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -183,7 +183,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -184,7 +184,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -184,7 +184,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/sa.golden
vendored
8
helm/coder/tests/testdata/sa.golden
vendored
@ -180,7 +180,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/sa_coder.golden
vendored
8
helm/coder/tests/testdata/sa_coder.golden
vendored
@ -180,7 +180,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/sa_disabled.golden
vendored
8
helm/coder/tests/testdata/sa_disabled.golden
vendored
@ -165,7 +165,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -165,7 +165,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -193,7 +193,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -193,7 +193,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
capabilities:
|
capabilities:
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
capabilities:
|
capabilities:
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -180,7 +180,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -180,7 +180,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -178,7 +178,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -178,7 +178,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/tls.golden
vendored
8
helm/coder/tests/testdata/tls.golden
vendored
@ -195,7 +195,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/tls_coder.golden
vendored
8
helm/coder/tests/testdata/tls_coder.golden
vendored
@ -195,7 +195,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/coder/tests/testdata/topology.golden
vendored
8
helm/coder/tests/testdata/topology.golden
vendored
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -179,7 +179,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -187,7 +187,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -187,7 +187,13 @@ spec:
|
|||||||
path: /healthz
|
path: /healthz
|
||||||
port: http
|
port: http
|
||||||
scheme: HTTP
|
scheme: HTTP
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -196,16 +196,15 @@ coder:
|
|||||||
# exec:
|
# exec:
|
||||||
# command: ["/bin/sh","-c","echo preStart"]
|
# command: ["/bin/sh","-c","echo preStart"]
|
||||||
|
|
||||||
# coder.resources -- The resources to request for Coder. These are optional
|
# coder.resources -- The resources to request for Coder. The below values are
|
||||||
# and are not set by default.
|
# defaults and can be overridden.
|
||||||
resources:
|
resources:
|
||||||
{}
|
|
||||||
# limits:
|
# limits:
|
||||||
# cpu: 2000m
|
# cpu: 2000m
|
||||||
# memory: 4096Mi
|
# memory: 4096Mi
|
||||||
# requests:
|
# requests:
|
||||||
# cpu: 2000m
|
# cpu: 2000m
|
||||||
# memory: 4096Mi
|
# memory: 4096Mi
|
||||||
|
|
||||||
# coder.certs -- CA bundles to mount inside the Coder pod.
|
# coder.certs -- CA bundles to mount inside the Coder pod.
|
||||||
certs:
|
certs:
|
||||||
|
@ -66,7 +66,16 @@ imagePullPolicy: {{ .Values.coder.image.pullPolicy }}
|
|||||||
command:
|
command:
|
||||||
{{- toYaml .Values.coder.command | nindent 2 }}
|
{{- toYaml .Values.coder.command | nindent 2 }}
|
||||||
resources:
|
resources:
|
||||||
{{- toYaml .Values.coder.resources | nindent 2 }}
|
{{- if and (hasKey .Values.coder "resources") (not (empty .Values.coder.resources)) }}
|
||||||
|
{{- toYaml .Values.coder.resources | nindent 2 }}
|
||||||
|
{{- else }}
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
{{- end }}
|
||||||
lifecycle:
|
lifecycle:
|
||||||
{{- toYaml .Values.coder.lifecycle | nindent 2 }}
|
{{- toYaml .Values.coder.lifecycle | nindent 2 }}
|
||||||
securityContext: {{ toYaml .Values.coder.securityContext | nindent 2 }}
|
securityContext: {{ toYaml .Values.coder.securityContext | nindent 2 }}
|
||||||
|
@ -95,6 +95,14 @@ var testCases = []testCase{
|
|||||||
name: "name_override_existing_sa",
|
name: "name_override_existing_sa",
|
||||||
expectedError: "",
|
expectedError: "",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "custom_resources",
|
||||||
|
expectedError: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "partial_resources",
|
||||||
|
expectedError: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
type testCase struct {
|
type testCase struct {
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
145
helm/provisioner/tests/testdata/custom_resources.golden
vendored
Normal file
145
helm/provisioner/tests/testdata/custom_resources.golden
vendored
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
namespace: default
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder-provisioner"
|
||||||
|
namespace: default
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder-provisioner"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- provisionerd
|
||||||
|
- start
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_PROVISIONER_DAEMON_PSK
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: psk
|
||||||
|
name: coder-provisioner-psk
|
||||||
|
- name: CODER_URL
|
||||||
|
value: http://coder.default.svc.cluster.local
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
name: coder
|
||||||
|
ports: null
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 4000m
|
||||||
|
memory: 8192Mi
|
||||||
|
requests:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2048Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder-provisioner
|
||||||
|
terminationGracePeriodSeconds: 600
|
||||||
|
volumes: []
|
10
helm/provisioner/tests/testdata/custom_resources.yaml
vendored
Normal file
10
helm/provisioner/tests/testdata/custom_resources.yaml
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
coder:
|
||||||
|
image:
|
||||||
|
tag: latest
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 4000m
|
||||||
|
memory: 8192Mi
|
||||||
|
requests:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2048Mi
|
145
helm/provisioner/tests/testdata/custom_resources_coder.golden
vendored
Normal file
145
helm/provisioner/tests/testdata/custom_resources_coder.golden
vendored
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: coder
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
namespace: coder
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder-provisioner"
|
||||||
|
namespace: coder
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder-provisioner"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: coder
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- provisionerd
|
||||||
|
- start
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_PROVISIONER_DAEMON_PSK
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: psk
|
||||||
|
name: coder-provisioner-psk
|
||||||
|
- name: CODER_URL
|
||||||
|
value: http://coder.coder.svc.cluster.local
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
name: coder
|
||||||
|
ports: null
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 4000m
|
||||||
|
memory: 8192Mi
|
||||||
|
requests:
|
||||||
|
cpu: 1000m
|
||||||
|
memory: 2048Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder-provisioner
|
||||||
|
terminationGracePeriodSeconds: 600
|
||||||
|
volumes: []
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -132,7 +132,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -132,7 +132,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -131,7 +131,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -131,7 +131,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -132,7 +132,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -132,7 +132,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -52,7 +52,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -52,7 +52,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
142
helm/provisioner/tests/testdata/partial_resources.golden
vendored
Normal file
142
helm/provisioner/tests/testdata/partial_resources.golden
vendored
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: default
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
namespace: default
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder-provisioner"
|
||||||
|
namespace: default
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder-provisioner"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- provisionerd
|
||||||
|
- start
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_PROVISIONER_DAEMON_PSK
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: psk
|
||||||
|
name: coder-provisioner-psk
|
||||||
|
- name: CODER_URL
|
||||||
|
value: http://coder.default.svc.cluster.local
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
name: coder
|
||||||
|
ports: null
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1500m
|
||||||
|
memory: 3072Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder-provisioner
|
||||||
|
terminationGracePeriodSeconds: 600
|
||||||
|
volumes: []
|
7
helm/provisioner/tests/testdata/partial_resources.yaml
vendored
Normal file
7
helm/provisioner/tests/testdata/partial_resources.yaml
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
coder:
|
||||||
|
image:
|
||||||
|
tag: latest
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1500m
|
||||||
|
memory: 3072Mi
|
142
helm/provisioner/tests/testdata/partial_resources_coder.golden
vendored
Normal file
142
helm/provisioner/tests/testdata/partial_resources_coder.golden
vendored
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: coder
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: Role
|
||||||
|
metadata:
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
namespace: coder
|
||||||
|
rules:
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["pods"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups: [""]
|
||||||
|
resources: ["persistentvolumeclaims"]
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- create
|
||||||
|
- delete
|
||||||
|
- deletecollection
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- patch
|
||||||
|
- update
|
||||||
|
- watch
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/rbac.yaml
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: RoleBinding
|
||||||
|
metadata:
|
||||||
|
name: "coder-provisioner"
|
||||||
|
namespace: coder
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: "coder-provisioner"
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: Role
|
||||||
|
name: coder-provisioner-workspace-perms
|
||||||
|
---
|
||||||
|
# Source: coder-provisioner/templates/coder.yaml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
name: coder-provisioner
|
||||||
|
namespace: coder
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
annotations: {}
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/instance: release-name
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
|
app.kubernetes.io/name: coder-provisioner
|
||||||
|
app.kubernetes.io/part-of: coder-provisioner
|
||||||
|
app.kubernetes.io/version: 0.1.0
|
||||||
|
helm.sh/chart: coder-provisioner-0.1.0
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- provisionerd
|
||||||
|
- start
|
||||||
|
command:
|
||||||
|
- /opt/coder
|
||||||
|
env:
|
||||||
|
- name: CODER_PROMETHEUS_ADDRESS
|
||||||
|
value: 0.0.0.0:2112
|
||||||
|
- name: CODER_PROVISIONER_DAEMON_PSK
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: psk
|
||||||
|
name: coder-provisioner-psk
|
||||||
|
- name: CODER_URL
|
||||||
|
value: http://coder.coder.svc.cluster.local
|
||||||
|
image: ghcr.io/coder/coder:latest
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
lifecycle: {}
|
||||||
|
name: coder
|
||||||
|
ports: null
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 1500m
|
||||||
|
memory: 3072Mi
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: null
|
||||||
|
runAsGroup: 1000
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
volumeMounts: []
|
||||||
|
restartPolicy: Always
|
||||||
|
serviceAccountName: coder-provisioner
|
||||||
|
terminationGracePeriodSeconds: 600
|
||||||
|
volumes: []
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -123,7 +123,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -125,7 +125,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -125,7 +125,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
8
helm/provisioner/tests/testdata/sa.golden
vendored
8
helm/provisioner/tests/testdata/sa.golden
vendored
@ -124,7 +124,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -124,7 +124,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -52,7 +52,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
@ -52,7 +52,13 @@ spec:
|
|||||||
lifecycle: {}
|
lifecycle: {}
|
||||||
name: coder
|
name: coder
|
||||||
ports: null
|
ports: null
|
||||||
resources: {}
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
|
requests:
|
||||||
|
cpu: 2000m
|
||||||
|
memory: 4096Mi
|
||||||
securityContext:
|
securityContext:
|
||||||
allowPrivilegeEscalation: false
|
allowPrivilegeEscalation: false
|
||||||
readOnlyRootFilesystem: null
|
readOnlyRootFilesystem: null
|
||||||
|
Reference in New Issue
Block a user