Skip to content

Commit

Permalink
Add: labels for GCP resources
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Lamirault <[email protected]>
  • Loading branch information
nlamirault committed Oct 1, 2021
1 parent 90d3e19 commit 2ec52a4
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 1 deletion.
2 changes: 2 additions & 0 deletions krm/gcp/bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ spec:
storageClass: MULTI_REGIONAL
providerConfigRef:
name: portefaix-gcp
labels:
made-by: crossplane
deletionPolicy: Delete
---
apiVersion: storage.gcp.crossplane.io/v1alpha1
Expand Down
1 change: 1 addition & 0 deletions krm/gcp/firewall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
name: portefaix-krm-gcp
spec:
forProvider:
description: "Portefaix KRM Crossplane"
allowed:
- IPProtocol: tcp
ports: ["80", "443"]
Expand Down
58 changes: 57 additions & 1 deletion krm/gcp/gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ metadata:
name: portefaix-krm-gcp
spec:
forProvider:
initialClusterVersion: "1.21"
# initialClusterVersion: "1.21"
releaseChannel:
channel: REGULAR
location: eu-west1
masterAuth:
# setting this master auth user name enables basic auth so that a client (e.g.,
Expand Down Expand Up @@ -87,6 +89,9 @@ spec:
imageType: cos_containerd
labels:
made-by: crossplane
tags:
- kubernetes
- nodes
oauthScopes:
- "https://www.googleapis.com/auth/devstorage.read_only"
- "https://www.googleapis.com/auth/logging.write"
Expand All @@ -97,6 +102,9 @@ spec:
initialNodeCount: 1
locations:
- "eu-west1-b"
management:
autoRepair: true
autoUpgrade: true
providerConfigRef:
name: portefaix-gcp
---
Expand All @@ -122,6 +130,9 @@ spec:
imageType: cos_containerd
labels:
made-by: crossplane
tags:
- kubernetes
- nodes
oauthScopes:
- "https://www.googleapis.com/auth/devstorage.read_only"
- "https://www.googleapis.com/auth/logging.write"
Expand All @@ -132,5 +143,50 @@ spec:
initialNodeCount: 0
locations:
- "eu-west1-b"
management:
autoRepair: true
autoUpgrade: true
providerConfigRef:
name: portefaix-gcp
---
apiVersion: container.gcp.crossplane.io/v1beta1
kind: NodePool
metadata:
name: portefaix-krm-gcp-misc
spec:
forProvider:
autoscaling:
autoprovisioned: false
enabled: true
maxNodeCount: 3
minNodeCount: 0
clusterRef:
name: portefaix-krm-gcp
config:
machineType: n1-standard-1
sandboxConfig:
type: gvisor
diskSizeGb: 120
diskType: pd-ssd
imageType: cos_containerd
labels:
made-by: crossplane
tags:
- kubernetes
- nodes
preemptible: true
oauthScopes:
- "https://www.googleapis.com/auth/devstorage.read_only"
- "https://www.googleapis.com/auth/logging.write"
- "https://www.googleapis.com/auth/monitoring"
- "https://www.googleapis.com/auth/servicecontrol"
- "https://www.googleapis.com/auth/service.management.readonly"
- "https://www.googleapis.com/auth/trace.append"
initialNodeCount: 0
locations:
- "eu-west1-b"
management:
autoRepair: true
autoUpgrade: true
providerConfigRef:
name: portefaix-gcp
8 changes: 8 additions & 0 deletions krm/gcp/labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@ labels:
fieldSpecs:
- path: metadata/labels
create: true
- kind: CloudMemorystoreInstance
apiVersion: cache.gcp.crossplane.io/v1beta1
path: spec/forProvider/labels
create: true
- kind: NodePool
apiVersion: container.gcp.crossplane.io/v1beta1
path: spec/forProvider/config/labels
create: true
- kind: Topic
apiVersion: pubsub.gcp.crossplane.io/v1alpha1
path: spec/forProvider/labels
create: true
3 changes: 3 additions & 0 deletions krm/gcp/memorystore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ metadata:
name: portefaix-krm-gcp
spec:
forProvider:
displayName: portefaix-krm-crossplane
tier: STANDARD_HA
region: eu-west1
memorySizeGb: 1
labels:
made-by: crossplane
providerRef:
name: portefaix-gcp
writeConnectionSecretToRef:
Expand Down
1 change: 1 addition & 0 deletions krm/gcp/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
name: portefaix-krm-gcp
spec:
forProvider:
description: "Portefaix KRM Crossplane"
autoCreateSubnetworks: false
routingConfig:
routingMode: REGIONAL
Expand Down
1 change: 1 addition & 0 deletions krm/gcp/subnetwork.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metadata:
name: portefaix-krm-gcp
spec:
forProvider:
description: "Portefaix KRM Crossplane"
region: eu-west1
ipCidrRange: "192.168.0.0/24"
privateIpGoogleAccess: true
Expand Down

0 comments on commit 2ec52a4

Please sign in to comment.