Last active
January 21, 2017 18:59
-
-
Save csrwng/edfce1958d3a08635ee2070736d567e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Template | |
metadata: | |
name: oc-cli | |
objects: | |
- apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: cli-store | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
status: {} | |
- apiVersion: v1 | |
kind: ImageStream | |
metadata: | |
labels: | |
app: origin | |
name: origin | |
spec: | |
tags: | |
- name: latest | |
from: | |
kind: DockerImage | |
name: openshift/origin:latest | |
- apiVersion: v1 | |
kind: ImageStream | |
metadata: | |
labels: | |
app: origin-cli | |
name: origin-cli | |
spec: {} | |
- apiVersion: v1 | |
kind: BuildConfig | |
metadata: | |
labels: | |
app: origin-cli | |
name: origin-cli | |
spec: | |
output: | |
to: | |
kind: ImageStreamTag | |
name: origin-cli:latest | |
runPolicy: Serial | |
source: | |
dockerfile: |- | |
FROM origin | |
RUN yum -y install vim ruby bash-completion && yum -y clean all | |
RUN mkdir -p /home/user && chmod 770 -R /home | |
RUN gem install gist | |
ENV HOME=/home/user PS1="\h:\w > " KUBECONFIG=/home/user/.kube/config LANG=en_US.utf8 LC_ALL=en_US.utf8 | |
WORKDIR $HOME | |
RUN printf "#!/bin/bash\n\ | |
token_param=\"\$4\"\n\ | |
if [[ -z \${token_param} ]]; then\n\ | |
echo \"Please use the console\'s login command as arguments\"\n\ | |
exit 1\n\ | |
fi\n\ | |
oc login --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt https://kubernetes.default \${token_param}\n" \ | |
> /usr/bin/login | |
ENTRYPOINT ["/bin/bash", "-c", "while(true); do date; sleep 120; done"] | |
type: Binary | |
strategy: | |
dockerStrategy: | |
from: | |
kind: ImageStreamTag | |
name: origin:latest | |
type: Docker | |
triggers: | |
- type: ConfigChange | |
- github: | |
secret: svlPRVhStJshMsoWelHniv1OXIBREgpoVRlMv3EY | |
type: GitHub | |
- generic: | |
secret: 31VsU2sG70rDsFSiPm7cqUFoT1f45HKriEHrBEIg | |
type: Generic | |
- apiVersion: v1 | |
kind: DeploymentConfig | |
metadata: | |
labels: | |
app: origin-cli | |
name: origin-cli | |
spec: | |
replicas: 1 | |
selector: | |
app: origin-cli | |
deploymentconfig: origin-cli | |
strategy: | |
activeDeadlineSeconds: 21600 | |
recreateParams: | |
timeoutSeconds: 600 | |
resources: {} | |
type: Recreate | |
template: | |
metadata: | |
labels: | |
app: origin-cli | |
deploymentconfig: origin-cli | |
spec: | |
containers: | |
- image: " " | |
imagePullPolicy: Always | |
livenessProbe: | |
exec: | |
command: | |
- /usr/bin/oc | |
failureThreshold: 3 | |
initialDelaySeconds: 10 | |
periodSeconds: 10 | |
successThreshold: 1 | |
timeoutSeconds: 2 | |
name: origin-cli | |
ports: | |
- containerPort: 53 | |
protocol: TCP | |
- containerPort: 8443 | |
protocol: TCP | |
readinessProbe: | |
exec: | |
command: | |
- /usr/bin/oc | |
failureThreshold: 3 | |
initialDelaySeconds: 10 | |
periodSeconds: 10 | |
successThreshold: 1 | |
timeoutSeconds: 2 | |
resources: {} | |
terminationMessagePath: /dev/termination-log | |
volumeMounts: | |
- mountPath: /data | |
name: clidata | |
dnsPolicy: ClusterFirst | |
restartPolicy: Always | |
securityContext: {} | |
terminationGracePeriodSeconds: 30 | |
volumes: | |
- name: clidata | |
persistentVolumeClaim: | |
claimName: cli-store | |
test: false | |
triggers: | |
- imageChangeParams: | |
automatic: true | |
containerNames: | |
- origin-cli | |
from: | |
kind: ImageStreamTag | |
name: origin-cli:latest | |
type: ImageChange | |
- type: ConfigChange |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment