Skip to content

Commit

Permalink
configurable serviceaccount name
Browse files Browse the repository at this point in the history
  • Loading branch information
pb82 committed Feb 26, 2019
1 parent 9ceaa3a commit 6b835cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COPY tools /opt/intly/tools
RUN chown -R 1001:root /opt/intly

RUN find /opt/intly/tools -type f -exec chmod +x {} \; && \
mkdir /.kube && touch /.kube/config && chmod -R 777 /.kube
mkdir /.kube && touch /.kube/config && chmod -R 774 /.kube

ENTRYPOINT ["/opt/intly/tools/entrypoint.sh"]

Expand Down
4 changes: 3 additions & 1 deletion templates/openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ BACKEND_SECRET_NAME Backend secret name to create environment variables fro
ENCRYPTION_SECRET_NAME Encruption secret name to create environment variables from
CRON_SCHEDULE Job schedule in Cron Format [Default is everyday at 2am] */1 * * * *
IMAGE Backup docker image URL quay.io/integreatly/backup-container:master
SERVICEACCOUNT The service account used by the backup job. backupjob
DEBUG Debug flag to sleep the job pod after its execution
```

Expand Down Expand Up @@ -85,5 +86,6 @@ COMPONENT_SECRET_NAME Component secret name to create environment variables f
BACKEND_SECRET_NAME Backend secret name to create environment variables from
ENCRYPTION_SECRET_NAME Encruption secret name to create environment variables from
IMAGE Backup docker image URL quay.io/integreatly/backup-container:master
SERVICEACCOUNT The service account used by the backup job. backupjob
DEBUG Debug flag to sleep the job pod after its execution
```
```
5 changes: 4 additions & 1 deletion templates/openshift/backup-cronjob-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ objects:
labels:
cronjob-name: ${NAME}
spec:
serviceAccountName: backupjob
serviceAccountName: "${SERVICEACCOUNT}"
containers:
- name: backup-cronjob
image: "${IMAGE}"
Expand Down Expand Up @@ -71,5 +71,8 @@ parameters:
- name: IMAGE
description: 'Backup docker image URL'
value: 'quay.io/integreatly/backup-container:master'
- name: SERVICEACCOUNT
description: 'The service account used by the backup job'
value: backupjob
- name: DEBUG
description: "Debug flag to sleep the job pod after its execution"
12 changes: 4 additions & 8 deletions templates/openshift/backup-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ objects:
labels:
job-name: ${NAME}
spec:
serviceAccountName: backupjob
serviceAccountName: "${SERVICEACCOUNT}"
containers:
- name: backup-job
image: "${IMAGE}"
Expand All @@ -34,13 +34,6 @@ objects:
- "${ENCRYPTION}"
- "-d"
- "${DEBUG}"
envFrom:
- secretRef:
name: "${COMPONENT_SECRET_NAME}"
- secretRef:
name: "${BACKEND_SECRET_NAME}"
- secretRef:
name: "${ENCRYPTION_SECRET_NAME}"
restartPolicy: Never
parameters:
- name: NAME
Expand All @@ -67,5 +60,8 @@ parameters:
- name: IMAGE
description: 'Backup docker image URL'
value: 'quay.io/integreatly/backup-container:master'
- name: SERVICEACCOUNT
description: 'The service account used by the backup job'
value: backupjob
- name: DEBUG
description: "Debug flag to sleep the job pod after its execution"

0 comments on commit 6b835cc

Please sign in to comment.