-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/go_modules/github.com/open-policy…
…-agent/opa-0.65.0
- Loading branch information
Showing
4 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 2024 Stacklok, Inc | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Note that this assumes read/write permissions to the provider_access_tokens database | ||
# table. | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: rotate-provider-tokens | ||
spec: | ||
schedule: {{ .Values.rotateProviderTokensJobSettings.schedule | quote }} | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: {{ .Values.serviceAccounts.rotateProviderTokensJob | default "minder" }} | ||
containers: | ||
- name: rotator | ||
image: {{ .Values.rotateProviderTokensJobSettings.image }} | ||
# restricted security context: | ||
# https://kubernetes.io/docs/concepts/security/pod-security-standards/ | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
capabilities: | ||
drop: | ||
- ALL | ||
args: | ||
- encryption | ||
- rotate-provider-tokens | ||
- "--yes" | ||
- "--db-host={{ .Values.db.host }}" | ||
- "--config=/config/server-config.yaml" | ||
# We use two config files, one with all the defaults, and one with | ||
# additional override values from helm. (This is a viper feature.) | ||
- "--config=/config/overrides.yaml" | ||
imagePullPolicy: {{ .Values.rotateProviderTokensJobSettings.imagePullPolicy }} | ||
resources: | ||
{{- toYaml .Values.rotateProviderTokensJobSettings.resources | nindent 14 }} | ||
{{- if .Values.rotateProviderTokensJobSettings.extraEnv }} | ||
env: | ||
{{- toYaml .Values.rotateProviderTokensJobSettings.extraEnv | nindent 14 }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: config | ||
mountPath: /config | ||
{{- if .Values.rotateProviderTokensJobSettings.extraVolumeMounts }} | ||
{{- toYaml .Values.rotateProviderTokensJobSettings.extraVolumeMounts | nindent 14 }} | ||
{{- end }} | ||
{{- if .Values.rotateProviderTokensJobSettings.sidecarContainers }} | ||
{{- toYaml .Values.rotateProviderTokensJobSettings.sidecarContainers | nindent 10 }} | ||
{{- end }} | ||
restartPolicy: {{ .Values.rotateProviderTokensJobSettings.restartPolicy | quote }} | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: db-update-config | ||
items: | ||
- key: server-config.yaml | ||
path: server-config.yaml | ||
- key: overrides.yaml | ||
path: overrides.yaml | ||
{{- if .Values.rotateProviderTokensJobSettings.extraVolumes }} | ||
{{- toYaml .Values.rotateProviderTokensJobSettings.extraVolumes | nindent 10 }} | ||
{{- end }} |
78 changes: 78 additions & 0 deletions
78
deployment/helm/templates/session_expiration_purge_job.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Copyright 2024 Stacklok, Inc | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# Note that this assumes read/write permissions to the session_store database | ||
# table. | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: session-expiration-purge | ||
spec: | ||
schedule: {{ .Values.sessionExpirationPurgeJobSettings.schedule | quote }} | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
serviceAccountName: {{ .Values.serviceAccounts.sessionExpirationPurgeJob | default "minder" }} | ||
containers: | ||
- name: purger | ||
image: {{ .Values.sessionExpirationPurgeJobSettings.image }} | ||
# restricted security context: | ||
# https://kubernetes.io/docs/concepts/security/pod-security-standards/ | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
runAsNonRoot: true | ||
seccompProfile: | ||
type: RuntimeDefault | ||
capabilities: | ||
drop: | ||
- ALL | ||
args: | ||
- encryption | ||
- purge-sessions | ||
- "--yes" | ||
- "--db-host={{ .Values.db.host }}" | ||
- "--config=/config/server-config.yaml" | ||
# We use two config files, one with all the defaults, and one with | ||
# additional override values from helm. (This is a viper feature.) | ||
- "--config=/config/overrides.yaml" | ||
imagePullPolicy: {{ .Values.sessionExpirationPurgeJobSettings.imagePullPolicy }} | ||
resources: | ||
{{- toYaml .Values.sessionExpirationPurgeJobSettings.resources | nindent 14 }} | ||
{{- if .Values.sessionExpirationPurgeJobSettings.extraEnv }} | ||
env: | ||
{{- toYaml .Values.sessionExpirationPurgeJobSettings.extraEnv | nindent 14 }} | ||
{{- end }} | ||
volumeMounts: | ||
- name: config | ||
mountPath: /config | ||
{{- if .Values.sessionExpirationPurgeJobSettings.extraVolumeMounts }} | ||
{{- toYaml .Values.sessionExpirationPurgeJobSettings.extraVolumeMounts | nindent 14 }} | ||
{{- end }} | ||
{{- if .Values.sessionExpirationPurgeJobSettings.sidecarContainers }} | ||
{{- toYaml .Values.sessionExpirationPurgeJobSettings.sidecarContainers | nindent 10 }} | ||
{{- end }} | ||
restartPolicy: {{ .Values.sessionExpirationPurgeJobSettings.restartPolicy | quote }} | ||
volumes: | ||
- name: config | ||
configMap: | ||
name: minder-config | ||
items: | ||
- key: server-config.yaml | ||
path: server-config.yaml | ||
- key: overrides.yaml | ||
path: overrides.yaml | ||
{{- if .Values.sessionExpirationPurgeJobSettings.extraVolumes }} | ||
{{- toYaml .Values.sessionExpirationPurgeJobSettings.extraVolumes | nindent 10 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters