File tree Expand file tree Collapse file tree 5 files changed +120
-0
lines changed Expand file tree Collapse file tree 5 files changed +120
-0
lines changed Original file line number Diff line number Diff line change 1+ FROM hello-world:latest
Original file line number Diff line number Diff line change 1+ servicePipeline(
2+ upstreamProjects : [],
3+ )
4+
5+ // vim: ft=groovy
Original file line number Diff line number Diff line change 1+ DOCKER_REVISION ?= hello-world-testing-$(USER )
2+
3+ APP_DOCKER_TAG = docker-push.ocf.berkeley.edu/hello-world:$(DOCKER_REVISION )
4+ APP_VERSION := latest
5+
6+ .PHONY : cook-image
7+ cook-image :
8+ docker build --build-arg app_version=$(APP_VERSION ) --pull -f Dockerfile -t $(APP_DOCKER_TAG ) .
9+
10+ .PHONY : push-image
11+ push-image :
12+ docker push $(APP_DOCKER_TAG )
Original file line number Diff line number Diff line change 1+ # Kubernetes template repository
2+
3+ ** Live URL** : hello-world.dev-kubernetes.ocf.berkeley.edu
4+
5+ ** Upstream** : [ ocf/kube-template] ( https://github.com/ocf/kube-template )
6+
7+ OCF deployment of a service on Kubernetes.
8+ Replace this with proper README.md contents.
9+
10+ ### Repository TODO
11+ - [ ] Replace README.md
12+ - [ ] Fill in Makefile with proper contents
13+ - [ ] Fill in/rename kubernetes/app.yml.erb with proper contents
14+
15+ ### Allocating Secrets/etc.
16+ See the Kubernetes page in OCF staff documentation on how to setup secrets and do more with Kubernetes deployments.
Original file line number Diff line number Diff line change 1+ apiVersion: apps/v1
2+ kind: Deployment
3+ metadata:
4+ labels:
5+ app: hello-world
6+ name: hello-world-deploy
7+ spec:
8+ replicas: 1
9+ selector:
10+ matchLabels:
11+ app: hello-world
12+ strategy:
13+ type: Recreate
14+ template:
15+ metadata:
16+ labels:
17+ app: hello-world
18+ spec:
19+ containers:
20+ - name: hello-world-deploy
21+ image: "docker.ocf.berkeley.edu/hello-world:<%= version %> "
22+ imagePullPolicy: Always
23+ ports:
24+ - name: http
25+ containerPort: 80
26+ volumeMounts:
27+ - mountPath: "/hello-world/config/"
28+ name: hello-world-secrets
29+ readOnly: true
30+ - mountPath: "/hello-world/data/"
31+ name: hello-world-data
32+ env:
33+ - name: TZ
34+ value: America/Los_Angeles
35+ restartPolicy: Always
36+ volumes:
37+ - name: hello-world-secrets
38+ hostPath:
39+ path: /opt/share/kubernetes/secrets/hello-world
40+ type: Directory
41+ - name: hello-world-data
42+ persistentVolumeClaim:
43+ claimName: hello-world-vol
44+ ---
45+ apiVersion: v1
46+ kind: Service
47+ metadata:
48+ labels:
49+ app: hello-world
50+ name: hello-world-service
51+ spec:
52+ type: ClusterIP
53+ ports:
54+ - name: hello-world-port
55+ port: 80
56+ protocol: TCP
57+ targetPort: 80
58+ selector:
59+ app: hello-world
60+ ---
61+ apiVersion: apps/v1
62+ kind: Ingress
63+ metadata:
64+ labels:
65+ app: hello-world
66+ name: virtual-host-ingress
67+ spec:
68+ rules:
69+ - host: hello-world.dev-kubernetes.ocf.berkeley.edu
70+ http:
71+ paths:
72+ - backend:
73+ serviceName: hello-world-service
74+ servicePort: 80
75+ ---
76+ apiVersion: v1
77+ kind: PersistentVolumeClaim
78+ metadata:
79+ name: hello-world-vol
80+ spec:
81+ accessModes:
82+ - ReadWriteMany
83+ resources:
84+ requests:
85+ storage: 20Gi
86+ storageClassName: managed-nfs-storage
You can’t perform that action at this time.
0 commit comments