diff --git a/playbooks/openshift-apps/review-stats.yml b/playbooks/openshift-apps/review-stats.yml index 6f55f5ff77..4edd24c26d 100644 --- a/playbooks/openshift-apps/review-stats.yml +++ b/playbooks/openshift-apps/review-stats.yml @@ -24,6 +24,10 @@ app: review-stats objectname: buildconfig.yml template: buildconfig.yml + - role: openshift/object + app: review-stats + template: configmap.yml + objectname: configmap.yml - role: openshift/start-build app: review-stats buildname: builder-build diff --git a/roles/openshift-apps/review-stats/templates/config.cfg b/roles/openshift-apps/review-stats/templates/config.cfg new file mode 100644 index 0000000000..36b790b61a --- /dev/null +++ b/roles/openshift-apps/review-stats/templates/config.cfg @@ -0,0 +1,8 @@ +[review-stats] +{% if env == "staging" %} +url = "https://partner-bugzilla.redhat.com/xmlrpc.cgi" +{% else %} +url = "https://bugzilla.redhat.com/xmlrpc.cgi" +{% endif %} +username = "package-review@lists.fedoraproject.org" +password = "{{ packagereviewbugzilla }}" diff --git a/roles/openshift-apps/review-stats/templates/configmap.yml b/roles/openshift-apps/review-stats/templates/configmap.yml new file mode 100644 index 0000000000..fd283c28f7 --- /dev/null +++ b/roles/openshift-apps/review-stats/templates/configmap.yml @@ -0,0 +1,11 @@ +{% macro load_file(filename) %}{% include filename %}{%- endmacro -%} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: review-stats-configmap + labels: + app: review-stats +data: + config.cfg: |- + {{ load_file('config.cfg') | indent }} diff --git a/roles/openshift-apps/review-stats/templates/cron.yml b/roles/openshift-apps/review-stats/templates/cron.yml index 22c2035953..a16469b96d 100644 --- a/roles/openshift-apps/review-stats/templates/cron.yml +++ b/roles/openshift-apps/review-stats/templates/cron.yml @@ -18,5 +18,13 @@ spec: env: - name: BUILD_ENV value: "{{ env_short }}" + volumeMounts: + - name: review-stats-config + mountPath: /etc/review-stats + readOnly: true restartPolicy: Never startingDeadlineSeconds: 600 + volumes: + - name: review-stats-config + configMap: + name: review-stats-configmap