Kubernetes resource for Concourse.ci
This resource is maintained by Simon Groenborg and David Johannes Christensen
The first Kubernetes resource was written by jcderr, and we originally tried to use his resource instead of this repository. However it was unmaintained, and was breaking sporadically which caused us to initially fork the repository.
However even with some patching, there was a fundamental problem in the approach to the resource for our use case, which did not allow us to run kubectl commands as needed. Thus this resource was born - however it is heavily inspired by jcderr's work.
Simply add the following under resource_types:
resource_types:
- name: kubernetes
type: docker-image
source:
repository:
tag: ''
This gets the resource running.
-
cluster_url
Required The url pointing to the Kubernetes Master API service. For examplehttps://192.168.99.100:8443
in minikube. -
certificate_authority
Required w/https cluster The certificate for the cluster. For example ca.crt in minikube.
Format (credentials file):
certificate_authority: |
-----BEGIN CERTIFICATE-----
Whole bunch of text and numbers
-----END CERTIFICATE-----
client_certificate
Required w/https cluster The client certificate for admin in the cluster. For example apiserver.crt in minikube.
Format (credentials file):
client_certificate: |
-----BEGIN CERTIFICATE-----
Whole bunch of text and numbers
-----END CERTIFICATE-----
client_key
Required w/https cluster The certificate for the cluster. For example apiserver.key in minikube.
Format (credentials file):
client_key: |
-----BEGIN RSA PRIVATE KEY-----
Whole bunch of text and numbers
-----END RSA PRIVATE KEY-----
namespace
Optional Only execute on the specified namespace. Technically this can be specified in the out behaviour as well, but will then not work onin resource
.
Runs kubectl get pods, to ensure connection to cluster works.
Runs kubectl, and returns all resources in the current namespace (default if no namespace chosen).
Runs kubectl with the given command, thereby changing the cluster.
command
Required The command to execute on the cluster. For example:get pods
translates tokubectl get pods
(in default namespace).
Work in progress. . .