forked from leaf-ai/studio-go-runner
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathci_containerize_microk8s.yaml
89 lines (89 loc) · 2.12 KB
/
ci_containerize_microk8s.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
apiVersion: batch/v1
kind: Job
metadata:
name: imagebuilder
namespace: {{ .Namespace }}
spec:
template:
spec:
restartPolicy: Never
initContainers:
- name: clone
image: alpine/git
imagePullPolicy: IfNotPresent
args:
- clone
- {{ .URL }}
- /makisu-context
volumeMounts:
- name: context
mountPath: /makisu-context
- name: checkout
image: alpine/git
imagePullPolicy: IfNotPresent
args:
- checkout
- "{{ .Commit }}"
workingDir: /makisu-context
volumeMounts:
- name: context
mountPath: /makisu-context
containers:
- name: makisu
image: gcr.io/uber-container-tools/makisu:v0.1.17
imagePullPolicy: IfNotPresent
args:
- build
- --push={{ expandenv "$RegistryIP"}}:{{ expandenv "$RegistryPort"}}
- --modifyfs=true
- -t=leafai/studio-go-runner-standalone-build:latest
- -f=Dockerfile_microk8s
- --redis-cache-addr=makisu-cache:6379
- --registry-config=/registry-config/registry.yaml
- /makisu-context
volumeMounts:
- name: context
mountPath: /makisu-context
- name: registry-config
mountPath: /registry-config
- name: storage
mountPath: /makisu-storage
volumes:
- name: context
emptyDir: {}
- name: registry-config
secret:
secretName: docker-registry-config
- name: storage
emptyDir: {}
---
apiVersion: v1
kind: Secret
metadata:
name: docker-registry-config
namespace: {{ .Namespace }}
type: Opaque
data:
registry.yaml: '{{ expandenv "$Registry" | b64enc }}'
---
kind: Service
apiVersion: v1
metadata:
name: makisu-cache
namespace: {{ .Namespace }}
spec:
type: ExternalName
externalName: redis.makisu-cache.svc.cluster.local
ports:
- port: 6379
---
kind: Service
apiVersion: v1
metadata:
name: microk8s-registry
namespace: {{ .Namespace }}
spec:
type: ExternalName
externalName: registry.container-registry.svc.cluster.local
ports:
- port: 5000