[wgo-web] Land the membership list cron yaml + make sure /home/admin/bin gets created and granted pod uid perm
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wgo-web] Land the membership list cron yaml + make sure /home/admin/bin gets created and granted pod uid perm
- Date: Tue, 27 Aug 2019 10:58:49 +0000 (UTC)
commit 1913d5a54ff1c0b1054842880b9a33bd8a2e719b
Author: Andrea Veri <averi redhat com>
Date: Tue Aug 27 12:58:49 2019 +0200
Land the membership list cron yaml + make sure /home/admin/bin gets created and granted pod uid perms
Dockerfile | 5 ++++-
members-list-cron.yaml | 47 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 1 deletion(-)
---
diff --git a/Dockerfile b/Dockerfile
index 6268bba..ddd7ea7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -10,7 +10,8 @@ RUN rpm -Uvh --nodeps $(repoquery --location mod_geoip) && \
COPY git-pull.sh /usr/local/bin/git-pull.sh
COPY civicrm-cron.sh /usr/local/bin/civicrm-cron.sh
-RUN mkdir -p /srv/http/www.gnome.org
+RUN mkdir -p /srv/http/www.gnome.org \
+ mkdir -p /home/admin/bin
COPY 00_www.gnome.org.conf /etc/httpd/conf.d
COPY gnome-custom.aug /tmp
@@ -19,6 +20,8 @@ RUN augtool -f /tmp/gnome-custom.aug
RUN groupadd wgo -g 1000370000 && \
useradd wgo -g 1000370000 -u 1000370000 -G apache -r -l
+RUN chown 1000370000:1000370000 -R /home/admin/bin
+
EXPOSE 8443
USER wgo
diff --git a/members-list-cron.yaml b/members-list-cron.yaml
new file mode 100644
index 0000000..086e8f0
--- /dev/null
+++ b/members-list-cron.yaml
@@ -0,0 +1,47 @@
+apiVersion: batch/v1beta1
+kind: CronJob
+metadata:
+ name: members-list
+spec:
+ schedule: '*/5 * * * *'
+ successfulJobsHistoryLimit: 3
+ failedJobsHistoryLimit: 1
+ jobTemplate:
+ metadata:
+ labels:
+ job: members-list
+ spec:
+ template:
+ spec:
+ containers:
+ - name: members-list
+ image: docker-registry.default.svc:5000/wgo/prod
+ command: ["/bin/sh", "-c"]
+ args:
+ - git clone https://gitlab.gnome.org/Infrastructure/sysadmin-bin.git /home/admin/bin;
+ python /home/admin/bin/membership/foundation-operations.py --generate-membership-list >
/srv/http/www.gnome.org/html/membership/memberslist
+ imagePullPolicy: Always
+ env:
+ - name: LDAP_HOST
+ value: 'view.gnome.org'
+ - name: LDAP_USER
+ value: 'uid=sysadmin-scripts-ro,cn=users,cn=accounts,dc=gnome,dc=org'
+ - name: LDAP_USER_BASE
+ value: 'cn=users,cn=accounts,dc=gnome,dc=org'
+ - name: LDAP_GROUP_BASE
+ value: 'cn=groups,cn=accounts,dc=gnome,dc=org'
+ - name: LDAP_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: ldappassword
+ key: LDAP_PASSWORD
+ volumeMounts:
+ - mountPath: /srv/http/www.gnome.org
+ name: wgo-data
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ terminationGracePeriodSeconds: 30
+ volumes:
+ - name: wgo-data
+ persistentVolumeClaim:
+ claimName: wgo-data-claim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]