v1beta1

package
v1.123.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocation added in v1.122.0

func GetLocation(u *unstructured.Unstructured) (string, error)

func GetResourceID added in v1.121.0

func GetResourceID(u *unstructured.Unstructured) (string, error)

func ResolveProjectID added in v1.121.0

func ResolveProjectID(ctx context.Context, reader client.Reader, obj *unstructured.Unstructured) (string, error)

Types

type BigQueryDataset added in v1.123.0

type BigQueryDataset struct {
	// contains filtered or unexported fields
}

func ResolveBigQueryDataset added in v1.123.0

func ResolveBigQueryDataset(ctx context.Context, reader client.Reader, src client.Object, ref *BigQueryDatasetRef) (*BigQueryDataset, error)

func (*BigQueryDataset) GetDatasetID added in v1.123.0

func (d *BigQueryDataset) GetDatasetID() string

func (*BigQueryDataset) String added in v1.123.0

func (d *BigQueryDataset) String() string

type BigQueryDatasetRef added in v1.122.0

type BigQueryDatasetRef struct {
	// If provided must be in the format `projects/[project_id]/datasets/[dataset_id]`.
	External string `json:"external,omitempty"`
	// The `metadata.name` field of a `BigQueryDataset` resource.
	Name string `json:"name,omitempty"`
	// The `metadata.namespace` field of a `BigQueryDataset` resource.
	Namespace string `json:"namespace,omitempty"`
}

type ComputeAddressRef added in v1.121.0

type ComputeAddressRef struct {
	/* The ComputeAddress selflink in the form "projects/{{project}}/regions/{{region}}/addresses/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeAddress` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeAddress` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeBackendServiceRef added in v1.121.0

type ComputeBackendServiceRef struct {
	/* The ComputeBackendService selflink in the form "projects/{{project}}/global/backendServices/{{name}}" or "projects/{{project}}/regions/{{region}}/backendServices/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeBackendService` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeBackendService` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeNetwork added in v1.121.0

type ComputeNetwork struct {
	Project          string
	ComputeNetworkID string
}

func ResolveComputeNetwork added in v1.121.0

func ResolveComputeNetwork(ctx context.Context, reader client.Reader, src client.Object, ref *ComputeNetworkRef) (*ComputeNetwork, error)

func (*ComputeNetwork) String added in v1.121.0

func (c *ComputeNetwork) String() string

type ComputeNetworkRef added in v1.119.0

type ComputeNetworkRef struct {
	// A reference to an externally managed Compute Network resource.
	// Should be in the format `projects/<projectID>/global/networks/<network>`.
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeNetwork` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeNetwork` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeServiceAttachmentRef added in v1.121.0

type ComputeServiceAttachmentRef struct {
	/* The ComputeServiceAttachment selflink in the form "projects/{{project}}/regions/{{region}}/serviceAttachments/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeServiceAttachment` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeServiceAttachment` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeSubnetworkRef added in v1.121.0

type ComputeSubnetworkRef struct {
	/* The ComputeSubnetwork selflink of form "projects/{{project}}/regions/{{region}}/subnetworks/{{name}}", when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeSubnetwork` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeSubnetwork` resource. */
	Namespace string `json:"namespace,omitempty"`
}

func ResolveComputeSubnetwork added in v1.122.0

func ResolveComputeSubnetwork(ctx context.Context, reader client.Reader, src client.Object, ref *ComputeSubnetworkRef) (*ComputeSubnetworkRef, error)

type ComputeTargetGrpcProxyRef added in v1.121.0

