mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-08 02:58:29 +03:00
lint and cleanup local_volume_provisioner
This commit is contained in:
@@ -1,34 +1,28 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: local-storage-admin
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: local-storage-provisioner-pv-binding
|
||||
namespace: {{ system_namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: local-storage-admin
|
||||
namespace: {{ system_namespace }}
|
||||
- kind: ServiceAccount
|
||||
name: local-storage-admin
|
||||
namespace: {{ system_namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: system:persistent-volume-provisioner
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
metadata:
|
||||
name: local-storage-provisioner-node-binding
|
||||
namespace: {{ system_namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: local-storage-admin
|
||||
namespace: {{ system_namespace }}
|
||||
- kind: ServiceAccount
|
||||
name: local-storage-admin
|
||||
namespace: {{ system_namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: system:node
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
---
|
||||
# The config map is used to configure local volume discovery for Local SSDs on GCE and GKE.
|
||||
# It is a map from storage class to its mount configuration.
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: local-volume-config
|
||||
namespace: {{ system_namespace }}
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
kind: DaemonSet
|
||||
apiVersion: extensions/v1beta1
|
||||
metadata:
|
||||
name: local-volume-provisioner
|
||||
namespace: "{{ system_namespace }}"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: local-volume-provisioner
|
||||
spec:
|
||||
containers:
|
||||
- name: provisioner
|
||||
image: {{ local_volume_provisioner_image_repo }}:{{ local_volume_provisioner_image_tag }}
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: discovery-vol
|
||||
mountPath: "/local-disks"
|
||||
- name: local-volume-config
|
||||
mountPath: /etc/provisioner/config/
|
||||
env:
|
||||
- name: MY_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: MY_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
volumes:
|
||||
- name: discovery-vol
|
||||
hostPath:
|
||||
path: "{{ local_volume_base_dir }}"
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: local-volume-config
|
||||
name: local-volume-config
|
||||
serviceAccount: local-storage-admin
|
||||
@@ -1,42 +0,0 @@
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: local-volume-provisioner
|
||||
namespace: "{{ system_namespace }}"
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: local-volume-provisioner
|
||||
spec:
|
||||
containers:
|
||||
- name: provisioner
|
||||
image: {{ local_volume_provisioner_image_repo }}:{{ local_volume_provisioner_image_tag }}
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
securityContext:
|
||||
privileged: true
|
||||
volumeMounts:
|
||||
- name: discovery-vol
|
||||
mountPath: "/local-disks"
|
||||
- name: local-volume-config
|
||||
mountPath: /etc/provisioner/config/
|
||||
env:
|
||||
- name: MY_NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: spec.nodeName
|
||||
- name: MY_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
apiVersion: v1
|
||||
fieldPath: metadata.namespace
|
||||
volumes:
|
||||
- name: discovery-vol
|
||||
hostPath:
|
||||
path: "{{ local_volume_base_dir }}"
|
||||
- configMap:
|
||||
defaultMode: 420
|
||||
name: local-volume-config
|
||||
name: local-volume-config
|
||||
serviceAccount: local-storage-admin
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: local-storage-admin
|
||||
Reference in New Issue
Block a user