diff --git a/Taskfile.yml b/Taskfile.yml index 0a768d8..e6d16f3 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -22,6 +22,26 @@ tasks: - task: setup - task: lint-self-hosted + internal-release: + desc: Workflow that releases the self-hosted helm chart for internal use + deps: + - setup + cmds: + - task: package-self-hosted + - task: lint-self-hosted + - task: publish-self-hosted + vars: { REPLICATED_CHANNEL: 'Helm-Unstable' } + + public-release: + desc: Workflow that releases the self-hosted helm chart to customers + deps: + - setup + cmds: + - task: package-self-hosted + - task: lint-self-hosted + - task: publish-self-hosted + vars: { REPLICATED_CHANNEL: 'Helm' } + release-self-hosted: desc: Workflow that packages, lints and releases the self-hosted helm chart deps: diff --git a/charts/opslevel/Chart.yaml b/charts/opslevel/Chart.yaml index 083bea7..6cb3ad3 100644 --- a/charts/opslevel/Chart.yaml +++ b/charts/opslevel/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: "v2" name: "opslevel" type: "application" -version: "2025.5.23" +version: "2025.6.3" appVersion: "2025.5.22" description: "The OpsLevel internal developer portal helps your team ship fast without risking your software standards." home: "https://www.opslevel.com/" diff --git a/charts/opslevel/templates/redis/serviceaccount.yaml b/charts/opslevel/templates/redis/serviceaccount.yaml new file mode 100644 index 0000000..30af308 --- /dev/null +++ b/charts/opslevel/templates/redis/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.redis.serviceAccount.create }} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: '{{ .Values.redis.serviceAccount.name }}' + labels: + app.kubernetes.io/component: serviceAccount + app.kubernetes.io/part-of: redis +{{- with .Values.redis.serviceAccount.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/opslevel/templates/redis/deployment.yaml b/charts/opslevel/templates/redis/statefulset.yaml similarity index 51% rename from charts/opslevel/templates/redis/deployment.yaml rename to charts/opslevel/templates/redis/statefulset.yaml index 0231480..a621441 100644 --- a/charts/opslevel/templates/redis/deployment.yaml +++ b/charts/opslevel/templates/redis/statefulset.yaml @@ -1,6 +1,6 @@ {{- if eq .Values.redis.external false }} -apiVersion: apps/v1 # API version -kind: Deployment +apiVersion: apps/v1 +kind: StatefulSet metadata: name: redis labels: @@ -8,13 +8,14 @@ metadata: app.kubernetes.io/part-of: redis spec: replicas: 1 - strategy: - type: Recreate + serviceName: redis + revisionHistoryLimit: 3 selector: matchLabels: app.kubernetes.io/component: app app.kubernetes.io/part-of: redis - revisionHistoryLimit: 3 + updateStrategy: + type: RollingUpdate template: metadata: labels: @@ -28,19 +29,46 @@ spec: spec: {{- template "opslevel.pullSecrets" . }} {{- template "global.nodeSelector" . }} - priorityClassName: {{ .Values.priorityClasses.normal }} + serviceAccountName: "{{ .Values.redis.serviceAccount.name }}" + priorityClassName: {{ .Values.priorityClasses.high }} {{- with .Values.redis.securityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} + subdomain: redis containers: - - name: master + - name: redis image: {{ template "redis.image" . }} imagePullPolicy: IfNotPresent + {{- with .Values.redis.pod.securityContext }} + securityContext: + {{- toYaml . | nindent 12 }} + {{- end }} ports: - - containerPort: 6379 + - containerPort: 6379 {{- with .Values.redis.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} -{{- end }} \ No newline at end of file + volumeMounts: + - name: data + mountPath: /data + - name: empty-dir + mountPath: /tmp + subPath: tmp-dir + volumes: + - name: empty-dir + emptyDir: {} + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: + - ReadWriteOnce + {{- if .Values.redis.storageClass }} + storageClassName: '{{ .Values.redis.storageClass }}' + {{- end }} + resources: + requests: + storage: '{{ .Values.redis.storageSize }}' +{{- end }} diff --git a/charts/opslevel/values.yaml b/charts/opslevel/values.yaml index 926c752..b5360ee 100644 --- a/charts/opslevel/values.yaml +++ b/charts/opslevel/values.yaml @@ -180,7 +180,26 @@ redis: resources: *resourcesMedium pod: annotations: {} + securityContext: {} +# allowPrivilegeEscalation: false +# capabilities: +# drop: +# - ALL +# readOnlyRootFilesystem: true +# runAsNonRoot: true +# runAsUser: 1000 +# seccompProfile: +# type: RuntimeDefault + serviceAccount: + create: true + name: redis + annotations: {} securityContext: {} +# fsGroupChangePolicy: Always +# supplementalGroups: [] +# sysctls: [] + storageClass: "" + storageSize: "8Gi" secret: create: true name: "opslevel-redis"