--- kind: Template apiVersion: v1 metadata: name: startx-os-deploy-template annotations: openshift.io/display-name: Startx Base OS (deploy workflow) description: Deployement workflow of a bash script using various underlying linux distribution. See https://hub.docker.com/r/startx/fedora iconClass: icon-beaker tags: startx,os,fedora openshift.io/long-description: This template provides a fedora container with minimal tools and scripts. Ready to use in openshift with a simple deployement config, or as a s2i builder for bash applications. For more information about using this image, including OpenShift considerations, see https://gitlab.com/startx1/containers/blob/master/README.md. openshift.io/provider-display-name: STARTX openshift.io/documentation-url: https://gitlab.com/startx1/containers/blob/master/README.md openshift.io/support-url: https://gitlab.com/startx1/containers/issues/new message: |- Your application ${APP_NAME} is deploying... Service name: ${APP_NAME} action : ${RUN_ACTION} labels: template: startx-os-deploy-template provider: startx objects: - kind: ImageStream apiVersion: v1 metadata: name: "${APP_NAME}" annotations: openshift.io/display-name: Startx Base OS (fedora) labels: app: "${APP_NAME}" stage: "${APP_STAGE}" spec: tags: - name: ${APP_STAGE} annotations: openshift.io/display-name: S2I Startx ${APP_STAGE} description: Minimal Fedora OS builder for bash operations iconClass: icon-beaker tags: builder,startx,${APP_STAGE} supports: ${APP_STAGE} sampleRepo: https://gitlab.com/startx1/containers-example-bash.git from: kind: DockerImage name: ${BUILDER_IMAGE} - kind: ConfigMap apiVersion: v1 metadata: name: "${APP_NAME}-config" annotations: openshift.io/display-name: Application ${APP_NAME} configuration openshift.io/generated-by: STARTX labels: app: "${APP_NAME}" stage: "${APP_STAGE}" data: SX_ID: ${APP_NAME}/${APP_STAGE} SX_TYPE: ${APP_STAGE} SX_SERVICE: ${APP_NAME} SX_NAME: Bash application ${APP_NAME} SX_SUMMARY: Bash application ${APP_NAME} based on fedora container SX_VERSION: 0.0.1 - kind: DeploymentConfig apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" annotations: openshift.io/generated-by: STARTX spec: strategy: type: Recreate recreateParams: timeoutSeconds: 40 triggers: - type: ImageChange imageChangeParams: automatic: true containerNames: - "${APP_NAME}" from: kind: ImageStreamTag name: "${APP_NAME}:${APP_STAGE}" - type: ConfigChange postCommit: script: "/bin/sx info" replicas: 1 test: false selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" template: metadata: labels: app: "${APP_NAME}" stage: "${APP_STAGE}" deploymentconfig: "${APP_NAME}" annotations: openshift.io/generated-by: STARTX spec: containers: - name: "${APP_NAME}" image: " " env: - name: SX_VERBOSE value: "true" envFrom: - configMapRef: name: ${APP_NAME}-config command: - "/bin/sx" args: - "${RUN_ACTION}" livenessProbe: exec: command: - "/bin/sx" - isLive initialDelaySeconds: 1 timeoutSeconds: 1 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 readinessProbe: exec: command: - "/bin/sx" - isReady initialDelaySeconds: 1 timeoutSeconds: 1 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 resources: limits: cpu: 1000m memory: 256Mi requests: cpu: 200m memory: 128Mi terminationMessagePath: "/dev/termination-log" imagePullPolicy: Always volumeMounts: - mountPath: "/app" name: "${APP_NAME}-app" volumes: - name: "${APP_NAME}-app" emptyDir: {} restartPolicy: Always terminationGracePeriodSeconds: 30 dnsPolicy: ClusterFirst securityContext: {} parameters: - name: APP_NAME displayName: Application name description: The name of the created application value: daemon required: true - name: APP_STAGE displayName: Application stage description: "Stage of the application deployed (ex: dev, test, prod, example, demo, poc, ...)" value: example required: true - name: BUILDER_IMAGE displayName: Startx image description: "Image tag of the startx os image used. Could be : startx/fedora:latest, startx/fedora:32, startx/fedora:31, startx/fedora:30, startx/fedora:29, startx/fedora:28, startx/alpine:3, startx/centos:7, startx/centos:6" value: startx/fedora:latest required: true - name: RUN_ACTION displayName: Main action to perfom description: Action to perform for this running Pod. Should be one of build, post-build, pre-deploy, post-deploy, run, isLive, isReady, usage, usageS2i, daemon, info, version. See documentation for action list. value: run required: true