Skip to content

Commit

Permalink
Merge pull request #160 from rancher/v0.0.19
Browse files Browse the repository at this point in the history
Local Path Provisioner v0.0.19
  • Loading branch information
yasker authored Nov 30, 2020
2 parents 31496fd + d45bdcf commit d253f2b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deploy/chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v1
description: Use HostPath for persistent local storage with Kubernetes
name: local-path-provisioner
version: 0.0.18
appVersion: "v0.0.18"
version: 0.0.19
appVersion: "v0.0.19"
keywords:
- storage
- hostpath
Expand Down
2 changes: 1 addition & 1 deletion deploy/chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ default values.
| Parameter | Description | Default |
| ----------------------------------- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `image.repository` | Local Path Provisioner image name | `rancher/local-path-provisioner` |
| `image.tag` | Local Path Provisioner image tag | `v0.0.18` |
| `image.tag` | Local Path Provisioner image tag | `v0.0.19` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `storageClass.create` | If true, create a `StorageClass` | `true` |
| `storageClass.provisionerName` | The provisioner name for the storage class | `nil` |
Expand Down
2 changes: 1 addition & 1 deletion deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ replicaCount: 1

image:
repository: rancher/local-path-provisioner
tag: v0.0.18
tag: v0.0.19
pullPolicy: IfNotPresent

helperImage:
Expand Down
2 changes: 1 addition & 1 deletion deploy/local-path-storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
serviceAccountName: local-path-provisioner-service-account
containers:
- name: local-path-provisioner
image: rancher/local-path-provisioner:v0.0.18
image: rancher/local-path-provisioner:v0.0.19
imagePullPolicy: IfNotPresent
command:
- local-path-provisioner
Expand Down
2 changes: 1 addition & 1 deletion deploy/provisioner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceAccountName: local-path-provisioner-service-account
containers:
- name: local-path-provisioner
image: rancher/local-path-provisioner:v0.0.18
image: rancher/local-path-provisioner:v0.0.19
imagePullPolicy: Always
command:
- local-path-provisioner
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func startDaemon(c *cli.Context) error {
if helperPodFile == "" {
helperPodYaml, err = findConfigFileFromConfigMap(kubeClient, namespace, configMapName, DefaultHelperPodFile)
if err != nil {
return fmt.Errorf("invalid empty flag %v and it also does not exist at ConfigMap %v/%v with err: %v", FlagConfigFile, namespace, configMapName, err)
return fmt.Errorf("invalid empty flag %v and it also does not exist at ConfigMap %v/%v with err: %v", FlagHelperPodFile, namespace, configMapName, err)
}
} else {
helperPodYaml, err = loadFile(helperPodFile)
Expand Down
8 changes: 8 additions & 0 deletions provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ var (
CmdTimeoutCounts = 120

ConfigFileCheckInterval = 30 * time.Second

HelperPodNameMaxLength = 128
)

type LocalPathProvisioner struct {
Expand Down Expand Up @@ -386,6 +388,12 @@ func (p *LocalPathProvisioner) createHelperPod(action ActionType, cmdsForPath []
}
helperPod := p.helperPod.DeepCopy()

// use different name for helper pods
// https://github.com/rancher/local-path-provisioner/issues/154
helperPod.Name = (helperPod.Name + "-" + string(action) + "-" + name)
if len(helperPod.Name) > HelperPodNameMaxLength {
helperPod.Name = helperPod.Name[:HelperPodNameMaxLength]
}
helperPod.Namespace = p.namespace
helperPod.Spec.NodeName = node
helperPod.Spec.ServiceAccountName = p.serviceAccountName
Expand Down

0 comments on commit d253f2b

Please sign in to comment.