Skip to content

Commit

Permalink
update samples for version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeya Zhang committed Oct 15, 2019
1 parent baa0f26 commit 0620d6b
Show file tree
Hide file tree
Showing 52 changed files with 290 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ spec:
template:
spec:
containers:
- name: web
env:
- name: DB_USER
value: root-prod
- name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ spec:
template:
spec:
containers:
- env:
- name: web
env:
- name: DB_HOST
value: mysql-test:3306
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: db-info
key: password
name: web
11 changes: 0 additions & 11 deletions resources/computeaddress/compute_v1alpha1_computeaddress.yaml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeAddress
metadata:
name: globalcomputeaddress-sample
labels:
label-one: "value-one"
spec:
addressType: INTERNAL
description: a test global address
location: global
ipVersion: IPV4
purpose: VPC_PEERING
prefixLength: 16
networkRef:
name: globalcomputeaddress-dep
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: computeaddress-dep
name: globalcomputeaddress-dep
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeAddress
metadata:
name: regionalcomputeaddress-sample
labels:
label-one: "value-one"
spec:
addressType: INTERNAL
description: a test regional address
location: us-central1
ipVersion: IPV6
subnetworkRef:
name: regionalcomputeaddress-dep
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: regionalcomputeaddress-dep
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeSubnetwork
metadata:
name: regionalcomputeaddress-dep
spec:
ipCidrRange: 10.2.0.0/16
region: us-central1
networkRef:
name: regionalcomputeaddress-dep

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeBackendService
metadata:
name: computebackendservice-sample
spec:
healthCheckRef:
name: computebackendservice-dep
location: global
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeHealthCheck
metadata:
name: computebackendservice-dep
spec:
checkIntervalSec: 10
httpHealthCheck:
port: 80
location: global
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeFirewall
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: computefirewall-allow-dep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeFirewall
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: computefirewall-deny-dep
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeBackendService
metadata:
name: computeglobalforwardingrule-dep
spec:
healthCheckRef:
name: computeglobalforwardingrule-dep
location: global
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
kind: ComputeGlobalForwardingRule
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeForwardingRule
metadata:
labels:
label-one: "value-one"
Expand All @@ -9,6 +9,6 @@ spec:
targetRef:
name: computeglobalforwardingrule-dep
portRange: "80"
loadBalancingScheme: "INTERNAL_SELF_MANAGED"
ipProtocol: "TCP"
ipVersion: "IPV4"
location: global
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeHealthCheck
metadata:
name: computeglobalforwardingrule-dep
spec:
checkIntervalSec: 10
httpHealthCheck:
port: 80
location: global
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeTargetHTTPProxy
metadata:
name: computeglobalforwardingrule-dep
spec:
urlMapRef:
name: computeglobalforwardingrule-dep
location: global
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeURLMap
metadata:
name: computeglobalforwardingrule-dep
spec:
defaultService:
backendServiceRef:
name: computeglobalforwardingrule-dep
kind: ComputeBackendService
location: global

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeHealthCheck
metadata:
name: computehealthcheck-sample
spec:
checkIntervalSec: 10
httpHealthCheck:
port: 80
location: global
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeHTTPSHealthCheck
metadata:
name: computehttpshealthcheck-sample
spec:
checkIntervalSec: 10
description: example HTTPS health check
healthyThreshold: 2
port: 80
requestPath: /
timeoutSec: 5
unhealthyThreshold: 2

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: computenetworkpeering-dep1
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
---
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: computenetworkpeering-dep2
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetworkPeering
metadata:
name: computenetworkpeering-peering1
spec:
autoCreateRoutes: true
exportCustomRoutes: false
importCustomRoutes: false
networkRef:
name: computenetworkpeering-dep1
peerNetworkRef:
name: computenetworkpeering-dep2
---
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetworkPeering
metadata:
name: computenetworkpeering-peering2
spec:
autoCreateRoutes: true
exportCustomRoutes: false
importCustomRoutes: false
networkRef:
name: computenetworkpeering-dep2
peerNetworkRef:
name: computenetworkpeering-dep1
9 changes: 9 additions & 0 deletions resources/computerouter/compute_v1alpha2_computenetwork.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
labels:
label-one: "value-one"
name: computerouter-dep
spec:
routingMode: REGIONAL
autoCreateSubnetworks: false
16 changes: 16 additions & 0 deletions resources/computerouter/compute_v1alpha2_computerouter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeRouter
metadata:
name: computerouter-sample
spec:
networkRef:
name: computerouter-dep
description: example router description
region: us-west1
bgp:
asn: 64514
advertiseMode: CUSTOM
advertisedGroups:
- ALL_SUBNETS
advertisedIpRanges:
- range: "1.2.3.4"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This resource will enable the project this namespace is bound to as a Shared
# VPC host. You should only create one of these resources per project. If you
# have multiple namespaces mapping to the same project, ensure that only one
# ComputeSharedVPCHostProject resource exists across these namespaces.
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeSharedVPCHostProject
metadata:
name: computesharedvpchostproject-sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeNetwork
metadata:
name: computesubnetwork-dep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: compute.cnrm.cloud.google.com/v1alpha1
apiVersion: compute.cnrm.cloud.google.com/v1alpha2
kind: ComputeSubnetwork
metadata:
labels:
Expand Down

This file was deleted.

Loading

0 comments on commit 0620d6b

Please sign in to comment.