Skip to content

Commit

Permalink
feat: helm - add priorityClassName
Browse files Browse the repository at this point in the history
  • Loading branch information
ReuDa committed Sep 27, 2023
1 parent 69c468b commit 1bf9c61
Show file tree
Hide file tree
Showing 4 changed files with 147 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.podSecurityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,135 @@ manifest should match snapshot with mutual TLS using containerPaths:
volumeMounts: null
serviceAccountName: steadybit-extension-prometheus
volumes: null
manifest should match snapshot with podSecurityContext:
1: |
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
steadybit.com/discovery-disabled: "true"
name: RELEASE-NAME-steadybit-extension-prometheus
namespace: NAMESPACE
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: steadybit-extension-prometheus
template:
metadata:
annotations: null
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: steadybit-extension-prometheus
steadybit.com/discovery-disabled: "true"
spec:
containers:
- env:
- name: STEADYBIT_LOG_LEVEL
value: INFO
- name: STEADYBIT_LOG_FORMAT
value: text
- name: STEADYBIT_EXTENSION_PROMETHEUS_INSTANCE_0_NAME
value: null
- name: STEADYBIT_EXTENSION_PROMETHEUS_INSTANCE_0_ORIGIN
value: null
image: ghcr.io/steadybit/extension-prometheus:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /health/liveness
port: 8088
name: extension
readinessProbe:
httpGet:
path: /health/readiness
port: 8088
resources:
limits:
cpu: 200m
memory: 128Mi
requests:
cpu: 50m
memory: 32Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
securityContext:
runAsUser: 2222
serviceAccountName: steadybit-extension-prometheus
volumes: null
manifest should match snapshot with priority class:
1: |
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
steadybit.com/discovery-disabled: "true"
name: RELEASE-NAME-steadybit-extension-prometheus
namespace: NAMESPACE
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: steadybit-extension-prometheus
template:
metadata:
annotations: null
labels:
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/name: steadybit-extension-prometheus
steadybit.com/discovery-disabled: "true"
spec:
containers:
- env:
- name: STEADYBIT_LOG_LEVEL
value: INFO
- name: STEADYBIT_LOG_FORMAT
value: text
- name: STEADYBIT_EXTENSION_PROMETHEUS_INSTANCE_0_NAME
value: null
- name: STEADYBIT_EXTENSION_PROMETHEUS_INSTANCE_0_ORIGIN
value: null
image: ghcr.io/steadybit/extension-prometheus:latest
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /health/liveness
port: 8088
name: extension
readinessProbe:
httpGet:
path: /health/readiness
port: 8088
resources:
limits:
cpu: 200m
memory: 128Mi
requests:
cpu: 50m
memory: 32Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsGroup: 10000
runAsNonRoot: true
runAsUser: 10000
volumeMounts: null
priorityClassName: my-priority-class
serviceAccountName: steadybit-extension-prometheus
volumes: null
manifest should match snapshot without TLS:
1: |
apiVersion: apps/v1
Expand Down
12 changes: 12 additions & 0 deletions charts/steadybit-extension-prometheus/tests/deployment_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,15 @@ tests:
tags.datadoghq.com/service: steadybit-extension
asserts:
- matchSnapshot: {}
- it: manifest should match snapshot with podSecurityContext
set:
podSecurityContext:
runAsUser: 2222
asserts:
- matchSnapshot: {}

- it: manifest should match snapshot with priority class
set:
priorityClassName: my-priority-class
asserts:
- matchSnapshot: {}
3 changes: 3 additions & 0 deletions charts/steadybit-extension-prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ topologySpreadConstraints: []
# affinity -- Affinities to influence pod assignment.
affinity: {}

# priorityClassName -- Priority class used to influence pod scheduling priority.
priorityClassName: ""

# podSecurityContext -- SecurityContext to apply to the pod.
podSecurityContext: {}

Expand Down

0 comments on commit 1bf9c61

Please sign in to comment.