Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlehtimaki/kubernetes-ci
This project aims to provide support for easy kubernetes deployments for (almost) every system out there.
https://github.com/jlehtimaki/kubernetes-ci
baremetal ci cicd eks gke kubernetes kubernetes-ci kustomize
Last synced: about 6 hours ago
JSON representation
This project aims to provide support for easy kubernetes deployments for (almost) every system out there.
- Host: GitHub
- URL: https://github.com/jlehtimaki/kubernetes-ci
- Owner: jlehtimaki
- License: apache-2.0
- Created: 2020-11-06T12:51:29.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-01T19:41:36.000Z (over 3 years ago)
- Last Synced: 2024-06-19T20:51:17.272Z (7 months ago)
- Topics: baremetal, ci, cicd, eks, gke, kubernetes, kubernetes-ci, kustomize
- Language: Go
- Homepage:
- Size: 8.9 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# kubernetes-ci
This project aims to provide support for easy kubernetes deployments for (almost) every system out there.
Kubernetes-CI uses Environment variables to do `kubectl` tasks automatically with almost every Cloud provider there is.## Supported types of Kubernetes
| Architecture | Type | Kustomize | Other notes |
| ------------ |:----: |:---------:|:-----------: |
| AMD64 | EKS | Yes | -- |
| ARMv8 | EKS | Yes | -- |
| AMD64 | GKE | Yes | -- |
| ARMv8 | GKE | Yes | -- |
| AMD64 | Baremetal | Yes | -- |
| ARMv8 | Baremetal | Yes | -- |> Note: Currently Kustomize cannot be utilised with ARMv8 architecture due to Kustomize being built only for AMD64
> Hopefully this will be fixed in the future!## Supported CI's
Here's a list with tested CI's and examples how to use kubernetes-ci with them. \
This plugin should work with every CI that allows you to run custom containers with ENV variables.
- [Drone](docs/drone/README.md)## Supported environment paramenters
| Paramenter | Description |Required | Default Value | Allowed Values |
| ------------- |:-------------: |:-------------:|:-------------:|:-------------: |
| AWS_ACCESS_KEY | AWS Access key | YES | - | - |
| AWS_SECRET_KEY | AWS Access key secret | YES | - | - |
| REGION | Region / Zone | NO | eu-west-1 | - |
| ASSUME_ROLE | AWS Assume role | NO | - | Role ARN |
| ACTIONS | Kubectl commands to be run | YES | test | apply/delete/diff|
| KUBECTL_VERSION | Kubectl version to be installed| NO | v1.8.3 | - |
| NAMESPACE | Kubernetes namespace | NO | default | - |
| CLUSTER_NAME | EKS Cluster name | NO | EKS-Cluster | - |
| MANIFEST_DIR | Directory holding the manifests| NO | ./ | - |
| KUSTOMIZE | Use Kustomize | NO | false | true / false |
| IMAGE_VERSION | Version to deploy | NO | - | - |
| IMAGE | Image name of the deployment. Used with Kustomize | NO | - | - |
| TYPE | Type of Kubernetes deployment | NO | Baremetal | EKS / Baremetal|
| TOKEN | Kubernetes authentication token| NO | - | - |
| CA | Kubernetes CA certificate | NO | - | - |
| K8S_SERVER | Kubernetes server address | NO | - | - |
| K8S_USER | Kubernetes authentication username | NO | default | - |
| ROLLOUT_CHECK | Check rollout success | NO | true | true / false |
| ROLLOUT_TIMEOUT | Rollout check timeout | NO | 1m | Xs, Xm, Xh ... |## Build
Build the binary with the following commands:```shell script
export CGO_ENABLED=0
cd cmd/kubernetes-ci && go build
```## Docker
Kubernetes-ci project uses multiarch builds with dockers buildx tool. \
Build the docker image with:
```
docker buildx build -f docker/Dockerfile --platform linux/amd64,linux/arm64/v8 -t quay.io/jlehtimaki/kubernetes-ci --push .
```## Usage
```
docker run --rm -it -e AWS_ACCESS_KEY=.... -e PLUGIN_ASSUME_ROLE=.... -e AWS_SECRET_KEY=....
-e PLUGIN_ACTIONS="apply" -e PLUGIN_MANIFEST_DIR="manifests/" lehtux/drone-kubernetes
```