1
1
import kind.v1alpha4 as kind
2
+ import kubeadm.v1beta3 as kubeadm
3
+ import yaml
4
+
5
+ _kubeadmpatches=[]
2
6
3
7
_nodes = [
4
8
]
5
9
10
+
11
+ _clusterConfiguration=kubeadm.ClusterConfiguration{
12
+ apiServer: kubeadm.ApiServer{}
13
+ }
14
+
15
+ _extraVolumes=[kubeadm.ExtraVolumeItem{
16
+ "name" = "audit-logs"
17
+ "hostPath" = "/var/log/audit"
18
+ "mountPath" = "/var/log/audit"
19
+ }]
20
+
21
+ _apiServerExtraArgs={
22
+ "runtime-config" = "api/all=true"
23
+ "storage-media-type" = option("storageMediaType",default="application/json")
24
+ "audit-log-path" = "/var/log/audit/kube-apiserver-audit.log"
25
+ "audit-policy-file" = "/etc/kubernetes/audit-policy/apiserver-audit-policy.yaml"
26
+ }
27
+
28
+ _apiServerExtraArgsEnabled=option("apiServerExtraArgsEnabled",default=False)
29
+ if _apiServerExtraArgsEnabled:
30
+ _clusterConfiguration.apiServer.extraArgs=_apiServerExtraArgs
31
+
32
+
33
+ _apiServerExtraVolumesEnabled=option("apiServerExtraVolumesEnabled",default=False)
34
+ if _apiServerExtraVolumesEnabled:
35
+ _clusterConfiguration.apiServer.extraVolumes=_extraVolumes
36
+
37
+
38
+ _server_yaml = yaml.encode(_clusterConfiguration)
39
+
6
40
_result = [(lambda x: int -> int {
7
- _nodes+=[{
41
+ _nodes+=[kind.Node {
8
42
role = "control-plane"
9
- image = option("image",default="kindest/node:v1.30.0")
43
+ image = option("image",default="kindest/node:v1.30.2")
44
+ kubeadmConfigPatches = [
45
+ _server_yaml
46
+ ]
10
47
}
11
48
]
12
49
x
@@ -16,7 +53,7 @@ _result = [(lambda x: int -> int {
16
53
_result = [(lambda x: int -> int {
17
54
_nodes+=[{
18
55
role = "worker"
19
- image = option("image",default="kindest/node:v1.30.0 ")
56
+ image = option("image",default="kindest/node:v1.30.2 ")
20
57
}
21
58
]
22
59
x
0 commit comments