OpenShift DeploymentConfig Definition: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * OpenShift Concepts =Example= <pre> apiVersion: v1 kind: DeploymentConfig metadata: name: frontend spec: replicas: 5...")
 
Line 6: Line 6:


<pre>
<pre>
apiVersion: v1
 
kind: DeploymentConfig
      "metadata": {
metadata:
        "labels": {
  name: frontend
          "name": "frontend"
spec:
        }
  replicas: 5
      },
  selector:
      "spec": {
    name: frontend
        "containers": [
  template: { ... }
          {
  triggers:
            "name": "helloworld",
  - type: ConfigChange  
            "image": "openshift/origin-ruby-sample",
  - imageChangeParams:
            "ports": [
      automatic: true
              {
      containerNames:
                "containerPort": 8080,
      - helloworld
                "protocol": "TCP"
      from:
              }
        kind: ImageStreamTag
            ]
        name: hello-openshift:latest
          }
     type: ImageChange 
        ]
  strategy:
      }
    type: Rolling
    }
</pre>
    "replicas": 5,
    "selector": {
      "name": "frontend"
    },
    "triggers": [
      {
        "type": "ConfigChange"
      },
      {
        "type": "ImageChange",
        "imageChangeParams": {
          "automatic": true,
          "containerNames": [
            "helloworld"
          ],
          "from": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        }
      }
     ],
    "strategy": {
      "type": "Rolling"
    }
  }
}</pre>

Revision as of 00:31, 12 May 2017

Internal

Example


      "metadata": {
        "labels": {
          "name": "frontend"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "helloworld",
            "image": "openshift/origin-ruby-sample",
            "ports": [
              {
                "containerPort": 8080,
                "protocol": "TCP"
              }
            ]
          }
        ]
      }
    }
    "replicas": 5, 
    "selector": {
      "name": "frontend"
    },
    "triggers": [
      {
        "type": "ConfigChange" 
      },
      {
        "type": "ImageChange", 
        "imageChangeParams": {
          "automatic": true,
          "containerNames": [
            "helloworld"
          ],
          "from": {
            "kind": "ImageStreamTag",
            "name": "origin-ruby-sample:latest"
          }
        }
      }
    ],
    "strategy": {
      "type": "Rolling" 
    }
  }
}