-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
FIS 2.0
-
None
-
%
Use case:
As a developer, I want to create a maven artifact representing a deployment to be created from an existing openshift image stream (e.g. an A-MQ deployment from jboss-amq-6.2:1.3 ImageStreamTag from the openshift namespace ), so that I can use this artifact as a dependency to be deployed together with my deployment.
How to do it:
- Create a maven project with f-m-p plugin,
- Create src/main/fabric8/deploymentconfig.yml like the following
kind: DeploymentConfig spec: replicas: 1 selector: name: amq-pod strategy: recreateParams: timeoutSeconds: 600 resources: {} type: Recreate template: metadata: creationTimestamp: null labels: name: amq-pod name: amq-pod spec: containers: - env: - name: AMQ_KEYSTORE_TRUSTSTORE_DIR value: /opt/amq/conf - name: AMQ_TRUSTSTORE_PASSWORD value: password - name: AMQ_KEYSTORE_PASSWORD value: password - name: AMQ_KEYSTORE value: broker.ks - name: AMQ_TRUSTSTORE value: broker.ts imagePullPolicy: Always name: amq ports: - containerPort: 8778 name: jolokia protocol: TCP readinessProbe: exec: command: - /bin/bash - -c - /opt/amq/bin/readinessProbe.sh failureThreshold: 3 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 resources: {} terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 test: false triggers: - type: ConfigChange - type: ImageChange imageChangeParams: automatic: true containerNames: - amq from: kind: ImageStreamTag namespace: openshift name: jboss-amq-62:1.3
- Note the importance of using deploymentconfig.yml instead of deployment.yml and the kind: DeploymentConfig (otherwise the image change trigger won't be properly created, as it would not be treated as a DeploymentConfig, but as a Deployment)
- documents
-
ENTESB-8488 fabric8:resource replaces an explicit ImageChange trigger, preventing deployments from existing image streams
- Closed