type ComputeTargetGrpcProxyRef struct {
	/* The ComputeTargetGrpcProxy selflink in the form "projects/{{project}}/global/targetGrpcProxies/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeTargetGrpcProxy` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeTargetGrpcProxy` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeTargetHTTPProxyRef added in v1.121.0

type ComputeTargetHTTPProxyRef struct {
	/* The ComputeTargetHTTPProxy selflink in the form "projects/{{project}}/global/targetHttpProxies/{{name}}" or "projects/{{project}}/regions/{{region}}/targetHttpProxies/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeTargetHTTPProxy` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeTargetHTTPProxy` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeTargetHTTPSProxyRef added in v1.121.0

type ComputeTargetHTTPSProxyRef struct {
	/* The ComputeTargetHTTPSProxy selflink in the form "projects/{{project}}/global/targetHttpProxies/{{name}}" or "projects/{{project}}/regions/{{region}}/targetHttpProxies/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeTargetHTTPSProxy` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeTargetHTTPSProxy` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeTargetSSLProxyRef added in v1.121.0

type ComputeTargetSSLProxyRef struct {
	/* The ComputeTargetSSLProxy selflink in the form "projects/{{project}}/global/targetSslProxies/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeTargetSSLProxy` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeTargetSSLProxy` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeTargetTCPProxyRef added in v1.121.0

type ComputeTargetTCPProxyRef struct {
	/* The ComputeTargetTCPProxy selflink in the form "projects/{{project}}/global/targetTcpProxies/{{name}}" or "projects/{{project}}/regions/{{region}}/targetTcpProxies/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeTargetTCPProxy` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeTargetTCPProxy` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ComputeTargetVPNGatewayRef added in v1.121.0

type ComputeTargetVPNGatewayRef struct {
	/* The ComputeTargetVPNGateway selflink in the form "projects/{{project}}/regions/{{region}}/targetVpnGateways/{{name}}" when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `ComputeTargetVPNGateway` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `ComputeTargetVPNGateway` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type ExternalNormalizer added in v1.123.0

type ExternalNormalizer interface {
	// NormalizeToExternalForm expects the implemented struct has a "External" field, and this function
	// assigns a value to the "External" field if it is empty.
	// In general, it retrieves the corresponding ConfigConnector object from the cluster, using
	// the `status.externalRef` or other field as the "External" value
	NormalizeToExternalForm(context.Context, client.Reader) error
}

type FeatureProjectRef added in v1.119.0

type FeatureProjectRef struct {
	/* The project of the feature. Allowed value: The Google Cloud resource name of a `Project` resource (format: `projects/{{name}}`).*/
	External string `json:"external,omitempty"`
	/* Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */
	Name string `json:"name,omitempty"`
	/* Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */
	Namespace string `json:"namespace,omitempty"`
}

type FeatureRef added in v1.119.0

type FeatureRef struct {
	/* The name of the feature. Allowed value: The Google Cloud resource name of a `GKEHubFeature` resource (format: `projects/{{project}}/locations/{{location}}/features/{{name}}`). */
	External string `json:"external,omitempty"`
	/* Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */
	Name string `json:"name,omitempty"`
	/* Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */
	Namespace string `json:"namespace,omitempty"`
}

type IAMServiceAccountRef added in v1.120.0

type IAMServiceAccountRef struct {
	/* The `email` field of an `IAMServiceAccount` resource. */
	External string `json:"external,omitempty"`
	/* Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */
	Name string `json:"name,omitempty"`
	/* Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */
	Namespace string `json:"namespace,omitempty"`
}

func (*IAMServiceAccountRef) Resolve added in v1.120.0

func (r *IAMServiceAccountRef) Resolve(ctx context.Context, reader client.Reader, src client.Object) error

type KMSCryptoKey added in v1.122.0

type KMSCryptoKey struct {
	Ref        *KMSCryptoKeyRef
	ResourceID string
}

type KMSCryptoKeyRef added in v1.121.0

type KMSCryptoKeyRef struct {
	// A reference to an externally managed KMSCryptoKey.
	// Should be in the format `projects/[kms_project_id]/locations/[region]/keyRings/[key_ring_id]/cryptoKeys/[key]`.
	External string `json:"external,omitempty"`

	// The `name` of a `KMSCryptoKey` resource.
	Name string `json:"name,omitempty"`
	// The `namespace` of a `KMSCryptoKey` resource.
	Namespace string `json:"namespace,omitempty"`
}

