forked from gardener/etcd-druid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
skaffold.yaml
139 lines (139 loc) · 4.19 KB
/
skaffold.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
apiVersion: skaffold/v2beta25
kind: Config
metadata:
name: etcd-druid
build:
local:
useBuildkit: true
artifacts:
- image: eu.gcr.io/gardener-project/gardener/etcd-druid
docker:
dockerfile: Dockerfile
target: druid
deploy:
helm:
releases:
- name: etcd-druid
chartPath: charts/druid
namespace: default
artifactOverrides:
image: eu.gcr.io/gardener-project/gardener/etcd-druid
imageStrategy:
helm: {}
# Dependency builds create new dep archives and thus circumvent Docker's build cache at the next run.
skipBuildDependencies: true
profiles:
- name: use-feature-gates
activation:
- env: "USE_ETCD_DRUID_FEATURE_GATES=true"
patches:
- op: add
path: /deploy/helm/releases/0/setValues
value:
featureGates:
UseEtcdWrapper: true
---
apiVersion: skaffold/v2beta25
kind: Config
metadata:
name: druid-e2e
deploy:
kustomize:
hooks:
before:
- host:
command:
- sh
- -c
- |
echo "Deleting previous job"
namespace_flag=${SKAFFOLD_NAMESPACES:-""}
if [ -n "$namespace_flag" ]; then
namespace_flag="-n ${namespace_flag}"
fi
kubectl delete job -l role=infra-job --ignore-not-found=true $namespace_flag
after:
- host:
command:
- sh
- -c
- |
echo "Wait until job is ready"
namespace_flag=${SKAFFOLD_NAMESPACES:-""}
if [ -n "$namespace_flag" ]; then
namespace_flag="-n ${namespace_flag}"
fi
kubectl wait --for=condition=Complete job -l role=infra-job --timeout=5m $namespace_flag
os: [ darwin, linux ]
profiles:
# Profile to create the required S3 backup bucket for an e2e test.
- name: aws-setup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/aws/setup]
# Profile to delete the S3 backup bucket from an e2e test.
- name: aws-cleanup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/aws/cleanup]
# Profile to create the required Azure storage container for an e2e test.
- name: azure-setup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/azure/setup]
# Profile to delete the Azure storage container from an e2e test.
- name: azure-cleanup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/azure/cleanup]
# Profile to create the required GCP backup bucket for an e2e test.
- name: gcp-setup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/gcp/setup]
- op: add
path: /deploy/kustomize/hooks/before/-
value: {
"host": {
"command": [sh, -c, '
echo "Copying GCP service account json" &&
touch "hack/e2e-test/infrastructure/overlays/gcp/common/assets/serviceaccount.json" &&
cp "$GCP_SERVICEACCOUNT_JSON_PATH" "hack/e2e-test/infrastructure/overlays/gcp/common/assets/serviceaccount.json"'],
"os": [darwin, linux]
}
}
# Profile to delete the GCP backup bucket from an e2e test.
- name: gcp-cleanup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/gcp/cleanup]
- op: add
path: /deploy/kustomize/hooks/before/-
value: {
"host": {
"command": [sh, -c, '
echo "Copying GCP service account json" &&
touch "hack/e2e-test/infrastructure/overlays/gcp/common/assets/serviceaccount.json" &&
cp "$GCP_SERVICEACCOUNT_JSON_PATH" "hack/e2e-test/infrastructure/overlays/gcp/common/assets/serviceaccount.json"'],
"os": [darwin, linux]
}
}
# Profile to create the required Local storage container for an e2e test.
- name: local-setup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/local/setup]
# Profile to delete the Local storage container from an e2e test.
- name: local-cleanup
patches:
- op: add
path: /deploy/kustomize/paths
value: [hack/e2e-test/infrastructure/overlays/local/cleanup]