From 49e816cf92c2c82973dc33bac458753c3f423d04 Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Wed, 28 Oct 2020 07:58:50 +0200 Subject: [PATCH] Amazon VPC CNI - rearrange manifest resources --- .../k8s-1.16.yaml.template | 66 +++++++++---------- 1 file changed, 31 insertions(+), 35 deletions(-) diff --git a/upup/models/cloudup/resources/addons/networking.amazon-vpc-routed-eni/k8s-1.16.yaml.template b/upup/models/cloudup/resources/addons/networking.amazon-vpc-routed-eni/k8s-1.16.yaml.template index 8db5368815..00dfb158a0 100644 --- a/upup/models/cloudup/resources/addons/networking.amazon-vpc-routed-eni/k8s-1.16.yaml.template +++ b/upup/models/cloudup/resources/addons/networking.amazon-vpc-routed-eni/k8s-1.16.yaml.template @@ -1,5 +1,18 @@ # Vendored from https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/release-1.7/config/v1.7/aws-k8s-cni.yaml +--- +apiVersion: rbac.authorization.k8s.io/v1 +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 --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -25,28 +38,22 @@ rules: resources: - daemonsets verbs: ["list", "watch"] - --- -apiVersion: v1 -kind: ServiceAccount +apiVersion: apiextensions.k8s.io/v1beta1 +kind: CustomResourceDefinition metadata: - name: aws-node - namespace: kube-system - ---- -apiVersion: rbac.authorization.k8s.io/v1 -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 - + name: eniconfigs.crd.k8s.amazonaws.com +spec: + scope: Cluster + group: crd.k8s.amazonaws.com + versions: + - name: v1alpha1 + served: true + storage: true + names: + plural: eniconfigs + singular: eniconfig + kind: ENIConfig --- apiVersion: apps/v1 kind: DaemonSet @@ -207,20 +214,9 @@ spec: path: /var/run/aws-node type: DirectoryOrCreate name: run-dir - --- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition +apiVersion: v1 +kind: ServiceAccount metadata: - name: eniconfigs.crd.k8s.amazonaws.com -spec: - scope: Cluster - group: crd.k8s.amazonaws.com - versions: - - name: v1alpha1 - served: true - storage: true - names: - plural: eniconfigs - singular: eniconfig - kind: ENIConfig + name: aws-node + namespace: kube-system