Skip to content

Commit

Permalink
Add documentation for Helm chart
Browse files Browse the repository at this point in the history
  • Loading branch information
kuskoman committed Apr 12, 2023
1 parent 3ab787f commit 5f8006f
Show file tree
Hide file tree
Showing 8 changed files with 470 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ _debug*.yml
_debug/
_debug.yaml
_debug*.yaml

# Readme generator files
helm-generator/
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ logs:
minify:
upx -9 $(GOOS_EXES)

install-helm-readme:
./scripts/install_helm_readme_generator.sh

helm-readme:
./scripts/generate_helm_readme.sh

.DEFAULT_GOAL := run
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ The application can be run in two ways:
- using the binary executable
- using the Docker image

Additionally [Helm chart](./chart/) is provided for easy deployment to Kubernetes.

#### Binary Executable

The binary executable can be downloaded from the [releases page](https://github.com/kuskoman/logstash-exporter/releases).
Expand Down Expand Up @@ -70,6 +72,10 @@ To pull the image from command line simply use:

docker pull ghcr.io/kuskoman/logstash-exporter:master

#### Helm Chart

The Helm chart has its own [README](./chart/README.md).

### Endpoints

- `/metrics`: Exposes metrics in Prometheus format.
Expand Down
77 changes: 77 additions & 0 deletions chart/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Helm chart

## Parameters

### Logstash configuration

| Name | Description | Value |
| -------------- | --------------------- | ---------------------- |
| `logstash.url` | Logstash instance URL | `http://logstash:9600` |

### Image settings

| Name | Description | Value |
| ------------------ | ---------------------------------- | ---------------------------- |
| `image.repository` | Image repository | `kuskoman/logstash-exporter` |
| `image.tag` | Image tag | `v1.0.2` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `fullnameOverride` | Override the fullname of the chart | `""` |

### Deployment settings

| Name | Description | Value |
| ------------------------------ | ------------------------------------------------------------ | -------- |
| `deployment.replicas` | Number of replicas for the deployment | `1` |
| `deployment.restartPolicy` | Restart policy for the deployment. | `Always` |
| `deployment.annotations` | Additional deployment annotations | `{}` |
| `deployment.labels` | Additional deployment labels | `{}` |
| `deployment.pullSecret` | Kubernetes secret for pulling the image | `[]` |
| `deployment.resources` | Resource requests and limits | `{}` |
| `deployment.nodeSelector` | Node selector for the deployment | `{}` |
| `deployment.tolerations` | Tolerations for the deployment | `[]` |
| `deployment.podAnnotations` | Additional pod annotations | `{}` |
| `deployment.podLabels` | Additional pod labels | `{}` |
| `deployment.affinity` | Affinity for the deployment | `{}` |
| `deployment.env` | Additional environment variables | `{}` |
| `deployment.envFrom` | Additional environment variables from config maps or secrets | `[]` |
| `deployment.priorityClassName` | Priority class name for the deployment | `""` |
| `deployment.dnsConfig` | DNS configuration for the deployment | `{}` |
| `deployment.securityContext` | Security context for the deployment | `{}` |

### Liveness probe settings

| Name | Description | Value |
| ---------------------------------------------- | ------------------------------------ | --------- |
| `deployment.livenessProbe.httpGet.path` | Path for liveness probe | `/health` |
| `deployment.livenessProbe.httpGet.port` | Port for liveness probe | `9198` |
| `deployment.livenessProbe.initialDelaySeconds` | Initial delay for liveness probe | `30` |
| `deployment.livenessProbe.periodSeconds` | Period for liveness probe | `10` |
| `deployment.livenessProbe.timeoutSeconds` | Timeout for liveness probe | `5` |
| `deployment.livenessProbe.successThreshold` | Success threshold for liveness probe | `1` |
| `deployment.livenessProbe.failureThreshold` | Failure threshold for liveness probe | `3` |
| `deployment.readinessProbe` | Readiness probe configuration | `{}` |

### Rolling update settings

| Name | Description | Value |
| ----------------------------------------- | -------------------------------------- | ----- |
| `deployment.rollingUpdate.maxSurge` | Maximum surge for rolling update | `1` |
| `deployment.rollingUpdate.maxUnavailable` | Maximum unavailable for rolling update | `0` |

### Service settings

| Name | Description | Value |
| --------------------- | ------------------------------ | ----------- |
| `service.type` | Service type | `ClusterIP` |
| `service.port` | Service port | `9198` |
| `service.annotations` | Additional service annotations | `{}` |
| `service.labels` | Additional service labels | `{}` |

### ServiceAccount settings

| Name | Description | Value |
| ---------------------------- | -------------------------------------- | ------- |
| `serviceAccount.enabled` | Enable service account creation | `false` |
| `serviceAccount.create` | Create service account | `false` |
| `serviceAccount.name` | Service account name | `""` |
| `serviceAccount.annotations` | Additional service account annotations | `{}` |
244 changes: 244 additions & 0 deletions chart/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
{
"title": "Chart Values",
"type": "object",
"properties": {
"logstash": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Logstash instance URL",
"default": "http://logstash:9600"
}
}
},
"image": {
"type": "object",
"properties": {
"repository": {
"type": "string",
"description": "Image repository",
"default": "kuskoman/logstash-exporter"
},
"tag": {
"type": "string",
"description": "Image tag",
"default": "v1.0.2"
},
"pullPolicy": {
"type": "string",
"description": "Image pull policy",
"default": "IfNotPresent"
}
}
},
"fullnameOverride": {
"type": "string",
"description": "Override the fullname of the chart",
"default": ""
},
"deployment": {
"type": "object",
"properties": {
"replicas": {
"type": "number",
"description": "Number of replicas for the deployment",
"default": 1
},
"restartPolicy": {
"type": "string",
"description": "Restart policy for the deployment.",
"default": "Always"
},
"annotations": {
"type": "object",
"description": "Additional deployment annotations",
"default": {}
},
"labels": {
"type": "object",
"description": "Additional deployment labels",
"default": {}
},
"pullSecret": {
"type": "array",
"description": "Kubernetes secret for pulling the image",
"default": [],
"items": {}
},
"resources": {
"type": "object",
"description": "Resource requests and limits",
"default": {}
},
"nodeSelector": {
"type": "object",
"description": "Node selector for the deployment",
"default": {}
},
"tolerations": {
"type": "array",
"description": "Tolerations for the deployment",
"default": [],
"items": {}
},
"podAnnotations": {
"type": "object",
"description": "Additional pod annotations",
"default": {}
},
"podLabels": {
"type": "object",
"description": "Additional pod labels",
"default": {}
},
"affinity": {
"type": "object",
"description": "Affinity for the deployment",
"default": {}
},
"env": {
"type": "object",
"description": "Additional environment variables",
"default": {}
},
"envFrom": {
"type": "array",
"description": "Additional environment variables from config maps or secrets",
"default": [],
"items": {}
},
"priorityClassName": {
"type": "string",
"description": "Priority class name for the deployment",
"default": ""
},
"dnsConfig": {
"type": "object",
"description": "DNS configuration for the deployment",
"default": {}
},
"securityContext": {
"type": "object",
"description": "Security context for the deployment",
"default": {}
},
"livenessProbe": {
"type": "object",
"properties": {
"httpGet": {
"type": "object",
"properties": {
"path": {
"type": "string",
"description": "Path for liveness probe",
"default": "/health"
},
"port": {
"type": "number",
"description": "Port for liveness probe",
"default": 9198
}
}
},
"initialDelaySeconds": {
"type": "number",
"description": "Initial delay for liveness probe",
"default": 30
},
"periodSeconds": {
"type": "number",
"description": "Period for liveness probe",
"default": 10
},
"timeoutSeconds": {
"type": "number",
"description": "Timeout for liveness probe",
"default": 5
},
"successThreshold": {
"type": "number",
"description": "Success threshold for liveness probe",
"default": 1
},
"failureThreshold": {
"type": "number",
"description": "Failure threshold for liveness probe",
"default": 3
}
}
},
"readinessProbe": {
"type": "object",
"description": "Readiness probe configuration",
"default": {}
},
"rollingUpdate": {
"type": "object",
"properties": {
"maxSurge": {
"type": "number",
"description": "Maximum surge for rolling update",
"default": 1
},
"maxUnavailable": {
"type": "number",
"description": "Maximum unavailable for rolling update",
"default": 0
}
}
}
}
},
"service": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Service type",
"default": "ClusterIP"
},
"port": {
"type": "number",
"description": "Service port",
"default": 9198
},
"annotations": {
"type": "object",
"description": "Additional service annotations",
"default": {}
},
"labels": {
"type": "object",
"description": "Additional service labels",
"default": {}
}
}
},
"serviceAccount": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable service account creation",
"default": false
},
"create": {
"type": "boolean",
"description": "Create service account",
"default": false
},
"name": {
"type": "string",
"description": "Service account name",
"default": ""
},
"annotations": {
"type": "object",
"description": "Additional service account annotations",
"default": {}
}
}
}
}
}
Loading

0 comments on commit 5f8006f

Please sign in to comment.