committed by
Kubernetes Prow Robot
10 changed files with 336 additions and 105 deletions
Unified View
Diff Options
-
23roles/network_plugin/canal/tasks/main.yml
-
43roles/network_plugin/canal/templates/canal-calico-kube-controllers.yml.j2
-
71roles/network_plugin/canal/templates/canal-config.yaml.j2
-
2roles/network_plugin/canal/templates/canal-cr-flannel.yml.j2
-
30roles/network_plugin/canal/templates/canal-cr.yml.j2
-
12roles/network_plugin/canal/templates/canal-crb-canal.yml.j2
-
6roles/network_plugin/canal/templates/canal-node-sa.yml.j2
-
177roles/network_plugin/canal/templates/canal-node.yaml.j2
-
18roles/network_plugin/canal/templates/canal-secret-calico-etcd.yml.j2
-
59roles/network_plugin/canal/templates/cni-canal.conflist.j2
@ -0,0 +1,30 @@ |
|||||
|
kind: ClusterRole |
||||
|
apiVersion: rbac.authorization.k8s.io/v1 |
||||
|
metadata: |
||||
|
name: canal |
||||
|
rules: |
||||
|
# Used for creating service account tokens to be used by the CNI plugin |
||||
|
- apiGroups: [""] |
||||
|
resources: |
||||
|
- serviceaccounts/token |
||||
|
verbs: |
||||
|
- create |
||||
|
- apiGroups: [""] |
||||
|
resources: |
||||
|
- pods |
||||
|
- nodes |
||||
|
- namespaces |
||||
|
verbs: |
||||
|
- get |
||||
|
# Pod CIDR auto-detection on kubeadm needs access to config maps. |
||||
|
- apiGroups: [""] |
||||
|
resources: |
||||
|
- configmaps |
||||
|
verbs: |
||||
|
- get |
||||
|
- apiGroups: |
||||
|
- "" |
||||
|
resources: |
||||
|
- nodes |
||||
|
verbs: |
||||
|
- list |
@ -0,0 +1,12 @@ |
|||||
|
apiVersion: rbac.authorization.k8s.io/v1 |
||||
|
kind: ClusterRoleBinding |
||||
|
metadata: |
||||
|
name: canal |
||||
|
roleRef: |
||||
|
apiGroup: rbac.authorization.k8s.io |
||||
|
kind: ClusterRole |
||||
|
name: canal |
||||
|
subjects: |
||||
|
- kind: ServiceAccount |
||||
|
name: canal |
||||
|
namespace: kube-system |
@ -0,0 +1,18 @@ |
|||||
|
# Source: calico/templates/calico-etcd-secrets.yaml |
||||
|
# The following contains k8s Secrets for use with a TLS enabled etcd cluster. |
||||
|
# For information on populating Secrets, see http://kubernetes.io/docs/user-guide/secrets/ |
||||
|
apiVersion: v1 |
||||
|
kind: Secret |
||||
|
type: Opaque |
||||
|
metadata: |
||||
|
name: calico-etcd-secrets |
||||
|
namespace: kube-system |
||||
|
data: |
||||
|
# Populate the following with etcd TLS configuration if desired, but leave blank if |
||||
|
# not using TLS for etcd. |
||||
|
# The keys below should be uncommented and the values populated with the base64 |
||||
|
# encoded contents of each file that would be associated with the TLS data. |
||||
|
# Example command for encoding a file contents: cat <file> | base64 -w 0 |
||||
|
etcd-key: {{ etcd_key_file.content }} |
||||
|
etcd-cert: {{ etcd_cert_file.content }} |
||||
|
etcd-ca: {{ etcd_ca_cert_file.content }} |
@ -1,33 +1,34 @@ |
|||||
{ |
|
||||
"name": "cni0", |
|
||||
"cniVersion":"0.3.1", |
|
||||
"plugins":[ |
|
||||
{ |
{ |
||||
"type": "flannel", |
|
||||
"delegate": { |
|
||||
"type": "calico", |
|
||||
"include_default_routes": true, |
|
||||
"etcd_endpoints": "{{ etcd_access_addresses }}", |
|
||||
"etcd_key_file": "{{ canal_cert_dir }}/key.pem", |
|
||||
"etcd_cert_file": "{{ canal_cert_dir }}/cert.crt", |
|
||||
"etcd_ca_cert_file": "{{ canal_cert_dir }}/ca_cert.crt", |
|
||||
"log_level": "info", |
|
||||
|
"name": "canal", |
||||
|
"cniVersion": "0.3.1", |
||||
|
"plugins": [ |
||||
|
{ |
||||
|
"type": "flannel", |
||||
|
"delegate": { |
||||
|
"type": "calico", |
||||
|
"include_default_routes": true, |
||||
|
"etcd_endpoints": "__ETCD_ENDPOINTS__", |
||||
|
"etcd_key_file": "__ETCD_KEY_FILE__", |
||||
|
"etcd_cert_file": "__ETCD_CERT_FILE__", |
||||
|
"etcd_ca_cert_file": "__ETCD_CA_CERT_FILE__", |
||||
|
"log_level": "info", |
||||
{% if calico_cni_log_file_path %} |
{% if calico_cni_log_file_path %} |
||||
"log_file_path": "{{ calico_cni_log_file_path }}", |
|
||||
|
"log_file_path": "{{ calico_cni_log_file_path }}", |
||||
{% endif %} |
{% endif %} |
||||
"policy": { |
|
||||
"type": "k8s" |
|
||||
}, |
|
||||
"kubernetes": { |
|
||||
"kubeconfig": "__KUBECONFIG_FILEPATH__" |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
{ |
|
||||
"type":"portmap", |
|
||||
"capabilities":{ |
|
||||
"portMappings":true |
|
||||
} |
|
||||
|
"policy": { |
||||
|
"type": "k8s", |
||||
|
"k8s_api_root": "https://__KUBERNETES_SERVICE_HOST__:__KUBERNETES_SERVICE_PORT__", |
||||
|
"k8s_auth_token": "__SERVICEACCOUNT_TOKEN__" |
||||
|
}, |
||||
|
"kubernetes": { |
||||
|
"kubeconfig": "__KUBECONFIG_FILEPATH__" |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
"type": "portmap", |
||||
|
"capabilities": {"portMappings": true}, |
||||
|
"snat": true |
||||
|
} |
||||
|
] |
||||
} |
} |
||||
] |
|
||||
} |
|
Write
Preview
Loading…
Cancel
Save