From cc19f3970f6afa2fac3362417a24d19b196fd84b Mon Sep 17 00:00:00 2001 From: Paul Czarkowski Date: Mon, 30 Jul 2018 15:39:36 -0500 Subject: [PATCH] fix source-to-url-go sample to use secret (#253) * fix source-to-url-go sample to use secret * fix pluralization for manifests --- serving/samples/source-to-url-go/README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/serving/samples/source-to-url-go/README.md b/serving/samples/source-to-url-go/README.md index ddcafe14a..c0f468a0e 100644 --- a/serving/samples/source-to-url-go/README.md +++ b/serving/samples/source-to-url-go/README.md @@ -68,11 +68,26 @@ available, but these are the key steps: cGFzc3dvcmQ= ``` -1. After you have created the manifest file, apply it to your cluster with `kubectl`: +1. Create a new `Service Account` manifest which is used to link the build process to the secret. + Save this file as `service-account.yaml`: + + + ```yaml + apiVersion: v1 + kind: ServiceAccount + metadata: + name: build-bot + secrets: + - name: basic-user-pass + ``` + +1. After you have created the manifest files, apply them to your cluster with `kubectl`: ```shell $ kubectl apply -f docker-secret.yaml secret "basic-user-pass" created + $ kubectl apply -f service-account.yaml + serviceaccount "build-bot" created ``` @@ -101,6 +116,7 @@ container for the application. runLatest: configuration: build: + serviceAccountName: build-bot source: git: url: https://github.com/mchmarny/simple-app.git @@ -121,7 +137,7 @@ container for the application. ``` 1. Apply this manifest using `kubectl`, and watch the results: - + ```shell # Apply the manifest $ kubectl apply -f service.yaml