This repository has been archived by the owner on Oct 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from oxyno-zeta/develop
Develop
- Loading branch information
Showing
31 changed files
with
2,127 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
OWNERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
appVersion: "1.0.0" | ||
description: A Helm chart for Kubernetes Tagger | ||
name: kubernetes-tagger | ||
version: 1.0.0 | ||
home: https://github.com/oxyno-zeta/kubernetes-tagger | ||
sources: | ||
- https://github.com/oxyno-zeta/kubernetes-tagger | ||
maintainers: | ||
- name: oxyno-zeta | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
approvers: | ||
- oxyno-zeta | ||
reviewers: | ||
- oxyno-zeta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# kubernetes-tagger | ||
|
||
[kubernetes-tagger](https://github.com/oxyno-zeta/kubernetes-tagger) is a Kubernetes watcher that will tag external resources like EBS following rules. | ||
|
||
## TL;DR; | ||
|
||
```console | ||
$ helm install incubator/kubernetes-tagger | ||
``` | ||
|
||
## Introduction | ||
|
||
This chart bootstraps a kubernetes-tagger deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
## Installing the Chart | ||
|
||
To install the chart with the release name `my-release`: | ||
|
||
```console | ||
$ helm install incubator/kubernetes-tagger --name my-release | ||
``` | ||
|
||
The command deploys kubernetes-tagger on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation. | ||
|
||
## Uninstalling the Chart | ||
|
||
To uninstall/delete the `my-release` deployment: | ||
|
||
```console | ||
$ helm delete my-release | ||
``` | ||
|
||
The command removes all the Kubernetes components associated with the chart and deletes the release. | ||
|
||
## Configuration | ||
|
||
The following table lists the configurable parameters of the kubernetes-tagger chart and their default values. | ||
|
||
| Parameter | Description | Default | | ||
| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | | ||
| `rbac.create` | If true, create & use RBAC resources | `false` | | ||
| `rbac.serviceAccountName` | Existing ServiceAccount to use (ignored if rbac.create=true) | `default` | | ||
| `secrets.aws.accessKey` | Will create AWS Access Key in secrets | Empty | | ||
| `secrets.aws.secretKey` | Will create AWS Secret Access Key in secrets | Empty | | ||
| `config` | Kubernetes-tagger configuration (You can see more about this [here](https://github.com/oxyno-zeta/kubernetes-tagger)) | Configuration | | ||
| `replicaCount` | Desired number of pods | `1` | | ||
| `image.name` | Container image name (Including repository name if not `hub.docker.com`). | `oxynozeta/kubernetes-tagger` | | ||
| `image.pullPolicy` | Container pull policy. | `IfNotPresent` | | ||
| `image.tag` | Container image tag. | `1.1.0` | | ||
| `service.annotations` | Annotations to add to service | `{}` | | ||
| `service.clusterIP` | IP address to assign to service | `""` | | ||
| `service.externalIPs` | Service external IP addresses | `[]` | | ||
| `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` | | ||
| `service.loadBalancerSourceRanges` | List of IP CIDRs allowed access to load balancer (if supported) | `[]` | | ||
| `service.servicePort` | Service port to expose | `80` | | ||
| `service.type` | Type of service to create | `ClusterIP` | | ||
| `ingress.enabled` | Enables Ingress | `false` | | ||
| `ingress.annotations` | Ingress annotations | `{}` | | ||
| `ingress.path` | Ingress path | `/` | | ||
| `ingress.hosts` | Ingress accepted hostnames | `[]` | | ||
| `ingress.tls` | Ingress TLS configuration | `[]` | | ||
| `resources` | CPU/Memory resource requests/limits. | `{}` | | ||
| `nodeSelector` | Node labels for pod assignment | `{}` | | ||
| `tolerations` | List of node taints to tolerate (requires Kubernetes >= 1.6) | `[]` | | ||
| `affinity` | List of affinities (requires Kubernetes >=1.6) | `{}` | | ||
| `annotations` | Deployment annotations | `{}` | | ||
| `podAnnotations` | Additional annotations to apply to the pod. | `{}` | | ||
| `podLabels` | Additional labels to apply to the pod. | `{}` | | ||
| `podDisruptionBudget.enabled` | If true, create a pod disruption budget for prometheus pods. The created resource cannot be modified once created - it must be deleted to perform a change | `false` | | ||
| `podDisruptionBudget.minAvailable` | Minimum number / percentage of pods that should remain scheduled | `1` | | ||
| `podDisruptionBudget.maxUnavailable` | Maximum number / percentage of pods that may be made unavailable | `""` | | ||
| `livenessProbe` | Liveness Probe settings | `{ "initialDelaySeconds": 0, "periodSeconds": 30, "timeoutSeconds": 1, "successThreshold": 1, "failureThreshold": 3 }` | | ||
| `readinessProbe` | Readiness Probe settings | `{ "initialDelaySeconds": 0, "periodSeconds": 30, "timeoutSeconds": 1, "successThreshold": 1, "failureThreshold": 3 }` | | ||
| `prometheus.pod.enabled` | If `true`, annotate with Prometheus annotations pods | `false` | | ||
| `prometheus.operator.enabled` | If `true`, creates a Prometheus Operator ServiceMonitor | `false` | | ||
| `prometheus.operator.serviceMonitor.namespace` | Namespace which Prometheus is running in | `monitoring` | | ||
| `prometheus.operator.serviceMonitor.interval` | Interval that Prometheus scrapes metrics | `20s` | | ||
| `prometheus.operator.serviceMonitor.scrapeTimeout` | Scrape timeout for Prometheus scrape metrics | None | | ||
| `prometheus.operator.serviceMonitor.selector` | Default to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install | `{ prometheus: kube-prometheus }` | | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, | ||
|
||
```console | ||
$ helm install incubator/kubernetes-tagger --name my-release \ | ||
--set=secrets.aws.accessKey="XXXXXXX",secrets.aws.secretKey="XXXXXXX" | ||
``` | ||
|
||
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example, | ||
|
||
```console | ||
$ helm install incubator/kubernetes-tagger --name my-release -f values.yaml | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](values.yaml) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
1. Get the application URL by running these commands: | ||
{{- if .Values.ingress.enabled }} | ||
{{- range $host := .Values.ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .Values.service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "kubernetes-tagger.fullname" . }}) | ||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") | ||
echo http://$NODE_IP:$NODE_PORT | ||
{{- else if contains "LoadBalancer" .Values.service.type }} | ||
NOTE: It may take a few minutes for the LoadBalancer IP to be available. | ||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "kubernetes-tagger.fullname" . }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "kubernetes-tagger.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') | ||
echo http://$SERVICE_IP:{{ .Values.service.port }} | ||
{{- else if contains "ClusterIP" .Values.service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "kubernetes-tagger.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
echo "Visit http://127.0.0.1:8085 to use your application" | ||
kubectl port-forward $POD_NAME 8085:80 | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "kubernetes-tagger.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "kubernetes-tagger.fullname" -}} | ||
{{- if .Values.fullnameOverride -}} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- if contains $name .Release.Name -}} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" -}} | ||
{{- else -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "kubernetes-tagger.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} |
Oops, something went wrong.