-
Notifications
You must be signed in to change notification settings - Fork 22
Pod security updates and Helm push #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c56d008
5018042
272fce9
1162f9b
4617621
1ec6417
0e9f2f2
35aff2b
514c954
564897a
73f9b04
ad97941
f211331
ea20bad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# from https://github.com/wkbrd/docker-registry.helm/blob/main/.github/workflows/helm_release.yaml | ||
# Apache 2 License | ||
|
||
name: Release Charts | ||
env: | ||
HELM_VERSION_TO_INSTALL: 3.14.0 | ||
GCR_IMAGE: ghcr.io/${{ github.repository_owner }} | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
packages: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: install helm | ||
uses: Azure/[email protected] | ||
with: | ||
# Version of helm | ||
version: ${{ env.HELM_VERSION_TO_INSTALL }} # default is latest | ||
|
||
- name: publish to oci registry | ||
run: | | ||
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin | ||
helm package ${{ github.workspace }}/charts/questdb/ | ||
package=`ls -t questdb-*.tgz | head -n 1` | ||
helm push "${package}" oci://${{ env.GCR_IMAGE }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,14 +29,15 @@ spec: | |
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
{{- include "generatePodSecurityContext" . | nindent 8 }} | ||
{{- if or .Values.serviceAccount.create .Values.serviceAccount.name }} | ||
serviceAccountName: {{ include "questdb.serviceAccountName" . }} | ||
{{- end }} | ||
automountServiceAccountToken: {{ .Values.automountServiceAccountToken }} | ||
containers: | ||
- name: {{ .Chart.Name }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
{{- include "generateSecurityContext" . | nindent 12 }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
env: | ||
|
@@ -49,6 +50,12 @@ spec: | |
{{ toYaml .Values.questdb.envFrom | nindent 10 }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: tmpfs-tmp | ||
mountPath: /tmp | ||
- name: tmpfs-questdb-import | ||
mountPath: /var/lib/questdb/import | ||
- name: tmpfs-questdb-public | ||
mountPath: /var/lib/questdb/public | ||
Comment on lines
+53
to
+58
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These mounts are breaking a simple
I think if we remove |
||
- name: {{ include "questdb.fullname" . }} | ||
mountPath: {{ .Values.questdb.dataDir }}/db | ||
subPath: db/ | ||
|
@@ -68,6 +75,11 @@ spec: | |
mountPath: {{ .Values.questdb.dataDir }}/conf/log.conf | ||
subPath: log.conf | ||
{{- end }} | ||
{{- if .Values.questdb.mimeConfig.enabled }} | ||
- name: mime-config | ||
mountPath: {{ .Values.questdb.dataDir }}/conf/mime.types | ||
subPath: mime.types | ||
{{- end }} | ||
{{- if .Values.extraVolumeMounts }} | ||
{{ toYaml .Values.extraVolumeMounts | nindent 10 }} | ||
{{- end }} | ||
|
@@ -103,6 +115,8 @@ spec: | |
- name: init-db-migration | ||
image: "{{ .Values.dataMigration.image.repository }}:{{ .Values.dataMigration.image.tag }}" | ||
command: ["bash", "/mnt/migration_scripts/migrate_to_helm_v1.sh"] | ||
securityContext: | ||
{{- include "generateSecurityContext" . | nindent 12 }} | ||
volumeMounts: | ||
- name: {{ include "questdb.fullname" . }} | ||
mountPath: /mnt/questdb | ||
|
@@ -128,6 +142,12 @@ spec: | |
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: tmpfs-tmp | ||
emptyDir: {} | ||
- name: tmpfs-questdb-import | ||
emptyDir: {} | ||
- name: tmpfs-questdb-public | ||
emptyDir: {} | ||
Comment on lines
+145
to
+150
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above comment |
||
{{- if .Values.questdb.serverConfig.enabled }} | ||
- name: server-config | ||
{{- if eq .Values.questdb.configStorageType "Secret" }} | ||
|
@@ -148,6 +168,16 @@ spec: | |
name: {{ include "questdb.fullname" . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- if .Values.questdb.mimeConfig.enabled }} | ||
- name: mime-config | ||
{{- if eq .Values.questdb.configStorageType "Secret" }} | ||
secret: | ||
secretName: {{ include "questdb.fullname" . }} | ||
{{- else }} | ||
configMap: | ||
name: {{ include "questdb.fullname" . }} | ||
{{- end }} | ||
{{- end }} | ||
- name: migration-scripts | ||
configMap: | ||
name: {{ include "questdb.fullname" . }}-db-migrations | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,24 @@ nameOverride: "" | |
fullnameOverride: "" | ||
|
||
podAnnotations: {} | ||
podSecurityContext: {} | ||
securityContext: {} | ||
podSecurityContext: | ||
fsGroup: 10001 | ||
seccompProfile: | ||
type: RuntimeDefault | ||
|
||
securityContext: | ||
readOnlyRootFilesystem: true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above, let's remove this and let the user add it as necessary |
||
capabilities: | ||
drop: | ||
- ALL | ||
runAsNonRoot: true | ||
runAsUser: 10001 | ||
runAsGroup: 10001 | ||
privileged: false | ||
allowPrivilegeEscalation: false | ||
seccompProfile: | ||
type: RuntimeDefault | ||
|
||
extraVolumes: [] | ||
extraVolumeMounts: [] | ||
extraLabels: {} | ||
|
@@ -23,6 +39,9 @@ questdb: | |
loggingConfig: | ||
enabled: false | ||
options: {} | ||
mimeConfig: | ||
enabled: false | ||
options: {} | ||
# env supports key/value pairs that are added directly to the questdb statefulset's env | ||
env: {} | ||
# envFrom supports a list of sources that will be injected into the questdb statefulset's env | ||
|
@@ -94,6 +113,7 @@ livenessProbe: {} | |
# successThreshold: 1 | ||
# timeoutSeconds: 2 | ||
|
||
automountServiceAccountToken: false | ||
|
||
metrics: | ||
enabled: true | ||
|
@@ -106,6 +126,7 @@ serviceAccount: | |
create: false | ||
labels: {} | ||
annotations: {} | ||
automountServiceAccountToken: false | ||
|
||
# if create is set to "true", you can specify the name of that service account below | ||
# if create is set to "false", you can use this to reference an existing service account for the StatefulSet pod | ||
|
@@ -121,3 +142,8 @@ dataMigration: | |
memory: "256Mi" | ||
limits: | ||
memory: "1Gi" | ||
|
||
# openshift | ||
openshift: | ||
enabled: detect | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert changes to this file? We'll update it as part of the release process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sklarsa : Do you publish your chart to an OCI registry? If not, that is something that this change would enable. Using an OCI registry standardizes how software is deployed and helps improve the tooling around a secure supply chain.