-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from jpopelka/mix
Simplify
- Loading branch information
Showing
11 changed files
with
89 additions
and
159 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
packit-service-validation-install: | ||
make -C ocp-deployments/packit-service-validation install | ||
|
||
packit-service-validation-dryrun: | ||
make -C ocp-deployments/packit-service-validation dryrun |
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 was deleted.
Oops, something went wrong.
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,7 @@ | ||
DEPLOYMENT ?= production | ||
|
||
install: | ||
helm upgrade $(EXTRA_OPTIONS) --install --cleanup-on-fail packit-$(DEPLOYMENT)-validation ../../ocp-helm-charts/packit-service-validation/ --set secrets.sentry=${SENTRY} --set secrets.github=${GITHUB} --values $(DEPLOYMENT).yaml | ||
|
||
dryrun: | ||
make install EXTRA_OPTIONS="--debug --dry-run" |
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,4 @@ | ||
deployment: production | ||
|
||
image: | ||
tag: 2c35a8a |
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,4 @@ | ||
deployment: staging | ||
|
||
image: | ||
tag: 2c35a8a |
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 |
---|---|---|
|
@@ -2,14 +2,13 @@ apiVersion : v2 | |
name : packit-service-validation | ||
description : Helm chart for deploying packit-service-validation app | ||
type : application | ||
version : 1.0.0 | ||
appVersion : "1.0.0" | ||
version : 1.1.0 | ||
|
||
keywords: | ||
- python | ||
- unified | ||
- deployment | ||
|
||
maintainers: | ||
- name : Serhii Turivnyi | ||
email: [email protected] | ||
- name: The Packit team | ||
url: https://packit.dev |
42 changes: 13 additions & 29 deletions
42
ocp-helm-charts/packit-service-validation/templates/job-run-validation.yml
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 |
---|---|---|
@@ -1,48 +1,32 @@ | ||
# https://docs.openshift.com/container-platform/4.11/rest_api/workloads_apis/cronjob-batch-v1.html | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ .Values.cronjob_name }} | ||
name: {{ .Release.Name }} | ||
spec: | ||
schedule: "{{ .Values.cron.schedule }}" | ||
concurrencyPolicy: {{ .Values.cron.concurrencyPolicy }} | ||
startingDeadlineSeconds: {{ .Values.cron.startingDeadlineSeconds }} | ||
suspend: {{ .Values.cron.suspend }} | ||
successfulJobsHistoryLimit: {{ .Values.cron.successfulJobsHistoryLimit }} | ||
failedJobsHistoryLimit: {{ .Values.cron.failedJobsHistoryLimit }} | ||
schedule: {{ .Values.cronjob.schedule | quote }} | ||
jobTemplate: | ||
metadata: | ||
annotations: | ||
timestamp: {{ now | quote }} | ||
creationTimestamp: null | ||
labels: | ||
app: {{ .Values.app_name }} | ||
deploymentconfig: {{ .Values.app_name }} | ||
spec: | ||
activeDeadlineSeconds: {{ .Values.cronjob.activeDeadlineSeconds }} | ||
template: | ||
metadata: | ||
annotations: | ||
timestamp: {{ now | quote }} | ||
creationTimestamp: null | ||
labels: | ||
app: {{ .Values.app_name }} | ||
deploymentconfig: {{ .Values.app_name }} | ||
spec: | ||
containers: | ||
- name: {{ .Values.container.name }} | ||
image: {{ .Values.image.repo }}:{{ .Values.image.tag }} | ||
command: ["python3", "/usr/bin/packit-service-validation.py"] | ||
- name: run-validation | ||
image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: IfNotPresent | ||
env: | ||
- name: GITHUB_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.env_variables.github_token.name }} | ||
key: {{ .Values.env_variables.github_token.key }} | ||
name: {{ .Release.Name }}-github | ||
key: token | ||
- name: SENTRY_SECRET | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .Values.env_variables.sentry_secret.name }} | ||
key: {{ .Values.env_variables.sentry_secret.key }} | ||
name: {{ .Release.Name }}-sentry | ||
key: dsn | ||
- name: DEPLOYMENT | ||
value: {{ .Values.env_variables.deployment.value }} | ||
value: {{ .Values.deployment }} | ||
resources: | ||
{{- toYaml .Values.resources | nindent 14 }} | ||
restartPolicy: OnFailure |
4 changes: 2 additions & 2 deletions
4
ocp-helm-charts/packit-service-validation/templates/secret-github.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: packit-github-token | ||
namespace: {{ .Values.namespace }} | ||
name: {{ .Release.Name }}-github | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque | ||
data: | ||
token: "{{ .Values.secrets.github }}" |
6 changes: 3 additions & 3 deletions
6
ocp-helm-charts/packit-service-validation/templates/secret-sentry.yml
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: packit-sentry | ||
namespace: {{ .Values.namespace }} | ||
name: {{ .Release.Name }}-sentry | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque | ||
data: | ||
sentry: "{{ .Values.secrets.sentry }}" | ||
dsn: "{{ .Values.secrets.sentry }}" |
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