func ResolveKMSCryptoKeyRef added in v1.122.0

func ResolveKMSCryptoKeyRef(ctx context.Context, reader client.Reader, src client.Object, ref *KMSCryptoKeyRef) (*KMSCryptoKeyRef, error)

ResolveKMSCryptoKeyRef will resolve a KMSCryptoKeyRef to a KMSCryptoKey.

type KMSKeyRing added in v1.122.0

type KMSKeyRing struct {
	Ref        *KMSKeyRingRef
	ResourceID string
	Location   string
}

func ResolveKMSKeyRingRef added in v1.122.0

func ResolveKMSKeyRingRef(ctx context.Context, reader client.Reader, src client.Object, ref *KMSKeyRingRef) (*KMSKeyRing, error)

ResolveKMSKeyRingRef will resolve a KMSKeyRingRef to a KMSKeyRing.

func ResolveKeyRingForObject added in v1.122.0

func ResolveKeyRingForObject(ctx context.Context, reader client.Reader, obj *unstructured.Unstructured) (*KMSKeyRing, error)

type KMSKeyRingRef added in v1.122.0

type KMSKeyRingRef struct {
	//  If provided must be in the format `projects/[kms_project_id]/locations/[region]/keyRings/[key_ring_id]`.
	External string `json:"external,omitempty"`
	// The `name` field of a `KMSKeyRing` resource.
	Name string `json:"name,omitempty"`
	// The `metadata.namespace` field of a `KMSKeyRing` resource.
	Namespace string `json:"namespace,omitempty"`
}

type MembershipRef added in v1.119.0

type MembershipRef struct {
	/* The name of the membership. Allowed value: The Google Cloud resource name of a `GKEHubMembership` resource (format: `projects/{{project}}/locations/{{location}}/memberships/{{name}}`).*/
	External string `json:"external,omitempty"`
	/* Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */
	Name string `json:"name,omitempty"`
	/* Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */
	Namespace string `json:"namespace,omitempty"`
}

type MetricsGcpServiceAccountRef added in v1.119.0

type MetricsGcpServiceAccountRef struct {
	/* The Email of the Google Cloud Service Account (GSA) used for exporting Config Sync metrics to Cloud Monitoring. The GSA should have the Monitoring Metric Writer(roles/monitoring.metricWriter) IAM role. The Kubernetes ServiceAccount `default` in the namespace `config-management-monitoring` should be bound to the GSA. Allowed value: The `email` field of an `IAMServiceAccount` resource. */
	External string `json:"external,omitempty"`
	/* Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names */
	Name string `json:"name,omitempty"`
	/* Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ */
	Namespace string `json:"namespace,omitempty"`
}

func (*MetricsGcpServiceAccountRef) Resolve added in v1.120.0

type MonitoringAlertPolicyRef added in v1.120.0

type MonitoringAlertPolicyRef struct {
	/* The MonitoringAlertPolicy link in the form "projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID]", when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `MonitoringAlertPolicy` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `MonitoringAlertPolicy` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type Project added in v1.121.0

type Project struct {
	ProjectID string
}

func ResolveProject added in v1.121.0

func ResolveProject(ctx context.Context, reader client.Reader, src client.Object, ref *ProjectRef) (*Project, error)

ResolveProject will resolve a ProjectRef to a Project, with the ProjectID.

func ResolveProjectFromAnnotation added in v1.122.0

func ResolveProjectFromAnnotation(ctx context.Context, reader client.Reader, src client.Object) (*Project, error)

ResolveProjectFromAnnotation resolves the projectID to use for a resource, it should be used for resources which do not have a projectRef

type ProjectRef

type ProjectRef struct {
	/* The `projectID` field of a project, when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `Project` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `Project` resource. */
	Namespace string `json:"namespace,omitempty"`
	// The kind of the Project resource; optional but must be `Project` if provided.
	// +optional
	Kind string `json:"kind,omitempty"`
}

