Skip to content
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

Disabling removed feature flags in Pipleines v0.33.0 #639

Merged
merged 1 commit into from
Mar 1, 2022
Merged
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
15 changes: 0 additions & 15 deletions docs/TektonPipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,6 @@ them as per their need.
See more in the workspace documentation about [Affinity Assistant](https://github.com/tektoncd/pipeline/blob/main/docs/workspaces.md#affinity-assistant-and-specifying-workspace-order-in-a-pipeline)
or more info [here](https://github.com/tektoncd/pipeline/pull/2630).


- `disable-home-env-overwrite` (Default: `true`)

Setting this flag to "false" will allow Tekton to override your Task container's $HOME environment variable.

See more info [here](https://github.com/tektoncd/pipeline/issues/2013).


- `disable-working-directory-overwrite` (Default: `true`)

Setting this flag to "false" will allow Tekton to override your Task container's working directory.

See more info [here](https://github.com/tektoncd/pipeline/issues/1836).


- `disable-creds-init` (Default: `false`)

Setting this flag to "true" will prevent Tekton scanning attached service accounts and injecting any credentials it
Expand Down
11 changes: 7 additions & 4 deletions pkg/apis/operator/v1alpha1/tektonpipeline_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ func (tp *TektonPipeline) SetDefaults(ctx context.Context) {
}

func (p *PipelineProperties) setDefaults() {
if p.DisableHomeEnvOverwrite == nil {
p.DisableHomeEnvOverwrite = ptr.Bool(true)
// Disabling this for now and will be removed in next release
// disabling will hide this from users in TektonConfig/TektonPipeline
if p.DisableHomeEnvOverwrite != nil {
p.DisableHomeEnvOverwrite = nil
}
if p.DisableWorkingDirectoryOverwrite == nil {
p.DisableWorkingDirectoryOverwrite = ptr.Bool(true)
if p.DisableWorkingDirectoryOverwrite != nil {
p.DisableWorkingDirectoryOverwrite = nil
}

if p.DisableCredsInit == nil {
p.DisableCredsInit = ptr.Bool(false)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/apis/operator/v1alpha1/tektonpipeline_defaults_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ func Test_SetDefaults_PipelineProperties(t *testing.T) {
}

properties := PipelineProperties{
DisableHomeEnvOverwrite: ptr.Bool(true),
DisableWorkingDirectoryOverwrite: ptr.Bool(true),
DisableHomeEnvOverwrite: nil,
DisableWorkingDirectoryOverwrite: nil,
DisableCredsInit: ptr.Bool(false),
RunningInEnvironmentWithInjectedSidecars: ptr.Bool(true),
RequireGitSshSecretKnownHosts: ptr.Bool(false),
Expand Down
10 changes: 7 additions & 3 deletions pkg/apis/operator/v1alpha1/tektonpipeline_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ type Pipeline struct {

// PipelineProperties defines customizable flags for Pipeline Component.
type PipelineProperties struct {
DisableAffinityAssistant *bool `json:"disable-affinity-assistant,omitempty"`
DisableHomeEnvOverwrite *bool `json:"disable-home-env-overwrite,omitempty"`
DisableWorkingDirectoryOverwrite *bool `json:"disable-working-directory-overwrite,omitempty"`
DisableAffinityAssistant *bool `json:"disable-affinity-assistant,omitempty"`

// DEPRECATED: (Removed in Pipelines v0.33.0): to be removed in next release
DisableHomeEnvOverwrite *bool `json:"disable-home-env-overwrite,omitempty"`
// DEPRECATED: (Removed in Pipelines v0.33.0): to be removed in next release
DisableWorkingDirectoryOverwrite *bool `json:"disable-working-directory-overwrite,omitempty"`

DisableCredsInit *bool `json:"disable-creds-init,omitempty"`
RunningInEnvironmentWithInjectedSidecars *bool `json:"running-in-environment-with-injected-sidecars,omitempty"`
RequireGitSshSecretKnownHosts *bool `json:"require-git-ssh-secret-known-hosts,omitempty"`
Expand Down