From 326e9729a86bf8f2b5e692494fa7394ecebbea70 Mon Sep 17 00:00:00 2001 From: Huy Pham Date: Thu, 19 Mar 2026 13:06:58 -0700 Subject: [PATCH] Remove cluster directory --- cluster/OWNERS | 24 - cluster/addons/README.md | 34 - cluster/addons/addon-manager/CHANGELOG.md | 109 - cluster/addons/addon-manager/Dockerfile | 25 - cluster/addons/addon-manager/Makefile | 57 - cluster/addons/addon-manager/README.md | 59 - .../addons/addon-manager/kube-addons-main.sh | 74 - .../addons/addon-manager/kube-addons-test.sh | 286 -- cluster/addons/addon-manager/kube-addons.sh | 294 -- .../addons/calico-policy-controller/README.md | 13 - .../bgpconfigurations-crd.yaml | 131 - .../bgppeers-crd.yaml | 105 - .../blockaffinity-crd.yaml | 60 - .../calico-clusterrole.yaml | 140 - .../calico-clusterrolebinding.yaml | 14 - .../calico-cpva-clusterrole.yaml | 13 - .../calico-cpva-clusterrolebinding.yaml | 14 - .../calico-cpva-serviceaccount.yaml | 7 - .../calico-node-daemonset.yaml | 189 - ...co-node-vertical-autoscaler-configmap.yaml | 21 - ...o-node-vertical-autoscaler-deployment.yaml | 38 - .../calico-serviceaccount.yaml | 7 - .../clusterinformations-crd.yaml | 64 - .../felixconfigurations-crd.yaml | 540 --- .../globalnetworkpolicy-crd.yaml | 771 --- .../globalnetworksets-crd.yaml | 53 - .../hostendpoints-crd.yaml | 108 - .../ipamblock-crd.yaml | 81 - .../ipamconfig-crd.yaml | 52 - .../ipamhandle-crd.yaml | 54 - .../calico-policy-controller/ippool-crd.yaml | 99 - .../kubecontrollersconfigurations-crd.yaml | 223 - .../networkpolicies-crd.yaml | 752 --- .../networkset-crd.yaml | 51 - .../typha-deployment.yaml | 75 - ...pha-horizontal-autoscaler-clusterrole.yaml | 10 - ...izontal-autoscaler-clusterrolebinding.yaml | 14 - ...typha-horizontal-autoscaler-configmap.yaml | 23 - ...ypha-horizontal-autoscaler-deployment.yaml | 38 - .../typha-horizontal-autoscaler-role.yaml | 14 - ...pha-horizontal-autoscaler-rolebinding.yaml | 15 - ...-horizontal-autoscaler-serviceaccount.yaml | 7 - .../typha-service.yaml | 17 - ...typha-vertical-autoscaler-clusterrole.yaml | 13 - ...ertical-autoscaler-clusterrolebinding.yaml | 14 - .../typha-vertical-autoscaler-configmap.yaml | 21 - .../typha-vertical-autoscaler-deployment.yaml | 38 - ...ha-vertical-autoscaler-serviceaccount.yaml | 7 - .../cloud-node-controller-binding.yaml | 46 - .../cloud-node-controller-role.yaml | 177 - .../pvl-controller-role.yaml | 23 - .../cluster-loadbalancing/glbc/README.md | 9 - .../glbc/default-svc-controller.yaml | 45 - .../glbc/default-svc.yaml | 22 - .../dns-horizontal-autoscaler/MAINTAINERS.md | 3 - .../dns-horizontal-autoscaler/README.md | 11 - .../dns-horizontal-autoscaler.yaml | 108 - cluster/addons/dns/coredns/Makefile | 34 - cluster/addons/dns/coredns/coredns.yaml.base | 216 - cluster/addons/dns/coredns/coredns.yaml.in | 216 - cluster/addons/dns/coredns/coredns.yaml.sed | 216 - .../addons/dns/coredns/transforms2salt.sed | 5 - cluster/addons/dns/coredns/transforms2sed.sed | 5 - cluster/addons/dns/kube-dns/Makefile | 34 - cluster/addons/dns/kube-dns/README.md | 62 - .../addons/dns/kube-dns/kube-dns.yaml.base | 247 - cluster/addons/dns/kube-dns/kube-dns.yaml.in | 247 - cluster/addons/dns/kube-dns/kube-dns.yaml.sed | 247 - .../addons/dns/kube-dns/transforms2salt.sed | 5 - .../addons/dns/kube-dns/transforms2sed.sed | 5 - cluster/addons/dns/nodelocaldns/README.md | 55 - .../addons/dns/nodelocaldns/nodelocaldns.yaml | 211 - cluster/addons/fluentd-gcp/README.md | 75 - .../addons/fluentd-gcp/event-exporter.yaml | 82 - .../fluentd-gcp-configmap-old.yaml | 425 -- .../fluentd-gcp/fluentd-gcp-configmap.yaml | 465 -- .../addons/fluentd-gcp/fluentd-gcp-ds-sa.yaml | 8 - .../addons/fluentd-gcp/fluentd-gcp-ds.yaml | 117 - .../fluentd-gcp/fluentd-gcp-image/README.md | 4 - .../addons/fluentd-gcp/scaler-deployment.yaml | 36 - cluster/addons/fluentd-gcp/scaler-policy.yaml | 20 - cluster/addons/fluentd-gcp/scaler-rbac.yaml | 48 - .../addons/ip-masq-agent/ip-masq-agent.yaml | 64 - .../kube-network-policies-rbac.yaml | 49 - .../kube-network-policies.yaml | 47 - cluster/addons/kube-proxy/kube-proxy-ds.yaml | 74 - .../addons/kube-proxy/kube-proxy-rbac.yaml | 22 - cluster/addons/metadata-agent/README.md | 4 - .../stackdriver/metadata-agent-rbac.yaml | 32 - .../stackdriver/metadata-agent.yaml | 131 - cluster/addons/metadata-proxy/README.md | 5 - .../metadata-proxy/gce/metadata-proxy.yaml | 89 - cluster/addons/metrics-server/README.md | 18 - .../addons/metrics-server/auth-delegator.yaml | 15 - .../addons/metrics-server/auth-reader.yaml | 16 - .../metrics-server/metrics-apiservice.yaml | 16 - .../metrics-server-deployment.yaml | 129 - .../metrics-server-service.yaml | 16 - .../metrics-server/resource-reader.yaml | 49 - .../node-problem-detector/MAINTAINERS.md | 4 - .../addons/node-problem-detector/README.md | 7 - .../kubelet-user-standalone/npd-binding.yaml | 15 - cluster/addons/node-problem-detector/npd.yaml | 96 - .../standalone/npd-binding.yaml | 15 - cluster/addons/pdcsi-driver/README.md | 5 - cluster/addons/pdcsi-driver/pd-csi-psp.yaml | 74 - cluster/addons/pdcsi-driver/pd-csi-rbac.yaml | 458 -- cluster/addons/pdcsi-driver/pd-csi.yaml | 188 - cluster/addons/pdcsi-driver/sc-premium.yaml | 14 - cluster/addons/pdcsi-driver/sc-standard.yaml | 14 - .../cluster-autoscaler-rbac.yaml | 71 - .../cluster-loadbalancing/glbc/roles.yaml | 73 - .../glbc/user-rolebindings.yaml | 28 - ...e-apiserver-kubelet-api-admin-binding.yaml | 15 - .../kubelet-api-admin-role.yaml | 17 - .../kubelet-certificate-management.yaml | 58 - .../kubelet-binding.yaml | 29 - .../legacy-kubelet-user/kubelet-binding.yaml | 18 - .../addons/storage-class/azure/default.yaml | 9 - cluster/addons/storage-class/gce/default.yaml | 12 - .../addons/storage-class/local/default.yaml | 10 - ....storage.k8s.io_volumesnapshotclasses.yaml | 145 - ...storage.k8s.io_volumesnapshotcontents.yaml | 459 -- ...apshot.storage.k8s.io_volumesnapshots.yaml | 353 -- .../rbac-volume-snapshot-controller.yaml | 99 - ...volume-snapshot-controller-deployment.yaml | 29 - cluster/clientbin.sh | 99 - cluster/common.sh | 568 --- cluster/gce/addons/README.md | 7 - .../resource-quota.yaml | 18 - .../mutating-webhook-configuration.yaml | 25 - .../konnectivity-agent-ds.yaml | 82 - .../konnectivity-agent-rbac.yaml | 8 - .../konnectivity-agent/konnectivity-rbac.yaml | 15 - .../gce/addons/limit-range/limit-range.yaml | 12 - .../loadbalancing/cloud-provider-binding.yaml | 30 - .../loadbalancing/cloud-provider-role.yaml | 86 - cluster/gce/config-common.sh | 177 - cluster/gce/config-default.sh | 568 --- cluster/gce/config-test.sh | 616 --- cluster/gce/cos | 1 - cluster/gce/custom | 1 - cluster/gce/delete-stranded-load-balancers.sh | 35 - cluster/gce/gci/README.md | 108 - cluster/gce/gci/apiserver_etcd_test.go | 215 - cluster/gce/gci/apiserver_kms_test.go | 225 - .../append_or_replace_prefixed_line_test.go | 182 - cluster/gce/gci/audit_policy_test.go | 265 -- cluster/gce/gci/configure-helper.sh | 3751 --------------- cluster/gce/gci/configure-kubeapiserver.sh | 492 -- cluster/gce/gci/configure.sh | 1055 ----- cluster/gce/gci/configure_helper_test.go | 179 - cluster/gce/gci/flexvolume_node_setup.sh | 183 - cluster/gce/gci/helper.sh | 26 - cluster/gce/gci/kube-master-internal-route.sh | 27 - cluster/gce/gci/master-helper.sh | 216 - cluster/gce/gci/master.yaml | 140 - cluster/gce/gci/mounter/.gitignore | 1 - cluster/gce/gci/mounter/Changelog | 7 - cluster/gce/gci/mounter/Dockerfile | 19 - cluster/gce/gci/mounter/Makefile | 30 - cluster/gce/gci/mounter/mounter.go | 93 - cluster/gce/gci/mounter/stage-upload.sh | 68 - cluster/gce/gci/node-helper.sh | 47 - cluster/gce/gci/node.yaml | 96 - cluster/gce/gci/shutdown.sh | 23 - .../gci/testdata/kube-apiserver/base.template | 22 - .../gci/testdata/kube-apiserver/etcd.template | 16 - .../gci/testdata/kube-apiserver/kms.template | 9 - cluster/gce/list-resources.sh | 102 - cluster/gce/manifests/abac-authz-policy.jsonl | 7 - .../cloud-controller-manager.manifest | 115 - .../gce/manifests/cluster-autoscaler.manifest | 115 - cluster/gce/manifests/cri-auth-config.yaml | 12 - cluster/gce/manifests/etcd.manifest | 132 - cluster/gce/manifests/glbc.manifest | 85 - .../gce/manifests/konnectivity-server.yaml | 67 - cluster/gce/manifests/kube-addon-manager.yaml | 61 - cluster/gce/manifests/kube-apiserver.manifest | 154 - .../kube-controller-manager.manifest | 121 - cluster/gce/manifests/kube-proxy.manifest | 77 - cluster/gce/manifests/kube-scheduler.manifest | 79 - cluster/gce/manifests/pdcsi-controller.yaml | 165 - cluster/gce/ubuntu | 1 - cluster/gce/upgrade-aliases.sh | 180 - cluster/gce/upgrade.sh | 707 --- cluster/gce/util.sh | 4218 ----------------- .../gce/windows/README-GCE-Windows-kube-up.md | 241 - cluster/gce/windows/common.psm1 | 672 --- cluster/gce/windows/configure.ps1 | 213 - cluster/gce/windows/k8s-node-setup.psm1 | 2350 --------- cluster/gce/windows/node-helper.sh | 58 - cluster/gce/windows/smoke-test.sh | 642 --- cluster/gce/windows/testonly/install-ssh.psm1 | 294 -- .../gce/windows/testonly/user-profile.psm1 | 343 -- cluster/get-kube-binaries.sh | 292 -- cluster/get-kube.sh | 268 -- cluster/kube-down.sh | 40 - cluster/kube-up.sh | 79 - cluster/kube-util.sh | 39 - cluster/kubectl.sh | 76 - cluster/kubemark/gce/config-default.sh | 61 - cluster/kubemark/iks/config-default.sh | 44 - .../kubemark/pre-existing/config-default.sh | 37 - cluster/kubemark/util.sh | 20 - cluster/log-dump/README.md | 19 - cluster/log-dump/log-dump.sh | 716 --- cluster/log-dump/logexporter-daemonset.yaml | 81 - cluster/pre-existing/util.sh | 45 - cluster/skeleton/util.sh | 79 - cluster/util.sh | 821 ---- cluster/validate-cluster.sh | 192 - 212 files changed, 35451 deletions(-) delete mode 100644 cluster/OWNERS delete mode 100644 cluster/addons/README.md delete mode 100644 cluster/addons/addon-manager/CHANGELOG.md delete mode 100644 cluster/addons/addon-manager/Dockerfile delete mode 100644 cluster/addons/addon-manager/Makefile delete mode 100644 cluster/addons/addon-manager/README.md delete mode 100755 cluster/addons/addon-manager/kube-addons-main.sh delete mode 100755 cluster/addons/addon-manager/kube-addons-test.sh delete mode 100755 cluster/addons/addon-manager/kube-addons.sh delete mode 100644 cluster/addons/calico-policy-controller/README.md delete mode 100644 cluster/addons/calico-policy-controller/bgpconfigurations-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/bgppeers-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/blockaffinity-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-clusterrole.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-clusterrolebinding.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-cpva-clusterrole.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-cpva-clusterrolebinding.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-cpva-serviceaccount.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-node-daemonset.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-configmap.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-deployment.yaml delete mode 100644 cluster/addons/calico-policy-controller/calico-serviceaccount.yaml delete mode 100644 cluster/addons/calico-policy-controller/clusterinformations-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/felixconfigurations-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/globalnetworkpolicy-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/globalnetworksets-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/hostendpoints-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/ipamblock-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/ipamconfig-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/ipamhandle-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/ippool-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/kubecontrollersconfigurations-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/networkpolicies-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/networkset-crd.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-deployment.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrole.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrolebinding.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-configmap.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-deployment.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-rolebinding.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-serviceaccount.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-service.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrole.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrolebinding.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-vertical-autoscaler-configmap.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-vertical-autoscaler-deployment.yaml delete mode 100644 cluster/addons/calico-policy-controller/typha-vertical-autoscaler-serviceaccount.yaml delete mode 100644 cluster/addons/cloud-controller-manager/cloud-node-controller-binding.yaml delete mode 100644 cluster/addons/cloud-controller-manager/cloud-node-controller-role.yaml delete mode 100644 cluster/addons/cloud-controller-manager/pvl-controller-role.yaml delete mode 100644 cluster/addons/cluster-loadbalancing/glbc/README.md delete mode 100644 cluster/addons/cluster-loadbalancing/glbc/default-svc-controller.yaml delete mode 100644 cluster/addons/cluster-loadbalancing/glbc/default-svc.yaml delete mode 100644 cluster/addons/dns-horizontal-autoscaler/MAINTAINERS.md delete mode 100644 cluster/addons/dns-horizontal-autoscaler/README.md delete mode 100644 cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml delete mode 100644 cluster/addons/dns/coredns/Makefile delete mode 100644 cluster/addons/dns/coredns/coredns.yaml.base delete mode 100644 cluster/addons/dns/coredns/coredns.yaml.in delete mode 100644 cluster/addons/dns/coredns/coredns.yaml.sed delete mode 100644 cluster/addons/dns/coredns/transforms2salt.sed delete mode 100644 cluster/addons/dns/coredns/transforms2sed.sed delete mode 100644 cluster/addons/dns/kube-dns/Makefile delete mode 100644 cluster/addons/dns/kube-dns/README.md delete mode 100644 cluster/addons/dns/kube-dns/kube-dns.yaml.base delete mode 100644 cluster/addons/dns/kube-dns/kube-dns.yaml.in delete mode 100644 cluster/addons/dns/kube-dns/kube-dns.yaml.sed delete mode 100644 cluster/addons/dns/kube-dns/transforms2salt.sed delete mode 100644 cluster/addons/dns/kube-dns/transforms2sed.sed delete mode 100644 cluster/addons/dns/nodelocaldns/README.md delete mode 100644 cluster/addons/dns/nodelocaldns/nodelocaldns.yaml delete mode 100644 cluster/addons/fluentd-gcp/README.md delete mode 100644 cluster/addons/fluentd-gcp/event-exporter.yaml delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-configmap-old.yaml delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-configmap.yaml delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-ds-sa.yaml delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-ds.yaml delete mode 100644 cluster/addons/fluentd-gcp/fluentd-gcp-image/README.md delete mode 100644 cluster/addons/fluentd-gcp/scaler-deployment.yaml delete mode 100644 cluster/addons/fluentd-gcp/scaler-policy.yaml delete mode 100644 cluster/addons/fluentd-gcp/scaler-rbac.yaml delete mode 100644 cluster/addons/ip-masq-agent/ip-masq-agent.yaml delete mode 100644 cluster/addons/kube-network-policies/kube-network-policies-rbac.yaml delete mode 100644 cluster/addons/kube-network-policies/kube-network-policies.yaml delete mode 100644 cluster/addons/kube-proxy/kube-proxy-ds.yaml delete mode 100644 cluster/addons/kube-proxy/kube-proxy-rbac.yaml delete mode 100644 cluster/addons/metadata-agent/README.md delete mode 100644 cluster/addons/metadata-agent/stackdriver/metadata-agent-rbac.yaml delete mode 100644 cluster/addons/metadata-agent/stackdriver/metadata-agent.yaml delete mode 100644 cluster/addons/metadata-proxy/README.md delete mode 100644 cluster/addons/metadata-proxy/gce/metadata-proxy.yaml delete mode 100644 cluster/addons/metrics-server/README.md delete mode 100644 cluster/addons/metrics-server/auth-delegator.yaml delete mode 100644 cluster/addons/metrics-server/auth-reader.yaml delete mode 100644 cluster/addons/metrics-server/metrics-apiservice.yaml delete mode 100644 cluster/addons/metrics-server/metrics-server-deployment.yaml delete mode 100644 cluster/addons/metrics-server/metrics-server-service.yaml delete mode 100644 cluster/addons/metrics-server/resource-reader.yaml delete mode 100644 cluster/addons/node-problem-detector/MAINTAINERS.md delete mode 100644 cluster/addons/node-problem-detector/README.md delete mode 100644 cluster/addons/node-problem-detector/kubelet-user-standalone/npd-binding.yaml delete mode 100644 cluster/addons/node-problem-detector/npd.yaml delete mode 100644 cluster/addons/node-problem-detector/standalone/npd-binding.yaml delete mode 100644 cluster/addons/pdcsi-driver/README.md delete mode 100644 cluster/addons/pdcsi-driver/pd-csi-psp.yaml delete mode 100644 cluster/addons/pdcsi-driver/pd-csi-rbac.yaml delete mode 100644 cluster/addons/pdcsi-driver/pd-csi.yaml delete mode 100644 cluster/addons/pdcsi-driver/sc-premium.yaml delete mode 100644 cluster/addons/pdcsi-driver/sc-standard.yaml delete mode 100644 cluster/addons/rbac/cluster-autoscaler/cluster-autoscaler-rbac.yaml delete mode 100644 cluster/addons/rbac/cluster-loadbalancing/glbc/roles.yaml delete mode 100644 cluster/addons/rbac/cluster-loadbalancing/glbc/user-rolebindings.yaml delete mode 100644 cluster/addons/rbac/kubelet-api-auth/kube-apiserver-kubelet-api-admin-binding.yaml delete mode 100644 cluster/addons/rbac/kubelet-api-auth/kubelet-api-admin-role.yaml delete mode 100644 cluster/addons/rbac/kubelet-cert-rotation/kubelet-certificate-management.yaml delete mode 100644 cluster/addons/rbac/legacy-kubelet-user-disable/kubelet-binding.yaml delete mode 100644 cluster/addons/rbac/legacy-kubelet-user/kubelet-binding.yaml delete mode 100644 cluster/addons/storage-class/azure/default.yaml delete mode 100644 cluster/addons/storage-class/gce/default.yaml delete mode 100644 cluster/addons/storage-class/local/default.yaml delete mode 100644 cluster/addons/volumesnapshots/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml delete mode 100644 cluster/addons/volumesnapshots/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml delete mode 100644 cluster/addons/volumesnapshots/crd/snapshot.storage.k8s.io_volumesnapshots.yaml delete mode 100644 cluster/addons/volumesnapshots/volume-snapshot-controller/rbac-volume-snapshot-controller.yaml delete mode 100644 cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml delete mode 100755 cluster/clientbin.sh delete mode 100755 cluster/common.sh delete mode 100644 cluster/gce/addons/README.md delete mode 100644 cluster/gce/addons/admission-resource-quota-critical-pods/resource-quota.yaml delete mode 100644 cluster/gce/addons/cloud-pvl-admission/mutating-webhook-configuration.yaml delete mode 100644 cluster/gce/addons/konnectivity-agent/konnectivity-agent-ds.yaml delete mode 100644 cluster/gce/addons/konnectivity-agent/konnectivity-agent-rbac.yaml delete mode 100644 cluster/gce/addons/konnectivity-agent/konnectivity-rbac.yaml delete mode 100644 cluster/gce/addons/limit-range/limit-range.yaml delete mode 100644 cluster/gce/addons/loadbalancing/cloud-provider-binding.yaml delete mode 100644 cluster/gce/addons/loadbalancing/cloud-provider-role.yaml delete mode 100644 cluster/gce/config-common.sh delete mode 100755 cluster/gce/config-default.sh delete mode 100755 cluster/gce/config-test.sh delete mode 120000 cluster/gce/cos delete mode 120000 cluster/gce/custom delete mode 100755 cluster/gce/delete-stranded-load-balancers.sh delete mode 100644 cluster/gce/gci/README.md delete mode 100644 cluster/gce/gci/apiserver_etcd_test.go delete mode 100644 cluster/gce/gci/apiserver_kms_test.go delete mode 100644 cluster/gce/gci/append_or_replace_prefixed_line_test.go delete mode 100644 cluster/gce/gci/audit_policy_test.go delete mode 100755 cluster/gce/gci/configure-helper.sh delete mode 100644 cluster/gce/gci/configure-kubeapiserver.sh delete mode 100644 cluster/gce/gci/configure.sh delete mode 100644 cluster/gce/gci/configure_helper_test.go delete mode 100755 cluster/gce/gci/flexvolume_node_setup.sh delete mode 100755 cluster/gce/gci/helper.sh delete mode 100644 cluster/gce/gci/kube-master-internal-route.sh delete mode 100755 cluster/gce/gci/master-helper.sh delete mode 100644 cluster/gce/gci/master.yaml delete mode 100644 cluster/gce/gci/mounter/.gitignore delete mode 100644 cluster/gce/gci/mounter/Changelog delete mode 100644 cluster/gce/gci/mounter/Dockerfile delete mode 100644 cluster/gce/gci/mounter/Makefile delete mode 100644 cluster/gce/gci/mounter/mounter.go delete mode 100755 cluster/gce/gci/mounter/stage-upload.sh delete mode 100755 cluster/gce/gci/node-helper.sh delete mode 100644 cluster/gce/gci/node.yaml delete mode 100755 cluster/gce/gci/shutdown.sh delete mode 100644 cluster/gce/gci/testdata/kube-apiserver/base.template delete mode 100644 cluster/gce/gci/testdata/kube-apiserver/etcd.template delete mode 100644 cluster/gce/gci/testdata/kube-apiserver/kms.template delete mode 100755 cluster/gce/list-resources.sh delete mode 100644 cluster/gce/manifests/abac-authz-policy.jsonl delete mode 100644 cluster/gce/manifests/cloud-controller-manager.manifest delete mode 100644 cluster/gce/manifests/cluster-autoscaler.manifest delete mode 100644 cluster/gce/manifests/cri-auth-config.yaml delete mode 100644 cluster/gce/manifests/etcd.manifest delete mode 100644 cluster/gce/manifests/glbc.manifest delete mode 100644 cluster/gce/manifests/konnectivity-server.yaml delete mode 100644 cluster/gce/manifests/kube-addon-manager.yaml delete mode 100644 cluster/gce/manifests/kube-apiserver.manifest delete mode 100644 cluster/gce/manifests/kube-controller-manager.manifest delete mode 100644 cluster/gce/manifests/kube-proxy.manifest delete mode 100644 cluster/gce/manifests/kube-scheduler.manifest delete mode 100644 cluster/gce/manifests/pdcsi-controller.yaml delete mode 120000 cluster/gce/ubuntu delete mode 100755 cluster/gce/upgrade-aliases.sh delete mode 100755 cluster/gce/upgrade.sh delete mode 100755 cluster/gce/util.sh delete mode 100644 cluster/gce/windows/README-GCE-Windows-kube-up.md delete mode 100644 cluster/gce/windows/common.psm1 delete mode 100644 cluster/gce/windows/configure.ps1 delete mode 100644 cluster/gce/windows/k8s-node-setup.psm1 delete mode 100755 cluster/gce/windows/node-helper.sh delete mode 100755 cluster/gce/windows/smoke-test.sh delete mode 100644 cluster/gce/windows/testonly/install-ssh.psm1 delete mode 100644 cluster/gce/windows/testonly/user-profile.psm1 delete mode 100755 cluster/get-kube-binaries.sh delete mode 100755 cluster/get-kube.sh delete mode 100755 cluster/kube-down.sh delete mode 100755 cluster/kube-up.sh delete mode 100755 cluster/kube-util.sh delete mode 100755 cluster/kubectl.sh delete mode 100644 cluster/kubemark/gce/config-default.sh delete mode 100644 cluster/kubemark/iks/config-default.sh delete mode 100644 cluster/kubemark/pre-existing/config-default.sh delete mode 100644 cluster/kubemark/util.sh delete mode 100644 cluster/log-dump/README.md delete mode 100755 cluster/log-dump/log-dump.sh delete mode 100644 cluster/log-dump/logexporter-daemonset.yaml delete mode 100644 cluster/pre-existing/util.sh delete mode 100644 cluster/skeleton/util.sh delete mode 100755 cluster/util.sh delete mode 100755 cluster/validate-cluster.sh diff --git a/cluster/OWNERS b/cluster/OWNERS deleted file mode 100644 index 8b37fd5222..0000000000 --- a/cluster/OWNERS +++ /dev/null @@ -1,24 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -reviewers: - - bowei - - cjcullen - - MaciekPytel - - mtaufen - - mwielgus - - vishh - - yujuhong -approvers: - - amwat - - BenTheElder - - bowei - - cheftako - - cjcullen - - MaciekPytel - - mtaufen - - mwielgus - - vishh - - yujuhong -emeritus_approvers: -- gmarek -- jingax10 diff --git a/cluster/addons/README.md b/cluster/addons/README.md deleted file mode 100644 index 1ab9ef0aaf..0000000000 --- a/cluster/addons/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Legacy Cluster add-ons - -For more information on add-ons see [the documentation](https://kubernetes.io/docs/concepts/cluster-administration/addons/). - -## Overview - -Cluster add-ons are resources like Services and Deployments (with pods) that are -shipped with the Kubernetes binaries and are considered an inherent part of the -Kubernetes clusters. - -There are currently two classes of add-ons: -- Add-ons that will be reconciled. -- Add-ons that will be created if they don't exist. - -More details could be found in [addon-manager/README.md](addon-manager/README.md). - -## Cooperating Horizontal / Vertical Auto-Scaling with "reconcile class addons" - -"Reconcile" class addons will be periodically reconciled to the original state given -by the initial config. In order to make Horizontal / Vertical Auto-scaling functional, -the related fields in config should be left unset. More specifically, leave `replicas` -in `ReplicationController` / `Deployment` / `ReplicaSet` unset for Horizontal Scaling, -leave `resources` for container unset for Vertical Scaling. The periodic reconcile -won't clobbered these fields, hence they could be managed by Horizontal / Vertical -Auto-scaler. - -## Add-on naming - -The suggested naming for most of the resources is `` (with no version number). -Though resources like `Pod`, `ReplicationController` and `DaemonSet` are exceptional. -It would be hard to update `Pod` because many fields in `Pod` are immutable. For -`ReplicationController` and `DaemonSet`, in-place update may not trigger the underlying -pods to be re-created. You probably need to change their names during update to trigger -a complete deletion and creation. diff --git a/cluster/addons/addon-manager/CHANGELOG.md b/cluster/addons/addon-manager/CHANGELOG.md deleted file mode 100644 index 0cc424c91c..0000000000 --- a/cluster/addons/addon-manager/CHANGELOG.md +++ /dev/null @@ -1,109 +0,0 @@ -### Version 9.1.8 (Mon Mar 3 2025 Jeffrey Ying ) -- Update kubectl to v1.32.2. -- Update base image to debian-base:bookworm-v1.0.4. - -### Version 9.1.7 (Thu May 15 2023 Paco Xu ) -- Update kubectl to v1.27.1. -- Use `--prune-allowlist` instead of deprecated `--prune-whitelist`. - -### Version 9.1.6 (Thu February 24 2022 Shihang Zhang ) - - Clean up the wait check for service account (https://github.com/kubernetes/kubernetes/pull/108313) - -### Version 9.1.5 (Mon April 19 2021 Spencer Peterson ) - - Update baseimage to debian-base:v1.0.1. - -### Version 9.1.4 (Wed February 10 2021 Jordan Liggitt ) - - Update kubectl to v1.20.2. - - Fix a bug in leader election (https://github.com/kubernetes/kubernetes/issues/98966) - -### Version 9.1.3 (Mon November 30 2020 Spencer Peterson ) - - Update kubectl to v1.19.3. - -### Version 9.1.2 (Thu August 6 2020 Spencer Peterson ) - - Fix `start_addon` overwriting resources with `addonmanager.kubernetes.io/mode=EnsureExists`. - -### Version 9.1.1 (Wed May 19 2020 Antoni Zawodny ) - - Fix kube-addons.sh and kubectl permissions - -### Version 9.1.0 (Wed May 13 2020 Antoni Zawodny ) - - Enable overriding the default list of whitelisted resources - -### Version 9.0.2 (Thu August 1 2019 Maciej Borsz - - Fix a bug in leader election (https://github.com/kubernetes/kubernetes/pull/80575) - -### Version 9.0.1 (Wed April 10 2019 Zihong Zheng ) - - Update to use debian-base:v1.0.0. - -### Version 9.0 (Wed January 16 2019 Jordan Liggitt ) - - Prune workload resources via apps/v1 APIs - - Update kubectl to v1.13.2. - -### Version 8.9 (Fri October 19 2018 Jeff Grafton ) - - Update to use debian-base:0.4.0. - - Update kubectl to v1.11.3. - -### Version 8.8 (Mon October 1 2018 Zihong Zheng ) - - Update to use debian-base:0.3.2. - -### Version 8.7 (Tue September 4 2018 Zihong Zheng ) - - Support extra `--prune-whitelist` resources in kube-addon-manager. - - Update kubectl to v1.10.7. - -### Version 8.6 (Tue February 20 2018 Zihong Zheng ) - - Allow reconcile/ensure loop to work with resource under non-kube-system namespace. - - Update kubectl to v1.9.3. - -### Version 8.4 (Thu November 30 2017 zou nengren @zouyee) - - Update kubectl to v1.8.4. - -### Version 6.5 (Wed October 15 2017 Daniel Kłobuszewski ) - - Support for HA masters. - -### Version 6.4-beta.2 (Mon June 12 2017 Jeff Grafton ) - - Update kubectl to v1.6.4. - - Refresh base images. - -### Version 6.4-beta.1 (Wed March 8 2017 Zihong Zheng ) - - Create EnsureExists class addons before Reconcile class addons. - -### Version 6.4-alpha.3 (Fri February 24 2017 Zihong Zheng ) - - Support 'ensure exist' class addon and use addon-manager specific label. - -### Version 6.4-alpha.2 (Wed February 16 2017 Zihong Zheng ) - - Update kubectl to v1.6.0-alpha.2 to use HPA in autoscaling/v1 instead of extensions/v1beta1. - -### Version 6.4-alpha.1 (Wed February 1 2017 Zihong Zheng ) - - Update kubectl to v1.6.0-alpha.1 for supporting optional ConfigMap. - -### Version 6.3 (Fri January 27 2017 Lucas Käldström ) - - Updated the arm base image to `armhf/busybox` and now using qemu v2.7 for emulation. - -### Version 6.2 (Thu January 12 2017 Zihong Zheng ) - - Update kubectl to the stable version. - -### Version 6.1 (Tue November 29 2016 Zihong Zheng ) - - Support pruning old Deployments. - -### Version 6.0 (Fri November 18 2016 Zihong Zheng ) - - Upgrade Addon Manager to use `kubectl apply`. - -### Version 5.2 (Wed October 26 2016 Zihong Zheng ) - - Added support for ConfigMap and upgraded kubectl version to v1.4.4 (pr #35255) - -### Version 5.1 (Mon Jul 4 2016 Marek Grabowski ) - - Fixed the way addon-manager handles non-namespaced objects - -### Version 5 (Fri Jun 24 2016 Jerzy Szczepkowski @jszczepkowski) - - Added PetSet support to addon manager - -### Version 4 (Tue Jun 21 2016 Mike Danese @mikedanese) - - Increased addon check interval - -### Version 3 (Sun Jun 19 2016 Lucas Käldström @luxas) - - Bumped up addon-manager to v3 - -### Version 2 (Fri May 20 2016 Lucas Käldström @luxas) - - Removed deprecated kubectl command, added support for DaemonSets - -### Version 1 (Thu May 5 2016 Mike Danese @mikedanese) - - Run kube-addon-manager in a pod diff --git a/cluster/addons/addon-manager/Dockerfile b/cluster/addons/addon-manager/Dockerfile deleted file mode 100644 index e7418d41c6..0000000000 --- a/cluster/addons/addon-manager/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2016 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. - -ARG BASEIMAGE - -FROM ${BASEIMAGE} - -RUN clean-install bash - -ADD kube-addons.sh /opt/ -ADD kube-addons-main.sh /opt/ -ADD kubectl /usr/local/bin/ - -CMD ["/opt/kube-addons-main.sh"] diff --git a/cluster/addons/addon-manager/Makefile b/cluster/addons/addon-manager/Makefile deleted file mode 100644 index 8727a80417..0000000000 --- a/cluster/addons/addon-manager/Makefile +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 2016 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. - -IMAGE=gcr.io/k8s-staging-addon-manager/kube-addon-manager -ARCH?=amd64 -TEMP_DIR:=$(shell mktemp -d) -VERSION=v9.1.8 -KUBECTL_VERSION?=v1.32.2 - -BASEIMAGE=registry.k8s.io/build-image/debian-base-$(ARCH):bookworm-v1.0.6 - -SUDO=$(if $(filter 0,$(shell id -u)),,sudo) - -.PHONY: build push - -all: build - -build: - cp ./* $(TEMP_DIR) - curl -sSL --retry 5 https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/$(ARCH)/kubectl > $(TEMP_DIR)/kubectl - chmod a+rx $(TEMP_DIR)/kube-addons.sh $(TEMP_DIR)/kube-addons-main.sh $(TEMP_DIR)/kubectl - -ifneq ($(ARCH),amd64) - # Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel - $(SUDO) ../../../third_party/multiarch/qemu-user-static/register/register.sh --reset -endif - - docker build --pull -t $(IMAGE)-$(ARCH):$(VERSION) $(TEMP_DIR) --build-arg BASEIMAGE=$(BASEIMAGE) - -push: build - docker push $(IMAGE)-$(ARCH):$(VERSION) -ifeq ($(ARCH),amd64) - # Backward compatibility. TODO: deprecate this image tag - docker rmi $(IMAGE):$(VERSION) 2>/dev/null || true - docker tag $(IMAGE)-$(ARCH):$(VERSION) $(IMAGE):$(VERSION) - docker push $(IMAGE):$(VERSION) -endif - -test: - cp ./* $(TEMP_DIR) - curl -sSL --retry 5 https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/linux/$(ARCH)/kubectl > $(TEMP_DIR)/kubectl - chmod a+rx $(TEMP_DIR)/kube-addons.sh $(TEMP_DIR)/kube-addons-test.sh $(TEMP_DIR)/kubectl - cd $(TEMP_DIR) && KUBECTL_BIN=$(TEMP_DIR)/kubectl ./kube-addons-test.sh - -clean: - docker rmi -f $(IMAGE)-$(ARCH):$(VERSION) diff --git a/cluster/addons/addon-manager/README.md b/cluster/addons/addon-manager/README.md deleted file mode 100644 index e6d82fb5e3..0000000000 --- a/cluster/addons/addon-manager/README.md +++ /dev/null @@ -1,59 +0,0 @@ -### Addon-manager - -addon-manager manages two classes of addons with given template files in -`$ADDON_PATH` (default `/etc/kubernetes/addons/`). -- Addons with label `addonmanager.kubernetes.io/mode=Reconcile` will be periodically -reconciled. Direct manipulation to these addons through apiserver is discouraged because -addon-manager will bring them back to the original state. In particular: - - Addon will be re-created if it is deleted. - - Addon will be reconfigured to the state given by the supplied fields in the template - file periodically. - - Addon will be deleted when its manifest file is deleted from the `$ADDON_PATH`. -- Addons with label `addonmanager.kubernetes.io/mode=EnsureExists` will be checked for -existence only. Users can edit these addons as they want. In particular: - - Addon will only be created/re-created with the given template file when there is no - instance of the resource with that name. - - Addon will not be deleted when the manifest file is deleted from the `$ADDON_PATH`. - -Notes: -- Label `kubernetes.io/cluster-service=true` is deprecated (only for Addon Manager). -In future release (after one year), Addon Manager may not respect it anymore. Addons -have this label but without `addonmanager.kubernetes.io/mode=EnsureExists` will be -treated as "reconcile class addons" for now. -- Resources under `$ADDON_PATH` need to have either one of these two labels. -Otherwise it will be omitted. - -#### Images - -addon-manager images are pushed to `registry.k8s.io`. As addon-manager is built for multiple architectures, there is an image per architecture in the format - `registry.k8s.io/addon-manager/kube-addon-manager-$(ARCH):$(VERSION)`. - -#### How to release - -The `addon-manager` is built for multiple architectures. - -1. Change something in the source -2. Bump `VERSION` in the `Makefile` -3. Bump `KUBECTL_VERSION` in the `Makefile` if required -4. Build the `amd64` image and test it on a cluster -5. Push all images - -```console -# Build for linux/amd64 (default) -$ make push ARCH=amd64 -# ---> staging-k8s.gcr.io/addon-manager/kube-addon-manager-amd64:VERSION -# ---> staging-k8s.gcr.io/addon-manager/kube-addon-manager:VERSION (image with backwards-compatible naming) - -$ make push ARCH=arm -# ---> staging-k8s.gcr.io/addon-manager/kube-addon-manager-arm:VERSION - -$ make push ARCH=arm64 -# ---> staging-k8s.gcr.io/addon-manager/kube-addon-manager-arm64:VERSION - -$ make push ARCH=ppc64le -# ---> staging-k8s.gcr.io/addon-manager/kube-addon-manager-ppc64le:VERSION - -$ make push ARCH=s390x -# ---> staging-k8s.gcr.io/addon-manager/kube-addon-manager-s390x:VERSION -``` - -If you don't want to push the images, run `make` or `make build` instead diff --git a/cluster/addons/addon-manager/kube-addons-main.sh b/cluster/addons/addon-manager/kube-addons-main.sh deleted file mode 100755 index 7ae2d5669c..0000000000 --- a/cluster/addons/addon-manager/kube-addons-main.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2020 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. - -# Import required functions. The addon manager is installed to /opt in -# production use (see the Dockerfile) -# Disabling shellcheck following files as the full path would be required. -if [ -f "kube-addons.sh" ]; then - # shellcheck disable=SC1091 - source "kube-addons.sh" -elif [ -f "/opt/kube-addons.sh" ]; then - # shellcheck disable=SC1091 - source "/opt/kube-addons.sh" -else - # If the required source is missing, we have to fail. - log ERR "== Could not find kube-addons.sh (not in working directory or /opt) at $(date -Is) ==" - exit 1 -fi - -# The business logic for whether a given object should be created -# was already enforced by salt, and /etc/kubernetes/addons is the -# managed result of that. Start everything below that directory. -log INFO "== Kubernetes addon manager started at $(date -Is) with ADDON_CHECK_INTERVAL_SEC=${ADDON_CHECK_INTERVAL_SEC} ==" - -# Wait for the default service account to be created in the kube-system namespace. -# shellcheck disable=SC2086 -# Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here -while ! ${KUBECTL} ${KUBECTL_OPTS} get --namespace="${SYSTEM_NAMESPACE}" serviceaccount default; do - log WRN "== Error getting default service account, retry in 0.5 second ==" - sleep 0.5 -done - -log INFO "== Default service account in the ${SYSTEM_NAMESPACE} namespace ==" - -# Create admission_control objects if defined before any other addon services. If the limits -# are defined in a namespace other than default, we should still create the limits for the -# default namespace. -while IFS=$'\n' read -r obj; do - start_addon "${obj}" 100 10 default & - log INFO "++ obj ${obj} is created ++" -done < <(find /etc/kubernetes/admission-controls \( -name \*.yaml -o -name \*.json \)) - -# Start the apply loop. -# Check if the configuration has changed recently - in case the user -# created/updated/deleted the files on the master. -log INFO "== Entering periodical apply loop at $(date -Is) ==" -while true; do - start_sec=$(date +"%s") - if is_leader; then - ensure_addons - reconcile_addons - else - log INFO "Not elected leader, going back to sleep." - fi - end_sec=$(date +"%s") - len_sec=$((end_sec-start_sec)) - # subtract the time passed from the sleep time - if [[ ${len_sec} -lt ${ADDON_CHECK_INTERVAL_SEC} ]]; then - sleep_time=$((ADDON_CHECK_INTERVAL_SEC-len_sec)) - sleep ${sleep_time} - fi -done diff --git a/cluster/addons/addon-manager/kube-addons-test.sh b/cluster/addons/addon-manager/kube-addons-test.sh deleted file mode 100755 index e22d0af3c5..0000000000 --- a/cluster/addons/addon-manager/kube-addons-test.sh +++ /dev/null @@ -1,286 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2020 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. - -# These tests enforce behavior of kube-addon-manager functions against a real -# cluster. A working Kubernetes cluster must be set up with kubectl configured. -# To run with the released version of kubectl, use `make test`. - -set -o errexit -set -o pipefail -set -o nounset - -# Default kubectl to the test users installation if needed. -KUBECTL_BIN="${KUBECTL_BIN:-kubectl}" - -# Disabling shellcheck following files as the full path would be required. -# shellcheck disable=SC1091 -source "kube-addons.sh" - -TEST_NS="kube-addon-manager-test" - -function retry() { - local tries=10 - while [ "${tries}" -gt 0 ]; do - "$@" && return 0; - (( tries-- )) - sleep 1 - done -} - -function setup(){ - retry kubectl create namespace "${TEST_NS}" -} - -function teardown() { - retry kubectl delete namespace "${TEST_NS}" -} - -function error() { - echo -e "\e[31m$*\e[0m" -} - -function echo_green() { - echo -e "\e[32m$*\e[0m" -} - -function echo_blue() { - echo -e "\e[34m$*\e[0m" -} - -function test_create_resource_reconcile() { - local limitrange - read -r -d '' limitrange << EOF -apiVersion: "v1" -kind: "LimitRange" -metadata: - name: "limits" - namespace: "${TEST_NS}" - labels: - addonmanager.kubernetes.io/mode: Reconcile -spec: - limits: - - type: "Container" - defaultRequest: - cpu: "100m" -EOF - - # arguments are yaml text, number of tries, delay, name of file, and namespace - echo_blue "Creating initial resource to test Reconcile mode" - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if ! (kubectl get limits/limits -n "${TEST_NS}"); then - error "failed to create limits w/ reconcile" - return 1 - elif ! (kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"); then - error "limits does not match applied config" - return 1 - fi - - # Changes to addons with mode reconcile should be reflected. - echo_blue "Changes to manifest should be reflected in the cluster" - limitrange="${limitrange//100m/50m}" - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"; then - error "failed to update resource, still has 100m" - return 1 - elif ! (kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "50m"); then - error "failed to update resource, 50m limit was not reflected" - return 1 - fi - - # Finally, the users configuration will not be respected. - echo_blue "Changes the user makes should be overwritten by kube-addon-manager" - EDITOR="sed -i 's/50m/600m/'" kubectl edit limits/limits -n ${TEST_NS} - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "50m"; then - error "failed to edit resource with sed -- test is broken" - return 1 - fi - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if ! ( kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "50m"); then - error "failed to update resource, user config was respected when it should have been rewritten" - return 1 - fi -} - -function test_create_resource_ensureexists() { - local limitrange - read -r -d '' limitrange << EOF -apiVersion: "v1" -kind: "LimitRange" -metadata: - name: "limits" - namespace: "${TEST_NS}" - labels: - addonmanager.kubernetes.io/mode: EnsureExists -spec: - limits: - - type: "Container" - defaultRequest: - cpu: "100m" -EOF - - # arguments are yaml text, number of tries, delay, name of file, and namespace - echo_blue "Creating initial resource to test mode EnsureExists" - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if ! (kubectl get limits/limits -n "${TEST_NS}"); then - error "failed to create limits w/ EnsureExists" - return 1 - elif ! (kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"); then - error "limits does not match applied config" - return 1 - fi - - # Changes to addons with mode EnsureExists should NOT be reflected. - echo_blue "Changes to the manifest should not be reconciled with the cluster" - limitrange="${limitrange//100m/50m}" - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "50m"; then - error "failed to respect existing resource, was overwritten despite EnsureExists" - return 1 - fi - - # the users configuration must be respected - echo_blue "User configuration will be persisted for EnsureExists" - EDITOR="sed -i 's/100m/600m/'" kubectl edit limits/limits -n ${TEST_NS} - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"; then - error "failed to edit resource with sed -- test is broken" - return 1 - fi - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"; then - error "failed to respect user changes to EnsureExists object" - return 1 - fi - - # unless they delete the object, in which case it should return - echo_blue "Missing EnsureExists resources will be re-created" - kubectl delete limits/limits -n ${TEST_NS} - if kubectl get limits/limits -n ${TEST_NS}; then - error "failed to delete limitrange" - return 1 - fi - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if ! kubectl get limits/limits -n ${TEST_NS}; then - error "failed to recreate deleted EnsureExists resource" - return 1 - fi -} - -function test_create_multiresource() { - local limitrange - read -r -d '' limitrange << EOF -apiVersion: "v1" -kind: "LimitRange" -metadata: - name: "limits" - namespace: "${TEST_NS}" - labels: - addonmanager.kubernetes.io/mode: EnsureExists -spec: - limits: - - type: "Container" - defaultRequest: - cpu: "100m" ---- -apiVersion: "v1" -kind: "LimitRange" -metadata: - name: "limits2" - namespace: "${TEST_NS}" - labels: - addonmanager.kubernetes.io/mode: Reconcile -spec: - limits: - - type: "Container" - defaultRequest: - cpu: "100m" -EOF - - # arguments are yaml text, number of tries, delay, name of file, and namespace - echo_blue "Creating initial resources from multi-resource manifest" - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if ! (kubectl get limits/limits -n "${TEST_NS}"); then - error "failed to create limits w/ EnsureExists" - return 1 - elif ! (kubectl get limits/limits2 -n "${TEST_NS}"); then - error "failed to create limits2 w/ Reconcile" - return 1 - fi - - # Changes to addons with mode EnsureExists should NOT be reflected. - # However, the mode=Reconcile addon should be changed. - echo_blue "Multi-resource manifest changes should apply to EnsureExists, not Reconcile" - limitrange="${limitrange//100m/50m}" - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "50m"; then - error "failed to respect existing resource, was overwritten despite EnsureExists" - return 1 - elif kubectl get limits/limits2 -n ${TEST_NS} | grep --silent "100m"; then - error "failed to update resource with mode Reconcile" - return 1 - fi - - # the users configuration must be respected for EnsureExists - echo_blue "Multi-resource manifest should not overwrite user config in EnsureExists" - EDITOR="sed -i 's/100m/600m/'" kubectl edit limits/limits -n ${TEST_NS} - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"; then - error "failed to edit resource with sed -- test is broken" - return 1 - fi - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if kubectl get limits/limits -n ${TEST_NS} -o yaml | grep --silent "100m"; then - error "failed to respect user changes to EnsureExists object" - return 1 - fi - - # But not for Reconcile. - echo_blue "Multi-resource manifest should overwrite user config in EnsureExists" - EDITOR="sed -i 's/50m/600m/'" kubectl edit limits/limits2 -n ${TEST_NS} - if kubectl get limits/limits2 -n ${TEST_NS} -o yaml | grep --silent "50m"; then - error "failed to edit resource with sed -- test is broken" - return 1 - fi - create_resource_from_string "${limitrange}" "10" "1" "limitrange.yaml" "${TEST_NS}" - if ! ( kubectl get limits/limits2 -n ${TEST_NS} -o yaml | grep --silent "50m"); then - error "failed to update resource, user config was respected when it should have been rewritten" - return 1 - fi -} - -function test_func() { - local -r name="${1}" - - echo_blue "=== TEST ${name}" - setup - if ! "${name}"; then - failures=$((failures+1)) - error "=== FAIL" - else - echo_green "=== PASS" - fi - teardown -} - -failures=0 -test_func test_create_resource_reconcile -test_func test_create_resource_ensureexists -test_func test_create_multiresource -if [ "${failures}" -gt 0 ]; then - error "no. failed tests: ${failures}" - error "FAIL" - exit 1 -else - echo_green "PASS" -fi diff --git a/cluster/addons/addon-manager/kube-addons.sh b/cluster/addons/addon-manager/kube-addons.sh deleted file mode 100755 index f20ae03afc..0000000000 --- a/cluster/addons/addon-manager/kube-addons.sh +++ /dev/null @@ -1,294 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2014 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. - -# LIMITATIONS -# 1. Exit code is probably not always correct. -# 2. There are no unittests. -# 3. Will not work if the total length of paths to addons is greater than -# bash can handle. Probably it is not a problem: ARG_MAX=2097152 on GCE. - -# cosmetic improvements to be done -# 1. Improve the log function; add timestamp, file name, etc. -# 2. Logging doesn't work from files that print things out. -# 3. Kubectl prints the output to stderr (the output should be captured and then -# logged) - -KUBECTL=${KUBECTL_BIN:-/usr/local/bin/kubectl} -KUBECTL_OPTS=${KUBECTL_OPTS:-} -# KUBECTL_PRUNE_WHITELIST is a list of resources whitelisted by default. -# This is currently the same with the default in: -# https://github.com/kubernetes/kubectl/blob/master/pkg/cmd/apply/prune.go. -# To override the default list with other values, set -# KUBECTL_PRUNE_WHITELIST_OVERRIDE environment variable to space-separated -# names of resources to whitelist. -if [ -z "${KUBECTL_PRUNE_WHITELIST_OVERRIDE:-}" ]; then - KUBECTL_PRUNE_WHITELIST=( - core/v1/ConfigMap - core/v1/Endpoints - core/v1/Namespace - core/v1/PersistentVolumeClaim - core/v1/PersistentVolume - core/v1/Pod - core/v1/ReplicationController - core/v1/Secret - core/v1/Service - batch/v1/Job - batch/v1/CronJob - apps/v1/DaemonSet - apps/v1/Deployment - apps/v1/ReplicaSet - apps/v1/StatefulSet - networking.k8s.io/v1/Ingress - ) -else - read -ra KUBECTL_PRUNE_WHITELIST <<< "${KUBECTL_PRUNE_WHITELIST_OVERRIDE}" -fi - -# This variable is unused in this file, but not in those that source it. -# shellcheck disable=SC2034 -ADDON_CHECK_INTERVAL_SEC=${TEST_ADDON_CHECK_INTERVAL_SEC:-60} -ADDON_PATH=${ADDON_PATH:-/etc/kubernetes/addons} - -# This variable is unused in this file, but not in those that source it. -# shellcheck disable=SC2034 -SYSTEM_NAMESPACE=kube-system - -# Addons could use this label with two modes: -# - ADDON_MANAGER_LABEL=Reconcile -# - ADDON_MANAGER_LABEL=EnsureExists -ADDON_MANAGER_LABEL="addonmanager.kubernetes.io/mode" -# This label is deprecated (only for Addon Manager). In future release -# addon-manager may not respect it anymore. Addons with -# CLUSTER_SERVICE_LABEL=true and without ADDON_MANAGER_LABEL=EnsureExists -# will be reconciled for now. -CLUSTER_SERVICE_LABEL="kubernetes.io/cluster-service" - -# Whether only one addon manager should be running in a multi-master setup. -# Disabling this flag will force all addon managers to assume they are the -# leaders. -ADDON_MANAGER_LEADER_ELECTION=${ADDON_MANAGER_LEADER_ELECTION:-true} - -# Remember that you can't log from functions that print some output (because -# logs are also printed on stdout). -# $1 level -# $2 message -function log() { - # manage log levels manually here - - # add the timestamp if you find it useful - case $1 in - DB3 ) -# echo "$1: $2" - ;; - DB2 ) -# echo "$1: $2" - ;; - DBG ) -# echo "$1: $2" - ;; - INFO ) - echo "$1: $2" - ;; - WRN ) - echo "$1: $2" - ;; - ERR ) - echo "$1: $2" - ;; - * ) - echo "INVALID_LOG_LEVEL $1: $2" - ;; - esac -} - -# Generate kubectl prune-allowlist flags from provided resource list. -function generate_prune_allowlist_flags() { - local -r resources=( "$@" ) - for resource in "${resources[@]}"; do - # Check if $resource isn't composed just of whitespaces by replacing ' ' - # with '' and checking whether the resulting string is not empty. - if [[ -n "${resource// /}" ]]; then - printf "%s" "--prune-allowlist ${resource} " - fi - done -} - -# KUBECTL_EXTRA_PRUNE_WHITELIST is a list of extra allowed resources -# besides the default ones. -extra_prune_allowlist= -if [ -n "${KUBECTL_EXTRA_PRUNE_WHITELIST:-}" ]; then - read -ra extra_prune_allowlist <<< "${KUBECTL_EXTRA_PRUNE_WHITELIST}" -fi -prune_allowlist=( "${KUBECTL_PRUNE_WHITELIST[@]}" "${extra_prune_allowlist[@]}" ) -prune_allowlist_flags=$(generate_prune_allowlist_flags "${prune_allowlist[@]}") - -log INFO "== Generated kubectl prune allowlist flags: $prune_allowlist_flags ==" - -# $1 filename of addon to start. -# $2 count of tries to start the addon. -# $3 delay in seconds between two consecutive tries -# $4 namespace -function start_addon() { - local -r addon_filename=$1; - local -r tries=$2; - local -r delay=$3; - local -r namespace=$4 - - create_resource_from_string "$(cat "${addon_filename}")" "${tries}" "${delay}" "${addon_filename}" "${namespace}" -} - -# $1 string with json or yaml. -# $2 count of tries to start the addon. -# $3 delay in seconds between two consecutive tries -# $4 name of this object to use when logging about it. -# $5 namespace for this object -function create_resource_from_string() { - local -r config_string=$1; - local tries=$2; - local -r delay=$3; - local -r config_name=$4; - local -r namespace=$5; - while [ "${tries}" -gt 0 ]; do - reconcile_resource_from_string "${config_string}" "${config_name}" "${namespace}" && \ - ensure_resource_from_string "${config_string}" "${config_name}" "${namespace}" && \ - return 0; - (( tries-- )) - log WRN "== Failed to start ${config_name} in namespace ${namespace} at $(date -Is). ${tries} tries remaining. ==" - sleep "${delay}"; - done - return 1; -} - -# Creates resources with addon mode Reconcile for create_resource_from_string. -# Does not perform pruning. -# $1 string with json or yaml. -# $2 name of this object for logging -# $3 namespace for the object -function reconcile_resource_from_string() { - local -r config_string=$1; - local -r config_name=$2; - local -r namespace=$3; - - # kubectl_output must be declared ahead of time to allow capturing kubectl's exit code and not local's exit code. - local kubectl_output; - # shellcheck disable=SC2086 - # Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here - kubectl_output=$(echo "${config_string}" | ${KUBECTL} ${KUBECTL_OPTS} apply -f - \ - --namespace="${namespace}" -l ${ADDON_MANAGER_LABEL}=Reconcile 2>&1) && \ - log INFO "== Successfully reconciled ${config_name} in namespace ${namespace} at $(date -Is)" && \ - return 0; - if echo "${kubectl_output}" | grep --silent "no objects"; then - # Nothing to do. - return 0; - fi - echo "${kubectl_output}" # for visibility of errors - return 1; -} - -# Creates resources with addon mode EnsureExists for create_resource_from_string. -# Does not perform pruning. -# $1 string with json or yaml. -# $2 name of this object for logging -# $3 namespace for the object -function ensure_resource_from_string() { - local -r config_string=$1; - local -r config_name=$2; - local -r namespace=$3; - - # Resources that are set to the addon mode EnsureExists should not be overwritten if they already exist. - local kubectl_output; - # shellcheck disable=SC2086 - # Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here - kubectl_output=$(echo "${config_string}" | ${KUBECTL} ${KUBECTL_OPTS} create -f - \ - --namespace="${namespace}" -l ${ADDON_MANAGER_LABEL}=EnsureExists 2>&1) && \ - log INFO "== Successfully started ${config_name} in namespace ${namespace} at $(date -Is)" && \ - return 0; - # Detect an already exists failure for creating EnsureExists resources. - # All other errors should result in a retry. - if echo "${kubectl_output}" | grep --silent "AlreadyExists"; then - log INFO "== Skipping start ${config_name} in namespace ${namespace}, already exists at $(date -Is)" - return 0; - elif echo "${kubectl_output}" | grep --silent "no objects"; then - # Nothing to do. - return 0; - fi - echo "${kubectl_output}" # for visibility of errors - return 1; -} - -function reconcile_addons() { - # TODO: Remove the first command in future release. - # Adding this for backward compatibility. Old addons have CLUSTER_SERVICE_LABEL=true and don't have - # ADDON_MANAGER_LABEL=EnsureExists will still be reconciled. - # Filter out `configured` message to not noisily log. - # `created`, `pruned` and errors will be logged. - log INFO "== Reconciling with deprecated label ==" - # shellcheck disable=SC2086 - # Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here - ${KUBECTL} ${KUBECTL_OPTS} apply -f ${ADDON_PATH} \ - -l ${CLUSTER_SERVICE_LABEL}=true,${ADDON_MANAGER_LABEL}!=EnsureExists \ - --prune=true ${prune_allowlist_flags} --recursive | grep -v configured - - log INFO "== Reconciling with addon-manager label ==" - # shellcheck disable=SC2086 - # Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here - ${KUBECTL} ${KUBECTL_OPTS} apply -f ${ADDON_PATH} \ - -l ${CLUSTER_SERVICE_LABEL}!=true,${ADDON_MANAGER_LABEL}=Reconcile \ - --prune=true ${prune_allowlist_flags} --recursive | grep -v configured - - log INFO "== Kubernetes addon reconcile completed at $(date -Is) ==" -} - -function ensure_addons() { - # Create objects already exist should fail. - # Filter out `AlreadyExists` message to not noisily log. - # shellcheck disable=SC2086 - # Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here - ${KUBECTL} ${KUBECTL_OPTS} create -f ${ADDON_PATH} \ - -l ${ADDON_MANAGER_LABEL}=EnsureExists --recursive 2>&1 | grep -v AlreadyExists - - log INFO "== Kubernetes addon ensure completed at $(date -Is) ==" -} - -function is_leader() { - # In multi-master setup, only one addon manager should be running. We use - # existing leader election in kube-controller-manager instead of implementing - # a separate mechanism here. - if ! $ADDON_MANAGER_LEADER_ELECTION; then - log INFO "Leader election disabled." - return 0; - fi - # shellcheck disable=SC2086 - # Disabling because "${KUBECTL_OPTS}" needs to allow for expansion here - KUBE_CONTROLLER_MANAGER_LEADER=$(${KUBECTL} ${KUBECTL_OPTS} -n kube-system get leases.v1.coordination.k8s.io kube-controller-manager -o "jsonpath={.spec.holderIdentity}") - - case "${KUBE_CONTROLLER_MANAGER_LEADER}" in - "") - log ERR "No leader election info found." - return 1 - ;; - - "${HOSTNAME}"_*) - log INFO "Leader is $KUBE_CONTROLLER_MANAGER_LEADER" - return 0 - ;; - - *) - log INFO "Leader is $KUBE_CONTROLLER_MANAGER_LEADER, not ${HOSTNAME}_*" - return 1 - ;; - esac -} diff --git a/cluster/addons/calico-policy-controller/README.md b/cluster/addons/calico-policy-controller/README.md deleted file mode 100644 index c43b09dac5..0000000000 --- a/cluster/addons/calico-policy-controller/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Calico Policy Controller - -Calico is an implementation of the Kubernetes network policy API. The provided manifests install: - -- A DaemonSet which runs Calico on each node in the cluster. -- A Deployment which installs the Calico Typha agent. -- A Service for the Calico Typha agent. -- Horizontal and vertical autoscalers for Calico. - -### Learn More - -Learn more about Calico at https://docs.projectcalico.org - diff --git a/cluster/addons/calico-policy-controller/bgpconfigurations-crd.yaml b/cluster/addons/calico-policy-controller/bgpconfigurations-crd.yaml deleted file mode 100644 index 5913a885f8..0000000000 --- a/cluster/addons/calico-policy-controller/bgpconfigurations-crd.yaml +++ /dev/null @@ -1,131 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: bgpconfigurations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: BGPConfiguration - listKind: BGPConfigurationList - plural: bgpconfigurations - singular: bgpconfiguration - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: BGPConfiguration contains the configuration for any BGP routing. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BGPConfigurationSpec contains the values of the BGP configuration. - properties: - asNumber: - description: 'ASNumber is the default AS number used by a node. [Default: - 64512]' - format: int32 - type: integer - communities: - description: Communities is a list of BGP community values and their - arbitrary names for tagging routes. - items: - description: Community contains standard or large community value - and its name. - properties: - name: - description: Name given to community value. - type: string - value: - description: Value must be of format `aa:nn` or `aa:nn:mm`. - For standard community use `aa:nn` format, where `aa` and - `nn` are 16 bit number. For large community use `aa:nn:mm` - format, where `aa`, `nn` and `mm` are 32 bit number. Where, - `aa` is an AS Number, `nn` and `mm` are per-AS identifier. - pattern: ^(\d+):(\d+)$|^(\d+):(\d+):(\d+)$ - type: string - type: object - type: array - listenPort: - description: ListenPort is the port where BGP protocol should listen. - Defaults to 179 - maximum: 65535 - minimum: 1 - type: integer - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs - are sent to the stdout. [Default: INFO]' - type: string - nodeToNodeMeshEnabled: - description: 'NodeToNodeMeshEnabled sets whether full node to node - BGP mesh is enabled. [Default: true]' - type: boolean - prefixAdvertisements: - description: PrefixAdvertisements contains per-prefix advertisement - configuration. - items: - description: PrefixAdvertisement configures advertisement properties - for the specified CIDR. - properties: - cidr: - description: CIDR for which properties should be advertised. - type: string - communities: - description: Communities can be list of either community names - already defined in `Specs.Communities` or community value - of format `aa:nn` or `aa:nn:mm`. For standard community use - `aa:nn` format, where `aa` and `nn` are 16 bit number. For - large community use `aa:nn:mm` format, where `aa`, `nn` and - `mm` are 32 bit number. Where,`aa` is an AS Number, `nn` and - `mm` are per-AS identifier. - items: - type: string - type: array - type: object - type: array - serviceClusterIPs: - description: ServiceClusterIPs are the CIDR blocks from which service - cluster IPs are allocated. If specified, Calico will advertise these - blocks, as well as any cluster IPs within them. - items: - description: ServiceClusterIPBlock represents a single allowed ClusterIP - CIDR block. - properties: - cidr: - type: string - type: object - type: array - serviceExternalIPs: - description: ServiceExternalIPs are the CIDR blocks for Kubernetes - Service External IPs. Kubernetes Service ExternalIPs will only be - advertised if they are within one of these blocks. - items: - description: ServiceExternalIPBlock represents a single allowed - External IP CIDR block. - properties: - cidr: - type: string - type: object - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/bgppeers-crd.yaml b/cluster/addons/calico-policy-controller/bgppeers-crd.yaml deleted file mode 100644 index a7db643fb2..0000000000 --- a/cluster/addons/calico-policy-controller/bgppeers-crd.yaml +++ /dev/null @@ -1,105 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: bgppeers.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: BGPPeer - listKind: BGPPeerList - plural: bgppeers - singular: bgppeer - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BGPPeerSpec contains the specification for a BGPPeer resource. - properties: - asNumber: - description: The AS Number of the peer. - format: int32 - type: integer - keepOriginalNextHop: - description: Option to keep the original nexthop field when routes - are sent to a BGP Peer. Setting "true" configures the selected BGP - Peers node to use the "next hop keep;" instead of "next hop self;"(default) - in the specific branch of the Node on "bird.cfg". - type: boolean - node: - description: The node name identifying the Calico node instance that - is peering with this peer. If this is not set, this represents a - global peer, i.e. a peer that peers with every node in the deployment. - type: string - nodeSelector: - description: Selector for the nodes that should have this peering. When - this is set, the Node field must be empty. - type: string - password: - description: Optional BGP password for the peerings generated by this - BGPPeer resource. - properties: - secretKeyRef: - description: Selects a key of a secret in the node pod's namespace. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - TODO: Add other useful fields. apiVersion, kind, uid?' - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - type: object - peerIP: - description: The IP address of the peer followed by an optional port - number to peer with. If port number is given, format should be `[]:port` - or `:` for IPv4. If optional port number is not set, - and this peer IP and ASNumber belongs to a calico/node with ListenPort - set in BGPConfiguration, then we use that port to peer. - type: string - peerSelector: - description: Selector for the remote nodes to peer with. When this - is set, the PeerIP and ASNumber fields must be empty. For each - peering between the local node and selected remote nodes, we configure - an IPv4 peering if both ends have NodeBGPSpec.IPv4Address specified, - and an IPv6 peering if both ends have NodeBGPSpec.IPv6Address specified. The - remote AS number comes from the remote node’s NodeBGPSpec.ASNumber, - or the global default if that is not set. - type: string - required: - - asNumber - - peerIP - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/blockaffinity-crd.yaml b/cluster/addons/calico-policy-controller/blockaffinity-crd.yaml deleted file mode 100644 index 49cea41819..0000000000 --- a/cluster/addons/calico-policy-controller/blockaffinity-crd.yaml +++ /dev/null @@ -1,60 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: blockaffinities.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: BlockAffinity - listKind: BlockAffinityList - plural: blockaffinities - singular: blockaffinity - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: BlockAffinitySpec contains the specification for a BlockAffinity - resource. - properties: - cidr: - type: string - deleted: - description: Deleted indicates that this block affinity is being deleted. - This field is a string for compatibility with older releases that - mistakenly treat this field as a string. - type: string - node: - type: string - state: - type: string - required: - - cidr - - node - - state - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/calico-clusterrole.yaml b/cluster/addons/calico-policy-controller/calico-clusterrole.yaml deleted file mode 100644 index b3adead79a..0000000000 --- a/cluster/addons/calico-policy-controller/calico-clusterrole.yaml +++ /dev/null @@ -1,140 +0,0 @@ -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: calico - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -rules: - # The CNI plugin needs to get pods, nodes, and namespaces. - - apiGroups: [""] - resources: - - pods - - nodes - - namespaces - verbs: - - get - # calico/node checks configmaps for cluster CIDR. - - apiGroups: [""] - resources: - - configmaps - verbs: - - get - - apiGroups: [""] - resources: - - endpoints - - services - verbs: - # Used to discover service IPs for advertisement. - - watch - - list - # Used to discover Typhas. - - get - - apiGroups: [""] - resources: - - nodes/status - verbs: - # Needed for clearing NodeNetworkUnavailable flag. - - patch - # Calico stores some configuration information in node annotations. - - update - # Watch for changes to Kubernetes NetworkPolicies. - - apiGroups: ["networking.k8s.io"] - resources: - - networkpolicies - verbs: - - watch - - list - # Used by Calico for policy information. - - apiGroups: [""] - resources: - - pods - - namespaces - - serviceaccounts - verbs: - - list - - watch - # The CNI plugin patches pods/status. - - apiGroups: [""] - resources: - - pods/status - verbs: - - patch - # Calico monitors various CRDs for config. - # Note: Though we are not using ipam from calico, calico node still needs those permissions - # to boot. - - apiGroups: ["crd.projectcalico.org"] - resources: - - globalfelixconfigs - - felixconfigurations - - bgppeers - - globalbgpconfigs - - bgpconfigurations - - ippools - - ipamblocks - - globalnetworkpolicies - - globalnetworksets - - networkpolicies - - networksets - - clusterinformations - - hostendpoints - verbs: - - get - - list - - watch - # Calico must create and update some CRDs on startup. - - apiGroups: ["crd.projectcalico.org"] - resources: - - ippools - - felixconfigurations - - clusterinformations - verbs: - - create - - update - # Calico stores some configuration information on the node. - - apiGroups: [""] - resources: - - nodes - verbs: - - get - - list - - watch - # These permissions are only required for upgrade from v2.6, and can - # be removed after upgrade or on fresh installations. - - apiGroups: ["crd.projectcalico.org"] - resources: - - bgpconfigurations - - bgppeers - verbs: - - create - - update - # These permissions are required for Calico CNI to perform IPAM allocations. - - apiGroups: ["crd.projectcalico.org"] - resources: - - blockaffinities - - ipamblocks - - ipamhandles - verbs: - - get - - list - - create - - update - - delete - - apiGroups: ["crd.projectcalico.org"] - resources: - - ipamconfigs - verbs: - - get - # Block affinities must also be watchable by confd for route aggregation. - - apiGroups: ["crd.projectcalico.org"] - resources: - - blockaffinities - verbs: - - watch - # The Calico IPAM migration needs to get daemonsets. These permissions can be - # removed if not upgrading from an installation using host-local IPAM. - - apiGroups: ["apps"] - resources: - - daemonsets - verbs: - - get diff --git a/cluster/addons/calico-policy-controller/calico-clusterrolebinding.yaml b/cluster/addons/calico-policy-controller/calico-clusterrolebinding.yaml deleted file mode 100644 index 2dbbd0e6e8..0000000000 --- a/cluster/addons/calico-policy-controller/calico-clusterrolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: calico - labels: - addonmanager.kubernetes.io/mode: Reconcile -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: calico -subjects: -- kind: ServiceAccount - name: calico - namespace: kube-system diff --git a/cluster/addons/calico-policy-controller/calico-cpva-clusterrole.yaml b/cluster/addons/calico-policy-controller/calico-cpva-clusterrole.yaml deleted file mode 100644 index 78f0cc8816..0000000000 --- a/cluster/addons/calico-policy-controller/calico-cpva-clusterrole.yaml +++ /dev/null @@ -1,13 +0,0 @@ -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: calico-cpva - labels: - addonmanager.kubernetes.io/mode: Reconcile -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["list"] - - apiGroups: ["apps"] - resources: ["deployments", "daemonsets"] - verbs: ["patch"] diff --git a/cluster/addons/calico-policy-controller/calico-cpva-clusterrolebinding.yaml b/cluster/addons/calico-policy-controller/calico-cpva-clusterrolebinding.yaml deleted file mode 100644 index b04abce43b..0000000000 --- a/cluster/addons/calico-policy-controller/calico-cpva-clusterrolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: calico-cpva - labels: - addonmanager.kubernetes.io/mode: Reconcile -subjects: - - kind: ServiceAccount - name: calico-cpva - namespace: kube-system -roleRef: - kind: ClusterRole - name: calico-cpva - apiGroup: rbac.authorization.k8s.io diff --git a/cluster/addons/calico-policy-controller/calico-cpva-serviceaccount.yaml b/cluster/addons/calico-policy-controller/calico-cpva-serviceaccount.yaml deleted file mode 100644 index 8d19907860..0000000000 --- a/cluster/addons/calico-policy-controller/calico-cpva-serviceaccount.yaml +++ /dev/null @@ -1,7 +0,0 @@ -kind: ServiceAccount -apiVersion: v1 -metadata: - name: calico-cpva - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile diff --git a/cluster/addons/calico-policy-controller/calico-node-daemonset.yaml b/cluster/addons/calico-policy-controller/calico-node-daemonset.yaml deleted file mode 100644 index d409232e07..0000000000 --- a/cluster/addons/calico-policy-controller/calico-node-daemonset.yaml +++ /dev/null @@ -1,189 +0,0 @@ -kind: DaemonSet -apiVersion: apps/v1 -metadata: - name: calico-node - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile - k8s-app: calico-node -spec: - selector: - matchLabels: - k8s-app: calico-node - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - k8s-app: calico-node - spec: - priorityClassName: system-node-critical - nodeSelector: - projectcalico.org/ds-ready: "true" - hostNetwork: true - serviceAccountName: calico - # Minimize downtime during a rolling upgrade or deletion; tell Kubernetes to do a "force - # deletion": https://kubernetes.io/docs/concepts/workloads/pods/pod/#termination-of-pods. - terminationGracePeriodSeconds: 0 - initContainers: - - name: install-cni - image: gcr.io/projectcalico-org/cni:v3.19.1 - command: ["/opt/cni/bin/install"] - env: - - name: CNI_CONF_NAME - value: "10-calico.conflist" - - name: CNI_NETWORK_CONFIG - value: |- - { - "name": "k8s-pod-network", - "cniVersion": "0.3.1", - "plugins": [ - { - "type": "calico", - "log_level": "info", - "datastore_type": "kubernetes", - "nodename": "__KUBERNETES_NODE_NAME__", - "ipam": { - "type": "host-local", - "subnet": "usePodCidr" - }, - "policy": { - "type": "k8s" - }, - "kubernetes": { - "kubeconfig": "/etc/cni/net.d/calico-kubeconfig" - } - }, - { - "type": "portmap", - "capabilities": {"portMappings": true}, - "snat": true - } - ] - } - - name: KUBERNETES_NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - # Prevents the container from sleeping forever. - - name: SLEEP - value: "false" - volumeMounts: - - mountPath: /host/opt/cni/bin - name: cni-bin-dir - - mountPath: /host/etc/cni/net.d - name: cni-net-dir - containers: - # Runs calico/node container on each Kubernetes node. This - # container programs network policy and routes on each - # host. - - name: calico-node - image: gcr.io/projectcalico-org/node:v3.19.1 - env: - - name: CALICO_MANAGE_CNI - value: "true" - - name: CALICO_DISABLE_FILE_LOGGING - value: "true" - - name: CALICO_NETWORKING_BACKEND - value: "none" - - name: DATASTORE_TYPE - value: "kubernetes" - - name: FELIX_DEFAULTENDPOINTTOHOSTACTION - value: "ACCEPT" - - name: FELIX_HEALTHENABLED - value: "true" - - name: FELIX_IPV6SUPPORT - value: "false" - - name: FELIX_LOGSEVERITYSYS - value: "none" - - name: FELIX_LOGSEVERITYSCREEN - value: "info" - - name: FELIX_PROMETHEUSMETRICSENABLED - value: "true" - - name: FELIX_REPORTINGINTERVALSECS - value: "0" - - name: FELIX_TYPHAK8SSERVICENAME - value: "calico-typha" - - name: FELIX_ROUTETABLERANGE - value: "10-250" - - name: USE_POD_CIDR - value: "true" - - name: IP - value: "autodetect" - - name: NO_DEFAULT_POOLS - value: "true" - - name: NODENAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: WAIT_FOR_DATASTORE - value: "true" - securityContext: - privileged: true - livenessProbe: - httpGet: - path: /liveness - port: 9099 - host: localhost - periodSeconds: 10 - initialDelaySeconds: 10 - failureThreshold: 6 - readinessProbe: - httpGet: - path: /readiness - port: 9099 - host: localhost - periodSeconds: 10 - volumeMounts: - - mountPath: /host/etc/cni/net.d - name: cni-net-dir - - mountPath: /lib/modules - name: lib-modules - readOnly: true - - mountPath: /etc/calico - name: etc-calico - readOnly: true - - mountPath: /var/run/calico - name: var-run-calico - readOnly: false - - mountPath: /var/lib/calico - name: var-lib-calico - readOnly: false - - mountPath: /run/xtables.lock - name: xtables-lock - readOnly: false - volumes: - # Used to ensure proper kmods are installed. - - name: lib-modules - hostPath: - path: /lib/modules - # Mount in the Felix config file from the host. - - name: etc-calico - hostPath: - path: /etc/calico - # Used to install CNI binaries. - - name: cni-bin-dir - hostPath: - path: __CALICO_CNI_DIR__ - # Used to install CNI network config. - - name: cni-net-dir - hostPath: - path: /etc/cni/net.d - - name: var-run-calico - hostPath: - path: /var/run/calico - - name: var-lib-calico - hostPath: - path: /var/lib/calico - - name: xtables-lock - hostPath: - path: /run/xtables.lock - type: FileOrCreate - tolerations: - # Make sure calico/node gets scheduled on all nodes. - - effect: NoSchedule - operator: Exists - - effect: NoExecute - operator: Exists - - key: CriticalAddonsOnly - operator: Exists diff --git a/cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-configmap.yaml b/cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-configmap.yaml deleted file mode 100644 index e4a8e1457b..0000000000 --- a/cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: calico-node-vertical-autoscaler - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -data: - node-autoscaler: |- - { - "calico-node": { - "requests": { - "cpu": { - "base": "80m", - "step": "20m", - "nodesPerStep": 10, - "max": "500m" - } - } - } - } diff --git a/cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-deployment.yaml b/cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-deployment.yaml deleted file mode 100644 index 90ca651ee8..0000000000 --- a/cluster/addons/calico-policy-controller/calico-node-vertical-autoscaler-deployment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -kind: Deployment -apiVersion: apps/v1 -metadata: - name: calico-node-vertical-autoscaler - namespace: kube-system - labels: - k8s-app: calico-node-autoscaler - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: calico-node-autoscaler - template: - metadata: - labels: - k8s-app: calico-node-autoscaler - spec: - priorityClassName: system-cluster-critical - containers: - - image: registry.k8s.io/cpvpa-amd64:v0.8.3 - name: autoscaler - command: - - /cpvpa - - --target=daemonset/calico-node - - --namespace=kube-system - - --logtostderr=true - - --poll-period-seconds=30 - - --v=2 - - --config-file=/etc/config/node-autoscaler - volumeMounts: - - name: config - mountPath: /etc/config - volumes: - - name: config - configMap: - name: calico-node-vertical-autoscaler - serviceAccountName: calico-cpva diff --git a/cluster/addons/calico-policy-controller/calico-serviceaccount.yaml b/cluster/addons/calico-policy-controller/calico-serviceaccount.yaml deleted file mode 100644 index 94adc0fd71..0000000000 --- a/cluster/addons/calico-policy-controller/calico-serviceaccount.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: calico - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile diff --git a/cluster/addons/calico-policy-controller/clusterinformations-crd.yaml b/cluster/addons/calico-policy-controller/clusterinformations-crd.yaml deleted file mode 100644 index d245a38a0a..0000000000 --- a/cluster/addons/calico-policy-controller/clusterinformations-crd.yaml +++ /dev/null @@ -1,64 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: clusterinformations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: ClusterInformation - listKind: ClusterInformationList - plural: clusterinformations - singular: clusterinformation - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: ClusterInformation contains the cluster specific information. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: ClusterInformationSpec contains the values of describing - the cluster. - properties: - calicoVersion: - description: CalicoVersion is the version of Calico that the cluster - is running - type: string - clusterGUID: - description: ClusterGUID is the GUID of the cluster - type: string - clusterType: - description: ClusterType describes the type of the cluster - type: string - datastoreReady: - description: DatastoreReady is used during significant datastore migrations - to signal to components such as Felix that it should wait before - accessing the datastore. - type: boolean - variant: - description: Variant declares which variant of Calico should be active. - type: string - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/felixconfigurations-crd.yaml b/cluster/addons/calico-policy-controller/felixconfigurations-crd.yaml deleted file mode 100644 index e2add59f40..0000000000 --- a/cluster/addons/calico-policy-controller/felixconfigurations-crd.yaml +++ /dev/null @@ -1,540 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: felixconfigurations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: FelixConfiguration - listKind: FelixConfigurationList - plural: felixconfigurations - singular: felixconfiguration - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: Felix Configuration contains the configuration for Felix. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: FelixConfigurationSpec contains the values of the Felix configuration. - properties: - allowIPIPPacketsFromWorkloads: - description: 'AllowIPIPPacketsFromWorkloads controls whether Felix - will add a rule to drop IPIP encapsulated traffic from workloads - [Default: false]' - type: boolean - allowVXLANPacketsFromWorkloads: - description: 'AllowVXLANPacketsFromWorkloads controls whether Felix - will add a rule to drop VXLAN encapsulated traffic from workloads - [Default: false]' - type: boolean - awsSrcDstCheck: - description: 'Set source-destination-check on AWS EC2 instances. Accepted - value must be one of "DoNothing", "Enabled" or "Disabled". [Default: - DoNothing]' - enum: - - DoNothing - - Enable - - Disable - type: string - bpfConnectTimeLoadBalancingEnabled: - description: 'BPFConnectTimeLoadBalancingEnabled when in BPF mode, - controls whether Felix installs the connection-time load balancer. The - connect-time load balancer is required for the host to be able to - reach Kubernetes services and it improves the performance of pod-to-service - connections. The only reason to disable it is for debugging purposes. [Default: - true]' - type: boolean - bpfDataIfacePattern: - description: 'BPFDataIfacePattern is a regular expression that controls - which interfaces Felix should attach BPF programs to in order to - catch traffic to/from the network. This needs to match the interfaces - that Calico workload traffic flows over as well as any interfaces - that handle incoming traffic to nodeports and services from outside - the cluster. It should not match the workload interfaces (usually - named cali...). [Default: ^(en.*|eth.*|tunl0$)]' - type: string - bpfDisableUnprivileged: - description: 'BPFDisableUnprivileged, if enabled, Felix sets the kernel.unprivileged_bpf_disabled - sysctl to disable unprivileged use of BPF. This ensures that unprivileged - users cannot access Calico''s BPF maps and cannot insert their own - BPF programs to interfere with Calico''s. [Default: true]' - type: boolean - bpfEnabled: - description: 'BPFEnabled, if enabled Felix will use the BPF dataplane. - [Default: false]' - type: boolean - bpfExternalServiceMode: - description: 'BPFExternalServiceMode in BPF mode, controls how connections - from outside the cluster to services (node ports and cluster IPs) - are forwarded to remote workloads. If set to "Tunnel" then both - request and response traffic is tunneled to the remote node. If - set to "DSR", the request traffic is tunneled but the response traffic - is sent directly from the remote node. In "DSR" mode, the remote - node appears to use the IP of the ingress node; this requires a - permissive L2 network. [Default: Tunnel]' - type: string - bpfKubeProxyEndpointSlicesEnabled: - description: BPFKubeProxyEndpointSlicesEnabled in BPF mode, controls - whether Felix's embedded kube-proxy accepts EndpointSlices or not. - type: boolean - bpfKubeProxyIptablesCleanupEnabled: - description: 'BPFKubeProxyIptablesCleanupEnabled, if enabled in BPF - mode, Felix will proactively clean up the upstream Kubernetes kube-proxy''s - iptables chains. Should only be enabled if kube-proxy is not running. [Default: - true]' - type: boolean - bpfKubeProxyMinSyncPeriod: - description: 'BPFKubeProxyMinSyncPeriod, in BPF mode, controls the - minimum time between updates to the dataplane for Felix''s embedded - kube-proxy. Lower values give reduced set-up latency. Higher values - reduce Felix CPU usage by batching up more work. [Default: 1s]' - type: string - bpfLogLevel: - description: 'BPFLogLevel controls the log level of the BPF programs - when in BPF dataplane mode. One of "Off", "Info", or "Debug". The - logs are emitted to the BPF trace pipe, accessible with the command - `tc exec bpf debug`. [Default: Off].' - type: string - chainInsertMode: - description: 'ChainInsertMode controls whether Felix hooks the kernel’s - top-level iptables chains by inserting a rule at the top of the - chain or by appending a rule at the bottom. insert is the safe default - since it prevents Calico’s rules from being bypassed. If you switch - to append mode, be sure that the other rules in the chains signal - acceptance by falling through to the Calico rules, otherwise the - Calico policy will be bypassed. [Default: insert]' - type: string - dataplaneDriver: - type: string - debugDisableLogDropping: - type: boolean - debugMemoryProfilePath: - type: string - debugSimulateCalcGraphHangAfter: - type: string - debugSimulateDataplaneHangAfter: - type: string - defaultEndpointToHostAction: - description: 'DefaultEndpointToHostAction controls what happens to - traffic that goes from a workload endpoint to the host itself (after - the traffic hits the endpoint egress policy). By default Calico - blocks traffic from workload endpoints to the host itself with an - iptables “DROP” action. If you want to allow some or all traffic - from endpoint to host, set this parameter to RETURN or ACCEPT. Use - RETURN if you have your own rules in the iptables “INPUT” chain; - Calico will insert its rules at the top of that chain, then “RETURN” - packets to the “INPUT” chain once it has completed processing workload - endpoint egress policy. Use ACCEPT to unconditionally accept packets - from workloads after processing workload endpoint egress policy. - [Default: Drop]' - type: string - deviceRouteProtocol: - description: This defines the route protocol added to programmed device - routes, by default this will be RTPROT_BOOT when left blank. - type: integer - deviceRouteSourceAddress: - description: This is the source address to use on programmed device - routes. By default the source address is left blank, leaving the - kernel to choose the source address used. - type: string - disableConntrackInvalidCheck: - type: boolean - endpointReportingDelay: - type: string - endpointReportingEnabled: - type: boolean - externalNodesList: - description: ExternalNodesCIDRList is a list of CIDR's of external-non-calico-nodes - which may source tunnel traffic and have the tunneled traffic be - accepted at calico nodes. - items: - type: string - type: array - failsafeInboundHostPorts: - description: 'FailsafeInboundHostPorts is a comma-delimited list of - UDP/TCP ports that Felix will allow incoming traffic to host endpoints - on irrespective of the security policy. This is useful to avoid - accidentally cutting off a host with incorrect configuration. Each - port should be specified as tcp: or udp:. - For back-compatibility, if the protocol is not specified, it defaults - to “tcp”. To disable all inbound host ports, use the value none. - The default value allows ssh access and DHCP. [Default: tcp:22, - udp:68, tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667]' - items: - description: ProtoPort is combination of protocol and port, both - must be specified. - properties: - port: - type: integer - protocol: - type: string - required: - - port - - protocol - type: object - type: array - failsafeOutboundHostPorts: - description: 'FailsafeOutboundHostPorts is a comma-delimited list - of UDP/TCP ports that Felix will allow outgoing traffic from host - endpoints to irrespective of the security policy. This is useful - to avoid accidentally cutting off a host with incorrect configuration. - Each port should be specified as tcp: or udp:. - For back-compatibility, if the protocol is not specified, it defaults - to “tcp”. To disable all outbound host ports, use the value none. - The default value opens etcd’s standard ports to ensure that Felix - does not get cut off from etcd as well as allowing DHCP and DNS. - [Default: tcp:179, tcp:2379, tcp:2380, tcp:6443, tcp:6666, tcp:6667, - udp:53, udp:67]' - items: - description: ProtoPort is combination of protocol and port, both - must be specified. - properties: - port: - type: integer - protocol: - type: string - required: - - port - - protocol - type: object - type: array - featureDetectOverride: - description: FeatureDetectOverride is used to override the feature - detection. Values are specified in a comma separated list with no - spaces, example; "SNATFullyRandom=true,MASQFullyRandom=false,RestoreSupportsLock=". - "true" or "false" will force the feature, empty or omitted values - are auto-detected. - type: string - genericXDPEnabled: - description: 'GenericXDPEnabled enables Generic XDP so network cards - that don''t support XDP offload or driver modes can use XDP. This - is not recommended since it doesn''t provide better performance - than iptables. [Default: false]' - type: boolean - healthEnabled: - type: boolean - healthHost: - type: string - healthPort: - type: integer - interfaceExclude: - description: 'InterfaceExclude is a comma-separated list of interfaces - that Felix should exclude when monitoring for host endpoints. The - default value ensures that Felix ignores Kubernetes'' IPVS dummy - interface, which is used internally by kube-proxy. If you want to - exclude multiple interface names using a single value, the list - supports regular expressions. For regular expressions you must wrap - the value with ''/''. For example having values ''/^kube/,veth1'' - will exclude all interfaces that begin with ''kube'' and also the - interface ''veth1''. [Default: kube-ipvs0]' - type: string - interfacePrefix: - description: 'InterfacePrefix is the interface name prefix that identifies - workload endpoints and so distinguishes them from host endpoint - interfaces. Note: in environments other than bare metal, the orchestrators - configure this appropriately. For example our Kubernetes and Docker - integrations set the ‘cali’ value, and our OpenStack integration - sets the ‘tap’ value. [Default: cali]' - type: string - interfaceRefreshInterval: - description: InterfaceRefreshInterval is the period at which Felix - rescans local interfaces to verify their state. The rescan can be - disabled by setting the interval to 0. - type: string - ipipEnabled: - type: boolean - ipipMTU: - description: 'IPIPMTU is the MTU to set on the tunnel device. See - Configuring MTU [Default: 1440]' - type: integer - ipsetsRefreshInterval: - description: 'IpsetsRefreshInterval is the period at which Felix re-checks - all iptables state to ensure that no other process has accidentally - broken Calico’s rules. Set to 0 to disable iptables refresh. [Default: - 90s]' - type: string - iptablesBackend: - description: IptablesBackend specifies which backend of iptables will - be used. The default is legacy. - type: string - iptablesFilterAllowAction: - type: string - iptablesLockFilePath: - description: 'IptablesLockFilePath is the location of the iptables - lock file. You may need to change this if the lock file is not in - its standard location (for example if you have mapped it into Felix’s - container at a different path). [Default: /run/xtables.lock]' - type: string - iptablesLockProbeInterval: - description: 'IptablesLockProbeInterval is the time that Felix will - wait between attempts to acquire the iptables lock if it is not - available. Lower values make Felix more responsive when the lock - is contended, but use more CPU. [Default: 50ms]' - type: string - iptablesLockTimeout: - description: 'IptablesLockTimeout is the time that Felix will wait - for the iptables lock, or 0, to disable. To use this feature, Felix - must share the iptables lock file with all other processes that - also take the lock. When running Felix inside a container, this - requires the /run directory of the host to be mounted into the calico/node - or calico/felix container. [Default: 0s disabled]' - type: string - iptablesMangleAllowAction: - type: string - iptablesMarkMask: - description: 'IptablesMarkMask is the mask that Felix selects its - IPTables Mark bits from. Should be a 32 bit hexadecimal number with - at least 8 bits set, none of which clash with any other mark bits - in use on the system. [Default: 0xff000000]' - format: int32 - type: integer - iptablesNATOutgoingInterfaceFilter: - type: string - iptablesPostWriteCheckInterval: - description: 'IptablesPostWriteCheckInterval is the period after Felix - has done a write to the dataplane that it schedules an extra read - back in order to check the write was not clobbered by another process. - This should only occur if another application on the system doesn’t - respect the iptables lock. [Default: 1s]' - type: string - iptablesRefreshInterval: - description: 'IptablesRefreshInterval is the period at which Felix - re-checks the IP sets in the dataplane to ensure that no other process - has accidentally broken Calico’s rules. Set to 0 to disable IP sets - refresh. Note: the default for this value is lower than the other - refresh intervals as a workaround for a Linux kernel bug that was - fixed in kernel version 4.11. If you are using v4.11 or greater - you may want to set this to, a higher value to reduce Felix CPU - usage. [Default: 10s]' - type: string - ipv6Support: - type: boolean - kubeNodePortRanges: - description: 'KubeNodePortRanges holds list of port ranges used for - service node ports. Only used if felix detects kube-proxy running - in ipvs mode. Felix uses these ranges to separate host and workload - traffic. [Default: 30000:32767].' - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - logFilePath: - description: 'LogFilePath is the full path to the Felix log. Set to - none to disable file logging. [Default: /var/log/calico/felix.log]' - type: string - logPrefix: - description: 'LogPrefix is the log prefix that Felix uses when rendering - LOG rules. [Default: calico-packet]' - type: string - logSeverityFile: - description: 'LogSeverityFile is the log severity above which logs - are sent to the log file. [Default: Info]' - type: string - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs - are sent to the stdout. [Default: Info]' - type: string - logSeveritySys: - description: 'LogSeveritySys is the log severity above which logs - are sent to the syslog. Set to None for no logging to syslog. [Default: - Info]' - type: string - maxIpsetSize: - type: integer - metadataAddr: - description: 'MetadataAddr is the IP address or domain name of the - server that can answer VM queries for cloud-init metadata. In OpenStack, - this corresponds to the machine running nova-api (or in Ubuntu, - nova-api-metadata). A value of none (case insensitive) means that - Felix should not set up any NAT rule for the metadata path. [Default: - 127.0.0.1]' - type: string - metadataPort: - description: 'MetadataPort is the port of the metadata server. This, - combined with global.MetadataAddr (if not ‘None’), is used to set - up a NAT rule, from 169.254.169.254:80 to MetadataAddr:MetadataPort. - In most cases this should not need to be changed [Default: 8775].' - type: integer - natOutgoingAddress: - description: NATOutgoingAddress specifies an address to use when performing - source NAT for traffic in a natOutgoing pool that is leaving the - network. By default the address used is an address on the interface - the traffic is leaving on (ie it uses the iptables MASQUERADE target) - type: string - natPortRange: - anyOf: - - type: integer - - type: string - description: NATPortRange specifies the range of ports that is used - for port mapping when doing outgoing NAT. When unset the default - behavior of the network stack is used. - pattern: ^.* - x-kubernetes-int-or-string: true - netlinkTimeout: - type: string - openstackRegion: - description: 'OpenstackRegion is the name of the region that a particular - Felix belongs to. In a multi-region Calico/OpenStack deployment, - this must be configured somehow for each Felix (here in the datamodel, - or in felix.cfg or the environment on each compute node), and must - match the [calico] openstack_region value configured in neutron.conf - on each node. [Default: Empty]' - type: string - policySyncPathPrefix: - description: 'PolicySyncPathPrefix is used to by Felix to communicate - policy changes to external services, like Application layer policy. - [Default: Empty]' - type: string - prometheusGoMetricsEnabled: - description: 'PrometheusGoMetricsEnabled disables Go runtime metrics - collection, which the Prometheus client does by default, when set - to false. This reduces the number of metrics reported, reducing - Prometheus load. [Default: true]' - type: boolean - prometheusMetricsEnabled: - description: 'PrometheusMetricsEnabled enables the Prometheus metrics - server in Felix if set to true. [Default: false]' - type: boolean - prometheusMetricsHost: - description: 'PrometheusMetricsHost is the host that the Prometheus - metrics server should bind to. [Default: empty]' - type: string - prometheusMetricsPort: - description: 'PrometheusMetricsPort is the TCP port that the Prometheus - metrics server should bind to. [Default: 9091]' - type: integer - prometheusProcessMetricsEnabled: - description: 'PrometheusProcessMetricsEnabled disables process metrics - collection, which the Prometheus client does by default, when set - to false. This reduces the number of metrics reported, reducing - Prometheus load. [Default: true]' - type: boolean - removeExternalRoutes: - description: Whether or not to remove device routes that have not - been programmed by Felix. Disabling this will allow external applications - to also add device routes. This is enabled by default which means - we will remove externally added routes. - type: boolean - reportingInterval: - description: 'ReportingInterval is the interval at which Felix reports - its status into the datastore or 0 to disable. Must be non-zero - in OpenStack deployments. [Default: 30s]' - type: string - reportingTTL: - description: 'ReportingTTL is the time-to-live setting for process-wide - status reports. [Default: 90s]' - type: string - routeRefreshInterval: - description: 'RouterefreshInterval is the period at which Felix re-checks - the routes in the dataplane to ensure that no other process has - accidentally broken Calico’s rules. Set to 0 to disable route refresh. - [Default: 90s]' - type: string - routeSource: - description: 'RouteSource configures where Felix gets its routing - information. - WorkloadIPs: use workload endpoints to construct - routes. - CalicoIPAM: the default - use IPAM data to construct routes.' - type: string - routeTableRange: - description: Calico programs additional Linux route tables for various - purposes. RouteTableRange specifies the indices of the route tables - that Calico should use. - properties: - max: - type: integer - min: - type: integer - required: - - max - - min - type: object - sidecarAccelerationEnabled: - description: 'SidecarAccelerationEnabled enables experimental sidecar - acceleration [Default: false]' - type: boolean - usageReportingEnabled: - description: 'UsageReportingEnabled reports anonymous Calico version - number and cluster size to projectcalico.org. Logs warnings returned - by the usage server. For example, if a significant security vulnerability - has been discovered in the version of Calico being used. [Default: - true]' - type: boolean - usageReportingInitialDelay: - description: 'UsageReportingInitialDelay controls the minimum delay - before Felix makes a report. [Default: 300s]' - type: string - usageReportingInterval: - description: 'UsageReportingInterval controls the interval at which - Felix makes reports. [Default: 86400s]' - type: string - useInternalDataplaneDriver: - type: boolean - vxlanEnabled: - type: boolean - vxlanMTU: - description: 'VXLANMTU is the MTU to set on the tunnel device. See - Configuring MTU [Default: 1440]' - type: integer - vxlanPort: - type: integer - vxlanVNI: - type: integer - wireguardEnabled: - description: 'WireguardEnabled controls whether Wireguard is enabled. - [Default: false]' - type: boolean - wireguardInterfaceName: - description: 'WireguardInterfaceName specifies the name to use for - the Wireguard interface. [Default: wg.calico]' - type: string - wireguardListeningPort: - description: 'WireguardListeningPort controls the listening port used - by Wireguard. [Default: 51820]' - type: integer - wireguardMTU: - description: 'WireguardMTU controls the MTU on the Wireguard interface. - See Configuring MTU [Default: 1420]' - type: integer - wireguardRoutingRulePriority: - description: 'WireguardRoutingRulePriority controls the priority value - to use for the Wireguard routing rule. [Default: 99]' - type: integer - xdpEnabled: - description: 'XDPEnabled enables XDP acceleration for suitable untracked - incoming deny rules. [Default: true]' - type: boolean - xdpRefreshInterval: - description: 'XDPRefreshInterval is the period at which Felix re-checks - all XDP state to ensure that no other process has accidentally broken - Calico''s BPF maps or attached programs. Set to 0 to disable XDP - refresh. [Default: 90s]' - type: string - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/globalnetworkpolicy-crd.yaml b/cluster/addons/calico-policy-controller/globalnetworkpolicy-crd.yaml deleted file mode 100644 index 54f9fe055e..0000000000 --- a/cluster/addons/calico-policy-controller/globalnetworkpolicy-crd.yaml +++ /dev/null @@ -1,771 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: globalnetworkpolicies.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: GlobalNetworkPolicy - listKind: GlobalNetworkPolicyList - plural: globalnetworkpolicies - singular: globalnetworkpolicy - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - applyOnForward: - description: ApplyOnForward indicates to apply the rules in this policy - on forward traffic. - type: boolean - doNotTrack: - description: DoNotTrack indicates whether packets matched by the rules - in this policy should go through the data plane's connection tracking, - such as Linux conntrack. If True, the rules in this policy are - applied before any data plane connection tracking, and packets allowed - by this policy are marked as not to be tracked. - type: boolean - egress: - description: The ordered set of egress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - ingress: - description: The ordered set of ingress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - namespaceSelector: - description: NamespaceSelector is an optional field for an expression - used to select a pod based on namespaces. - type: string - order: - description: Order is an optional field that specifies the order in - which the policy is applied. Policies with higher "order" are applied - after those with lower order. If the order is omitted, it may be - considered to be "infinite" - i.e. the policy will be applied last. Policies - with identical order will be applied in alphanumerical order based - on the Policy "Name". - type: number - preDNAT: - description: PreDNAT indicates to apply the rules in this policy before - any DNAT. - type: boolean - selector: - description: "The selector is an expression used to pick pick out - the endpoints that the policy should be applied to. \n Selector - expressions follow this syntax: \n \tlabel == \"string_literal\" - \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\" - \ -> not equal; also matches if label is not present \tlabel in - { \"a\", \"b\", \"c\", ... } -> true if the value of label X is - one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\", - ... } -> true if the value of label X is not one of \"a\", \"b\", - \"c\" \thas(label_name) -> True if that label is present \t! expr - -> negation of expr \texpr && expr -> Short-circuit and \texpr - || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall() - or the empty selector -> matches all endpoints. \n Label names are - allowed to contain alphanumerics, -, _ and /. String literals are - more permissive but they do not support escape characters. \n Examples - (with made-up labels): \n \ttype == \"webserver\" && deployment - == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment != - \"dev\" \t! has(label_name)" - type: string - serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression - used to select a pod based on service accounts. - type: string - types: - description: "Types indicates whether this policy applies to ingress, - or to egress, or to both. When not explicitly specified (and so - the value on creation is empty or nil), Calico defaults Types according - to what Ingress and Egress rules are present in the policy. The - default is: \n - [ PolicyTypeIngress ], if there are no Egress rules - (including the case where there are also no Ingress rules) \n - - [ PolicyTypeEgress ], if there are Egress rules but no Ingress - rules \n - [ PolicyTypeIngress, PolicyTypeEgress ], if there are - both Ingress and Egress rules. \n When the policy is read back again, - Types will always be one of these values, never empty or nil." - items: - description: PolicyType enumerates the possible values of the PolicySpec - Types field. - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/globalnetworksets-crd.yaml b/cluster/addons/calico-policy-controller/globalnetworksets-crd.yaml deleted file mode 100644 index 7a700d69a5..0000000000 --- a/cluster/addons/calico-policy-controller/globalnetworksets-crd.yaml +++ /dev/null @@ -1,53 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: globalnetworksets.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: GlobalNetworkSet - listKind: GlobalNetworkSetList - plural: globalnetworksets - singular: globalnetworkset - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - description: GlobalNetworkSet contains a set of arbitrary IP sub-networks/CIDRs - that share labels to allow rules to refer to them via selectors. The labels - of GlobalNetworkSet are not namespaced. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: GlobalNetworkSetSpec contains the specification for a NetworkSet - resource. - properties: - nets: - description: The list of IP networks that belong to this set. - items: - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/hostendpoints-crd.yaml b/cluster/addons/calico-policy-controller/hostendpoints-crd.yaml deleted file mode 100644 index b9a1d85b26..0000000000 --- a/cluster/addons/calico-policy-controller/hostendpoints-crd.yaml +++ /dev/null @@ -1,108 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: hostendpoints.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: HostEndpoint - listKind: HostEndpointList - plural: hostendpoints - singular: hostendpoint - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: HostEndpointSpec contains the specification for a HostEndpoint - resource. - properties: - expectedIPs: - description: "The expected IP addresses (IPv4 and IPv6) of the endpoint. - If \"InterfaceName\" is not present, Calico will look for an interface - matching any of the IPs in the list and apply policy to that. Note: - \tWhen using the selector match criteria in an ingress or egress - security Policy \tor Profile, Calico converts the selector into - a set of IP addresses. For host \tendpoints, the ExpectedIPs field - is used for that purpose. (If only the interface \tname is specified, - Calico does not learn the IPs of the interface for use in match - \tcriteria.)" - items: - type: string - type: array - interfaceName: - description: "Either \"*\", or the name of a specific Linux interface - to apply policy to; or empty. \"*\" indicates that this HostEndpoint - governs all traffic to, from or through the default network namespace - of the host named by the \"Node\" field; entering and leaving that - namespace via any interface, including those from/to non-host-networked - local workloads. \n If InterfaceName is not \"*\", this HostEndpoint - only governs traffic that enters or leaves the host through the - specific interface named by InterfaceName, or - when InterfaceName - is empty - through the specific interface that has one of the IPs - in ExpectedIPs. Therefore, when InterfaceName is empty, at least - one expected IP must be specified. Only external interfaces (such - as “eth0”) are supported here; it isn't possible for a HostEndpoint - to protect traffic through a specific local workload interface. - \n Note: Only some kinds of policy are implemented for \"*\" HostEndpoints; - initially just pre-DNAT policy. Please check Calico documentation - for the latest position." - type: string - node: - description: The node name identifying the Calico node instance. - type: string - ports: - description: Ports contains the endpoint's named ports, which may - be referenced in security policy rules. - items: - properties: - name: - type: string - port: - type: integer - protocol: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - required: - - name - - port - - protocol - type: object - type: array - profiles: - description: A list of identifiers of security Profile objects that - apply to this endpoint. Each profile is applied in the order that - they appear in this list. Profile rules are applied after the selector-based - security policy. - items: - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/ipamblock-crd.yaml b/cluster/addons/calico-policy-controller/ipamblock-crd.yaml deleted file mode 100644 index 18a76b225f..0000000000 --- a/cluster/addons/calico-policy-controller/ipamblock-crd.yaml +++ /dev/null @@ -1,81 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: ipamblocks.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPAMBlock - listKind: IPAMBlockList - plural: ipamblocks - singular: ipamblock - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPAMBlockSpec contains the specification for an IPAMBlock - resource. - properties: - affinity: - type: string - allocations: - items: - type: integer - # TODO: This nullable is manually added in. We should update controller-gen - # to handle []*int properly itself. - nullable: true - type: array - attributes: - items: - properties: - handle_id: - type: string - secondary: - additionalProperties: - type: string - type: object - type: object - type: array - cidr: - type: string - deleted: - type: boolean - strictAffinity: - type: boolean - unallocated: - items: - type: integer - type: array - required: - - allocations - - attributes - - cidr - - strictAffinity - - unallocated - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/ipamconfig-crd.yaml b/cluster/addons/calico-policy-controller/ipamconfig-crd.yaml deleted file mode 100644 index d51ce6e7f0..0000000000 --- a/cluster/addons/calico-policy-controller/ipamconfig-crd.yaml +++ /dev/null @@ -1,52 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: ipamconfigs.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPAMConfig - listKind: IPAMConfigList - plural: ipamconfigs - singular: ipamconfig - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPAMConfigSpec contains the specification for an IPAMConfig - resource. - properties: - autoAllocateBlocks: - type: boolean - strictAffinity: - type: boolean - required: - - autoAllocateBlocks - - strictAffinity - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/ipamhandle-crd.yaml b/cluster/addons/calico-policy-controller/ipamhandle-crd.yaml deleted file mode 100644 index c7663c3b50..0000000000 --- a/cluster/addons/calico-policy-controller/ipamhandle-crd.yaml +++ /dev/null @@ -1,54 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: ipamhandles.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPAMHandle - listKind: IPAMHandleList - plural: ipamhandles - singular: ipamhandle - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPAMHandleSpec contains the specification for an IPAMHandle - resource. - properties: - block: - additionalProperties: - type: integer - type: object - handleID: - type: string - required: - - block - - handleID - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/ippool-crd.yaml b/cluster/addons/calico-policy-controller/ippool-crd.yaml deleted file mode 100644 index 46e24a959a..0000000000 --- a/cluster/addons/calico-policy-controller/ippool-crd.yaml +++ /dev/null @@ -1,99 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: ippools.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: IPPool - listKind: IPPoolList - plural: ippools - singular: ippool - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: IPPoolSpec contains the specification for an IPPool resource. - properties: - blockSize: - description: The block size to use for IP address assignments from - this pool. Defaults to 26 for IPv4 and 112 for IPv6. - type: integer - cidr: - description: The pool CIDR. - type: string - disabled: - description: When disabled is true, Calico IPAM will not assign addresses - from this pool. - type: boolean - ipip: - description: 'Deprecated: this field is only used for APIv1 backwards - compatibility. Setting this field is not allowed, this field is - for internal use only.' - properties: - enabled: - description: When enabled is true, ipip tunneling will be used - to deliver packets to destinations within this pool. - type: boolean - mode: - description: The IPIP mode. This can be one of "always" or "cross-subnet". A - mode of "always" will also use IPIP tunneling for routing to - destination IP addresses within this pool. A mode of "cross-subnet" - will only use IPIP tunneling when the destination node is on - a different subnet to the originating node. The default value - (if not specified) is "always". - type: string - type: object - ipipMode: - description: Contains configuration for IPIP tunneling for this pool. - If not specified, then this is defaulted to "Never" (i.e. IPIP tunneling - is disabled). - type: string - nat-outgoing: - description: 'Deprecated: this field is only used for APIv1 backwards - compatibility. Setting this field is not allowed, this field is - for internal use only.' - type: boolean - natOutgoing: - description: When nat-outgoing is true, packets sent from Calico networked - containers in this pool to destinations outside of this pool will - be masqueraded. - type: boolean - nodeSelector: - description: Allows IPPool to allocate for a specific node by label - selector. - type: string - vxlanMode: - description: Contains configuration for VXLAN tunneling for this pool. - If not specified, then this is defaulted to "Never" (i.e. VXLAN - tunneling is disabled). - type: string - required: - - cidr - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/kubecontrollersconfigurations-crd.yaml b/cluster/addons/calico-policy-controller/kubecontrollersconfigurations-crd.yaml deleted file mode 100644 index 7609fb8822..0000000000 --- a/cluster/addons/calico-policy-controller/kubecontrollersconfigurations-crd.yaml +++ /dev/null @@ -1,223 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: kubecontrollersconfigurations.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: KubeControllersConfiguration - listKind: KubeControllersConfigurationList - plural: kubecontrollersconfigurations - singular: kubecontrollersconfiguration - scope: Cluster - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: KubeControllersConfigurationSpec contains the values of the - Kubernetes controllers configuration. - properties: - controllers: - description: Controllers enables and configures individual Kubernetes - controllers - properties: - namespace: - description: Namespace enables and configures the namespace controller. - Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - node: - description: Node enables and configures the node controller. - Enabled by default, set to nil to disable. - properties: - hostEndpoint: - description: HostEndpoint controls syncing nodes to host endpoints. - Disabled by default, set to nil to disable. - properties: - autoCreate: - description: 'AutoCreate enables automatic creation of - host endpoints for every node. [Default: Disabled]' - type: string - type: object - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - syncLabels: - description: 'SyncLabels controls whether to copy Kubernetes - node labels to Calico nodes. [Default: Enabled]' - type: string - type: object - policy: - description: Policy enables and configures the policy controller. - Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - serviceAccount: - description: ServiceAccount enables and configures the service - account controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - workloadEndpoint: - description: WorkloadEndpoint enables and configures the workload - endpoint controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform reconciliation - with the Calico datastore. [Default: 5m]' - type: string - type: object - type: object - etcdV3CompactionPeriod: - description: 'EtcdV3CompactionPeriod is the period between etcdv3 - compaction requests. Set to 0 to disable. [Default: 10m]' - type: string - healthChecks: - description: 'HealthChecks enables or disables support for health - checks [Default: Enabled]' - type: string - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which logs - are sent to the stdout. [Default: Info]' - type: string - required: - - controllers - type: object - status: - description: KubeControllersConfigurationStatus represents the status - of the configuration. It's useful for admins to be able to see the actual - config that was applied, which can be modified by environment variables - on the kube-controllers process. - properties: - environmentVars: - additionalProperties: - type: string - description: EnvironmentVars contains the environment variables on - the kube-controllers that influenced the RunningConfig. - type: object - runningConfig: - description: RunningConfig contains the effective config that is running - in the kube-controllers pod, after merging the API resource with - any environment variables. - properties: - controllers: - description: Controllers enables and configures individual Kubernetes - controllers - properties: - namespace: - description: Namespace enables and configures the namespace - controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - node: - description: Node enables and configures the node controller. - Enabled by default, set to nil to disable. - properties: - hostEndpoint: - description: HostEndpoint controls syncing nodes to host - endpoints. Disabled by default, set to nil to disable. - properties: - autoCreate: - description: 'AutoCreate enables automatic creation - of host endpoints for every node. [Default: Disabled]' - type: string - type: object - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - syncLabels: - description: 'SyncLabels controls whether to copy Kubernetes - node labels to Calico nodes. [Default: Enabled]' - type: string - type: object - policy: - description: Policy enables and configures the policy controller. - Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - serviceAccount: - description: ServiceAccount enables and configures the service - account controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - workloadEndpoint: - description: WorkloadEndpoint enables and configures the workload - endpoint controller. Enabled by default, set to nil to disable. - properties: - reconcilerPeriod: - description: 'ReconcilerPeriod is the period to perform - reconciliation with the Calico datastore. [Default: - 5m]' - type: string - type: object - type: object - etcdV3CompactionPeriod: - description: 'EtcdV3CompactionPeriod is the period between etcdv3 - compaction requests. Set to 0 to disable. [Default: 10m]' - type: string - healthChecks: - description: 'HealthChecks enables or disables support for health - checks [Default: Enabled]' - type: string - logSeverityScreen: - description: 'LogSeverityScreen is the log severity above which - logs are sent to the stdout. [Default: Info]' - type: string - required: - - controllers - type: object - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/networkpolicies-crd.yaml b/cluster/addons/calico-policy-controller/networkpolicies-crd.yaml deleted file mode 100644 index 11fc9ee693..0000000000 --- a/cluster/addons/calico-policy-controller/networkpolicies-crd.yaml +++ /dev/null @@ -1,752 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: networkpolicies.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: NetworkPolicy - listKind: NetworkPolicyList - plural: networkpolicies - singular: networkpolicy - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - properties: - egress: - description: The ordered set of egress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - ingress: - description: The ordered set of ingress rules. Each rule contains - a set of packet match criteria and a corresponding action to apply. - items: - description: "A Rule encapsulates a set of match criteria and an - action. Both selector-based security Policy and security Profiles - reference rules - separated out as a list of rules for both ingress - and egress packet matching. \n Each positive match criteria has - a negated version, prefixed with ”Not”. All the match criteria - within a rule must be satisfied for a packet to match. A single - rule can contain the positive and negative version of a match - and both must be satisfied for the rule to match." - properties: - action: - type: string - destination: - description: Destination contains the match criteria that apply - to destination entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - http: - description: HTTP contains match criteria that apply to HTTP - requests. - properties: - methods: - description: Methods is an optional field that restricts - the rule to apply only to HTTP requests that use one of - the listed HTTP Methods (e.g. GET, PUT, etc.) Multiple - methods are OR'd together. - items: - type: string - type: array - paths: - description: 'Paths is an optional field that restricts - the rule to apply to HTTP requests that use one of the - listed HTTP Paths. Multiple paths are OR''d together. - e.g: - exact: /foo - prefix: /bar NOTE: Each entry may - ONLY specify either a `exact` or a `prefix` match. The - validator will check for it.' - items: - description: 'HTTPPath specifies an HTTP path to match. - It may be either of the form: exact: : which matches - the path exactly or prefix: : which matches - the path prefix' - properties: - exact: - type: string - prefix: - type: string - type: object - type: array - type: object - icmp: - description: ICMP is an optional field that restricts the rule - to apply to a specific type and code of ICMP traffic. This - should only be specified if the Protocol field is set to "ICMP" - or "ICMPv6". - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - ipVersion: - description: IPVersion is an optional field that restricts the - rule to only match a specific IP version. - type: integer - metadata: - description: Metadata contains additional information for this - rule - properties: - annotations: - additionalProperties: - type: string - description: Annotations is a set of key value pairs that - give extra information about the rule - type: object - type: object - notICMP: - description: NotICMP is the negated version of the ICMP field. - properties: - code: - description: Match on a specific ICMP code. If specified, - the Type value must also be specified. This is a technical - limitation imposed by the kernel’s iptables firewall, - which Calico uses to enforce the rule. - type: integer - type: - description: Match on a specific ICMP type. For example - a value of 8 refers to ICMP Echo Request (i.e. pings). - type: integer - type: object - notProtocol: - anyOf: - - type: integer - - type: string - description: NotProtocol is the negated version of the Protocol - field. - pattern: ^.* - x-kubernetes-int-or-string: true - protocol: - anyOf: - - type: integer - - type: string - description: "Protocol is an optional field that restricts the - rule to only apply to traffic of a specific IP protocol. Required - if any of the EntityRules contain Ports (because ports only - apply to certain protocols). \n Must be one of these string - values: \"TCP\", \"UDP\", \"ICMP\", \"ICMPv6\", \"SCTP\", - \"UDPLite\" or an integer in the range 1-255." - pattern: ^.* - x-kubernetes-int-or-string: true - source: - description: Source contains the match criteria that apply to - source entity. - properties: - namespaceSelector: - description: "NamespaceSelector is an optional field that - contains a selector expression. Only traffic that originates - from (or terminates at) endpoints within the selected - namespaces will be matched. When both NamespaceSelector - and Selector are defined on the same rule, then only workload - endpoints that are matched by both selectors will be selected - by the rule. \n For NetworkPolicy, an empty NamespaceSelector - implies that the Selector is limited to selecting only - workload endpoints in the same namespace as the NetworkPolicy. - \n For NetworkPolicy, `global()` NamespaceSelector implies - that the Selector is limited to selecting only GlobalNetworkSet - or HostEndpoint. \n For GlobalNetworkPolicy, an empty - NamespaceSelector implies the Selector applies to workload - endpoints across all namespaces." - type: string - nets: - description: Nets is an optional field that restricts the - rule to only apply to traffic that originates from (or - terminates at) IP addresses in any of the given subnets. - items: - type: string - type: array - notNets: - description: NotNets is the negated version of the Nets - field. - items: - type: string - type: array - notPorts: - description: NotPorts is the negated version of the Ports - field. Since only some protocols have ports, if any ports - are specified it requires the Protocol match in the Rule - to be set to "TCP" or "UDP". - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - notSelector: - description: NotSelector is the negated version of the Selector - field. See Selector field for subtleties with negated - selectors. - type: string - ports: - description: "Ports is an optional field that restricts - the rule to only apply to traffic that has a source (destination) - port that matches one of these ranges/values. This value - is a list of integers or strings that represent ranges - of ports. \n Since only some protocols have ports, if - any ports are specified it requires the Protocol match - in the Rule to be set to \"TCP\" or \"UDP\"." - items: - anyOf: - - type: integer - - type: string - pattern: ^.* - x-kubernetes-int-or-string: true - type: array - selector: - description: "Selector is an optional field that contains - a selector expression (see Policy for sample syntax). - \ Only traffic that originates from (terminates at) endpoints - matching the selector will be matched. \n Note that: in - addition to the negated version of the Selector (see NotSelector - below), the selector expression syntax itself supports - negation. The two types of negation are subtly different. - One negates the set of matched endpoints, the other negates - the whole match: \n \tSelector = \"!has(my_label)\" matches - packets that are from other Calico-controlled \tendpoints - that do not have the label “my_label”. \n \tNotSelector - = \"has(my_label)\" matches packets that are not from - Calico-controlled \tendpoints that do have the label “my_label”. - \n The effect is that the latter will accept packets from - non-Calico sources whereas the former is limited to packets - from Calico-controlled endpoints." - type: string - serviceAccounts: - description: ServiceAccounts is an optional field that restricts - the rule to only apply to traffic that originates from - (or terminates at) a pod running as a matching service - account. - properties: - names: - description: Names is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account whose name is in the list. - items: - type: string - type: array - selector: - description: Selector is an optional field that restricts - the rule to only apply to traffic that originates - from (or terminates at) a pod running as a service - account that matches the given label selector. If - both Names and Selector are specified then they are - AND'ed. - type: string - type: object - type: object - required: - - action - type: object - type: array - order: - description: Order is an optional field that specifies the order in - which the policy is applied. Policies with higher "order" are applied - after those with lower order. If the order is omitted, it may be - considered to be "infinite" - i.e. the policy will be applied last. Policies - with identical order will be applied in alphanumerical order based - on the Policy "Name". - type: number - selector: - description: "The selector is an expression used to pick pick out - the endpoints that the policy should be applied to. \n Selector - expressions follow this syntax: \n \tlabel == \"string_literal\" - \ -> comparison, e.g. my_label == \"foo bar\" \tlabel != \"string_literal\" - \ -> not equal; also matches if label is not present \tlabel in - { \"a\", \"b\", \"c\", ... } -> true if the value of label X is - one of \"a\", \"b\", \"c\" \tlabel not in { \"a\", \"b\", \"c\", - ... } -> true if the value of label X is not one of \"a\", \"b\", - \"c\" \thas(label_name) -> True if that label is present \t! expr - -> negation of expr \texpr && expr -> Short-circuit and \texpr - || expr -> Short-circuit or \t( expr ) -> parens for grouping \tall() - or the empty selector -> matches all endpoints. \n Label names are - allowed to contain alphanumerics, -, _ and /. String literals are - more permissive but they do not support escape characters. \n Examples - (with made-up labels): \n \ttype == \"webserver\" && deployment - == \"prod\" \ttype in {\"frontend\", \"backend\"} \tdeployment != - \"dev\" \t! has(label_name)" - type: string - serviceAccountSelector: - description: ServiceAccountSelector is an optional field for an expression - used to select a pod based on service accounts. - type: string - types: - description: "Types indicates whether this policy applies to ingress, - or to egress, or to both. When not explicitly specified (and so - the value on creation is empty or nil), Calico defaults Types according - to what Ingress and Egress are present in the policy. The default - is: \n - [ PolicyTypeIngress ], if there are no Egress rules (including - the case where there are also no Ingress rules) \n - [ PolicyTypeEgress - ], if there are Egress rules but no Ingress rules \n - [ PolicyTypeIngress, - PolicyTypeEgress ], if there are both Ingress and Egress rules. - \n When the policy is read back again, Types will always be one - of these values, never empty or nil." - items: - description: PolicyType enumerates the possible values of the PolicySpec - Types field. - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/networkset-crd.yaml b/cluster/addons/calico-policy-controller/networkset-crd.yaml deleted file mode 100644 index 0793a040c8..0000000000 --- a/cluster/addons/calico-policy-controller/networkset-crd.yaml +++ /dev/null @@ -1,51 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: networksets.crd.projectcalico.org -spec: - group: crd.projectcalico.org - names: - kind: NetworkSet - listKind: NetworkSetList - plural: networksets - singular: networkset - scope: Namespaced - versions: - - name: v1 - schema: - openAPIV3Schema: - description: NetworkSet is the Namespaced-equivalent of the GlobalNetworkSet. - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: NetworkSetSpec contains the specification for a NetworkSet - resource. - properties: - nets: - description: The list of IP networks that belong to this set. - items: - type: string - type: array - type: object - type: object - served: true - storage: true -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/cluster/addons/calico-policy-controller/typha-deployment.yaml b/cluster/addons/calico-policy-controller/typha-deployment.yaml deleted file mode 100644 index bc31e4b230..0000000000 --- a/cluster/addons/calico-policy-controller/typha-deployment.yaml +++ /dev/null @@ -1,75 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: calico-typha - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile - k8s-app: calico-typha -spec: - revisionHistoryLimit: 2 - selector: - matchLabels: - k8s-app: calico-typha - template: - metadata: - labels: - k8s-app: calico-typha - spec: - priorityClassName: system-cluster-critical - tolerations: - - key: CriticalAddonsOnly - operator: Exists - hostNetwork: true - serviceAccountName: calico - containers: - - image: gcr.io/projectcalico-org/typha:v3.19.1 - name: calico-typha - ports: - - containerPort: 5473 - name: calico-typha - protocol: TCP - env: - - name: TYPHA_LOGFILEPATH - value: "none" - - name: TYPHA_LOGSEVERITYSYS - value: "none" - - name: TYPHA_LOGSEVERITYSCREEN - value: "info" - - name: TYPHA_PROMETHEUSMETRICSENABLED - value: "true" - - name: TYPHA_CONNECTIONREBALANCINGMODE - value: "kubernetes" - - name: TYPHA_PROMETHEUSMETRICSPORT - value: "9093" - - name: TYPHA_DATASTORETYPE - value: "kubernetes" - - name: TYPHA_REPORTINGINTERVALSECS - value: "0" - - name: TYPHA_MAXCONNECTIONSLOWERLIMIT - value: "1" - - name: TYPHA_HEALTHENABLED - value: "true" - - name: USE_POD_CIDR - value: "true" - volumeMounts: - - mountPath: /etc/calico - name: etc-calico - readOnly: true - livenessProbe: - httpGet: - path: /liveness - port: 9098 - host: localhost - periodSeconds: 30 - initialDelaySeconds: 30 - readinessProbe: - httpGet: - path: /readiness - port: 9098 - host: localhost - periodSeconds: 10 - volumes: - - name: etc-calico - hostPath: - path: /etc/calico diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrole.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrole.yaml deleted file mode 100644 index 216053187c..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrole.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: typha-cpha - labels: - addonmanager.kubernetes.io/mode: Reconcile -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["list", "watch"] diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrolebinding.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrolebinding.yaml deleted file mode 100644 index 62832c7b1c..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-clusterrolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: typha-cpha - labels: - addonmanager.kubernetes.io/mode: Reconcile -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: typha-cpha -subjects: - - kind: ServiceAccount - name: typha-cpha - namespace: kube-system diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-configmap.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-configmap.yaml deleted file mode 100644 index b81724045f..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-configmap.yaml +++ /dev/null @@ -1,23 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: calico-typha-horizontal-autoscaler - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -data: - ladder: |- - { - "coresToReplicas": [], - "nodesToReplicas": - [ - [1, 1], - [10, 2], - [100, 3], - [250, 4], - [500, 5], - [1000, 6], - [1500, 7], - [2000, 8] - ] - } diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-deployment.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-deployment.yaml deleted file mode 100644 index 9def228ef1..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-deployment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: calico-typha-horizontal-autoscaler - namespace: kube-system - labels: - k8s-app: calico-typha-autoscaler - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: calico-typha-autoscaler - template: - metadata: - labels: - k8s-app: calico-typha-autoscaler - spec: - priorityClassName: system-cluster-critical - securityContext: - supplementalGroups: [ 65534 ] - fsGroup: 65534 - containers: - - image: registry.k8s.io/cluster-proportional-autoscaler-amd64:1.7.1 - name: autoscaler - command: - - /cluster-proportional-autoscaler - - --namespace=kube-system - - --configmap=calico-typha-horizontal-autoscaler - - --target=deployment/calico-typha - - --logtostderr=true - - --v=2 - resources: - requests: - cpu: 10m - limits: - cpu: 10m - serviceAccountName: typha-cpha diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml deleted file mode 100644 index 385f517940..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-role.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: typha-cpha - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get"] - - apiGroups: ["apps"] - resources: ["deployments/scale"] - verbs: ["get", "update"] diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-rolebinding.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-rolebinding.yaml deleted file mode 100644 index 7b90f57a3e..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-rolebinding.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: typha-cpha - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: typha-cpha -subjects: - - kind: ServiceAccount - name: typha-cpha - namespace: kube-system diff --git a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-serviceaccount.yaml b/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-serviceaccount.yaml deleted file mode 100644 index b44d28844d..0000000000 --- a/cluster/addons/calico-policy-controller/typha-horizontal-autoscaler-serviceaccount.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: typha-cpha - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile diff --git a/cluster/addons/calico-policy-controller/typha-service.yaml b/cluster/addons/calico-policy-controller/typha-service.yaml deleted file mode 100644 index c9c2b382af..0000000000 --- a/cluster/addons/calico-policy-controller/typha-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: calico-typha - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - k8s-app: calico-typha -spec: - ports: - - port: 5473 - protocol: TCP - targetPort: calico-typha - name: calico-typha - selector: - k8s-app: calico-typha diff --git a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrole.yaml b/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrole.yaml deleted file mode 100644 index 35af7416ac..0000000000 --- a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrole.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: typha-cpva - labels: - addonmanager.kubernetes.io/mode: Reconcile -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["list"] - - apiGroups: ["apps"] - resources: ["deployments"] - verbs: ["patch"] diff --git a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrolebinding.yaml b/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrolebinding.yaml deleted file mode 100644 index 8b57abd275..0000000000 --- a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-clusterrolebinding.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: typha-cpva - labels: - addonmanager.kubernetes.io/mode: Reconcile -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: typha-cpva -subjects: - - kind: ServiceAccount - name: typha-cpva - namespace: kube-system diff --git a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-configmap.yaml b/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-configmap.yaml deleted file mode 100644 index 119b3976e5..0000000000 --- a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-configmap.yaml +++ /dev/null @@ -1,21 +0,0 @@ -kind: ConfigMap -apiVersion: v1 -metadata: - name: calico-typha-vertical-autoscaler - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -data: - typha-autoscaler: |- - { - "calico-typha": { - "requests": { - "cpu": { - "base": "120m", - "step": "80m", - "nodesPerStep": 10, - "max": "1000m" - } - } - } - } diff --git a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-deployment.yaml b/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-deployment.yaml deleted file mode 100644 index bb636e58de..0000000000 --- a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-deployment.yaml +++ /dev/null @@ -1,38 +0,0 @@ -kind: Deployment -apiVersion: apps/v1 -metadata: - name: calico-typha-vertical-autoscaler - namespace: kube-system - labels: - k8s-app: calico-typha-autoscaler - addonmanager.kubernetes.io/mode: Reconcile -spec: - replicas: 1 - selector: - matchLabels: - k8s-app: calico-typha-autoscaler - template: - metadata: - labels: - k8s-app: calico-typha-autoscaler - spec: - priorityClassName: system-cluster-critical - containers: - - image: registry.k8s.io/cpvpa-amd64:v0.8.3 - name: autoscaler - command: - - /cpvpa - - --target=deployment/calico-typha - - --namespace=kube-system - - --logtostderr=true - - --poll-period-seconds=30 - - --v=2 - - --config-file=/etc/config/typha-autoscaler - volumeMounts: - - name: config - mountPath: /etc/config - volumes: - - name: config - configMap: - name: calico-typha-vertical-autoscaler - serviceAccountName: calico-cpva diff --git a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-serviceaccount.yaml b/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-serviceaccount.yaml deleted file mode 100644 index a07c8283b7..0000000000 --- a/cluster/addons/calico-policy-controller/typha-vertical-autoscaler-serviceaccount.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: typha-cpva - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile diff --git a/cluster/addons/cloud-controller-manager/cloud-node-controller-binding.yaml b/cluster/addons/cloud-controller-manager/cloud-node-controller-binding.yaml deleted file mode 100644 index 4be96052de..0000000000 --- a/cluster/addons/cloud-controller-manager/cloud-node-controller-binding.yaml +++ /dev/null @@ -1,46 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system::leader-locking-cloud-controller-manager - namespace: kube-system -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: system::leader-locking-cloud-controller-manager -subjects: -- kind: ServiceAccount - name: cloud-controller-manager - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system:cloud-controller-manager -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:cloud-controller-manager -subjects: -- kind: User - apiGroup: rbac.authorization.k8s.io - name: system:cloud-controller-manager ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system:controller:cloud-node-controller -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:controller:cloud-node-controller -subjects: -- kind: ServiceAccount - name: cloud-node-controller - namespace: kube-system - diff --git a/cluster/addons/cloud-controller-manager/cloud-node-controller-role.yaml b/cluster/addons/cloud-controller-manager/cloud-node-controller-role.yaml deleted file mode 100644 index 8f4644cb30..0000000000 --- a/cluster/addons/cloud-controller-manager/cloud-node-controller-role.yaml +++ /dev/null @@ -1,177 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system:cloud-controller-manager -rules: -- apiGroups: - - "" - - events.k8s.io - resources: - - events - verbs: - - create - - patch - - update -- apiGroups: - - coordination.k8s.io - resources: - - leases - verbs: - - create -- apiGroups: - - coordination.k8s.io - resourceNames: - - cloud-controller-manager - resources: - - leases - verbs: - - get - - update -- apiGroups: - - "" - resources: - - endpoints - - serviceaccounts - verbs: - - create - - get - - update -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - patch - - update -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get -- apiGroups: - - "" - resources: - - nodes/status - verbs: - - patch - - update -- apiGroups: - - "" - resources: - - secrets - verbs: - - create - - delete - - get - - update -- apiGroups: - - "authentication.k8s.io" - resources: - - tokenreviews - verbs: - - create -- apiGroups: - - "*" - resources: - - "*" - verbs: - - list - - watch -- apiGroups: - - "" - resources: - - serviceaccounts/token - verbs: - - create -- apiGroups: - - authentication.k8s.io - resources: - - subjectaccessreviews - verbs: - - create -- apiGroups: - - "" - resources: - - namespaces - - configmaps - verbs: - - get ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system::leader-locking-cloud-controller-manager - namespace: kube-system -rules: -- apiGroups: - - "" - resources: - - configmaps - verbs: - - watch -- apiGroups: - - "" - resources: - - configmaps - resourceNames: - - cloud-controller-manager - verbs: - - get - - update ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system:controller:cloud-node-controller -rules: -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - update -- apiGroups: - - "" - resources: - - nodes - verbs: - - get - - list - - update - - delete - - patch -- apiGroups: - - "" - resources: - - nodes/status - verbs: - - get - - list - - update - - delete - - patch - -- apiGroups: - - "" - resources: - - pods - verbs: - - list - - delete -- apiGroups: - - "" - resources: - - pods/status - verbs: - - list - - delete diff --git a/cluster/addons/cloud-controller-manager/pvl-controller-role.yaml b/cluster/addons/cloud-controller-manager/pvl-controller-role.yaml deleted file mode 100644 index fb3306655c..0000000000 --- a/cluster/addons/cloud-controller-manager/pvl-controller-role.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - addonmanager.kubernetes.io/mode: Reconcile - name: system:controller:pvl-controller -rules: -- apiGroups: - - "" - resources: - - events - verbs: - - create - - patch - - update -- apiGroups: - - "" - resources: - - persistentvolumeclaims - - persistentvolumes - verbs: - - list - - watch diff --git a/cluster/addons/cluster-loadbalancing/glbc/README.md b/cluster/addons/cluster-loadbalancing/glbc/README.md deleted file mode 100644 index d1a1d93f03..0000000000 --- a/cluster/addons/cluster-loadbalancing/glbc/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# GCE Load-Balancer Controller (GLBC) Cluster Addon - -This cluster addon is composed of a 404 default backend service and deployment. -On GCE, this 404 service is used in conjunction with the -[Ingress-GCE](https://github.com/kubernetes/ingress-gce) controller. - -See the Ingress-GCE docs for more information. - - diff --git a/cluster/addons/cluster-loadbalancing/glbc/default-svc-controller.yaml b/cluster/addons/cluster-loadbalancing/glbc/default-svc-controller.yaml deleted file mode 100644 index 01d77e6577..0000000000 --- a/cluster/addons/cluster-loadbalancing/glbc/default-svc-controller.yaml +++ /dev/null @@ -1,45 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: l7-default-backend - namespace: kube-system - labels: - k8s-app: glbc - kubernetes.io/name: "GLBC" - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - selector: - matchLabels: - k8s-app: glbc - template: - metadata: - labels: - k8s-app: glbc - name: glbc - spec: - securityContext: - seccompProfile: - type: RuntimeDefault - containers: - - name: default-http-backend - # Any image is permissible as long as: - # 1. It serves a 404 page at / - # 2. It serves 200 on a /healthz endpoint - image: registry.k8s.io/networking/ingress-gce-404-server-with-metrics-amd64:v1.10.11 - livenessProbe: - httpGet: - path: /healthz - port: 8080 - scheme: HTTP - initialDelaySeconds: 30 - timeoutSeconds: 5 - ports: - - containerPort: 8080 - resources: - limits: - cpu: 10m - memory: 20Mi - requests: - cpu: 10m - memory: 20Mi diff --git a/cluster/addons/cluster-loadbalancing/glbc/default-svc.yaml b/cluster/addons/cluster-loadbalancing/glbc/default-svc.yaml deleted file mode 100644 index 84b8881dfa..0000000000 --- a/cluster/addons/cluster-loadbalancing/glbc/default-svc.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - # This must match the --default-backend-service argument of the l7 lb - # controller and is required because GCE mandates a default backend. - name: default-http-backend - namespace: kube-system - labels: - k8s-app: glbc - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "GLBCDefaultBackend" -spec: - # The default backend must be of type NodePort. - type: NodePort - ports: - - port: 80 - targetPort: 8080 - protocol: TCP - name: http - selector: - k8s-app: glbc diff --git a/cluster/addons/dns-horizontal-autoscaler/MAINTAINERS.md b/cluster/addons/dns-horizontal-autoscaler/MAINTAINERS.md deleted file mode 100644 index 740f029729..0000000000 --- a/cluster/addons/dns-horizontal-autoscaler/MAINTAINERS.md +++ /dev/null @@ -1,3 +0,0 @@ -# Maintainers - -Zihong Zheng diff --git a/cluster/addons/dns-horizontal-autoscaler/README.md b/cluster/addons/dns-horizontal-autoscaler/README.md deleted file mode 100644 index 3acc2d5e64..0000000000 --- a/cluster/addons/dns-horizontal-autoscaler/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# DNS Horizontal Autoscaler - -DNS Horizontal Autoscaler enables horizontal autoscaling feature for DNS service -in Kubernetes clusters. This autoscaler runs as a Deployment. It collects cluster -status from the APIServer, horizontally scales the number of DNS backends based -on demand. Autoscaling parameters could be tuned by modifying the `kube-dns-autoscaler` -ConfigMap in `kube-system` namespace. - -Learn more about: -- Usage: http://kubernetes.io/docs/tasks/administer-cluster/dns-horizontal-autoscaling/ -- Implementation: https://github.com/kubernetes-incubator/cluster-proportional-autoscaler/ diff --git a/cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml b/cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml deleted file mode 100644 index 1f4df041cd..0000000000 --- a/cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2016 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. - -kind: ServiceAccount -apiVersion: v1 -metadata: - name: kube-dns-autoscaler - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: system:kube-dns-autoscaler - labels: - addonmanager.kubernetes.io/mode: Reconcile -rules: - - apiGroups: [""] - resources: ["nodes"] - verbs: ["list", "watch"] - - apiGroups: [""] - resources: ["replicationcontrollers/scale"] - verbs: ["get", "update"] - - apiGroups: ["apps"] - resources: ["deployments/scale", "replicasets/scale"] - verbs: ["get", "update"] -# Remove the configmaps rule once below issue is fixed: -# kubernetes-incubator/cluster-proportional-autoscaler#16 - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "create"] ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: system:kube-dns-autoscaler - labels: - addonmanager.kubernetes.io/mode: Reconcile -subjects: - - kind: ServiceAccount - name: kube-dns-autoscaler - namespace: kube-system -roleRef: - kind: ClusterRole - name: system:kube-dns-autoscaler - apiGroup: rbac.authorization.k8s.io - ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: kube-dns-autoscaler - namespace: kube-system - labels: - k8s-app: kube-dns-autoscaler - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - selector: - matchLabels: - k8s-app: kube-dns-autoscaler - template: - metadata: - labels: - k8s-app: kube-dns-autoscaler - spec: - priorityClassName: system-cluster-critical - securityContext: - seccompProfile: - type: RuntimeDefault - supplementalGroups: [ 65534 ] - fsGroup: 65534 - nodeSelector: - kubernetes.io/os: linux - containers: - - name: autoscaler - image: registry.k8s.io/cpa/cluster-proportional-autoscaler:1.8.4 - resources: - requests: - cpu: "20m" - memory: "10Mi" - command: - - /cluster-proportional-autoscaler - - --namespace=kube-system - - --configmap=kube-dns-autoscaler - # Should keep target in sync with cluster/addons/dns/kube-dns.yaml.base - - --target={{.Target}} - # When cluster is using large nodes(with more cores), "coresPerReplica" should dominate. - # If using small nodes, "nodesPerReplica" should dominate. - - --default-params={"linear":{"coresPerReplica":256,"nodesPerReplica":16,"preventSinglePointFailure":true,"includeUnschedulableNodes":true}} - - --logtostderr=true - - --v=2 - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - serviceAccountName: kube-dns-autoscaler diff --git a/cluster/addons/dns/coredns/Makefile b/cluster/addons/dns/coredns/Makefile deleted file mode 100644 index d3455dd853..0000000000 --- a/cluster/addons/dns/coredns/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2016 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. - -# Makefile for the kubedns underscore templates to Salt/Pillar and other formats. - -# If you update the *.base templates, please run this Makefile before pushing. -# -# Usage: -# make - -all: transform - -# .base -> .in pattern rule -%.in: %.base - sed -f transforms2salt.sed $< | sed s/__SOURCE_FILENAME__/$ $@ - -# .base -> .sed pattern rule -%.sed: %.base - sed -f transforms2sed.sed $< | sed s/__SOURCE_FILENAME__/$ $@ - -transform: coredns.yaml.in coredns.yaml.sed - -.PHONY: transform diff --git a/cluster/addons/dns/coredns/coredns.yaml.base b/cluster/addons/dns/coredns/coredns.yaml.base deleted file mode 100644 index 9cce5c3453..0000000000 --- a/cluster/addons/dns/coredns/coredns.yaml.base +++ /dev/null @@ -1,216 +0,0 @@ -# __MACHINE_GENERATED_WARNING__ - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: coredns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - kubernetes.io/bootstrapping: rbac-defaults - addonmanager.kubernetes.io/mode: Reconcile - name: system:coredns -rules: -- apiGroups: - - "" - resources: - - endpoints - - services - - pods - - namespaces - verbs: - - list - - watch -- apiGroups: - - discovery.k8s.io - resources: - - endpointslices - verbs: - - list - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - rbac.authorization.kubernetes.io/autoupdate: "true" - labels: - kubernetes.io/bootstrapping: rbac-defaults - addonmanager.kubernetes.io/mode: EnsureExists - name: system:coredns -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:coredns -subjects: -- kind: ServiceAccount - name: coredns - namespace: kube-system ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: coredns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: EnsureExists -data: - Corefile: | - .:53 { - errors - health { - lameduck 5s - } - ready - kubernetes __DNS__DOMAIN__ in-addr.arpa ip6.arpa { - pods insecure - fallthrough in-addr.arpa ip6.arpa - ttl 30 - } - prometheus :9153 - forward . /etc/resolv.conf { - max_concurrent 1000 - } - cache 30 - loop - reload - loadbalance - } ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: coredns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "CoreDNS" -spec: - # replicas: not specified here: - # 1. In order to make Addon Manager do not reconcile this replicas parameter. - # 2. Default is 1. - # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. - strategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - spec: - securityContext: - seccompProfile: - type: RuntimeDefault - priorityClassName: system-cluster-critical - serviceAccountName: coredns - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - nodeSelector: - kubernetes.io/os: linux - containers: - - name: coredns - image: registry.k8s.io/coredns/coredns:v1.13.1 - imagePullPolicy: IfNotPresent - resources: - limits: - memory: __DNS__MEMORY__LIMIT__ - requests: - cpu: 100m - memory: 70Mi - args: [ "-conf", "/etc/coredns/Corefile" ] - volumeMounts: - - name: config-volume - mountPath: /etc/coredns - readOnly: true - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9153 - name: metrics - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /ready - port: 8181 - scheme: HTTP - securityContext: - allowPrivilegeEscalation: false - capabilities: - add: - - NET_BIND_SERVICE - drop: - - ALL - readOnlyRootFilesystem: true - dnsPolicy: Default - volumes: - - name: config-volume - configMap: - name: coredns - items: - - key: Corefile - path: Corefile ---- -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - annotations: - prometheus.io/port: "9153" - prometheus.io/scrape: "true" - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "CoreDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: __DNS__SERVER__ - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP - - name: metrics - port: 9153 - protocol: TCP diff --git a/cluster/addons/dns/coredns/coredns.yaml.in b/cluster/addons/dns/coredns/coredns.yaml.in deleted file mode 100644 index ee07de6c32..0000000000 --- a/cluster/addons/dns/coredns/coredns.yaml.in +++ /dev/null @@ -1,216 +0,0 @@ -# Warning: This is a file generated from the base underscore template file: coredns.yaml.base - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: coredns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - kubernetes.io/bootstrapping: rbac-defaults - addonmanager.kubernetes.io/mode: Reconcile - name: system:coredns -rules: -- apiGroups: - - "" - resources: - - endpoints - - services - - pods - - namespaces - verbs: - - list - - watch -- apiGroups: - - discovery.k8s.io - resources: - - endpointslices - verbs: - - list - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - rbac.authorization.kubernetes.io/autoupdate: "true" - labels: - kubernetes.io/bootstrapping: rbac-defaults - addonmanager.kubernetes.io/mode: EnsureExists - name: system:coredns -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:coredns -subjects: -- kind: ServiceAccount - name: coredns - namespace: kube-system ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: coredns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: EnsureExists -data: - Corefile: | - .:53 { - errors - health { - lameduck 5s - } - ready - kubernetes dns_domain in-addr.arpa ip6.arpa { - pods insecure - fallthrough in-addr.arpa ip6.arpa - ttl 30 - } - prometheus :9153 - forward . /etc/resolv.conf { - max_concurrent 1000 - } - cache 30 - loop - reload - loadbalance - } ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: coredns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "CoreDNS" -spec: - # replicas: not specified here: - # 1. In order to make Addon Manager do not reconcile this replicas parameter. - # 2. Default is 1. - # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. - strategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - spec: - securityContext: - seccompProfile: - type: RuntimeDefault - priorityClassName: system-cluster-critical - serviceAccountName: coredns - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - nodeSelector: - kubernetes.io/os: linux - containers: - - name: coredns - image: registry.k8s.io/coredns/coredns:v1.13.1 - imagePullPolicy: IfNotPresent - resources: - limits: - memory: 'dns_memory_limit' - requests: - cpu: 100m - memory: 70Mi - args: [ "-conf", "/etc/coredns/Corefile" ] - volumeMounts: - - name: config-volume - mountPath: /etc/coredns - readOnly: true - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9153 - name: metrics - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /ready - port: 8181 - scheme: HTTP - securityContext: - allowPrivilegeEscalation: false - capabilities: - add: - - NET_BIND_SERVICE - drop: - - ALL - readOnlyRootFilesystem: true - dnsPolicy: Default - volumes: - - name: config-volume - configMap: - name: coredns - items: - - key: Corefile - path: Corefile ---- -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - annotations: - prometheus.io/port: "9153" - prometheus.io/scrape: "true" - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "CoreDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: 'dns_server' - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP - - name: metrics - port: 9153 - protocol: TCP diff --git a/cluster/addons/dns/coredns/coredns.yaml.sed b/cluster/addons/dns/coredns/coredns.yaml.sed deleted file mode 100644 index 5df370800c..0000000000 --- a/cluster/addons/dns/coredns/coredns.yaml.sed +++ /dev/null @@ -1,216 +0,0 @@ -# Warning: This is a file generated from the base underscore template file: coredns.yaml.base - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: coredns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - labels: - kubernetes.io/bootstrapping: rbac-defaults - addonmanager.kubernetes.io/mode: Reconcile - name: system:coredns -rules: -- apiGroups: - - "" - resources: - - endpoints - - services - - pods - - namespaces - verbs: - - list - - watch -- apiGroups: - - discovery.k8s.io - resources: - - endpointslices - verbs: - - list - - watch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - annotations: - rbac.authorization.kubernetes.io/autoupdate: "true" - labels: - kubernetes.io/bootstrapping: rbac-defaults - addonmanager.kubernetes.io/mode: EnsureExists - name: system:coredns -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:coredns -subjects: -- kind: ServiceAccount - name: coredns - namespace: kube-system ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: coredns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: EnsureExists -data: - Corefile: | - .:53 { - errors - health { - lameduck 5s - } - ready - kubernetes $DNS_DOMAIN in-addr.arpa ip6.arpa { - pods insecure - fallthrough in-addr.arpa ip6.arpa - ttl 30 - } - prometheus :9153 - forward . /etc/resolv.conf { - max_concurrent 1000 - } - cache 30 - loop - reload - loadbalance - } ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: coredns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "CoreDNS" -spec: - # replicas: not specified here: - # 1. In order to make Addon Manager do not reconcile this replicas parameter. - # 2. Default is 1. - # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. - strategy: - type: RollingUpdate - rollingUpdate: - maxUnavailable: 1 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - spec: - securityContext: - seccompProfile: - type: RuntimeDefault - priorityClassName: system-cluster-critical - serviceAccountName: coredns - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - nodeSelector: - kubernetes.io/os: linux - containers: - - name: coredns - image: registry.k8s.io/coredns/coredns:v1.13.1 - imagePullPolicy: IfNotPresent - resources: - limits: - memory: $DNS_MEMORY_LIMIT - requests: - cpu: 100m - memory: 70Mi - args: [ "-conf", "/etc/coredns/Corefile" ] - volumeMounts: - - name: config-volume - mountPath: /etc/coredns - readOnly: true - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9153 - name: metrics - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: 8080 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /ready - port: 8181 - scheme: HTTP - securityContext: - allowPrivilegeEscalation: false - capabilities: - add: - - NET_BIND_SERVICE - drop: - - ALL - readOnlyRootFilesystem: true - dnsPolicy: Default - volumes: - - name: config-volume - configMap: - name: coredns - items: - - key: Corefile - path: Corefile ---- -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - annotations: - prometheus.io/port: "9153" - prometheus.io/scrape: "true" - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "CoreDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: $DNS_SERVER_IP - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP - - name: metrics - port: 9153 - protocol: TCP diff --git a/cluster/addons/dns/coredns/transforms2salt.sed b/cluster/addons/dns/coredns/transforms2salt.sed deleted file mode 100644 index 6183aee5fe..0000000000 --- a/cluster/addons/dns/coredns/transforms2salt.sed +++ /dev/null @@ -1,5 +0,0 @@ -s/__DNS__SERVER__/{{ pillar['dns_server'] }}/g -s/__DNS__DOMAIN__/{{ pillar['dns_domain'] }}/g -s/__CLUSTER_CIDR__/{{ pillar['service_cluster_ip_range'] }}/g -s/__DNS__MEMORY__LIMIT__/{{ pillar['dns_memory_limit'] }}/g -s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g diff --git a/cluster/addons/dns/coredns/transforms2sed.sed b/cluster/addons/dns/coredns/transforms2sed.sed deleted file mode 100644 index f8285b401e..0000000000 --- a/cluster/addons/dns/coredns/transforms2sed.sed +++ /dev/null @@ -1,5 +0,0 @@ -s/__DNS__SERVER__/$DNS_SERVER_IP/g -s/__DNS__DOMAIN__/$DNS_DOMAIN/g -s/__CLUSTER_CIDR__/$SERVICE_CLUSTER_IP_RANGE/g -s/__DNS__MEMORY__LIMIT__/$DNS_MEMORY_LIMIT/g -s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g diff --git a/cluster/addons/dns/kube-dns/Makefile b/cluster/addons/dns/kube-dns/Makefile deleted file mode 100644 index 50419ff324..0000000000 --- a/cluster/addons/dns/kube-dns/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2016 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. - -# Makefile for the kubedns underscore templates to Salt/Pillar and other formats. - -# If you update the *.base templates, please run this Makefile before pushing. -# -# Usage: -# make - -all: transform - -# .base -> .in pattern rule -%.in: %.base - sed -f transforms2salt.sed $< | sed s/__SOURCE_FILENAME__/$ $@ - -# .base -> .sed pattern rule -%.sed: %.base - sed -f transforms2sed.sed $< | sed s/__SOURCE_FILENAME__/$ $@ - -transform: kube-dns.yaml.in kube-dns.yaml.sed - -.PHONY: transform diff --git a/cluster/addons/dns/kube-dns/README.md b/cluster/addons/dns/kube-dns/README.md deleted file mode 100644 index 38883f0c60..0000000000 --- a/cluster/addons/dns/kube-dns/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# kube-dns - -`kube-dns` schedules DNS Pods and Service on the cluster, other pods in cluster -can use the DNS Service’s IP to resolve DNS names. - -* [Administrators guide](http://kubernetes.io/docs/admin/dns/) -* [Code repository](http://www.github.com/kubernetes/dns) - -## Manually scale kube-dns Deployment - -kube-dns creates only one DNS Pod by default. If -[dns-horizontal-autoscaler](../../dns-horizontal-autoscaler/) -is not enabled, you may need to manually scale kube-dns Deployment. - -Please use below `kubectl scale` command to scale: -``` -kubectl --namespace=kube-system scale deployment kube-dns --replicas= -``` - -Do not use `kubectl edit` to modify kube-dns Deployment object if it is -controlled by [Addon Manager](../../addon-manager/). Otherwise the modifications -will be clobbered, in addition the replicas count for kube-dns Deployment will -be reset to 1. See [Cluster add-ons README](../../README.md) and -[#36411](https://github.com/kubernetes/kubernetes/issues/36411) for reference. - -## kube-dns addon templates - -This directory contains the base UNDERSCORE templates that can be used to -generate the kube-dns.yaml.in needed in Salt format. - -Due to a varied preference in templating language choices, the transform -Makefile in this directory should be enhanced to generate all required formats -from the base underscore templates. - -**N.B.**: When you add a parameter you should also update the various scripts -that supply values for your new parameter. Here is one way you might find those -scripts: - -``` -cd kubernetes && git grep 'kube-dns.yaml' -``` - -### Base Template files - -These are the authoritative base templates. -Run 'make' to generate the Salt and Sed yaml templates from these. - -``` -kube-dns.yaml.base -``` - -### Generated Salt files - -``` -kube-dns.yaml.in -``` - -### Generated Sed files - -``` -kube-dns.yaml.sed -``` \ No newline at end of file diff --git a/cluster/addons/dns/kube-dns/kube-dns.yaml.base b/cluster/addons/dns/kube-dns/kube-dns.yaml.base deleted file mode 100644 index 2b97de8a6c..0000000000 --- a/cluster/addons/dns/kube-dns/kube-dns.yaml.base +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright 2016 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. - -# Should keep target in cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml -# in sync with this file. - -# __MACHINE_GENERATED_WARNING__ - -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "KubeDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: __DNS__SERVER__ - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kube-dns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: kube-dns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: EnsureExists ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - # replicas: not specified here: - # 1. In order to make Addon Manager do not reconcile this replicas parameter. - # 2. Default is 1. - # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. - strategy: - rollingUpdate: - maxSurge: 10% - maxUnavailable: 0 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - annotations: - prometheus.io/port: "10054" - prometheus.io/scrape: "true" - spec: - priorityClassName: system-cluster-critical - securityContext: - seccompProfile: - type: RuntimeDefault - supplementalGroups: [ 65534 ] - fsGroup: 65534 - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - volumes: - - name: kube-dns-config - configMap: - name: kube-dns - optional: true - nodeSelector: - kubernetes.io/os: linux - containers: - - name: kubedns - image: registry.k8s.io/dns/k8s-dns-kube-dns:1.26.4 - resources: - # TODO: Set memory limits when we've profiled the container for large - # clusters, then set request = limit to keep this container in - # guaranteed class. Currently, this container falls into the - # "burstable" category so the kubelet doesn't backoff from restarting it. - limits: - memory: __DNS__MEMORY__LIMIT__ - requests: - cpu: 100m - memory: 70Mi - livenessProbe: - httpGet: - path: /healthcheck/kubedns - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /readiness - port: 8081 - scheme: HTTP - # we poll on pod startup for the Kubernetes master service and - # only setup the /readiness HTTP server once that's available. - initialDelaySeconds: 3 - timeoutSeconds: 5 - args: - - --domain=__DNS__DOMAIN__. - - --dns-port=10053 - - --config-dir=/kube-dns-config - - --v=2 - env: - - name: PROMETHEUS_PORT - value: "10055" - ports: - - containerPort: 10053 - name: dns-local - protocol: UDP - - containerPort: 10053 - name: dns-tcp-local - protocol: TCP - - containerPort: 10055 - name: metrics - protocol: TCP - volumeMounts: - - name: kube-dns-config - mountPath: /kube-dns-config - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 1001 - runAsGroup: 1001 - - name: dnsmasq - image: registry.k8s.io/dns/k8s-dns-dnsmasq-nanny:1.26.4 - livenessProbe: - httpGet: - path: /healthcheck/dnsmasq - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - -v=2 - - -configDir=/etc/k8s/dns/dnsmasq-nanny - - -restartDnsmasq=true - - -- - - -k - - --cache-size=1000 - - --no-negcache - - --dns-loop-detect - - --log-facility=- - - --server=/__DNS__DOMAIN__/127.0.0.1#10053 - - --server=/in-addr.arpa/127.0.0.1#10053 - - --server=/ip6.arpa/127.0.0.1#10053 - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - # see: https://github.com/kubernetes/kubernetes/issues/29055 for details - resources: - requests: - cpu: 150m - memory: 20Mi - volumeMounts: - - name: kube-dns-config - mountPath: /etc/k8s/dns/dnsmasq-nanny - securityContext: - capabilities: - drop: - - all - add: - - NET_BIND_SERVICE - - SETGID - - name: sidecar - image: registry.k8s.io/dns/k8s-dns-sidecar:1.26.4 - livenessProbe: - httpGet: - path: /metrics - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - --v=2 - - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.__DNS__DOMAIN__,5,SRV - - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.__DNS__DOMAIN__,5,SRV - ports: - - containerPort: 10054 - name: metrics - protocol: TCP - resources: - requests: - memory: 20Mi - cpu: 10m - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 1001 - runAsGroup: 1001 - dnsPolicy: Default # Don't use cluster DNS. - serviceAccountName: kube-dns diff --git a/cluster/addons/dns/kube-dns/kube-dns.yaml.in b/cluster/addons/dns/kube-dns/kube-dns.yaml.in deleted file mode 100644 index bf80cb7668..0000000000 --- a/cluster/addons/dns/kube-dns/kube-dns.yaml.in +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright 2016 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. - -# Should keep target in cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml -# in sync with this file. - -# Warning: This is a file generated from the base underscore template file: kube-dns.yaml.base - -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "KubeDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: dns_server - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kube-dns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: kube-dns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: EnsureExists ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - # replicas: not specified here: - # 1. In order to make Addon Manager do not reconcile this replicas parameter. - # 2. Default is 1. - # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. - strategy: - rollingUpdate: - maxSurge: 10% - maxUnavailable: 0 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - annotations: - prometheus.io/port: "10054" - prometheus.io/scrape: "true" - spec: - priorityClassName: system-cluster-critical - securityContext: - seccompProfile: - type: RuntimeDefault - supplementalGroups: [ 65534 ] - fsGroup: 65534 - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - volumes: - - name: kube-dns-config - configMap: - name: kube-dns - optional: true - nodeSelector: - kubernetes.io/os: linux - containers: - - name: kubedns - image: registry.k8s.io/dns/k8s-dns-kube-dns:1.26.4 - resources: - # TODO: Set memory limits when we've profiled the container for large - # clusters, then set request = limit to keep this container in - # guaranteed class. Currently, this container falls into the - # "burstable" category so the kubelet doesn't backoff from restarting it. - limits: - memory: 'dns_memory_limit' - requests: - cpu: 100m - memory: 70Mi - livenessProbe: - httpGet: - path: /healthcheck/kubedns - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /readiness - port: 8081 - scheme: HTTP - # we poll on pod startup for the Kubernetes master service and - # only setup the /readiness HTTP server once that's available. - initialDelaySeconds: 3 - timeoutSeconds: 5 - args: - - --domain=dns_domain. - - --dns-port=10053 - - --config-dir=/kube-dns-config - - --v=2 - env: - - name: PROMETHEUS_PORT - value: "10055" - ports: - - containerPort: 10053 - name: dns-local - protocol: UDP - - containerPort: 10053 - name: dns-tcp-local - protocol: TCP - - containerPort: 10055 - name: metrics - protocol: TCP - volumeMounts: - - name: kube-dns-config - mountPath: /kube-dns-config - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 1001 - runAsGroup: 1001 - - name: dnsmasq - image: registry.k8s.io/dns/k8s-dns-dnsmasq-nanny:1.26.4 - livenessProbe: - httpGet: - path: /healthcheck/dnsmasq - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - -v=2 - - -configDir=/etc/k8s/dns/dnsmasq-nanny - - -restartDnsmasq=true - - -- - - -k - - --cache-size=1000 - - --no-negcache - - --dns-loop-detect - - --log-facility=- - - --server=/dns_domain/127.0.0.1#10053 - - --server=/in-addr.arpa/127.0.0.1#10053 - - --server=/ip6.arpa/127.0.0.1#10053 - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - # see: https://github.com/kubernetes/kubernetes/issues/29055 for details - resources: - requests: - cpu: 150m - memory: 20Mi - volumeMounts: - - name: kube-dns-config - mountPath: /etc/k8s/dns/dnsmasq-nanny - securityContext: - capabilities: - drop: - - all - add: - - NET_BIND_SERVICE - - SETGID - - name: sidecar - image: registry.k8s.io/dns/k8s-dns-sidecar:1.26.4 - livenessProbe: - httpGet: - path: /metrics - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - --v=2 - - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.dns_domain,5,SRV - - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.dns_domain,5,SRV - ports: - - containerPort: 10054 - name: metrics - protocol: TCP - resources: - requests: - memory: 20Mi - cpu: 10m - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 1001 - runAsGroup: 1001 - dnsPolicy: Default # Don't use cluster DNS. - serviceAccountName: kube-dns diff --git a/cluster/addons/dns/kube-dns/kube-dns.yaml.sed b/cluster/addons/dns/kube-dns/kube-dns.yaml.sed deleted file mode 100644 index 71e2f04ed5..0000000000 --- a/cluster/addons/dns/kube-dns/kube-dns.yaml.sed +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright 2016 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. - -# Should keep target in cluster/addons/dns-horizontal-autoscaler/dns-horizontal-autoscaler.yaml -# in sync with this file. - -# Warning: This is a file generated from the base underscore template file: kube-dns.yaml.base - -apiVersion: v1 -kind: Service -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "KubeDNS" -spec: - selector: - k8s-app: kube-dns - clusterIP: $DNS_SERVER_IP - ports: - - name: dns - port: 53 - protocol: UDP - - name: dns-tcp - port: 53 - protocol: TCP ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kube-dns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: kube-dns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: EnsureExists ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: kube-dns - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - # replicas: not specified here: - # 1. In order to make Addon Manager do not reconcile this replicas parameter. - # 2. Default is 1. - # 3. Will be tuned in real time if DNS horizontal auto-scaling is turned on. - strategy: - rollingUpdate: - maxSurge: 10% - maxUnavailable: 0 - selector: - matchLabels: - k8s-app: kube-dns - template: - metadata: - labels: - k8s-app: kube-dns - annotations: - prometheus.io/port: "10054" - prometheus.io/scrape: "true" - spec: - priorityClassName: system-cluster-critical - securityContext: - seccompProfile: - type: RuntimeDefault - supplementalGroups: [ 65534 ] - fsGroup: 65534 - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: k8s-app - operator: In - values: ["kube-dns"] - topologyKey: kubernetes.io/hostname - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - volumes: - - name: kube-dns-config - configMap: - name: kube-dns - optional: true - nodeSelector: - kubernetes.io/os: linux - containers: - - name: kubedns - image: registry.k8s.io/dns/k8s-dns-kube-dns:1.26.4 - resources: - # TODO: Set memory limits when we've profiled the container for large - # clusters, then set request = limit to keep this container in - # guaranteed class. Currently, this container falls into the - # "burstable" category so the kubelet doesn't backoff from restarting it. - limits: - memory: $DNS_MEMORY_LIMIT - requests: - cpu: 100m - memory: 70Mi - livenessProbe: - httpGet: - path: /healthcheck/kubedns - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - readinessProbe: - httpGet: - path: /readiness - port: 8081 - scheme: HTTP - # we poll on pod startup for the Kubernetes master service and - # only setup the /readiness HTTP server once that's available. - initialDelaySeconds: 3 - timeoutSeconds: 5 - args: - - --domain=$DNS_DOMAIN. - - --dns-port=10053 - - --config-dir=/kube-dns-config - - --v=2 - env: - - name: PROMETHEUS_PORT - value: "10055" - ports: - - containerPort: 10053 - name: dns-local - protocol: UDP - - containerPort: 10053 - name: dns-tcp-local - protocol: TCP - - containerPort: 10055 - name: metrics - protocol: TCP - volumeMounts: - - name: kube-dns-config - mountPath: /kube-dns-config - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 1001 - runAsGroup: 1001 - - name: dnsmasq - image: registry.k8s.io/dns/k8s-dns-dnsmasq-nanny:1.26.4 - livenessProbe: - httpGet: - path: /healthcheck/dnsmasq - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - -v=2 - - -configDir=/etc/k8s/dns/dnsmasq-nanny - - -restartDnsmasq=true - - -- - - -k - - --cache-size=1000 - - --no-negcache - - --dns-loop-detect - - --log-facility=- - - --server=/$DNS_DOMAIN/127.0.0.1#10053 - - --server=/in-addr.arpa/127.0.0.1#10053 - - --server=/ip6.arpa/127.0.0.1#10053 - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - # see: https://github.com/kubernetes/kubernetes/issues/29055 for details - resources: - requests: - cpu: 150m - memory: 20Mi - volumeMounts: - - name: kube-dns-config - mountPath: /etc/k8s/dns/dnsmasq-nanny - securityContext: - capabilities: - drop: - - all - add: - - NET_BIND_SERVICE - - SETGID - - name: sidecar - image: registry.k8s.io/dns/k8s-dns-sidecar:1.26.4 - livenessProbe: - httpGet: - path: /metrics - port: 10054 - scheme: HTTP - initialDelaySeconds: 60 - timeoutSeconds: 5 - successThreshold: 1 - failureThreshold: 5 - args: - - --v=2 - - --probe=kubedns,127.0.0.1:10053,kubernetes.default.svc.$DNS_DOMAIN,5,SRV - - --probe=dnsmasq,127.0.0.1:53,kubernetes.default.svc.$DNS_DOMAIN,5,SRV - ports: - - containerPort: 10054 - name: metrics - protocol: TCP - resources: - requests: - memory: 20Mi - cpu: 10m - securityContext: - allowPrivilegeEscalation: false - readOnlyRootFilesystem: true - runAsUser: 1001 - runAsGroup: 1001 - dnsPolicy: Default # Don't use cluster DNS. - serviceAccountName: kube-dns diff --git a/cluster/addons/dns/kube-dns/transforms2salt.sed b/cluster/addons/dns/kube-dns/transforms2salt.sed deleted file mode 100644 index 6183aee5fe..0000000000 --- a/cluster/addons/dns/kube-dns/transforms2salt.sed +++ /dev/null @@ -1,5 +0,0 @@ -s/__DNS__SERVER__/{{ pillar['dns_server'] }}/g -s/__DNS__DOMAIN__/{{ pillar['dns_domain'] }}/g -s/__CLUSTER_CIDR__/{{ pillar['service_cluster_ip_range'] }}/g -s/__DNS__MEMORY__LIMIT__/{{ pillar['dns_memory_limit'] }}/g -s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g diff --git a/cluster/addons/dns/kube-dns/transforms2sed.sed b/cluster/addons/dns/kube-dns/transforms2sed.sed deleted file mode 100644 index f8285b401e..0000000000 --- a/cluster/addons/dns/kube-dns/transforms2sed.sed +++ /dev/null @@ -1,5 +0,0 @@ -s/__DNS__SERVER__/$DNS_SERVER_IP/g -s/__DNS__DOMAIN__/$DNS_DOMAIN/g -s/__CLUSTER_CIDR__/$SERVICE_CLUSTER_IP_RANGE/g -s/__DNS__MEMORY__LIMIT__/$DNS_MEMORY_LIMIT/g -s/__MACHINE_GENERATED_WARNING__/Warning: This is a file generated from the base underscore template file: __SOURCE_FILENAME__/g diff --git a/cluster/addons/dns/nodelocaldns/README.md b/cluster/addons/dns/nodelocaldns/README.md deleted file mode 100644 index 4b0be07edb..0000000000 --- a/cluster/addons/dns/nodelocaldns/README.md +++ /dev/null @@ -1,55 +0,0 @@ -# Nodelocal DNS Cache - -Using NodeLocal DNSCache in Kubernetes clusters(https://kubernetes.io/docs/tasks/administer-cluster/nodelocaldns/). -This addon runs a node-local-dns pod on all cluster nodes. The pod runs CoreDNS as the dns cache. It runs with `hostNetwork:True` and creates a dedicated dummy interface with a link local ip(169.254.20.10/32 by default) to listen for DNS queries. The cache instances connect to clusterDNS in case of cache misses. - -Design details [here](https://github.com/kubernetes/enhancements/blob/master/keps/sig-network/1024-nodelocal-cache-dns/README.md) - -This feature is graduating to GA in release 1.18(Beta in release 1.15). - -## nodelocaldns addon template - -This directory contains the addon config yaml - `nodelocaldns.yaml` -The variables will be substituted by the configure scripts when the yaml is copied into master. - -We have the following variables in the yaml: -`__PILLAR__DNS__SERVER__` - set to kube-dns service IP. -`__PILLAR__LOCAL__DNS__` - set to the link-local IP(169.254.20.10 by default). -`__PILLAR__DNS__DOMAIN__` - set to the cluster domain(cluster.local by default). - -Note: The local listen IP address for NodeLocal DNSCache can be any address that can be guaranteed to not collide with any existing IP in your cluster. It's recommended to use an address with a local scope, per example, from the link-local range 169.254.0.0/16 for IPv4 or from the Unique Local Address range in IPv6 fd00::/8. - -The following variables will be set by the node-cache images - registry.k8s.io/k8s-dns-node-cache:1.15.6 or later. -The values will be determined by reading the kube-dns configMap for custom -Upstream server configuration. -`__PILLAR__CLUSTER__DNS__` - Upstream server for in-cluster queries. -`__PILLAR__UPSTREAM__SERVERS__` - Upstream servers for external queries. - -### Network policy and DNS connectivity - -When running nodelocaldns addon on clusters using network policy, additional rules might be required to enable dns connectivity. -Using a namespace selector for dns egress traffic as shown [here](https://docs.projectcalico.org/security/tutorials/kubernetes-policy-advanced) -might not be enough since the node-local-dns pods run with `hostNetwork: True` - -One way to enable connectivity from node-local-dns pods to clusterDNS ip is to use an ipBlock rule instead: - -``` -spec: - egress: - - ports: - - port: 53 - protocol: TCP - - port: 53 - protocol: UDP - to: - - ipBlock: - cidr: /32 - podSelector: {} - policyTypes: - - Ingress - - Egress -``` - -### Negative caching - -The `denial` cache TTL has been reduced to the minimum of 5 seconds [here](https://github.com/kubernetes/kubernetes/blob/a38ed2c5ceedf682cbc19442aac5224ae6e10eaa/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml#L61). In the unlikely event that this impacts performance, setting this TTL to a higher value make help alleviate issues, but be aware that operations that rely on DNS polling for orchestration may fail (for example operators with StatefulSets). diff --git a/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml b/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml deleted file mode 100644 index 30a594227d..0000000000 --- a/cluster/addons/dns/nodelocaldns/nodelocaldns.yaml +++ /dev/null @@ -1,211 +0,0 @@ -# Copyright 2018 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. -# - -apiVersion: v1 -kind: ServiceAccount -metadata: - name: node-local-dns - namespace: kube-system - labels: - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile ---- -apiVersion: v1 -kind: Service -metadata: - name: kube-dns-upstream - namespace: kube-system - labels: - k8s-app: kube-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/name: "KubeDNSUpstream" -spec: - ports: - - name: dns - port: 53 - protocol: UDP - targetPort: 53 - - name: dns-tcp - port: 53 - protocol: TCP - targetPort: 53 - selector: - k8s-app: kube-dns ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: node-local-dns - namespace: kube-system - labels: - addonmanager.kubernetes.io/mode: Reconcile -data: - Corefile: | - __PILLAR__DNS__DOMAIN__:53 { - errors - cache { - success 9984 30 - denial 9984 5 - } - reload - loop - bind __PILLAR__LOCAL__DNS__ __PILLAR__DNS__SERVER__ - forward . __PILLAR__CLUSTER__DNS__ { - force_tcp - } - prometheus :9253 - health __PILLAR__LOCAL__DNS__:8080 - } - in-addr.arpa:53 { - errors - cache 30 - reload - loop - bind __PILLAR__LOCAL__DNS__ __PILLAR__DNS__SERVER__ - forward . __PILLAR__CLUSTER__DNS__ { - force_tcp - } - prometheus :9253 - } - ip6.arpa:53 { - errors - cache 30 - reload - loop - bind __PILLAR__LOCAL__DNS__ __PILLAR__DNS__SERVER__ - forward . __PILLAR__CLUSTER__DNS__ { - force_tcp - } - prometheus :9253 - } - .:53 { - errors - cache 30 - reload - loop - bind __PILLAR__LOCAL__DNS__ __PILLAR__DNS__SERVER__ - forward . __PILLAR__UPSTREAM__SERVERS__ - prometheus :9253 - } ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: node-local-dns - namespace: kube-system - labels: - k8s-app: node-local-dns - kubernetes.io/cluster-service: "true" - addonmanager.kubernetes.io/mode: Reconcile -spec: - updateStrategy: - rollingUpdate: - maxUnavailable: 10% - selector: - matchLabels: - k8s-app: node-local-dns - template: - metadata: - labels: - k8s-app: node-local-dns - annotations: - prometheus.io/port: "9253" - prometheus.io/scrape: "true" - spec: - priorityClassName: system-node-critical - serviceAccountName: node-local-dns - hostNetwork: true - dnsPolicy: Default # Don't use cluster DNS. - tolerations: - - key: "CriticalAddonsOnly" - operator: "Exists" - - effect: "NoExecute" - operator: "Exists" - - effect: "NoSchedule" - operator: "Exists" - containers: - - name: node-cache - image: registry.k8s.io/dns/k8s-dns-node-cache:1.26.4 - resources: - requests: - cpu: 25m - memory: 5Mi - args: [ "-localip", "__PILLAR__LOCAL__DNS__,__PILLAR__DNS__SERVER__", "-conf", "/etc/Corefile", "-upstreamsvc", "kube-dns-upstream" ] - securityContext: - capabilities: - add: - - NET_ADMIN - ports: - - containerPort: 53 - name: dns - protocol: UDP - - containerPort: 53 - name: dns-tcp - protocol: TCP - - containerPort: 9253 - name: metrics - protocol: TCP - livenessProbe: - httpGet: - host: __PILLAR__LOCAL__DNS__ - path: /health - port: 8080 - initialDelaySeconds: 60 - timeoutSeconds: 5 - volumeMounts: - - mountPath: /run/xtables.lock - name: xtables-lock - readOnly: false - - name: config-volume - mountPath: /etc/coredns - - name: kube-dns-config - mountPath: /etc/kube-dns - volumes: - - name: xtables-lock - hostPath: - path: /run/xtables.lock - type: FileOrCreate - - name: kube-dns-config - configMap: - name: kube-dns - optional: true - - name: config-volume - configMap: - name: node-local-dns - items: - - key: Corefile - path: Corefile.base ---- -# A headless service is a service with a service IP but instead of load-balancing it will return the IPs of our associated Pods. -# We use this to expose metrics to Prometheus. -apiVersion: v1 -kind: Service -metadata: - annotations: - prometheus.io/port: "9253" - prometheus.io/scrape: "true" - labels: - k8s-app: node-local-dns - name: node-local-dns - namespace: kube-system -spec: - clusterIP: None - ports: - - name: metrics - port: 9253 - targetPort: 9253 - selector: - k8s-app: node-local-dns diff --git a/cluster/addons/fluentd-gcp/README.md b/cluster/addons/fluentd-gcp/README.md deleted file mode 100644 index 8516519e54..0000000000 --- a/cluster/addons/fluentd-gcp/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Stackdriver Logging Agent -============== - -Stackdriver Logging Agent is a DaemonSet which spawns a pod on each node -that reads logs, generated by kubelet, container runtime and containers -and sends them to the Stackdriver. When logs are exported to the Stackdriver, -they can be searched, viewed, and analyzed. - -Learn more at: https://kubernetes.io/docs/tasks/debug-application-cluster/logging-stackdriver - -## Troubleshooting - -In Kubernetes clusters in version 1.10.0 or later, fluentd-gcp DaemonSet can be -manually scaled. This is useful e.g. when applications running in the cluster -are sending a large volume of logs (i.e. over 100kB/s), causing fluentd-gcp to -fail with OutOfMemory errors. Conversely, if the applications aren't generating -a lot of logs, it may be useful to reduce the amount of resources consumed by -fluentd-gcp, making these resources available to other applications. To learn -more about Kubernetes resource requests and limits, see the official -documentation ([CPU][cpu], [memory][memory]). The amount of resources requested -by fluentd-gcp on every node in the cluster can be fetched by running following -command: - -``` -$ kubectl get ds -n kube-system -l k8s-app=fluentd-gcp \ --o custom-columns=NAME:.metadata.name,\ -CPU_REQUEST:.spec.template.spec.containers[].resources.requests.cpu,\ -MEMORY_REQUEST:.spec.template.spec.containers[].resources.requests.memory,\ -MEMORY_LIMIT:.spec.template.spec.containers[].resources.limits.memory -``` - -This will display an output similar to the following: - -``` -NAME CPU_REQUEST MEMORY_REQUEST MEMORY_LIMIT -fluentd-gcp-v2.0.15 100m 200Mi 300Mi -``` - -In order to change those values, a [ScalingPolicy][scalingPolicy] needs to be -defined. Currently, only base values are supported (no automatic scaling). The -ScalingPolicy can be created using kubectl. E.g. to set cpu request to 101m, -memory request to 150Mi and memory limit to 400Mi: - -``` -$ cat < - # /var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log - # The /var/log directory on the host is mapped to the /var/log directory in the container - # running this instance of Fluentd and we end up collecting the file: - # /var/log/containers/synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log - # This results in the tag: - # var.log.containers.synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log - # where 'synthetic-logger-0.25lps-pod' is the pod name, 'default' is the - # namespace name, 'synth-lgr' is the container name and '997599971ee6..' is - # the container ID. - # The record reformer is used is discard the var.log.containers prefix and - # the Docker container ID suffix and "kubernetes." is pre-pended giving the tag: - # kubernetes.synthetic-logger-0.25lps-pod_default_synth-lgr - # Tag is then parsed by google_cloud plugin and translated to the metadata, - # visible in the log viewer - - # Json Log Example: - # {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"} - # CRI Log Example: - # 2016-02-17T00:04:05.931087621Z stdout F [info:2016-02-16T16:04:05.930-08:00] Some log text here - - @type tail - path /var/log/containers/*.log - pos_file /var/log/gcp-containers.log.pos - # Tags at this point are in the format of: - # reform.var.log.containers.__-.log - tag reform.* - read_from_head true - - @type multi_format - - format json - time_key time - time_format %Y-%m-%dT%H:%M:%S.%NZ - - - format /^(? - - - - - @type parser - format /^(?\w)(? - - - @type record_reformer - enable_ruby true - # Tags at this point are in the format of: - # 'raw.kubernetes.__'. - tag raw.kubernetes.${tag_suffix[4].split('-')[0..-2].join('-')} - - - # Detect exceptions in the log output and forward them as one log entry. - - @type detect_exceptions - - remove_tag_prefix raw - message log - stream stream - multiline_flush_interval 5 - max_bytes 500000 - max_lines 1000 - - system.input.conf: |- - # Example: - # Dec 21 23:17:22 gke-foo-1-1-4b5cbd14-node-4eoj startupscript: Finished running startup script /var/run/google.startup.script - - @type tail - format syslog - path /var/log/startupscript.log - pos_file /var/log/gcp-startupscript.log.pos - tag startupscript - - - # Examples: - # time="2016-02-04T06:51:03.053580605Z" level=info msg="GET /containers/json" - # time="2016-02-04T07:53:57.505612354Z" level=error msg="HTTP Error" err="No such image: -f" statusCode=404 - # TODO(random-liu): Remove this after cri container runtime rolls out. - - @type tail - format /^time="(?