Skip to content

Commit

Permalink
Fix NodePool.container example manifests
Browse files Browse the repository at this point in the history
- Import tests for NodePool.container are disabled because its
  Terraform ID is not stable, i.e., it acquires an ID in a
  different syntax after it's successfully imported.
- Set the deletion protection for the Cluster.container dependency
  to false.
- Git ignore kubeconfig files at the repo root.
- Add BucketObject.v1beta2.storage example manifest.

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed Apr 21, 2024
1 parent 2242799 commit 535e79b
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ cover.out
/.vendor-new
.DS_Store
.history
kubeconfig

# ignore IDE folders
.vscode/
.idea/

# packages
*.xpkg
*.xpkg
2 changes: 2 additions & 0 deletions examples/container/v1beta1/nodepool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apiVersion: container.gcp.upbound.io/v1beta1
kind: NodePool
metadata:
annotations:
uptest.upbound.io/disable-import: "true"
meta.upbound.io/example-id: container/v1beta1/nodepool
labels:
testing.upbound.io/example-name: nodepool
Expand Down Expand Up @@ -40,6 +41,7 @@ spec:
initialNodeCount: 1
location: us-central1-a
removeDefaultNodePool: true
deletionProtection: false

---

Expand Down
8 changes: 5 additions & 3 deletions examples/container/v1beta2/nodepool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ apiVersion: container.gcp.upbound.io/v1beta2
kind: NodePool
metadata:
annotations:
meta.upbound.io/example-id: container/v1beta1/nodepool
uptest.upbound.io/disable-import: "true"
meta.upbound.io/example-id: container/v1beta2/nodepool
labels:
testing.upbound.io/example-name: nodepool
name: nodepool
Expand All @@ -31,7 +32,7 @@ apiVersion: container.gcp.upbound.io/v1beta2
kind: Cluster
metadata:
annotations:
meta.upbound.io/example-id: container/v1beta1/cluster
meta.upbound.io/example-id: container/v1beta2/cluster
labels:
testing.upbound.io/example-name: nodepool
name: nodepool
Expand All @@ -40,14 +41,15 @@ spec:
initialNodeCount: 1
location: us-central1-a
removeDefaultNodePool: true
deletionProtection: false

---

apiVersion: cloudplatform.gcp.upbound.io/v1beta1
kind: ServiceAccount
metadata:
annotations:
meta.upbound.io/example-id: container/v1beta1/nodepool
meta.upbound.io/example-id: container/v1beta2/nodepool
labels:
testing.upbound.io/example-name: nodepool
name: nodepool
Expand Down
35 changes: 35 additions & 0 deletions examples/storage/v1beta2/bucketobject.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
#
# SPDX-License-Identifier: CC0-1.0

apiVersion: storage.gcp.upbound.io/v1beta2
kind: BucketObject
metadata:
annotations:
meta.upbound.io/example-id: storage/v1beta2/bucketobject
labels:
testing.upbound.io/example-name: bucket-object
name: bucket-object
spec:
forProvider:
bucketSelector:
matchLabels:
testing.upbound.io/example-name: bucket-object
name: bucket-object
content: "Upbound!"
contentType: text/plain

---

apiVersion: storage.gcp.upbound.io/v1beta2
kind: Bucket
metadata:
annotations:
meta.upbound.io/example-id: storage/v1beta2/bucketobject
labels:
testing.upbound.io/example-name: bucket-object
name: bucket-object-${Rand.RFC1123Subdomain}
spec:
forProvider:
location: US
storageClass: MULTI_REGIONAL
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240421001949-b0089fb1a6d5
replace github.com/crossplane/upjet => github.com/ulucinar/upbound-upjet v0.0.0-20240421181917-d6c4f0830109
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ=
github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w=
github.com/ulucinar/upbound-upjet v0.0.0-20240421001949-b0089fb1a6d5 h1:01eG3WG4KKNOvYZIm0BlZJHKpUW41EVaR+2ItgDJU6U=
github.com/ulucinar/upbound-upjet v0.0.0-20240421001949-b0089fb1a6d5/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA=
github.com/ulucinar/upbound-upjet v0.0.0-20240421181917-d6c4f0830109 h1:O8G2Hv9g5su53VdHxhJmTT6OXHyO+sJck5yJ9W+IIEs=
github.com/ulucinar/upbound-upjet v0.0.0-20240421181917-d6c4f0830109/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI=
github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
Expand Down

0 comments on commit 535e79b

Please sign in to comment.