Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def create_crs():
local(kubectl_cmd + " delete configmaps calico-ipv6-addon --ignore-not-found=true")
local(kubectl_cmd + " create configmap calico-ipv6-addon --from-file=templates/addons/calico-ipv6.yaml")
local(kubectl_cmd + " delete configmaps flannel-windows-addon --ignore-not-found=true")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to this PR but @jsturtevant do you know why we are deleting the flannel-windows-addon cm but not creating it?

Copy link
Copy Markdown
Contributor

@jsturtevant jsturtevant Feb 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's created on line https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/2012/files#diff-c2ee8653e1d6b85f0aadf87cd438a9250806c052877248442be4d434cbc52425R226

though it doesn't look like we delete calico-windows-addon which is added the line after. Not sure if deletion is required... Seems to be working, even on reboots of tilt

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to open another PR to fix that

local(kubectl_cmd + " delete configmaps csi-proxy-addon --ignore-not-found=true")
local(kubectl_cmd + " create configmap csi-proxy-addon --from-file=templates/addons/windows/csi-proxy/csi-proxy.yaml")

# need to set version for kube-proxy on windows.
os.putenv("KUBERNETES_VERSION", settings.get("kubernetes_version", {}))
Expand All @@ -227,6 +229,7 @@ def create_crs():
# set up crs
local(kubectl_cmd + " apply -f templates/addons/calico-resource-set.yaml")
local(kubectl_cmd + " apply -f templates/addons/flannel-resource-set.yaml")
local(kubectl_cmd + " apply -f templates/addons/windows/csi-proxy/csi-proxy-resource-set.yaml")

# create flavor resources from cluster-template files in the templates directory
def flavors():
Expand Down
14 changes: 14 additions & 0 deletions templates/addons/windows/csi-proxy/csi-proxy-resource-set.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
name: csi-proxy
namespace: default
spec:
clusterSelector:
matchLabels:
csi-proxy: enabled
resources:
- kind: ConfigMap
name: csi-proxy-addon
strategy: ApplyOnce
26 changes: 26 additions & 0 deletions templates/addons/windows/csi-proxy/csi-proxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: csi-proxy
name: csi-proxy
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: csi-proxy
template:
metadata:
labels:
k8s-app: csi-proxy
spec:
nodeSelector:
"kubernetes.io/os": windows
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: csi-proxy
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Cluster
metadata:
labels:
cni: calico
csi-proxy: enabled
windows: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down
1 change: 1 addition & 0 deletions templates/cluster-template-windows-containerd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Cluster
metadata:
labels:
cni: calico
csi-proxy: enabled
windows: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down
1 change: 1 addition & 0 deletions templates/flavors/base-windows-containerd/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
csi-proxy: enabled
windows: enabled
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
labels:
cni: ${CLUSTER_NAME}-calico
containerd-logger: enabled
csi-proxy: enabled
metrics-server: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down Expand Up @@ -545,6 +546,20 @@ spec:
tenantID: ${AZURE_TENANT_ID}
type: ServicePrincipal
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
name: csi-proxy
namespace: default
spec:
clusterSelector:
matchLabels:
csi-proxy: enabled
resources:
- kind: ConfigMap
name: csi-proxy-addon
strategy: ApplyOnce
---
apiVersion: v1
data:
kube-proxy-patch: |-
Expand Down Expand Up @@ -3111,6 +3126,44 @@ metadata:
name: cni-${CLUSTER_NAME}-calico
namespace: default
---
apiVersion: v1
data:
csi-proxy: |
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: csi-proxy
name: csi-proxy
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: csi-proxy
template:
metadata:
labels:
k8s-app: csi-proxy
spec:
nodeSelector:
"kubernetes.io/os": windows
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: csi-proxy
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
kind: ConfigMap
metadata:
annotations:
note: generated
labels:
type: generated
name: csi-proxy-addon
namespace: default
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
Expand Down
53 changes: 53 additions & 0 deletions templates/test/ci/cluster-template-prow-ci-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ metadata:
labels:
cni: ${CLUSTER_NAME}-calico
containerd-logger: enabled
csi-proxy: enabled
metrics-server: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down Expand Up @@ -545,6 +546,20 @@ spec:
tenantID: ${AZURE_TENANT_ID}
type: ServicePrincipal
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
name: csi-proxy
namespace: default
spec:
clusterSelector:
matchLabels:
csi-proxy: enabled
resources:
- kind: ConfigMap
name: csi-proxy-addon
strategy: ApplyOnce
---
apiVersion: v1
data:
kube-proxy-patch: |-
Expand Down Expand Up @@ -3111,6 +3126,44 @@ metadata:
name: cni-${CLUSTER_NAME}-calico
namespace: default
---
apiVersion: v1
data:
csi-proxy: |
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: csi-proxy
name: csi-proxy
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: csi-proxy
template:
metadata:
labels:
k8s-app: csi-proxy
spec:
nodeSelector:
"kubernetes.io/os": windows
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: csi-proxy
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
kind: ConfigMap
metadata:
annotations:
note: generated
labels:
type: generated
name: csi-proxy-addon
namespace: default
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Cluster
metadata:
labels:
cni: ${CLUSTER_NAME}-calico
csi-proxy: enabled
windows: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down
1 change: 1 addition & 0 deletions templates/test/ci/cluster-template-prow-machine-pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Cluster
metadata:
labels:
cni: ${CLUSTER_NAME}-calico
csi-proxy: enabled
windows: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down
53 changes: 53 additions & 0 deletions templates/test/ci/cluster-template-prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Cluster
metadata:
labels:
cni: ${CLUSTER_NAME}-calico
csi-proxy: enabled
name: ${CLUSTER_NAME}
namespace: default
spec:
Expand Down Expand Up @@ -353,6 +354,20 @@ spec:
tenantID: ${AZURE_TENANT_ID}
type: ServicePrincipal
---
apiVersion: addons.cluster.x-k8s.io/v1beta1
kind: ClusterResourceSet
metadata:
name: csi-proxy
namespace: default
spec:
clusterSelector:
matchLabels:
csi-proxy: enabled
resources:
- kind: ConfigMap
name: csi-proxy-addon
strategy: ApplyOnce
---
apiVersion: v1
data:
proxy: "apiVersion: apps/v1\nkind: DaemonSet\nmetadata:\n labels:\n k8s-app:
Expand Down Expand Up @@ -2910,3 +2925,41 @@ metadata:
type: generated
name: cni-${CLUSTER_NAME}-calico
namespace: default
---
apiVersion: v1
data:
csi-proxy: |
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
k8s-app: csi-proxy
name: csi-proxy
namespace: kube-system
spec:
selector:
matchLabels:
k8s-app: csi-proxy
template:
metadata:
labels:
k8s-app: csi-proxy
spec:
nodeSelector:
"kubernetes.io/os": windows
securityContext:
windowsOptions:
hostProcess: true
runAsUserName: "NT AUTHORITY\\SYSTEM"
hostNetwork: true
containers:
- name: csi-proxy
image: ghcr.io/kubernetes-sigs/sig-windows/csi-proxy:v1.0.2
kind: ConfigMap
metadata:
annotations:
note: generated
labels:
type: generated
name: csi-proxy-addon
namespace: default
7 changes: 7 additions & 0 deletions templates/test/ci/patches/windows-csi-proxy-enabled.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
labels:
csi-proxy: enabled
5 changes: 5 additions & 0 deletions templates/test/ci/prow/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ resources:
- mhc.yaml
- cni-resource-set.yaml
- ../../../azure-cluster-identity
- ../../../addons/windows/csi-proxy/csi-proxy-resource-set.yaml
patchesStrategicMerge:
- ../patches/tags.yaml
- ../patches/mhc.yaml
Expand All @@ -17,6 +18,7 @@ patchesStrategicMerge:
- ../../../azure-cluster-identity/azurecluster-identity-ref.yaml
- ../../../flavors/base-windows-containerd/kubeadm-control-plane.yaml
- ../patches/windows-containerd-patch.yaml
- ../patches/windows-csi-proxy-enabled.yaml
patches:
- target:
group: bootstrap.cluster.x-k8s.io
Expand All @@ -31,6 +33,9 @@ configMapGenerator:
- resources=../../../addons/calico.yaml
- windows-cni=../../../addons/windows/calico/calico.yaml
- proxy=../../../addons/windows/calico/kube-proxy-windows.yaml
- name: csi-proxy-addon
files:
- csi-proxy=../../../addons/windows/csi-proxy/csi-proxy.yaml
generatorOptions:
disableNameSuffixHash: true
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: Cluster
metadata:
labels:
cni: ${CLUSTER_NAME}-calico
csi-proxy: enabled
windows: enabled
name: ${CLUSTER_NAME}
namespace: default
Expand Down
Loading