diff --git a/charts/vela-core/templates/defwithtemplate/init-container.yaml b/charts/vela-core/templates/defwithtemplate/init-container.yaml index d39197814..593b534ee 100644 --- a/charts/vela-core/templates/defwithtemplate/init-container.yaml +++ b/charts/vela-core/templates/defwithtemplate/init-container.yaml @@ -43,7 +43,7 @@ spec: volumeMounts: [{ name: parameter.mountName mountPath: parameter.initMountPath - }] + }] + parameter.extraVolumeMounts }] // +patchKey=name volumes: [{ @@ -97,5 +97,13 @@ spec: // +usage=Specify the mount path of init container initMountPath: string + + // +usage=Specify the extra volume mounts for the init container + extraVolumeMounts: [{ + // +usage=The name of the volume to be mounted + name: string + // +usage=The mountPath for mount in the init container + mountPath: string + }] } diff --git a/charts/vela-core/templates/defwithtemplate/service-account.yaml b/charts/vela-core/templates/defwithtemplate/service-account.yaml index d03fe6b69..5ece5975e 100644 --- a/charts/vela-core/templates/defwithtemplate/service-account.yaml +++ b/charts/vela-core/templates/defwithtemplate/service-account.yaml @@ -63,7 +63,7 @@ spec: resources: p.resources } if p.resourceNames != _|_ { - resources: p.resourceNames + resourceNames: p.resourceNames } if p.nonResourceURLs != _|_ { nonResourceURLs: p.nonResourceURLs @@ -100,7 +100,7 @@ spec: resources: p.resources } if p.resourceNames != _|_ { - resources: p.resourceNames + resourceNames: p.resourceNames } if p.nonResourceURLs != _|_ { nonResourceURLs: p.nonResourceURLs diff --git a/charts/vela-core/templates/defwithtemplate/sidecar.yaml b/charts/vela-core/templates/defwithtemplate/sidecar.yaml index 47fec98a0..608bcaa9d 100644 --- a/charts/vela-core/templates/defwithtemplate/sidecar.yaml +++ b/charts/vela-core/templates/defwithtemplate/sidecar.yaml @@ -82,6 +82,11 @@ spec: // +usage=The key of the config map to select from. Must be a valid secret key key: string } + // +usage=Specify the field reference for env + fieldRef?: { + // +usage=Specify the field path for env + fieldPath: string + } } }] diff --git a/charts/vela-minimal/templates/defwithtemplate/init-container.yaml b/charts/vela-minimal/templates/defwithtemplate/init-container.yaml index d39197814..593b534ee 100644 --- a/charts/vela-minimal/templates/defwithtemplate/init-container.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/init-container.yaml @@ -43,7 +43,7 @@ spec: volumeMounts: [{ name: parameter.mountName mountPath: parameter.initMountPath - }] + }] + parameter.extraVolumeMounts }] // +patchKey=name volumes: [{ @@ -97,5 +97,13 @@ spec: // +usage=Specify the mount path of init container initMountPath: string + + // +usage=Specify the extra volume mounts for the init container + extraVolumeMounts: [{ + // +usage=The name of the volume to be mounted + name: string + // +usage=The mountPath for mount in the init container + mountPath: string + }] } diff --git a/charts/vela-minimal/templates/defwithtemplate/service-account.yaml b/charts/vela-minimal/templates/defwithtemplate/service-account.yaml index d03fe6b69..5ece5975e 100644 --- a/charts/vela-minimal/templates/defwithtemplate/service-account.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/service-account.yaml @@ -63,7 +63,7 @@ spec: resources: p.resources } if p.resourceNames != _|_ { - resources: p.resourceNames + resourceNames: p.resourceNames } if p.nonResourceURLs != _|_ { nonResourceURLs: p.nonResourceURLs @@ -100,7 +100,7 @@ spec: resources: p.resources } if p.resourceNames != _|_ { - resources: p.resourceNames + resourceNames: p.resourceNames } if p.nonResourceURLs != _|_ { nonResourceURLs: p.nonResourceURLs diff --git a/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml b/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml index 47fec98a0..608bcaa9d 100644 --- a/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml +++ b/charts/vela-minimal/templates/defwithtemplate/sidecar.yaml @@ -82,6 +82,11 @@ spec: // +usage=The key of the config map to select from. Must be a valid secret key key: string } + // +usage=Specify the field reference for env + fieldRef?: { + // +usage=Specify the field path for env + fieldPath: string + } } }] diff --git a/vela-templates/definitions/internal/trait/init-container.cue b/vela-templates/definitions/internal/trait/init-container.cue index 8827ba873..1362661f4 100644 --- a/vela-templates/definitions/internal/trait/init-container.cue +++ b/vela-templates/definitions/internal/trait/init-container.cue @@ -38,7 +38,7 @@ template: { volumeMounts: [{ name: parameter.mountName mountPath: parameter.initMountPath - }] + }] + parameter.extraVolumeMounts }] // +patchKey=name volumes: [{ @@ -92,5 +92,13 @@ template: { // +usage=Specify the mount path of init container initMountPath: string + + // +usage=Specify the extra volume mounts for the init container + extraVolumeMounts: [{ + // +usage=The name of the volume to be mounted + name: string + // +usage=The mountPath for mount in the init container + mountPath: string + }] } } diff --git a/vela-templates/definitions/internal/trait/service-account.cue b/vela-templates/definitions/internal/trait/service-account.cue index 1ad97f791..ff1ed80e1 100644 --- a/vela-templates/definitions/internal/trait/service-account.cue +++ b/vela-templates/definitions/internal/trait/service-account.cue @@ -59,7 +59,7 @@ template: { resources: p.resources } if p.resourceNames != _|_ { - resources: p.resourceNames + resourceNames: p.resourceNames } if p.nonResourceURLs != _|_ { nonResourceURLs: p.nonResourceURLs @@ -96,7 +96,7 @@ template: { resources: p.resources } if p.resourceNames != _|_ { - resources: p.resourceNames + resourceNames: p.resourceNames } if p.nonResourceURLs != _|_ { nonResourceURLs: p.nonResourceURLs diff --git a/vela-templates/definitions/internal/trait/sidecar.cue b/vela-templates/definitions/internal/trait/sidecar.cue index 64e261873..a020ed979 100644 --- a/vela-templates/definitions/internal/trait/sidecar.cue +++ b/vela-templates/definitions/internal/trait/sidecar.cue @@ -77,6 +77,11 @@ template: { // +usage=The key of the config map to select from. Must be a valid secret key key: string } + // +usage=Specify the field reference for env + fieldRef?: { + // +usage=Specify the field path for env + fieldPath: string + } } }]