Skip to content

Commit

Permalink
Switch to kubectl cloud builder
Browse files Browse the repository at this point in the history
  • Loading branch information
damemi committed Oct 20, 2022
1 parent b4ab181 commit d7c04cf
Showing 1 changed file with 23 additions and 12 deletions.
35 changes: 23 additions & 12 deletions cloudbuild-gke.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,30 @@
# limitations under the License.

steps:
- id: "cert-manager"
name: "gcr.io/cloud-builders/kubectl"
env:
- "CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER}"
- "CLOUDSDK_COMPUTE_ZONE=${_ZONE}"
args: ['apply', '-f', 'https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml']

- id: "install"
name: "gcr.io/cloud-builders/gcloud"
name: "gcr.io/cloud-builders/kubectl"
env:
- "KUBECONFIG=/kube/config"
- "PROJECT_ID=$PROJECT_ID"
entrypoint: "bash"
args:
- "-c"
- |
- "CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER}"
- "CLOUDSDK_COMPUTE_ZONE=${_ZONE}"
args: ['apply', '-f', 'https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml']

gcloud container clusters get-credentials "${_CLUSTER}" \
--project "$${PROJECT}" \
--zone "${_ZONE}"
- id: "cleanup-cert-manager"
name: "gcr.io/cloud-builders/kubectl"
env:
- "CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER}"
- "CLOUDSDK_COMPUTE_ZONE=${_ZONE}"
args: ['delete', '-f', 'https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml']

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.10.0/cert-manager.yaml
while ! kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml; do echo "Retrying"; sleep 5; done
- id: "cleanup-install"
name: "gcr.io/cloud-builders/kubectl"
env:
- "CLOUDSDK_CONTAINER_CLUSTER=${_CLUSTER}"
- "CLOUDSDK_COMPUTE_ZONE=${_ZONE}"
args: ['delete', '-f', 'https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml']

0 comments on commit d7c04cf

Please sign in to comment.