-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (57 loc) · 2.56 KB
/
Makefile
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
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
all: docker
docker:
# dep ensure -v
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o crd-hook
docker build --no-cache -t gcr.io/${PROJECT_ID}/${IMAGE_NAME}:1.0 .
rm -rf crd-hook
docker push gcr.io/${PROJECT_ID}/${IMAGE_NAME}:1.0
deploy:
kubectl create -f deployment/deployment.yaml
kubectl create -f deployment/service.yaml
cat ./deployment/mutatingwebhook.yaml | ./deployment/webhook-patch-ca-bundle.sh > ./deployment/mutatingwebhook-ca-bundle.yaml
kubectl create -f deployment/mutatingwebhook-ca-bundle.yaml
delete:
kubectl delete -f deployment/deployment.yaml
kubectl delete -f deployment/service.yaml
kubectl delete -f deployment/mutatingwebhook-ca-bundle.yaml
install-operators:
helm install https://github.com/cloud-ark/operatorcharts/blob/master/mysql-operator-0.2.5-1.tgz?raw=true
helm install https://github.com/cloud-ark/operatorcharts/blob/master/moodle-operator-chart-0.3.0.tgz?raw=true
helm install https://github.com/cloud-ark/operatorcharts/blob/master/stash-operator-chart-0.8.4.tgz?raw=true
cluster:
kubectl create -f deployment/crds/secrets/cluster1-secret.yaml
kubectl create -f deployment/crds/cluster1.yaml
delcluster:
kubectl delete -f deployment/crds/secrets/cluster1-secret.yaml
kubectl delete -f deployment/crds/cluster1.yaml
moodle:
kubectl create -f deployment/crds/moodle1.yaml
delmoodle:
kubectl delete -f deployment/crds/moodle1.yaml
restic:
kubectl create -f deployment/crds/restic-moodle.yaml
delrestic:
kubectl delete -f deployment/crds/restic-moodle.yaml
delall:
kubectl delete -f deployment/crds/secrets/cluster1-secret.yaml
kubectl delete -f deployment/crds/cluster1.yaml
kubectl delete -f deployment/crds/moodle1.yaml
kubectl delete -f deployment/crds/restic-moodle.yaml
gen-certs:
bash ./deployment/webhook-create-signed-cert.sh --service crd-hook-service --namespace default --secret webhook-tls-certificates
cat ./deployment/mutatingwebhook.yaml | ./deployment/webhook-patch-ca-bundle.sh > ./deployment/mutatingwebhook-ca-bundle.yaml
clean:
rm crdhook