diff --git a/deploy/crds/shipwright.io_buildruns.yaml b/deploy/crds/shipwright.io_buildruns.yaml index e6f2a8ca7b..ce0415f6f2 100644 --- a/deploy/crds/shipwright.io_buildruns.yaml +++ b/deploy/crds/shipwright.io_buildruns.yaml @@ -2357,7 +2357,9 @@ spec: be set if it is empty properties: generate: - description: If generates a new ServiceAccount for the build + description: "If generates a new ServiceAccount for the build + \n NOTICE: Generated ServiceAccounts are deprecated, and will + be removed in a future release." type: boolean name: description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names' diff --git a/docs/buildrun.md b/docs/buildrun.md index 7962515c0d..093ac7930e 100644 --- a/docs/buildrun.md +++ b/docs/buildrun.md @@ -165,7 +165,7 @@ spec: name: pipeline ``` -You can also use set the `spec.serviceAccount.generate` path to `true`. This will generate the service account during runtime for you. The name of the generated service account is the name of the BuildRun. +You can also use set the `spec.serviceAccount.generate` path to `true`. This will generate the service account during runtime for you. The name of the generated service account is the name of the BuildRun. **This field is deprecated, and will be removed in a future release.** _**Note**_: When the service account is not defined, the `BuildRun` uses the `pipeline` service account if it exists in the namespace, and falls back to the `default` service account. diff --git a/pkg/apis/build/v1alpha1/buildrun_types.go b/pkg/apis/build/v1alpha1/buildrun_types.go index 850fd17047..3f85bdfec4 100644 --- a/pkg/apis/build/v1alpha1/buildrun_types.go +++ b/pkg/apis/build/v1alpha1/buildrun_types.go @@ -219,6 +219,8 @@ type ServiceAccount struct { // +optional Name *string `json:"name,omitempty"` // If generates a new ServiceAccount for the build + // + // NOTICE: Generated ServiceAccounts are deprecated, and will be removed in a future release. // +optional Generate *bool `json:"generate,omitempty"` }