kind: Template apiVersion: v1 metadata: name: startx-memcache-build-template annotations: openshift.io/display-name: Startx Memcache Server (ephemeral build & deploy workflow) description: Build and deployement workflow of a Memcache SQL database using ephemeral storage for logs records. Use memcache with various underlying linux distribution. See https://hub.docker.com/r/startx/sv-memcache iconClass: icon-redis tags: startx,os,fedora,memcache openshift.io/provider-display-name: STARTX openshift.io/documentation-url: https://hub.docker.com/r/startx/sv-memcache openshift.io/support-url: https://gitlab.com/startx1/containers/issues/new message: |- Your cache ${APP_NAME} is building and will be soon deployed. Monitor the deployement for cache availability Source : ${SOURCE_BRANCH}@${SOURCE_GIT} Backend : ${APP_NAME} Stage : ${APP_STAGE} Builder : ${BUILDER_TAG} Connection : memcache://${APP_NAME}:11211 labels: template: startx-memcache-build-template provider: startx objects: - kind: ImageStream apiVersion: v1 metadata: name: startx-memcache annotations: openshift.io/display-name: Startx Memcache Backend openshift.io/generated-by: STARTX labels: app: "${APP_NAME}" stage: "${APP_STAGE}" spec: tags: - name: fc26 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 26) description: Memcache server builder for distributed cache backend running under Fedora 26 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc26 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc26 - name: fc27 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 27) description: Memcache server builder for distributed cache backend running under Fedora 27 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc27 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc27 - name: fc28 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 28) description: Memcache server builder for distributed cache backend running under Fedora 28 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc28 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc28 - name: fc29 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 29) description: Memcache server builder for distributed cache backend running under Fedora 29 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc29 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc29 - name: fc30 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 30) description: Memcache server builder for distributed cache backend running under Fedora 30 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc30 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc30 - name: fc31 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 31) description: Memcache server builder for distributed cache backend running under Fedora 31 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc31 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc31 - name: fc32 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 32) description: Memcache server builder for distributed cache backend running under Fedora 32 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc32 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc32 - name: fc33 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 33) description: Memcache server builder for distributed cache backend running under Fedora 33 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc33 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc33 - name: fc34 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora 34) description: Memcache server builder for distributed cache backend running under Fedora 34 iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: fc34 sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:fc34 - name: rawhide annotations: openshift.io/display-name: S2I Startx Memcache Backend (Fedora rawhide) description: Memcache server builder for distributed cache backend running under Fedora rawhide iconClass: icon-redis tags: builder,startx,fedora,memcache supports: memcache version: rawhide sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:latest - name: ubi8 annotations: openshift.io/display-name: S2I Startx Memcache Backend (RedHat UBI 8) description: Memcache server builder for distributed cache backend running under RedHat UBI 8 iconClass: icon-redis tags: builder,startx,ubi,memcache supports: memcache version: "8" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:ubi8 - name: alma8 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Alma 8) description: Memcache server builder for distributed cache backend running under Alma 8 iconClass: icon-redis tags: builder,startx,alma,memcache supports: memcache version: "8" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:alma8 - name: rocky8 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Rocky 8) description: Memcache server builder for distributed cache backend running under Rocky 8 iconClass: icon-redis tags: builder,startx,rocky,memcache supports: memcache version: "8" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:rocky8 - name: centos8 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Centos 8) description: Memcache server builder for distributed cache backend running under Centos 8 iconClass: icon-redis tags: builder,startx,centos,memcache supports: memcache version: "8" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:centos8 - name: centos7 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Centos 7) description: Memcache server builder for distributed cache backend running under Centos 7 iconClass: icon-redis tags: builder,startx,centos,memcache supports: memcache version: "7" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:centos7 - name: centos6 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Centos 6) description: Memcache server builder for distributed cache backend running under Centos 6 iconClass: icon-redis tags: builder,startx,centos,memcache supports: memcache version: "6" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:centos6 - name: alpine3 annotations: openshift.io/display-name: S2I Startx Memcache Backend (Alpine 3) description: Memcache server builder for distributed cache backend running under Alpine 3 iconClass: icon-redis tags: builder,startx,alpine,memcache supports: memcache version: "3" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: DockerImage name: startx/sv-memcache:alpine3 - name: latest annotations: openshift.io/display-name: S2I Startx Memcache Backend (latest) description: Memcache server builder for distributed cache backend running under Fedora latest iconClass: icon-redis tags: builder,startx,alpine,memcache supports: memcache sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: ImageStreamTag name: rawhide - name: dev annotations: openshift.io/display-name: S2I Startx Memcache Backend (dev) description: Memcache server builder for distributed cache backend (developpement) iconClass: icon-redis tags: builder,startx,alpine,memcache supports: memcache version: "dev" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: ImageStreamTag name: rawhide - name: test annotations: openshift.io/display-name: S2I Startx Memcache Backend (test) description: Memcache server builder for distributed cache backend (testing) iconClass: icon-redis tags: builder,startx,alpine,memcache supports: memcache version: "test" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: ImageStreamTag name: centos8 - name: preprod annotations: openshift.io/display-name: S2I Startx Memcache Backend (preprod) description: Memcache server builder for distributed cache backend (pre-production) iconClass: icon-redis tags: builder,startx,alpine,memcache supports: memcache version: "pre-prod" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: ImageStreamTag name: alpine3 - name: prod annotations: openshift.io/display-name: S2I Startx Memcache Backend (prod) description: Memcache server builder for distributed cache backend (production) iconClass: icon-redis tags: builder,startx,alpine,memcache supports: memcache version: "prod" sampleRepo: https://gitlab.com/startx1/containers-example-memcache.git from: kind: ImageStreamTag name: alpine3 - kind: ImageStream apiVersion: v1 metadata: name: "${APP_NAME}" annotations: openshift.io/display-name: Backend ${APP_NAME} openshift.io/generated-by: STARTX labels: app: "${APP_NAME}" stage: "${APP_STAGE}" spec: tags: - name: latest annotations: openshift.io/display-name: Backend ${APP_NAME} description: Base image for the database ${APP_NAME} iconClass: icon-redis tags: startx,fedora,memcache,database,${APP_NAME} supports: memcache version: latest - kind: ConfigMap apiVersion: v1 metadata: name: "${APP_NAME}-config" annotations: openshift.io/display-name: Backend ${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: SQL database ${APP_NAME} SX_SUMMARY: SQL database ${APP_NAME} based on ${BUILDER_TAG} container SX_VERSION: 0.0.1 - kind: BuildConfig apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" annotations: openshift.io/generated-by: STARTX spec: triggers: - type: GitHub github: secret: "${WEBHOOK_TOKEN}_${APP_NAME}" - type: Generic generic: secret: "${WEBHOOK_TOKEN}_${APP_NAME}" - type: ImageChange imageChange: {} - type: ConfigChange runPolicy: SerialLatestOnly source: type: Git git: uri: "${SOURCE_GIT}" ref: "${SOURCE_BRANCH}" strategy: type: Source sourceStrategy: from: kind: ImageStreamTag name: startx-memcache:${BUILDER_TAG} env: - name: SX_VERBOSE value: "true" output: to: kind: ImageStreamTag name: "${APP_NAME}:latest" postCommit: command: - "/bin/sx-memcache" - post-build - kind: DeploymentConfig apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" annotations: openshift.io/generated-by: STARTX spec: strategy: type: Rolling rollingParams: updatePeriodSeconds: 1 intervalSeconds: 1 timeoutSeconds: 30 maxUnavailable: 25% maxSurge: 25% triggers: - type: ImageChange imageChangeParams: automatic: true containerNames: - "${APP_NAME}" from: kind: ImageStreamTag name: "${APP_NAME}:latest" - type: ConfigChange postCommit: script: "/bin/sx-memcache info" replicas: 1 test: false selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" template: metadata: labels: app: "${APP_NAME}" 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-memcache" args: - run ports: - containerPort: 11211 protocol: TCP resources: limits: cpu: 4000m memory: "${MEMORY_LIMIT}" requests: cpu: 200m memory: "${MEMORY_LIMIT}" livenessProbe: exec: command: - "/bin/sx-memcache" - isLive initialDelaySeconds: 2 timeoutSeconds: 1 periodSeconds: 5 successThreshold: 1 failureThreshold: 2 readinessProbe: exec: command: - "/bin/sx-memcache" - isReady initialDelaySeconds: 2 timeoutSeconds: 1 periodSeconds: 5 successThreshold: 1 failureThreshold: 2 terminationMessagePath: "/dev/termination-log" imagePullPolicy: Always restartPolicy: Always terminationGracePeriodSeconds: 2 dnsPolicy: ClusterFirst - kind: Service apiVersion: v1 metadata: name: "${APP_NAME}" labels: app: "${APP_NAME}" stage: "${APP_STAGE}" annotations: openshift.io/generated-by: STARTX spec: ports: - protocol: TCP port: 11211 targetPort: 11211 selector: app: "${APP_NAME}" deploymentconfig: "${APP_NAME}" type: ClusterIP sessionAffinity: None parameters: - name: APP_NAME displayName: Backend name description: The name of the created database value: memcache required: true - name: APP_STAGE displayName: Backend stage description: "Stage of the database deployed (ex: dev, test, prod, example, demo, poc, ...)" value: example required: true - name: BUILDER_TAG displayName: Builder image stage description: "Image tag of the startx memcache builder image used. Could be : latest, dev, test, preprod, prod - rawhide, fc31, fc30, fc29, fc28 - alpine3 - ubi8 - centos8, centos7, centos6, alma8, rocky8)" value: latest required: true - name: SOURCE_GIT displayName: Source repository description: URL to the source code to use during build process value: https://gitlab.com/startx1/containers-example-memcache.git required: true - name: SOURCE_BRANCH displayName: Source branch description: Name of the default branch value: master required: true - name: WEBHOOK_TOKEN displayName: Webhook token description: Secret token to use for webhook to github or generic generate: expression from: "[a-zA-Z0-9]{24}" required: true - name: MEMORY_LIMIT displayName: Memory Limit description: Maximum amount of memory the container can use. e.g. 512Mi, 2Gi. value: 1024Mi required: true