mirror of https://github.com/kubernetes/kops.git
186 lines
4.2 KiB
Plaintext
186 lines
4.2 KiB
Plaintext
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: scaleway-secret
|
|
namespace: kube-system
|
|
type: Opaque
|
|
stringData:
|
|
# insert your Scaleway credentials here
|
|
SCW_ACCESS_KEY: {{ SCW_ACCESS_KEY }}
|
|
SCW_SECRET_KEY: {{ SCW_SECRET_KEY }}
|
|
# Project ID could also be an Organization ID
|
|
SCW_DEFAULT_PROJECT_ID: {{ SCW_DEFAULT_PROJECT_ID }}
|
|
# Region is where your loadbalancer will be created, ex: fr-par, nl-ams
|
|
SCW_DEFAULT_REGION: {{ SCW_DEFAULT_REGION }}
|
|
# Zone is where your servers and volumes will be created, ex: fr-par-1, nl-ams-2
|
|
SCW_DEFAULT_ZONE: {{ SCW_DEFAULT_ZONE }}
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: scaleway-cloud-controller-manager
|
|
namespace: kube-system
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: scaleway-cloud-controller-manager
|
|
revisionHistoryLimit: 2
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: scaleway-cloud-controller-manager
|
|
annotations:
|
|
scheduler.alpha.kubernetes.io/critical-pod: ''
|
|
spec:
|
|
dnsPolicy: Default
|
|
hostNetwork: true
|
|
serviceAccountName: cloud-controller-manager
|
|
tolerations:
|
|
# we sould allow to schedule on uninitialized and master nodes
|
|
- key: "node.cloudprovider.kubernetes.io/uninitialized"
|
|
value: "true"
|
|
effect: "NoSchedule"
|
|
- key: "CriticalAddonsOnly"
|
|
operator: "Exists"
|
|
- key: "node-role.kubernetes.io/master"
|
|
effect: NoSchedule
|
|
- key: "node-role.kubernetes.io/control-plane"
|
|
effect: NoSchedule
|
|
- key: node.kubernetes.io/not-ready
|
|
effect: NoExecute
|
|
operator: Exists
|
|
tolerationSeconds: 300
|
|
- key: node.kubernetes.io/unreachable
|
|
effect: NoExecute
|
|
operator: Exists
|
|
tolerationSeconds: 300
|
|
containers:
|
|
- name: scaleway-cloud-controller-manager
|
|
image: scaleway/scaleway-cloud-controller-manager:latest
|
|
imagePullPolicy: Always
|
|
args:
|
|
- --cloud-provider=scaleway
|
|
- --leader-elect=true
|
|
- --allow-untagged-cloud
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 50Mi
|
|
envFrom:
|
|
- secretRef:
|
|
name: scaleway-secret
|
|
---
|
|
apiVersion: v1
|
|
kind: ServiceAccount
|
|
metadata:
|
|
name: cloud-controller-manager
|
|
namespace: kube-system
|
|
---
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: ClusterRole
|
|
metadata:
|
|
annotations:
|
|
rbac.authorization.kubernetes.io/autoupdate: "true"
|
|
name: system:cloud-controller-manager
|
|
rules:
|
|
- apiGroups:
|
|
- coordination.k8s.io
|
|
resources:
|
|
- leases
|
|
verbs:
|
|
- get
|
|
- create
|
|
- update
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- events
|
|
verbs:
|
|
- create
|
|
- patch
|
|
- update
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- nodes
|
|
verbs:
|
|
- '*'
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- nodes/status
|
|
verbs:
|
|
- patch
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- services
|
|
verbs:
|
|
- list
|
|
- patch
|
|
- update
|
|
- watch
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- services/status
|
|
verbs:
|
|
- list
|
|
- patch
|
|
- update
|
|
- watch
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- serviceaccounts
|
|
verbs:
|
|
- create
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- persistentvolumes
|
|
verbs:
|
|
- get
|
|
- list
|
|
- update
|
|
- watch
|
|
- apiGroups:
|
|
- ""
|
|
resources:
|
|
- endpoints
|
|
verbs:
|
|
- create
|
|
- get
|
|
- list
|
|
- watch
|
|
- update
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: system:cloud-controller-manager
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: system:cloud-controller-manager
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: cloud-controller-manager
|
|
namespace: kube-system
|
|
---
|
|
kind: RoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
metadata:
|
|
name: system:cloud-controller-manager
|
|
namespace: kube-system
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: Role
|
|
name: extension-apiserver-authentication-reader
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: cloud-controller-manager
|
|
namespace: kube-system
|