Skip to content

Commit

Permalink
testing helm linter 25
Browse files Browse the repository at this point in the history
  • Loading branch information
djkormo committed Oct 26, 2024
1 parent 586f673 commit def6b88
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Binaries for programs and plugins
*.exe
*.exe~
Expand Down
5 changes: 5 additions & 0 deletions charts/adcs-issuer/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ spec:
{{- toYaml .Values.controllerManager.tolerations | nindent 8 }}
{{- end }}

{{- if .Values.podPriorityClass.enabled }}
priorityClassName: {{ .Values.podPriorityClass.name | quote | default "" }}

{{- end }}

containers:
- name: manager
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag | default .Chart.AppVersion }}
Expand Down
16 changes: 16 additions & 0 deletions charts/adcs-issuer/templates/openshift-rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if and .Values.openshift.enabled .Values.openshift.anyuid }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: scc-anyuid
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:anyuid
subjects:
- kind: ServiceAccount
name: {{ .Values.controllerManager.rbac.serviceAccountName | default (include "chart.fullname" .) }}
namespace: {{ .Release.Namespace }}

{{- end }}
13 changes: 13 additions & 0 deletions charts/adcs-issuer/templates/pdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{{- if .Values.controllerManager.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ include "chart.fullname" . }}-controller-manager
namespace: {{ .Release.Name }}
spec:
minAvailable: 1
selector:
matchLabels:
{{- include "chart.selectorLabels" . | nindent 8 }}

{{- end }}
12 changes: 12 additions & 0 deletions charts/adcs-issuer/templates/podpriorityclass.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.podPriorityClass.enabled }}

apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: {{ .Values.podPriorityClass.name }}
value: {{ .Values.podPriorityClass.value }}
globalDefault: false
preemptionPolicy: PreemptLowerPriority
description: "Priority class for adcs-issuer applications."

{{- end }}
20 changes: 19 additions & 1 deletion charts/adcs-issuer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,22 @@ cert-manager:
crd:
install: true

openshift:
enabled: false # to use permission SCC on Openshift
anyuid: true # add permission for anyuid SCC on Openshift


# @section ADCS Issuer Controller Manager
controllerManager:

networkPolicy:
enabled: false

podDisruptionBudget:
enabled: false



# @section Image
# Image settings for the ADCS Issuer manager.
manager:
Expand Down Expand Up @@ -58,7 +71,7 @@ controllerManager:

# @section Replicas
# Number of replicas for the controller manager deployment.
replicas: 1
replicas: 2

# @section Environment Variables
# Environment variables for the controller manager.
Expand Down Expand Up @@ -140,6 +153,11 @@ webhookService:
# Node selector configuration for the controller manager pods.
nodeSelector: {}

podPriorityClass:
enabled: false
name: adcs-issuer
value: 1000

# @section ADCS Simulator
# Configuration for the ADCS Simulator.
simulator:
Expand Down

0 comments on commit def6b88

Please sign in to comment.