forked from axoflow/axosyslog
-
Notifications
You must be signed in to change notification settings - Fork 0
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 axoflow#59 from axoflow/merge-axosyslog-charts
Merge axosyslog-charts
- Loading branch information
Showing
18 changed files
with
996 additions
and
686 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: AxoSyslog Collector | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
defaults: | ||
run: | ||
working-directory: charts/axosyslog-collector | ||
|
||
jobs: | ||
axosyslog-collector: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Linter | ||
run: | | ||
docker run -v${PWD}:${PWD} alpine/helm lint ${PWD} |
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,25 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
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,23 @@ | ||
# 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 | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,6 @@ | ||
apiVersion: v2 | ||
name: axosyslog-collector | ||
description: AxoSyslog Kubernetes log collector | ||
type: application | ||
version: 0.8.0 | ||
appVersion: "4.5.0" |
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,55 @@ | ||
# AxoSyslog Collector | ||
|
||
AxoSyslog Kubernetes log collector. | ||
|
||
## Prerequisites | ||
|
||
- Kubernetes 1.16+ | ||
- Helm 3.0+ | ||
|
||
|
||
## Configuration | ||
The following table lists the configurable parameters of the AxoSyslog Collector chart and their default values: | ||
|
||
|
||
| Parameter | Description | Default | | ||
| --------- | ----------- | ------- | | ||
| image.repository | The container image repository | ghcr.io/axoflow/axosyslog | | ||
| image.pullPolicy | The container image pull policy | IfNotPresent | | ||
| image.tag | The container image tag | 4.1.1 | | ||
| imagePullSecrets | The names of secrets containing private registry credentials | [] | | ||
| nameOverride | Override the chart name | "" | | ||
| fullnameOverride | Override the full chart name | "" | | ||
| daemonset.enabled | Deploy AxoSyslog as a DaemonSet | true | | ||
| daemonset.labels | Additional labels to apply to the DaemonSet | {} | | ||
| daemonset.annotations | Additional annotations to apply to the DaemonSet | {} | | ||
| daemonset.affinity | Pod affinity | {} | | ||
| daemonset.nodeSelector | Node labels for pod assignment | {} | | ||
| daemonset.resources | Resource requests and limits | {} | | ||
| daemonset.tolerations | Tolerations for pod assignment | [] | | ||
| daemonset.hostAliases | Add host aliases | [] | | ||
| daemonset.secretMounts | Mount additional secrets as volumes | [] | | ||
| daemonset.extraVolumes | Additional volumes to mount | [] | | ||
| daemonset.securityContext | Security context for the pod | {} | | ||
| daemonset.maxUnavailable | The maximum number of unavailable pods during a rolling update | 1 | | ||
| daemonset.hostNetworking | Whether to enable host networking | false | | ||
| rbac.create | Whether to create RBAC resources | false | | ||
| rbac.extraRules | Additional RBAC rules | [] | | ||
| openShift.enabled | Whether to deploy on OpenShift | false | | ||
| openShift.securityContextConstraints.create | Whether to create SecurityContextConstraints on OpenShift | true | | ||
| openShift.securityContextConstraints.annotations | Annotations to apply to SecurityContextConstraints | {} | | ||
| serviceAccount.create | Whether to create a service account | false | | ||
| serviceAccount.annotations | Annotations to apply to the service account | {} | | ||
| namespace | The Kubernetes namespace to deploy to | "" | | ||
| podAnnotations | Additional annotations to apply to the pod | {} | | ||
| podSecurityContext | Security context for the pod | {} | | ||
| securityContext | Security context for the container | {} | | ||
| resources | Resource requests and limits for the container | {} | | ||
| nodeSelector | Node labels for pod assignment | {} | | ||
| tolerations | Tolerations for pod assignment | [] | | ||
| affinity | Pod affinity | {} | | ||
| updateStrategy | Update strategy for the DaemonSet | RollingUpdate | | ||
| kubernetes.enabled | Enable kubernetes log collection | true | | ||
| kubernetes.prefix | Set JSON prefix for logs collected from the k8s cluster | "" | | ||
| kubernetes.keyDelimiter | Set JSON key delimiter for logs collected from the k8s cluster | "" | | ||
|
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,2 @@ | ||
1. Watch the {{ template "axosyslog-collector.fullname" . }} container start. | ||
$ kubectl get pods --namespace={{ .Release.Namespace }} -l app={{ template "axosyslog-collector.fullname" . }} -w |
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,66 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "axosyslog-collector.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 "axosyslog-collector.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 "axosyslog-collector.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "axosyslog-collector.labels" -}} | ||
helm.sh/chart: {{ include "axosyslog-collector.chart" . }} | ||
{{ include "axosyslog-collector.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "axosyslog-collector.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "axosyslog-collector.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "axosyslog-collector.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "axosyslog-collector.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{- define "axosyslog-collector.namespace" -}} | ||
{{ .Values.namespace | default .Release.Namespace }} | ||
{{- 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,23 @@ | ||
{{- if .Values.rbac.create -}} | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: {{ include "axosyslog-collector.serviceAccountName" . }} | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods"] | ||
verbs: ["get", "watch", "list"] | ||
{{- if .Values.rbac.extraRules }} | ||
{{ toYaml ( .Values.rbac.extraRules ) | indent 2 }} | ||
{{- end }} | ||
{{- if and .Values.openShift.enabled .Values.openShift.securityContextConstraints.create }} | ||
- apiGroups: | ||
- security.openshift.io | ||
resources: | ||
- securitycontextconstraints | ||
resourceNames: | ||
- {{ template "axosyslog-collector.fullname" . }} | ||
verbs: | ||
- use | ||
{{- end }} | ||
{{- end -}} |
13 changes: 13 additions & 0 deletions
13
charts/axosyslog-collector/templates/clusterrolebinding.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,13 @@ | ||
{{- if .Values.rbac.create -}} | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ include "axosyslog-collector.serviceAccountName" . }} | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ include "axosyslog-collector.serviceAccountName" . }} | ||
namespace: {{ include "axosyslog-collector.namespace" . }} | ||
roleRef: | ||
kind: ClusterRole | ||
name: {{ include "axosyslog-collector.serviceAccountName" . }} | ||
{{- end -}} |
Oops, something went wrong.