From 32c3d4e01c0a3ad21417602ad9523c6d62e49ac0 Mon Sep 17 00:00:00 2001 From: Rickard von Essen Date: Wed, 9 Oct 2024 12:03:43 +0200 Subject: [PATCH] Update examples Signed-off-by: Rickard von Essen --- .../beyondcorp/v1beta2/appconnection.yaml | 10 +-- .../binaryauthorization/v1beta2/policy.yaml | 12 +-- .../v1beta1/certificatemapentry.yaml | 16 ++-- .../v1beta2/certificate.yaml | 34 +++++++-- .../compute/v1beta2/instancetemplate.yaml | 74 ++++++++++++++++++- 5 files changed, 115 insertions(+), 31 deletions(-) diff --git a/examples/beyondcorp/v1beta2/appconnection.yaml b/examples/beyondcorp/v1beta2/appconnection.yaml index f37ece311..5eee4849d 100644 --- a/examples/beyondcorp/v1beta2/appconnection.yaml +++ b/examples/beyondcorp/v1beta2/appconnection.yaml @@ -14,10 +14,10 @@ metadata: spec: forProvider: applicationEndpoint: - host: foo-host + - host: foo-host port: 8080 - connectors: - - projects/${project.project_id}/locations/us-central1/appConnectors/app-connector + connectorsRefs: + - name: app_connector gateway: appGateway: app-gateway name: my-app-connection @@ -37,8 +37,8 @@ metadata: spec: forProvider: principalInfo: - serviceAccount: - emailSelector: + - serviceAccount: + - emailSelector: matchLabels: testing.upbound.io/example-name: service_account region: us-central1 diff --git a/examples/binaryauthorization/v1beta2/policy.yaml b/examples/binaryauthorization/v1beta2/policy.yaml index ffe0a5cf2..015cf5bae 100644 --- a/examples/binaryauthorization/v1beta2/policy.yaml +++ b/examples/binaryauthorization/v1beta2/policy.yaml @@ -18,10 +18,10 @@ spec: - cluster: us-central1-a.prod-cluster enforcementMode: ENFORCED_BLOCK_AND_AUDIT_LOG evaluationMode: REQUIRE_ATTESTATION - requireAttestationsBy: - - attestor + requireAttestationsByRefs: + - name: attestor defaultAdmissionRule: - enforcementMode: ENFORCED_BLOCK_AND_AUDIT_LOG + - enforcementMode: ENFORCED_BLOCK_AND_AUDIT_LOG evaluationMode: ALWAYS_ALLOW --- @@ -37,7 +37,7 @@ metadata: spec: forProvider: attestationAuthorityNote: - noteReferenceSelector: + - noteReferenceSelector: matchLabels: testing.upbound.io/example-name: note @@ -54,5 +54,5 @@ metadata: spec: forProvider: attestationAuthority: - hint: - humanReadableName: My attestor + - hint: + - humanReadableName: My attestor diff --git a/examples/certificatemanager/v1beta1/certificatemapentry.yaml b/examples/certificatemanager/v1beta1/certificatemapentry.yaml index 4237274db..5f7695d99 100644 --- a/examples/certificatemanager/v1beta1/certificatemapentry.yaml +++ b/examples/certificatemanager/v1beta1/certificatemapentry.yaml @@ -13,8 +13,8 @@ metadata: name: default spec: forProvider: - certificates: - - projects/official-provider-testing/locations/global/certificates/certificate + certificatesRefs: + - name: certificate description: My acceptance test certificate map entry labels: acc-test: "true" @@ -39,12 +39,12 @@ spec: forProvider: description: The default cert managed: - - dnsAuthorizations: - - projects/official-provider-testing/locations/global/dnsAuthorizations/instance - - projects/official-provider-testing/locations/global/dnsAuthorizations/instance2 - domains: - - subdomain2.hashicorptest.com - - subdomain.hashicorptest.com + - dnsAuthorizationsRefs: + - name: instance + - name: instance2 + domainsRefs: + - name: instance + - name: instance2 scope: DEFAULT --- diff --git a/examples/certificatemanager/v1beta2/certificate.yaml b/examples/certificatemanager/v1beta2/certificate.yaml index 1865baf98..afdc14f15 100644 --- a/examples/certificatemanager/v1beta2/certificate.yaml +++ b/examples/certificatemanager/v1beta2/certificate.yaml @@ -7,8 +7,7 @@ kind: Certificate metadata: annotations: meta.upbound.io/example-id: certificatemanager/v1beta2/certificate - upjet.upbound.io/manual-intervention: Certificate requires a real DNS authorization - ID + upjet.upbound.io/manual-intervention: Certificate requires a real DNS authorization ID labels: testing.upbound.io/example-name: default name: default @@ -16,11 +15,15 @@ spec: forProvider: description: The default cert location: global + labels: + env: test managed: - dnsAuthorizations: - - projects/official-provider-testing/locations/global/dnsAuthorizations/default - domains: - - subdomain.hashicorptest.com + - dnsAuthorizationsRefs: + - name: instance + - name: instance2 + domainsRefs: + - name: instance + - name: instance2 scope: DEFAULT --- @@ -31,9 +34,24 @@ metadata: annotations: meta.upbound.io/example-id: certificatemanager/v1beta2/certificate labels: - testing.upbound.io/example-name: default - name: default + testing.upbound.io/example-name: instance + name: instance spec: forProvider: description: The default dnss domain: subdomain.hashicorptest.com + +--- + +apiVersion: certificatemanager.gcp.upbound.io/v1beta1 +kind: DNSAuthorization +metadata: + annotations: + meta.upbound.io/example-id: certificatemanager/v1beta2/certificate + labels: + testing.upbound.io/example-name: instance2 + name: instance2 +spec: + forProvider: + description: The default dnss + domain: subdomain2.hashicorptest.com diff --git a/examples/compute/v1beta2/instancetemplate.yaml b/examples/compute/v1beta2/instancetemplate.yaml index 372b47e23..1c862eda5 100644 --- a/examples/compute/v1beta2/instancetemplate.yaml +++ b/examples/compute/v1beta2/instancetemplate.yaml @@ -17,18 +17,84 @@ spec: disk: - autoDelete: false boot: true + resourcePoliciesRefs: + - name: daily_backup sourceImage: debian-cloud/debian-11 + - autoDelete: false + boot: false + sourceSelector: + matchLabels: + testing.upbound.io/example-name: foobar instanceDescription: Description assigned to instances labels: - environment: dev + foo: bar machineType: e2-medium metadata: - environment: dev + foo: bar + name: appserver-template networkInterface: - - network: default + - networkSelector: + matchLabels: + testing.upbound.io/example-name: example scheduling: - automaticRestart: true + - automaticRestart: true onHostMaintenance: MIGRATE + serviceAccount: + - emailSelector: + matchLabels: + testing.upbound.io/example-name: default + scopes: + - cloud-platform tags: - foo - bar + +--- + +apiVersion: compute.gcp.upbound.io/v1beta2 +kind: Disk +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/instancetemplate + labels: + testing.upbound.io/example-name: foobar + name: foobar +spec: + forProvider: + image: debian-12-bookworm-v20240910 + size: 10 + type: pd-ssd + zone: us-central1-a + +--- + +apiVersion: compute.gcp.upbound.io/v1beta2 +kind: ResourcePolicy +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/instancetemplate + labels: + testing.upbound.io/example-name: daily_backup + name: daily-backup +spec: + forProvider: + region: us-central1 + snapshotSchedulePolicy: + - schedule: + - dailySchedule: + - daysInCycle: 1 + startTime: "04:00" + +--- + +apiVersion: cloudplatform.gcp.upbound.io/v1beta1 +kind: ServiceAccount +metadata: + annotations: + meta.upbound.io/example-id: compute/v1beta2/instancetemplate + labels: + testing.upbound.io/example-name: default + name: default +spec: + forProvider: + displayName: Service Account