forked from GoogleCloudPlatform/k8s-config-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add test to validate resource schema
- Loading branch information
Showing
36 changed files
with
1,345 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: iam.cnrm.cloud.google.com/v1beta1 | ||
kind: IAMPolicy | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/deletion-policy: abandon | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 1 | ||
labels: | ||
cnrm-test: "true" | ||
name: iamexternalonlyref-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
bindings: | ||
- members: | ||
- group:[email protected] | ||
- serviceAccount:[email protected] | ||
- user:[email protected] | ||
role: roles/billing.admin | ||
resourceRef: | ||
apiVersion: billing.cnrm.cloud.google.com/v1beta1 | ||
external: 123456-777777-000002 | ||
kind: BillingAccount | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 1 |
28 changes: 28 additions & 0 deletions
28
tests/e2e/golden/object/billingaccountiampolicymember.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: iam.cnrm.cloud.google.com/v1beta1 | ||
kind: IAMPolicyMember | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 1 | ||
labels: | ||
cnrm-test: "true" | ||
name: iamexternalonlyref-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
member: serviceAccount:extonly-${uniqueId}@${projectId}.iam.gserviceaccount.com | ||
resourceRef: | ||
apiVersion: billing.cnrm.cloud.google.com/v1beta1 | ||
external: 123456-777777-000001 | ||
kind: BillingAccount | ||
role: roles/billing.viewer | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: compute.cnrm.cloud.google.com/v1beta1 | ||
kind: ComputeDisk | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/observed-secret-versions: (removed) | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
name: computedisk-1-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
description: an example disk from source disk | ||
location: us-central1-a | ||
physicalBlockSizeBytes: 4096 | ||
projectRef: | ||
external: ${projectId} | ||
resourceID: computedisk-1-${uniqueId} | ||
sourceDiskRef: | ||
name: computedisk-2-${uniqueId} | ||
type: pd-standard | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
creationTimestamp: "1970-01-01T00:00:00Z" | ||
observedGeneration: 2 | ||
selfLink: https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-a/disks/computedisk-1-${uniqueId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apiVersion: compute.cnrm.cloud.google.com/v1beta1 | ||
kind: ComputeNetwork | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/project-id: ${projectId} | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 3 | ||
labels: | ||
cnrm-test: "true" | ||
label-one: value-one | ||
name: computenetwork-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
autoCreateSubnetworks: false | ||
networkFirewallPolicyEnforcementOrder: AFTER_CLASSIC_FIREWALL | ||
resourceID: computenetwork-${uniqueId} | ||
routingMode: GLOBAL | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 3 | ||
selfLink: https://compute.googleapis.com/compute/v1/projects/${projectId}/global/networks/computenetwork-${uniqueId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: compute.cnrm.cloud.google.com/v1beta1 | ||
kind: ComputeNodeGroup | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/project-id: ${projectId} | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
name: computenodegroup-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
description: A single sole-tenant node in the us-central1-b zone. | ||
maintenancePolicy: DEFAULT | ||
nodeTemplateRef: | ||
name: computenodetemplate-${uniqueId} | ||
resourceID: computenodegroup-${uniqueId} | ||
size: 1 | ||
zone: us-central1-b | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
creationTimestamp: "1970-01-01T00:00:00Z" | ||
observedGeneration: 2 | ||
selfLink: https://compute.googleapis.com/compute/v1/projects/${projectId}/zones/us-central1-b/nodeGroups/computenodegroup-${uniqueId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
apiVersion: compute.cnrm.cloud.google.com/v1beta1 | ||
kind: ComputeNodeTemplate | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/project-id: ${projectId} | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
memory_guarantee: "false" | ||
name: computenodetemplate-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
cpuOvercommitType: NONE | ||
description: Node template for sole tenant nodes running in us-central1, with 96vCPUs | ||
and any amount of memory on any machine type. | ||
nodeTypeFlexibility: | ||
cpus: "96" | ||
memory: any | ||
region: us-central1 | ||
resourceID: computenodetemplate-${uniqueId} | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
creationTimestamp: "1970-01-01T00:00:00Z" | ||
observedGeneration: 2 | ||
selfLink: https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/nodeTemplates/computenodetemplate-${uniqueId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
apiVersion: compute.cnrm.cloud.google.com/v1beta1 | ||
kind: ComputeSubnetwork | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/project-id: ${projectId} | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 3 | ||
labels: | ||
cnrm-test: "true" | ||
label-one: value-one | ||
name: computesubnetwork-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
ipCidrRange: 10.2.0.0/16 | ||
networkRef: | ||
name: computenetwork-${uniqueId} | ||
privateIpGoogleAccess: true | ||
region: us-central1 | ||
resourceID: computesubnetwork-${uniqueId} | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
creationTimestamp: "1970-01-01T00:00:00Z" | ||
observedGeneration: 3 | ||
selfLink: https://compute.googleapis.com/compute/v1/projects/${projectId}/regions/us-central1/subnetworks/computesubnetwork-${uniqueId} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: containerattached.cnrm.cloud.google.com/v1beta1 | ||
kind: ContainerAttachedCluster | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/mutable-but-unreadable-fields: '{"spec":{"deletionPolicy":"DELETE_IGNORE_ERRORS"}}' | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
name: containerattachedcluster-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
deletionPolicy: DELETE_IGNORE_ERRORS | ||
description: Test attached cluster update | ||
distribution: eks | ||
fleet: | ||
projectRef: | ||
name: project-${uniqueId} | ||
location: us-west1 | ||
oidcConfig: | ||
issuerUrl: https://oidc.eks.us-west-2.amazonaws.com/id/A115FE1C770C2452C75219524036FC0F | ||
platformVersion: 1.27.0-gke.2 | ||
projectRef: | ||
external: ${projectId} | ||
resourceID: kcc-attached-cluster-127 | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 2 | ||
state: STATE_UNSPECIFIED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
apiVersion: edgecontainer.cnrm.cloud.google.com/v1beta1 | ||
kind: EdgeContainerCluster | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
label-one: value-one | ||
label-two: value-two | ||
name: edgecontainercluster-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
authorization: | ||
adminUsers: | ||
usernameRef: | ||
name: gsa-${uniqueId} | ||
fleet: | ||
projectRef: | ||
name: project-${uniqueId} | ||
location: us-central1 | ||
networking: | ||
clusterIpv4CidrBlocks: | ||
- 10.0.0.0/16 | ||
servicesIpv4CidrBlocks: | ||
- 10.1.0.0/16 | ||
projectRef: | ||
external: ${projectId} | ||
resourceID: edgecontainercluster-${uniqueId} | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: edgecontainer.cnrm.cloud.google.com/v1beta1 | ||
kind: EdgeContainerNodePool | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
label-one: value-one | ||
name: edgecontainernodepools-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
clusterRef: | ||
name: edgecontainercluster-${uniqueId} | ||
location: us-central1 | ||
nodeCount: 1 | ||
nodeLocation: edge-site-node-123 | ||
projectRef: | ||
external: ${projectId} | ||
resourceID: edgecontainernodepools-${uniqueId} | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
observedGeneration: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: edgenetwork.cnrm.cloud.google.com/v1beta1 | ||
kind: EdgeNetworkNetwork | ||
metadata: | ||
annotations: | ||
cnrm.cloud.google.com/management-conflict-prevention-policy: none | ||
cnrm.cloud.google.com/state-into-spec: merge | ||
finalizers: | ||
- cnrm.cloud.google.com/finalizer | ||
- cnrm.cloud.google.com/deletion-defender | ||
generation: 2 | ||
labels: | ||
cnrm-test: "true" | ||
label-one: value-one | ||
name: edgenetworknetwork-${uniqueId} | ||
namespace: ${uniqueId} | ||
spec: | ||
description: Basic Network | ||
location: us-central1 | ||
mtu: 9000 | ||
projectRef: | ||
external: ${projectId} | ||
resourceID: edgenetworknetwork-${uniqueId} | ||
zone: us-central1-test-zone | ||
status: | ||
conditions: | ||
- lastTransitionTime: "1970-01-01T00:00:00Z" | ||
message: The resource is up to date | ||
reason: UpToDate | ||
status: "True" | ||
type: Ready | ||
name: projects/${projectId}/locations/us-central1/zones/us-central1-test-zone/networks/edgenetworknetwork-${uniqueId} | ||
observedGeneration: 2 |
Oops, something went wrong.