The Project that this resource belongs to.

func AsProjectRef added in v1.121.0

func AsProjectRef(in *v1alpha1.ResourceRef) *ProjectRef

AsProjectRef converts a generic ResourceRef into a ProjectRef

type PubSubTopic added in v1.123.0

type PubSubTopic struct {
	// contains filtered or unexported fields
}

func ResolvePubSubTopic added in v1.123.0

func ResolvePubSubTopic(ctx context.Context, reader client.Reader, src client.Object, ref *PubSubTopicRef) (*PubSubTopic, error)

func (*PubSubTopic) String added in v1.123.0

func (t *PubSubTopic) String() string

type PubSubTopicRef added in v1.122.0

type PubSubTopicRef struct {
	// If provided must be in the format `projects/[project_id]/topics/[topic_id]`.
	External string `json:"external,omitempty"`
	// The `metadata.name` field of a `PubSubTopic` resource.
	Name string `json:"name,omitempty"`
	// The `metadata.namespace` field of a `PubSubTopic` resource.
	Namespace string `json:"namespace,omitempty"`
}

type SQLInstanceRef added in v1.122.0

type SQLInstanceRef struct {
	/* The SQLInstance selfLink, when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `SQLInstance` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `SQLInstance` resource. */
	Namespace string `json:"namespace,omitempty"`
}

type SecretManagerSecret added in v1.122.0

type SecretManagerSecret struct {
	Ref        *SecretManagerSecretRef
	ResourceID string
}

func ResolveSecretIDForObject added in v1.122.0

func ResolveSecretIDForObject(ctx context.Context, reader client.Reader, obj *unstructured.Unstructured) (*SecretManagerSecret, error)

func ResolveSecretManagerSecretRef added in v1.122.0

func ResolveSecretManagerSecretRef(ctx context.Context, reader client.Reader, src client.Object, ref *SecretManagerSecretRef) (*SecretManagerSecret, error)

ResolveSecretManagerSecretRef will resolve a partial SecretManagerSecretRef to a SecretManagerSecret.

type SecretManagerSecretRef added in v1.122.0

type SecretManagerSecretRef struct {
	//  If provided must be in the format `projects/*/secrets/*`.
	External string `json:"external,omitempty"`
	// The `name` field of a `SecretManagerSecret` resource.
	Name string `json:"name,omitempty"`
	// The `metadata.namespace` field of a `SecretManagerSecret` resource.
	Namespace string `json:"namespace,omitempty"`
}

type SecretManagerSecretVersionRef added in v1.122.0

type SecretManagerSecretVersionRef struct {
	//  If provided must be in the format `projects/*/secrets/*/versions/*`.
	External string `json:"external,omitempty"`
	// The `name` field of a `SecretManagerSecretVersion` resource.
	Name string `json:"name,omitempty"`
	// The `metadata.namespace` field of a `SecretManagerSecretVersion` resource.
	Namespace string `json:"namespace,omitempty"`
}

func ResolveSecretManagerSecretVersionRef added in v1.122.0

func ResolveSecretManagerSecretVersionRef(ctx context.Context, reader client.Reader, src client.Object, ref *SecretManagerSecretVersionRef) (*SecretManagerSecretVersionRef, error)

ResolveSecretManagerSecretVersionRef will resolve a SecretManagerSecretVersionRef to a SecretManagerSecretVersion.

type StorageBucketRef added in v1.122.0

type StorageBucketRef struct {
	/* The StorageBucket selfLink, when not managed by Config Connector. */
	External string `json:"external,omitempty"`
	/* The `name` field of a `StorageBucket` resource. */
	Name string `json:"name,omitempty"`
	/* The `namespace` field of a `StorageBucket` resource. */
	Namespace string `json:"namespace,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL