Skip to content

Commit

Permalink
Merge pull request #3819 from BenTheElder/new-storage
Browse files Browse the repository at this point in the history
update local-path-provisioner
  • Loading branch information
k8s-ci-robot authored Dec 13, 2024
2 parents 6bba844 + 0dea9ca commit e7cf729
Showing 1 changed file with 48 additions and 14 deletions.
62 changes: 48 additions & 14 deletions pkg/build/nodeimage/const_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ NOTE: we have customized it in the following ways:
- our own image and helper image
- schedule to linux nodes only
- install as the default storage class
- tolerate control plane scheduling taints
*/

const storageProvisionerImage = "docker.io/kindest/local-path-provisioner:v20241108-5c6d2daf"
const storageHelperImage = "docker.io/kindest/local-path-helper:v20230510-486859a6"
const storageProvisionerImage = "docker.io/kindest/local-path-provisioner:v20241212-8ac705d0"
const storageHelperImage = "docker.io/kindest/local-path-helper:v20241212-8ac705d0"

// image we need to preload
var defaultStorageImages = []string{storageProvisionerImage, storageHelperImage}
Expand All @@ -44,24 +45,50 @@ metadata:
name: local-path-provisioner-service-account
namespace: local-path-storage
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: local-path-provisioner-role
namespace: local-path-storage
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: local-path-provisioner-role
rules:
- apiGroups: [ "" ]
resources: [ "nodes", "persistentvolumeclaims", "configmaps" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [ "" ]
resources: [ "endpoints", "persistentvolumes", "pods" ]
verbs: [ "*" ]
- apiGroups: [ "" ]
resources: [ "events" ]
verbs: [ "create", "patch" ]
- apiGroups: [ "storage.k8s.io" ]
resources: [ "storageclasses" ]
verbs: [ "get", "list", "watch" ]
- apiGroups: [""]
resources: ["nodes", "persistentvolumeclaims", "configmaps", "pods", "pods/log"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: local-path-provisioner-bind
namespace: local-path-storage
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: local-path-provisioner-role
subjects:
- kind: ServiceAccount
name: local-path-provisioner-service-account
namespace: local-path-storage
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -126,6 +153,8 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: CONFIG_MOUNT_PATH
value: /etc/config/
volumes:
- name: config-volume
configMap:
Expand Down Expand Up @@ -173,6 +202,11 @@ data:
metadata:
name: helper-pod
spec:
priorityClassName: system-node-critical
tolerations:
- key: node.kubernetes.io/disk-pressure
operator: Exists
effect: NoSchedule
containers:
- name: helper-pod
image: ` + storageHelperImage + `
Expand Down

0 comments on commit e7cf729

Please sign in to comment.