Skip to content

Instantly share code, notes, and snippets.

@david-martin
Last active November 22, 2016 13:33
Show Gist options
  • Save david-martin/fb29162ab5df4a6ad7d19abb8cc1a0a4 to your computer and use it in GitHub Desktop.
Save david-martin/fb29162ab5df4a6ad7d19abb8cc1a0a4 to your computer and use it in GitHub Desktop.
Kubernetes & OpenShift resources
apiVersion: v1
kind: BuildConfig
metadata:
name: nodejsexample
namespace: nodejsexample
selfLink: /oapi/v1/namespaces/nodejsexample/buildconfigs/nodejsexample
uid: cce45238-b0b6-11e6-89c0-0abb8905d551
resourceVersion: '23124054'
creationTimestamp: '2016-11-22T13:23:04Z'
labels:
app: nodejsexample
annotations:
openshift.io/generated-by: OpenShiftWebConsole
spec:
triggers:
-
type: Generic
generic:
secret: b0b173d80f836e75
-
type: GitHub
github:
secret: f2262c9b44496afb
-
type: ImageChange
imageChange:
lastTriggeredImageID: 'registry.access.redhat.com/rhscl/nodejs-4-rhel7@sha256:c64ff74d6e92d2f76cd2cf8af3c40075a2fe2674eab1d417b686f9e1a059fd0c'
-
type: ConfigChange
runPolicy: Serial
source:
type: Git
git:
uri: 'https://github.com/openshift/nodejs-ex.git'
ref: master
strategy:
type: Source
sourceStrategy:
from:
kind: ImageStreamTag
namespace: openshift
name: 'nodejs:4'
output:
to:
kind: ImageStreamTag
name: 'nodejsexample:latest'
resources:
postCommit:
status:
lastVersion: 1
apiVersion: v1
kind: DeploymentConfig
metadata:
name: nodejsexample
namespace: nodejsexample
selfLink: /oapi/v1/namespaces/nodejsexample/deploymentconfigs/nodejsexample
uid: cce4559d-b0b6-11e6-89c0-0abb8905d551
resourceVersion: '23124291'
generation: 2
creationTimestamp: '2016-11-22T13:23:04Z'
labels:
app: nodejsexample
annotations:
openshift.io/generated-by: OpenShiftWebConsole
spec:
strategy:
type: Rolling
rollingParams:
updatePeriodSeconds: 1
intervalSeconds: 1
timeoutSeconds: 600
maxUnavailable: 25%
maxSurge: 25%
resources:
triggers:
-
type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- nodejsexample
from:
kind: ImageStreamTag
namespace: nodejsexample
name: 'nodejsexample:latest'
lastTriggeredImage: '172.30.72.170:5000/nodejsexample/nodejsexample@sha256:030c0b0453ef5f711a5faf5b5672206e21bdcec90047fa9dd2ec6ee10bf2ec0c'
-
type: ConfigChange
replicas: 1
test: false
selector:
deploymentconfig: nodejsexample
template:
metadata:
creationTimestamp: null
labels:
app: nodejsexample
deploymentconfig: nodejsexample
spec:
containers:
-
name: nodejsexample
image: '172.30.72.170:5000/nodejsexample/nodejsexample@sha256:030c0b0453ef5f711a5faf5b5672206e21bdcec90047fa9dd2ec6ee10bf2ec0c'
ports:
-
containerPort: 8080
protocol: TCP
resources:
terminationMessagePath: /dev/termination-log
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext:
status:
latestVersion: 1
observedGeneration: 2
replicas: 1
updatedReplicas: 1
availableReplicas: 1
details:
message: 'caused by an image change'
causes:
-
type: ImageChange
imageTrigger:
from:
kind: ImageStreamTag
namespace: nodejsexample
name: 'nodejsexample:latest'
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
creationTimestamp: null
labels:
app: nodejsexample
name: nodejsexample
spec:
maxReplicas: 3
minReplicas: 1
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: DeploymentConfig
name: nodejsexample
targetCPUUtilizationPercentage: 80
status:
currentReplicas: 1
desiredReplicas: 0
apiVersion: v1
kind: Pod
metadata:
name: nodejsexample-1-build
namespace: nodejsexample
selfLink: /api/v1/namespaces/nodejsexample/pods/nodejsexample-1-build
uid: ccef7e7f-b0b6-11e6-89c0-0abb8905d551
resourceVersion: '23124068'
creationTimestamp: '2016-11-22T13:23:05Z'
labels:
openshift.io/build.name: nodejsexample-1
annotations:
openshift.io/build.name: nodejsexample-1
openshift.io/scc: privileged
spec:
volumes:
-
name: docker-socket
hostPath:
path: /var/run/docker.sock
-
name: builder-dockercfg-yg6et-push
secret:
secretName: builder-dockercfg-yg6et
-
name: builder-token-r2nwa
secret:
secretName: builder-token-r2nwa
containers:
-
name: sti-build
image: 'openshift3/ose-sti-builder:v3.3.1.3'
args:
- '--loglevel=0'
env:
-
name: BUILD
value: "{\"kind\":\"Build\",\"apiVersion\":\"v1\",\"metadata\":{\"name\":\"nodejsexample-1\",\"namespace\":\"nodejsexample\",\"selfLink\":\"/oapi/v1/namespaces/nodejsexample/builds/nodejsexample-1\",\"uid\":\"ccec7ec5-b0b6-11e6-89c0-0abb8905d551\",\"resourceVersion\":\"23124055\",\"creationTimestamp\":\"2016-11-22T13:23:04Z\",\"labels\":{\"app\":\"nodejsexample\",\"buildconfig\":\"nodejsexample\",\"openshift.io/build-config.name\":\"nodejsexample\",\"openshift.io/build.start-policy\":\"Serial\"},\"annotations\":{\"openshift.io/build-config.name\":\"nodejsexample\",\"openshift.io/build.number\":\"1\"}},\"spec\":{\"serviceAccount\":\"builder\",\"source\":{\"type\":\"Git\",\"git\":{\"uri\":\"https://github.com/openshift/nodejs-ex.git\",\"ref\":\"master\"}},\"strategy\":{\"type\":\"Source\",\"sourceStrategy\":{\"from\":{\"kind\":\"DockerImage\",\"name\":\"registry.access.redhat.com/rhscl/nodejs-4-rhel7@sha256:c64ff74d6e92d2f76cd2cf8af3c40075a2fe2674eab1d417b686f9e1a059fd0c\"}}},\"output\":{\"to\":{\"kind\":\"DockerImage\",\"name\":\"172.30.72.170:5000/nodejsexample/nodejsexample:latest\"},\"pushSecret\":{\"name\":\"builder-dockercfg-yg6et\"}},\"resources\":{},\"postCommit\":{},\"triggeredBy\":[{\"message\":\"Build configuration change\"}]},\"status\":{\"phase\":\"New\",\"outputDockerImageReference\":\"172.30.72.170:5000/nodejsexample/nodejsexample:latest\",\"config\":{\"kind\":\"BuildConfig\",\"namespace\":\"nodejsexample\",\"name\":\"nodejsexample\"}}}\n"
-
name: SOURCE_REPOSITORY
value: 'https://github.com/openshift/nodejs-ex.git'
-
name: SOURCE_URI
value: 'https://github.com/openshift/nodejs-ex.git'
-
name: SOURCE_REF
value: master
-
name: ORIGIN_VERSION
value: v3.3.1.3
-
name: ALLOWED_UIDS
value: 1-
-
name: DROP_CAPS
value: 'KILL,MKNOD,SETGID,SETUID,SYS_CHROOT'
-
name: PUSH_DOCKERCFG_PATH
value: /var/run/secrets/openshift.io/push
resources:
volumeMounts:
-
name: docker-socket
mountPath: /var/run/docker.sock
-
name: builder-dockercfg-yg6et-push
readOnly: true
mountPath: /var/run/secrets/openshift.io/push
-
name: builder-token-r2nwa
readOnly: true
mountPath: /var/run/secrets/kubernetes.io/serviceaccount
terminationMessagePath: /dev/termination-log
imagePullPolicy: IfNotPresent
securityContext:
privileged: true
restartPolicy: Never
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
nodeSelector:
type: compute
host: 10.10.0.102
serviceAccountName: builder
serviceAccount: builder
nodeName: 10.10.0.102
securityContext:
imagePullSecrets:
-
name: builder-dockercfg-yg6et
status:
phase: Running
conditions:
-
type: Initialized
status: 'True'
lastProbeTime: null
lastTransitionTime: '2016-11-22T13:23:05Z'
-
type: Ready
status: 'True'
lastProbeTime: null
lastTransitionTime: '2016-11-22T13:23:07Z'
-
type: PodScheduled
status: 'True'
lastProbeTime: null
lastTransitionTime: '2016-11-22T13:23:05Z'
hostIP: 10.10.0.102
podIP: 10.1.8.22
startTime: '2016-11-22T13:23:05Z'
containerStatuses:
-
name: sti-build
state:
running:
startedAt: '2016-11-22T13:23:07Z'
lastState:
ready: true
restartCount: 0
image: 'openshift3/ose-sti-builder:v3.3.1.3'
imageID: 'docker://1c707925b2d90b623d3380ab5b8405b7d31082247e259a5f1279bfa6ad8cfabc'
containerID: 'docker://99db2db81fd80868b4b6480e9b7dce525d7da06de8b2930cdadd3dd340a03a31'
apiVersion: v1
kind: Route
metadata:
name: nodejsexample
namespace: nodejsexample
selfLink: /oapi/v1/namespaces/nodejsexample/routes/nodejsexample
uid: cce33f79-b0b6-11e6-89c0-0abb8905d551
resourceVersion: '23124048'
creationTimestamp: '2016-11-22T13:23:04Z'
labels:
app: nodejsexample
annotations:
openshift.io/generated-by: OpenShiftWebConsole
openshift.io/host.generated: 'true'
spec:
host: nodejsexample-nodejsexample.osm3.feedhenry.net
to:
kind: Service
name: nodejsexample
weight: 100
port:
targetPort: 8080-tcp
status:
ingress:
-
host: nodejsexample-nodejsexample.osm3.feedhenry.net
routerName: router
conditions:
-
type: Admitted
status: 'True'
lastTransitionTime: '2016-11-22T13:23:04Z'
apiVersion: v1
kind: Service
metadata:
name: nodejsexample
namespace: nodejsexample
selfLink: /api/v1/namespaces/nodejsexample/services/nodejsexample
uid: cce59508-b0b6-11e6-89c0-0abb8905d551
resourceVersion: '23124051'
creationTimestamp: '2016-11-22T13:23:04Z'
labels:
app: nodejsexample
annotations:
openshift.io/generated-by: OpenShiftWebConsole
spec:
ports:
-
name: 8080-tcp
protocol: TCP
port: 8080
targetPort: 8080
selector:
deploymentconfig: nodejsexample
portalIP: 172.30.151.99
clusterIP: 172.30.151.99
type: ClusterIP
sessionAffinity: None
status:
loadBalancer:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment