Skip to content

Add support for setting secret mount mode #337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pkg/apis/upgrade.cattle.io/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ type VolumeSpec struct {
Name string `json:"name,omitempty"`
Source string `json:"source,omitempty"`
Destination string `json:"destination,omitempty"`
DefaultMode *int32 `json:"defaultMode,omitempty"`
}

// DrainSpec encapsulates `kubectl drain` parameters minus node/pod selectors.
Expand All @@ -101,6 +102,7 @@ type SecretSpec struct {
Name string `json:"name,omitempty"`
Path string `json:"path,omitempty"`
IgnoreUpdates bool `json:"ignoreUpdates,omitempty"`
DefaultMode *int32 `json:"defaultMode,omitempty"`
}

// TimeWindowSpec describes a time window in which a Plan should be processed.
Expand Down
3 changes: 2 additions & 1 deletion pkg/upgrade/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ func New(plan *upgradeapiv1.Plan, node *corev1.Node, controllerName string) *bat
Name: name.SafeConcatName("secret", secret.Name),
VolumeSource: corev1.VolumeSource{
Secret: &corev1.SecretVolumeSource{
SecretName: secret.Name,
SecretName: secret.Name,
DefaultMode: secret.DefaultMode,
},
},
})
Expand Down
Loading