-
Notifications
You must be signed in to change notification settings - Fork 735
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Config Knob to allow Pod to use different VPC subnet
- Loading branch information
1 parent
5751423
commit 8bb4c71
Showing
17 changed files
with
924 additions
and
35 deletions.
There are no files selected for viewing
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,130 @@ | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
# kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: aws-node | ||
rules: | ||
- apiGroups: | ||
- crd.k8s.amazonaws.com | ||
resources: | ||
- "*" | ||
- namespaecs | ||
verbs: | ||
- "*" | ||
- apiGroups: [""] | ||
resources: | ||
- pods | ||
- nodes | ||
- namespaces | ||
verbs: ["list", "watch", "get"] | ||
- apiGroups: ["extensions"] | ||
resources: | ||
- daemonsets | ||
verbs: ["list", "watch"] | ||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: aws-node | ||
namespace: kube-system | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
# kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: aws-node | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: aws-node | ||
subjects: | ||
- kind: ServiceAccount | ||
name: aws-node | ||
namespace: kube-system | ||
--- | ||
kind: DaemonSet | ||
apiVersion: extensions/v1beta1 | ||
metadata: | ||
name: aws-node | ||
namespace: kube-system | ||
labels: | ||
k8s-app: aws-node | ||
spec: | ||
updateStrategy: | ||
type: RollingUpdate | ||
selector: | ||
matchLabels: | ||
k8s-app: aws-node | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: aws-node | ||
annotations: | ||
scheduler.alpha.kubernetes.io/critical-pod: '' | ||
spec: | ||
serviceAccountName: aws-node | ||
hostNetwork: true | ||
tolerations: | ||
- operator: Exists | ||
containers: | ||
- image: 602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni:1.2.0 | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 60000 | ||
name: metrics | ||
name: aws-node | ||
env: | ||
- name: AWS_VPC_K8S_CNI_LOGLEVEL | ||
value: DEBUG | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: WATCH_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
resources: | ||
requests: | ||
cpu: 10m | ||
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
- mountPath: /host/opt/cni/bin | ||
name: cni-bin-dir | ||
- mountPath: /host/etc/cni/net.d | ||
name: cni-net-dir | ||
- mountPath: /host/var/log | ||
name: log-dir | ||
- mountPath: /var/run/docker.sock | ||
name: dockersock | ||
volumes: | ||
- name: cni-bin-dir | ||
hostPath: | ||
path: /opt/cni/bin | ||
- name: cni-net-dir | ||
hostPath: | ||
path: /etc/cni/net.d | ||
- name: log-dir | ||
hostPath: | ||
path: /var/log | ||
- name: dockersock | ||
hostPath: | ||
path: /var/run/docker.sock | ||
--- | ||
apiVersion: apiextensions.k8s.io/v1beta1 | ||
kind: CustomResourceDefinition | ||
metadata: | ||
name: eniconfigs.crd.k8s.amazonaws.com | ||
spec: | ||
scope: Cluster | ||
group: crd.k8s.amazonaws.com | ||
version: v1alpha1 | ||
names: | ||
scope: Cluster | ||
plural: eniconfigs | ||
singuar: eniconfig | ||
kind: ENIConfig | ||
|
||
|
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
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
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
Oops, something went wrong.