Skip to content

Commit 74d3b58

Browse files
committed
added principalinfo field in providerconfig
1 parent 40aad96 commit 74d3b58

File tree

3 files changed

+41
-2
lines changed

3 files changed

+41
-2
lines changed

pkg/apis/providerconfig/v1/types.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ type ProviderConfigSpec struct {
5353
// +kubebuilder:validation:Optional
5454
PSCConnectionID int64 `json:"pscConnectionID"`
5555
NetworkConfig ProviderNetworkConfig `json:"networkConfig"`
56+
// PrincipalInfo contains information about the principal entity associated with this configuration.
57+
// This field is optional.
58+
PrincipalInfo *PrincipalInfo `json:"principalInfo"`
5659
}
5760

5861
// ProviderNetworkConfig specifies the network configuration for the provider config.
@@ -98,3 +101,12 @@ type ProviderConfigList struct {
98101
metav1.ListMeta `json:"metadata"`
99102
Items []ProviderConfig `json:"items"`
100103
}
104+
105+
// PrincipalInfo defines the identity associated with a ProviderConfig (usually Cluster or Tenant),
106+
// This information is sourced from the corresponding Tenant CR or the cluster configuration.
107+
type PrincipalInfo struct {
108+
// A unique and stable identifier for the principal.
109+
// Usecases include: adding tags to the metrics and logs, naming GCP resources.
110+
// +kubebuilder:validation:MinLength=1
111+
ID string `json:"id"`
112+
}

pkg/apis/providerconfig/v1/zz_generated.deepcopy.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/providerconfig/v1/zz_generated.openapi.go

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)