[planet-web/oscp] Add a PV and cron job templates for pgo. In addition it should be fine to run update-pgo-heads from
- From: Andrea Veri <averi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [planet-web/oscp] Add a PV and cron job templates for pgo. In addition it should be fine to run update-pgo-heads from
- Date: Thu, 29 Aug 2019 15:35:43 +0000 (UTC)
commit abf083394663da3bfe7f2a6bb8732e76b20f9168
Author: Andrea Veri <averi redhat com>
Date: Thu Aug 29 17:35:38 2019 +0200
Add a PV and cron job templates for pgo. In addition it should be fine to run update-pgo-heads from
within the running container
entrypoint.sh | 3 +
templates/oscp-pv.yaml | 192 ++++++++++++++++++++++++++++++
oscp.yaml => templates/oscp-volatile.yaml | 0
templates/planet-update-cron.yaml | 30 +++++
4 files changed, 225 insertions(+)
---
diff --git a/entrypoint.sh b/entrypoint.sh
index 37365d7..c64b872 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -6,6 +6,9 @@ set -e
if [[ "$PLANET_NAME" != 'gnome' ]]; then
/usr/local/bin/update-planet
while sleep 3600; do /usr/local/bin/update-planet; done &
+else
+ /usr/local/bin/update-pgo-heads
+ while sleep 3600; do /usr/local/bin/update-pgo-heads; done &
fi
ln -s "/planet/web/$PLANET_NAME" /planet/webroot
diff --git a/templates/oscp-pv.yaml b/templates/oscp-pv.yaml
new file mode 100644
index 0000000..ef45a61
--- /dev/null
+++ b/templates/oscp-pv.yaml
@@ -0,0 +1,192 @@
+---
+kind: Template
+apiVersion: v1
+metadata:
+ name: planet-web
+ annotations:
+ openshift.io/display-name: "GNOME Planets"
+ description: Openshift template for GNOME planets
+parameters:
+- name: IS_NAMESPACE
+ description: The OpenShift Namespace where the ImageStream resides.
+ displayName: Namespace
+ value: planet-web
+- name: IS_NAME
+ description: The OpenShift ImageStream name.
+ displayName: Image Stream
+ value: planet-web
+- name: PLANET_NAME
+ description: The name of planet to deploy, as listed in config/ directory of planet-web repository
+ displayName: Planet name
+ required: true
+- name: PLANET_DOMAIN
+ description: Domain at which planet should be available
+ displayName: Planet domain
+ required: true
+
+objects:
+- apiVersion: build.openshift.io/v1
+ kind: BuildConfig
+ metadata:
+ name: planet-web
+ spec:
+ runPolicy: Serial
+ source:
+ git:
+ uri: https://gitlab.gnome.org/Infrastructure/planet-web.git
+ ref: oscp
+ strategy:
+ dockerStrategy:
+ dockerfilePath: Dockerfile
+ output:
+ to:
+ kind: ImageStreamTag
+ name: ${IS_NAME}:latest
+
+- apiVersion: image.openshift.io/v1
+ kind: ImageStream
+ metadata:
+ generation: 2
+ name: ${IS_NAME}
+ spec:
+ lookupPolicy:
+ local: false
+ tags:
+ - annotations: null
+ from:
+ kind: DockerImage
+ name: ${IS_NAME}:latest
+ generation: 2
+ importPolicy: {}
+ name: ${IS_VERSION}
+ referencePolicy:
+ type: Source
+
+- kind: DeploymentConfig
+ apiVersion: v1
+ metadata:
+ name: planet-web-${PLANET_NAME}
+ generation: 1
+ labels:
+ app: planet-web-${PLANET_NAME}
+ annotations: {}
+ spec:
+ strategy:
+ type: Rolling
+ rollingParams:
+ updatePeriodSeconds: 1
+ intervalSeconds: 1
+ timeoutSeconds: 180
+ maxUnavailable: 25%
+ maxSurge: 25%
+ resources: {}
+ activeDeadlineSeconds: 21600
+ triggers:
+ - type: ConfigChange
+ - type: ImageChange
+ imageChangeParams:
+ automatic: true
+ containerNames:
+ - planet-web-${PLANET_NAME}
+ from:
+ kind: ImageStreamTag
+ namespace: ${IS_NAMESPACE}
+ name: ${IS_NAME}:latest
+ replicas: 1
+ revisionHistoryLimit: 10
+ test: false
+ selector:
+ app: planet-web-${PLANET_NAME}
+ deploymentconfig: planet-web-${PLANET_NAME}
+ template:
+ metadata:
+ labels:
+ app: planet-web-${PLANET_NAME}
+ deploymentconfig: planet-web-${PLANET_NAME}
+ annotations: {}
+ spec:
+ containers:
+ - name: planet-web-${PLANET_NAME}
+ ports:
+ - containerPort: 8080
+ protocol: TCP
+ env:
+ - name: PLANET_NAME
+ value: ${PLANET_NAME}
+ volumeMounts:
+ - mountPath: /planet/webroot
+ name: planet-webroot
+ resources: {}
+ livenessProbe:
+ httpGet:
+ path: "/"
+ port: 8080
+ scheme: HTTP
+ initialDelaySeconds: 60
+ timeoutSeconds: 5
+ periodSeconds: 10
+ successThreshold: 1
+ failureThreshold: 6
+ readinessProbe:
+ httpGet:
+ path: "/"
+ port: 8080
+ scheme: HTTP
+ initialDelaySeconds: 10
+ timeoutSeconds: 2
+ periodSeconds: 10
+ successThreshold: 1
+ failureThreshold: 10
+ terminationMessagePath: "/dev/termination-log"
+ terminationMessagePolicy: File
+ imagePullPolicy: Always
+ restartPolicy: Always
+ terminationGracePeriodSeconds: 30
+ dnsPolicy: ClusterFirst
+ securityContext: {}
+ schedulerName: default-scheduler
+ volumes:
+ - name: planet-webroot
+ persistentVolumeClaim:
+ claimName: planet-webroot-claim
+
+
+- kind: Service
+ apiVersion: v1
+ metadata:
+ name: planet-web-${PLANET_NAME}
+ labels:
+ app: planet-web-${PLANET_NAME}
+ spec:
+ ports:
+ - name: web
+ protocol: TCP
+ port: 80
+ targetPort: 8080
+ selector:
+ app: planet-web-${PLANET_NAME}
+ deploymentconfig: planet-web-${PLANET_NAME}
+ type: ClusterIP
+ sessionAffinity: None
+ status:
+ loadBalancer: {}
+
+- kind: Route
+ apiVersion: v1
+ metadata:
+ name: planet-web-${PLANET_NAME}
+ creationTimestamp:
+ labels:
+ app: planet-web-${PLANET_NAME}
+ spec:
+ host: ${PLANET_DOMAIN}
+ to:
+ kind: Service
+ name: planet-web-${PLANET_NAME}
+ weight: 100
+ port:
+ targetPort: web
+ # tls:
+ # termination: edge
+ # insecureEdgeTerminationPolicy: "Redirect"
+ # wildcardPolicy: None
diff --git a/oscp.yaml b/templates/oscp-volatile.yaml
similarity index 100%
rename from oscp.yaml
rename to templates/oscp-volatile.yaml
diff --git a/templates/planet-update-cron.yaml b/templates/planet-update-cron.yaml
new file mode 100644
index 0000000..b4e6d2a
--- /dev/null
+++ b/templates/planet-update-cron.yaml
@@ -0,0 +1,30 @@
+apiVersion: batch/v1beta1
+kind: CronJob
+metadata:
+ name: planet-update-cron
+spec:
+ schedule: '0 * * * *'
+ successfulJobsHistoryLimit: 1
+ failedJobsHistoryLimit: 1
+ jobTemplate:
+ metadata:
+ labels:
+ job: planet-update-cron
+ spec:
+ template:
+ spec:
+ containers:
+ - name: planet-update-cron
+ image: "docker-registry.default.svc:5000/planet-web/planet-web"
+ command: ["/usr/local/bin/update-planet"]
+ imagePullPolicy: Always
+ volumeMounts:
+ - mountPath: /planet/webroot
+ name: planet-webroot
+ dnsPolicy: ClusterFirst
+ restartPolicy: Never
+ terminationGracePeriodSeconds: 30
+ volumes:
+ - name: planet-webroot
+ persistentVolumeClaim:
+ claimName: planet-webroot-claim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]