Verified Commit eafabc73 authored by Maarten de Waard's avatar Maarten de Waard
Browse files

Merge branch 'master' into merge-v0.0.22

parents 5673be1c 4b32a0be
Pipeline #13009 failed with stages
in 1 minute and 26 seconds
include:
- remote: https://open.greenhost.net/stackspin/stackspin/-/raw/main/.gitlab/ci_templates/helm_package.yml
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
variables:
CHART_NAME: local-path-provisioner
CHART_DIR: deploy/chart/
KANIKO_BUILD_IMAGENAME: local-path-provisioner
stages:
- build-project
- build-container
- lint-helm-chart
- package-helm-chart
- release-helm-chart
build-project:
stage: build-project
image:
name: golang:1.17
script:
- ./scripts/build
artifacts:
paths:
- ./bin/local-path-provisioner
expire_in: 1 week
when: always
build-container:
stage: build-container
image:
# We need a shell to provide the registry credentials, so we need to use the
# kaniko debug image (https://github.com/GoogleContainerTools/kaniko#debug-image)
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true --context ${CI_PROJECT_DIR}/ --dockerfile ${CI_PROJECT_DIR}/package/Dockerfile --destination ${CI_REGISTRY_IMAGE}/${KANIKO_BUILD_IMAGENAME}:${CI_COMMIT_REF_NAME}
......@@ -229,7 +229,6 @@ func (p *LocalPathProvisioner) Provision(opts pvController.ProvisionOptions) (*v
}
fs := v1.PersistentVolumeFilesystem
hostPathType := v1.HostPathDirectoryOrCreate
valueNode, ok := node.GetLabels()[KeyNode]
if !ok {
......@@ -248,9 +247,8 @@ func (p *LocalPathProvisioner) Provision(opts pvController.ProvisionOptions) (*v
v1.ResourceName(v1.ResourceStorage): pvc.Spec.Resources.Requests[v1.ResourceName(v1.ResourceStorage)],
},
PersistentVolumeSource: v1.PersistentVolumeSource{
HostPath: &v1.HostPathVolumeSource{
Local: &v1.LocalVolumeSource{
Path: path,
Type: &hostPathType,
},
},
NodeAffinity: &v1.VolumeNodeAffinity{
......@@ -307,11 +305,11 @@ func (p *LocalPathProvisioner) getPathAndNodeForPV(pv *v1.PersistentVolume) (pat
err = errors.Wrapf(err, "failed to delete volume %v", pv.Name)
}()
hostPath := pv.Spec.PersistentVolumeSource.HostPath
if hostPath == nil {
return "", "", fmt.Errorf("no HostPath set")
local := pv.Spec.PersistentVolumeSource.Local
if local == nil {
return "", "", fmt.Errorf("no Local set")
}
path = hostPath.Path
path = local.Path
nodeAffinity := pv.Spec.NodeAffinity
if nodeAffinity == nil {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment