mirror of https://github.com/kubernetes/kops.git
Merge pull request #15077 from Mia-Cross/scaleway_ccm_and_csi
scaleway: CCM and CSI driver
This commit is contained in:
commit
18e77efb59
|
@ -0,0 +1,185 @@
|
||||||
|
---
|
||||||
|
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: nl-ams, nl-ams
|
||||||
|
SCW_DEFAULT_REGION: {{ SCW_DEFAULT_REGION }}
|
||||||
|
# Zone is where your servers and volumes will be created, ex: nl-ams-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
|
File diff suppressed because it is too large
Load Diff
|
@ -834,6 +834,33 @@ func (b *BootstrapChannelBuilder) buildAddons(c *fi.CloudupModelBuilderContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.Cluster.Spec.GetCloudProvider() == kops.CloudProviderScaleway {
|
||||||
|
{
|
||||||
|
key := "scaleway-cloud-controller.addons.k8s.io"
|
||||||
|
id := "k8s-1.24"
|
||||||
|
location := key + "/" + id + ".yaml"
|
||||||
|
|
||||||
|
addons.Add(&channelsapi.AddonSpec{
|
||||||
|
Name: fi.PtrTo(key),
|
||||||
|
Selector: map[string]string{"k8s-addon": key},
|
||||||
|
Manifest: fi.PtrTo(location),
|
||||||
|
Id: id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key := "scaleway-csi-driver.addons.k8s.io"
|
||||||
|
id := "k8s-1.24"
|
||||||
|
location := key + "/" + id + ".yaml"
|
||||||
|
|
||||||
|
addons.Add(&channelsapi.AddonSpec{
|
||||||
|
Name: fi.PtrTo(key),
|
||||||
|
Selector: map[string]string{"k8s-addon": key},
|
||||||
|
Manifest: fi.PtrTo(location),
|
||||||
|
Id: id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if featureflag.Spotinst.Enabled() && featureflag.SpotinstController.Enabled() {
|
if featureflag.Spotinst.Enabled() && featureflag.SpotinstController.Enabled() {
|
||||||
key := "spotinst-kubernetes-cluster-controller.addons.k8s.io"
|
key := "spotinst-kubernetes-cluster-controller.addons.k8s.io"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue