fix source-to-url-go sample to use secret (#253)

* fix source-to-url-go sample to use secret

* fix pluralization for manifests
This commit is contained in:
Paul Czarkowski 2018-07-30 15:39:36 -05:00 committed by Google Prow Robot
parent c43067e9c6
commit cc19f3970f
1 changed files with 18 additions and 2 deletions

View File

@ -68,11 +68,26 @@ available, but these are the key steps:
cGFzc3dvcmQ= 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 ```shell
$ kubectl apply -f docker-secret.yaml $ kubectl apply -f docker-secret.yaml
secret "basic-user-pass" created secret "basic-user-pass" created
$ kubectl apply -f service-account.yaml
serviceaccount "build-bot" created
``` ```
@ -101,6 +116,7 @@ container for the application.
runLatest: runLatest:
configuration: configuration:
build: build:
serviceAccountName: build-bot
source: source:
git: git:
url: https://github.com/mchmarny/simple-app.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: 1. Apply this manifest using `kubectl`, and watch the results:
```shell ```shell
# Apply the manifest # Apply the manifest
$ kubectl apply -f service.yaml $ kubectl apply -f service.yaml