@@ -14,18 +14,15 @@ http://kubernetes.io/docs/user-guide/deployments/
14142 . The tested codebase has a yaml file (i.e. deployment.yml) that describes the Kubernetes deployment
1515parameters and configuration of your application.
16163 . 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
2120The following env variables control the deployment configuration:
2221
23221 . 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
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
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