Skip to content

Commit

Permalink
Deprecate Generated Service Accounts
Browse files Browse the repository at this point in the history
Deprecate the generated service account behavior. This feature will
eventually be removed from Shipwright.
  • Loading branch information
adambkaplan committed Sep 7, 2022
1 parent 5eaca8a commit e1bbd1f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion deploy/crds/shipwright.io_buildruns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion docs/buildrun.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/build/v1alpha1/buildrun_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
Expand Down

0 comments on commit e1bbd1f

Please sign in to comment.