From 6f8ffe148a4208024fe8e96187dfa627f3461e21 Mon Sep 17 00:00:00 2001 From: Gleb Otochkin Date: Mon, 26 Aug 2024 10:29:53 -0400 Subject: [PATCH] chore: added yaml files for service account and the service b/357864986 (#701) added yaml with tags to be used as samples in docs --- .../k8s-sidecar/proxy_sidecar_deployment.yaml | 2 ++ examples/k8s-sidecar/service-account.yaml | 20 ++++++++++++++ examples/k8s-sidecar/service.yaml | 27 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 examples/k8s-sidecar/service-account.yaml create mode 100644 examples/k8s-sidecar/service.yaml diff --git a/examples/k8s-sidecar/proxy_sidecar_deployment.yaml b/examples/k8s-sidecar/proxy_sidecar_deployment.yaml index a7441339..7ca27a8d 100644 --- a/examples/k8s-sidecar/proxy_sidecar_deployment.yaml +++ b/examples/k8s-sidecar/proxy_sidecar_deployment.yaml @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +# [START alloydb_auth_proxy_gke_quickstart_deployment] apiVersion: apps/v1 kind: Deployment metadata: @@ -93,3 +94,4 @@ spec: # the database and the application. Adjust this value based on your # application's requirements. cpu: "1" +# [END alloydb_auth_proxy_gke_quickstart_deployment] \ No newline at end of file diff --git a/examples/k8s-sidecar/service-account.yaml b/examples/k8s-sidecar/service-account.yaml new file mode 100644 index 00000000..d37bdc41 --- /dev/null +++ b/examples/k8s-sidecar/service-account.yaml @@ -0,0 +1,20 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# [START alloydb_auth_proxy_gke_quickstart_sa] +apiVersion: v1 +kind: ServiceAccount +metadata: + name: # TODO(developer): replace this value +# [END alloydb_auth_proxy_gke_quickstart_sa] \ No newline at end of file diff --git a/examples/k8s-sidecar/service.yaml b/examples/k8s-sidecar/service.yaml new file mode 100644 index 00000000..e83d9fc7 --- /dev/null +++ b/examples/k8s-sidecar/service.yaml @@ -0,0 +1,27 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# [START alloydb_auth_proxy_gke_quickstart_service] +apiVersion: v1 +kind: Service +metadata: + name: +spec: + type: LoadBalancer + selector: + app: + ports: + - port: 80 + targetPort: 8080 +# [END alloydb_auth_proxy_gke_quickstart_service] \ No newline at end of file