This repository has been archived by the owner on Jun 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "calico-host-protection: Remove HostEndpoint Controller"
This reverts commit 84c2ec76809c34789df23dd837a27d937ab7b17b.
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
...t/flatcar-linux/kubernetes/calico-host-protection/templates/host-endpoint-controller.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# manifests for component calico-hostendpoint-controller | ||
|
||
--- | ||
# deployment.yaml | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: calico-hostendpoint-controller | ||
namespace: kube-system | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: calico-hostendpoint-controller | ||
name: calico-hostendpoint-controller | ||
namespace: kube-system | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: calico-hostendpoint-controller | ||
template: | ||
metadata: | ||
labels: | ||
app: calico-hostendpoint-controller | ||
spec: | ||
serviceAccountName: calico-hostendpoint-controller | ||
containers: | ||
- image: kinvolk/calico-hostendpoint-controller:v0.0.3 | ||
name: calico-hostendpoint-controller | ||
volumeMounts: | ||
- mountPath: /tmp/ | ||
name: tmp-dir | ||
volumes: | ||
# mount in tmp so we can safely use from-scratch images and/or read-only containers | ||
- name: tmp-dir | ||
emptyDir: {} | ||
|
||
--- | ||
# rbac.yaml | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: calico-hostendpoint-controller-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["nodes"] | ||
verbs: ["get", "watch", "list"] | ||
- apiGroups: ["crd.projectcalico.org"] | ||
resources: ["hostendpoints"] | ||
verbs: | ||
- create | ||
- get | ||
- list | ||
- update | ||
- delete | ||
# To use kubectl apply on resources that already exist | ||
- patch | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: calico-hostendpoint-controller-role-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: calico-hostendpoint-controller | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: calico-hostendpoint-controller-role | ||
apiGroup: rbac.authorization.k8s.io |
14 changes: 14 additions & 0 deletions
14
...etes/packet/flatcar-linux/kubernetes/calico-host-protection/templates/host-endpoints.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{{- range .Values.hostEndpoints }} | ||
--- | ||
apiVersion: crd.projectcalico.org/v1 | ||
kind: HostEndpoint | ||
metadata: | ||
name: {{ .name }} | ||
labels: | ||
{{- range $key, $value := .labels }} | ||
{{ $key }}: {{ $value }} | ||
{{- end }} | ||
spec: | ||
interfaceName: {{ .interfaceName }} | ||
node: {{ .nodeName }} | ||
{{- end }} |