Skip to content

Commit

Permalink
Added service account as a required, immutable field for ClusterExten…
Browse files Browse the repository at this point in the history
…sions

Signed-off-by: Manna Kong <mkong@redhat.com>
  • Loading branch information
makon57 committed Jul 8, 2024
1 parent 235e3d4 commit 748fad8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/v1alpha1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ type ClusterExtensionSpec struct {
//+kubebuilder:Optional
// Preflight defines the configuration of preflight checks.
Preflight *PreflightConfig `json:"preflight,omitempty"`

//+kubebuilder:validation:MaxLength:=48
//+kubebuilder:validation:Pattern:=^[a-z0-9]+(-[a-z0-9]+)*$
// ServiceAccount is used to install and manage content
ServiceAccount string `json:"serviceAccount"`
}

// PreflightConfig holds the configuration for the preflight checks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ spec:
type: boolean
type: object
type: object
serviceAccount:
description: ServiceAccount is used to install and manage content
maxLength: 48
pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
type: string
upgradeConstraintPolicy:
default: Enforce
description: Defines the policy for how to handle upgrade constraints
Expand All @@ -93,6 +98,7 @@ spec:
required:
- installNamespace
- packageName
- serviceAccount
type: object
status:
description: ClusterExtensionStatus defines the observed state of ClusterExtension
Expand Down
2 changes: 2 additions & 0 deletions config/samples/olm_v1alpha1_clusterextension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ spec:
installNamespace: default
packageName: argocd-operator
version: 0.6.0
serviceAccount:
name: argocd-installer

0 comments on commit 748fad8

Please sign in to comment.