Skip to content

Instantly share code, notes, and snippets.

@Miciah
Last active April 15, 2016 20:00
Show Gist options
  • Save Miciah/f719d1ace1f077302881784e5ba3279a to your computer and use it in GitHub Desktop.
Save Miciah/f719d1ace1f077302881784e5ba3279a to your computer and use it in GitHub Desktop.
$ oc run jenkins-master --image=docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos --port=80 --expose --dry-run -o json > ,one-port
$ oc run jenkins-master --image=docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos --overrides='{"apiVersion":"v1","spec":{"template":{"spec":{"containers":[{"name":"jenkins-master","image":"docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos","ports":[{"containerPort":80},{"containerPort":41000}]}]}}}}' --expose --dry-run -o json > ,two-ports
error: --port must be a positive integer when exposing a service
$ oc run jenkins-master --image=docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos --port=80 --overrides='{"apiVersion":"v1","spec":{"template":{"spec":{"containers":[{"name":"jenkins-master","image":"docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos","ports":[{"containerPort":80},{"containerPort":41000}]}]}}}}' --expose --dry-run -o json > ,two-ports
$ diff -u ,one-port ,two-ports
--- ,one-port 2016-04-01 15:58:32.577483696 -0400
+++ ,two-ports 2016-04-01 15:59:03.164020621 -0400
@@ -32,9 +32,21 @@
},
"spec": {
"strategy": {
+ "type": "Rolling",
+ "rollingParams": {
+ "updatePeriodSeconds": 1,
+ "intervalSeconds": 1,
+ "timeoutSeconds": 600,
+ "maxUnavailable": "25%",
+ "maxSurge": "25%"
+ },
"resources": {}
},
- "triggers": null,
+ "triggers": [
+ {
+ "type": "ConfigChange"
+ }
+ ],
"replicas": 1,
"test": false,
"selector": {
@@ -54,12 +66,23 @@
"image": "docker-registry.usersys.redhat.com:5000/aos-ci/jenkins-master-aos",
"ports": [
{
- "containerPort": 80
+ "containerPort": 80,
+ "protocol": "TCP"
+ },
+ {
+ "containerPort": 41000,
+ "protocol": "TCP"
}
],
- "resources": {}
+ "resources": {},
+ "terminationMessagePath": "/dev/termination-log",
+ "imagePullPolicy": "Always"
}
- ]
+ ],
+ "restartPolicy": "Always",
+ "terminationGracePeriodSeconds": 30,
+ "dnsPolicy": "ClusterFirst",
+ "securityContext": {}
}
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment