diff --git a/docs/TektonPipeline.md b/docs/TektonPipeline.md index 5e305244b5..e8490d332c 100644 --- a/docs/TektonPipeline.md +++ b/docs/TektonPipeline.md @@ -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 diff --git a/pkg/apis/operator/v1alpha1/tektonpipeline_defaults.go b/pkg/apis/operator/v1alpha1/tektonpipeline_defaults.go index 631f98af69..bc330dd3c6 100644 --- a/pkg/apis/operator/v1alpha1/tektonpipeline_defaults.go +++ b/pkg/apis/operator/v1alpha1/tektonpipeline_defaults.go @@ -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) } diff --git a/pkg/apis/operator/v1alpha1/tektonpipeline_defaults_test.go b/pkg/apis/operator/v1alpha1/tektonpipeline_defaults_test.go index fd813e7242..126fae2e56 100644 --- a/pkg/apis/operator/v1alpha1/tektonpipeline_defaults_test.go +++ b/pkg/apis/operator/v1alpha1/tektonpipeline_defaults_test.go @@ -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), diff --git a/pkg/apis/operator/v1alpha1/tektonpipeline_types.go b/pkg/apis/operator/v1alpha1/tektonpipeline_types.go index 9d3cc5628c..cd9b30f538 100644 --- a/pkg/apis/operator/v1alpha1/tektonpipeline_types.go +++ b/pkg/apis/operator/v1alpha1/tektonpipeline_types.go @@ -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"`