Skip to content

Commit

Permalink
Document the spec.hubTemplateOptions.serviceAccountName field
Browse files Browse the repository at this point in the history
  • Loading branch information
mprahl authored and openshift-merge-bot[bot] committed Sep 17, 2024
1 parent e5ef033 commit 166702f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1/policy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ type PolicyDependency struct {
}

type HubTemplateOptions struct {
// ServiceAccountName is the name of a service account in the same namespace as the policy to use for all hub
// template lookups. The service account must have list and watch permissions on any object the hub templates
// look up. If not specified, lookups are restricted to namespaced objects in the same namespace as the policy and
// to the `ManagedCluster` object associated with the propagated policy.
ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ spec:
templates.
properties:
serviceAccountName:
description: |-
ServiceAccountName is the name of a service account in the same namespace as the policy to use for all hub
template lookups. The service account must have list and watch permissions on any object the hub templates
look up. If not specified, lookups are restricted to namespaced objects in the same namespace as the policy and
to the `ManagedCluster` object associated with the propagated policy.
type: string
type: object
policy-templates:
Expand Down
5 changes: 5 additions & 0 deletions deploy/crds/policy.open-cluster-management.io_policies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ spec:
templates.
properties:
serviceAccountName:
description: >-
ServiceAccountName is the name of a service account in the same namespace as the policy to use for all hub
template lookups. The service account must have list and watch permissions on any object the hub templates
look up. If not specified, lookups are restricted to namespaced objects in the same namespace as the policy and
to the `ManagedCluster` object associated with the propagated policy.
type: string
type: object
policy-templates:
Expand Down

0 comments on commit 166702f

Please sign in to comment.