Skip to content

Commit ffbdc1c

Browse files
Update README.md
1 parent cf26fd1 commit ffbdc1c

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@ http://kubernetes.io/docs/user-guide/deployments/
1414
2. The tested codebase has a yaml file (i.e. deployment.yml) that describes the Kubernetes deployment
1515
parameters and configuration of your application.
1616
3. The script processes deployment.yml as a simple template where all `{{ ENV_VARIABLE }}` are replaced with a value of $ENV_VARIABLE deployment.yml
17-
4. At the moment, only the basic username/pass authentication is supported.
1817

1918
# Configuration
2019

2120
The following env variables control the deployment configuration:
2221

2322
1. KUBERNETES_DEPLOYMENT_TIMEOUT - How much to wait for a successful deployment before failing the build. Defaults to 120 (secs).
24-
2. KUBERNETES_USER - The user for the Kubernetes cluster. Mandatory.
25-
3. KUBERNETES_PASSWORD - The password for the Kubernetes cluster. Mandatory.
26-
4. KUBERNETES_SERVER - The server (HTTPS endpoint) of the Kubernetes cluster's API. Mandatory.
27-
5. KUBERNETES_NAMESPACE - The namespace to deploy
28-
6. KUBECTL_ACTION - means an action for `kubectl <action>`. Valid values are apply|create|replace. Default is "apply"
23+
2. KUBECONTEXT - corresponds to the name of a cluster added to codefresh
24+
3. KUBERNETES_NAMESPACE - The namespace to deploy
25+
4. KUBECTL_ACTION - means an action for `kubectl <action>`. Valid values are apply|create|replace. Default is "apply"
2926

3027
# Usage in codefresh.io
3128

@@ -48,7 +45,7 @@ spec:
4845
spec:
4946
containers:
5047
- name: apisvc
51-
image: myrepo/apisvc:{{CF_BRANCH}}
48+
image: myrepo/apisvc:{{CF_BRANCH}}_{{CF_REVISION}}
5249
ports:
5350
- containerPort: 80
5451
name: http
@@ -79,7 +76,6 @@ steps:
7976
commands:
8077
- /cf-deploy-kubernetes deployment.yml
8178
environment:
82-
- KUBERNETES_USER=${{KUBERNETES_USER}}
83-
- KUBERNETES_PASSWORD=${{KUBERNETES_PASSWORD}}
84-
- KUBERNETES_SERVER=${{KUBERNETES_SERVER}}
79+
- KUBECONTEXT=my-clusterg@my-staging
80+
- KUBERNETES_NAMESPACE=mynamespace
8581
```

0 commit comments

Comments
 (0)