This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
498 additions
and
67 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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
*.tgz | ||
|
||
# Helm Charts dependencies | ||
/charts | ||
/charts/*.tgz | ||
*.lock | ||
|
||
.idea |
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,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,12 @@ | ||
apiVersion: v2 | ||
name: ca | ||
version: 1.0.0 | ||
# We are using the nifi version as appVersion | ||
appVersion: 1.11.4 | ||
description: A Helm chart to deploy ca server to generate self-signed certificates using nifi-toolkit. | ||
keywords: | ||
- nifi-toolkit | ||
- ca | ||
- self-signed certs | ||
home: https://nifi.apache.org/ | ||
icon: https://svn.apache.org/repos/asf/nifi/site/trunk/images/niFi-logo-horizontal-scaled.png |
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 @@ | ||
The release is named {{ .Release.Name }}. | ||
|
||
To learn more about the release, try: | ||
|
||
helm -n {{ .Release.Namespace }} status {{ .Release.Name }} | ||
helm -n {{ .Release.Namespace }} get all {{ .Release.Name }} |
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 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "ca.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 "ca.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 -}} |
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,81 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ template "ca.fullname" . }} | ||
labels: | ||
app: {{ template "ca.name" . }}-ca | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: {{ .Release.Name | quote }} | ||
heritage: {{ .Release.Service | quote }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ template "ca.name" . }}-ca | ||
release: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "ca.name" . }}-ca | ||
release: {{ .Release.Name }} | ||
spec: | ||
containers: | ||
- name: ca | ||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
if [ -f config.json ]; then | ||
OPTIONS="--configJson config.json --useConfigJson" | ||
fi | ||
exec ${NIFI_TOOLKIT_HOME}/bin/tls-toolkit.sh server -c "{{ template "ca.fullname" . }}" -t {{ .Values.token }} -p {{ .Values.app_port }} ${OPTIONS} | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
ports: | ||
- containerPort: {{ .Values.app_port }} | ||
livenessProbe: | ||
initialDelaySeconds: 90 | ||
periodSeconds: 60 | ||
tcpSocket: | ||
port: {{ .Values.app_port }} | ||
{{- if .Values.persistence.enabled }} | ||
volumeMounts: | ||
- mountPath: /ca | ||
name: nifi-ca | ||
subPath: ca | ||
workingDir: /ca | ||
{{- end }} | ||
terminationGracePeriodSeconds: 0 | ||
{{- if .Values.persistence.enabled }} | ||
initContainers: | ||
- command: | ||
- sh | ||
- -c | ||
- chown -R 1000:1000 /ca | ||
image: busybox | ||
imagePullPolicy: IfNotPresent | ||
name: volume-permissions | ||
resources: {} | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: {} | ||
privileged: false | ||
readOnlyRootFilesystem: false | ||
runAsNonRoot: false | ||
stdin: true | ||
terminationMessagePath: /dev/termination-log | ||
terminationMessagePolicy: File | ||
tty: true | ||
volumeMounts: | ||
- mountPath: /ca | ||
name: nifi-ca | ||
subPath: ca | ||
|
||
volumes: | ||
- name: nifi-ca | ||
persistentVolumeClaim: | ||
claimName: nifi-ca | ||
{{- 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,18 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "ca.fullname" . }} | ||
labels: | ||
app: {{ template "ca.name" . }}-ca | ||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" | ||
release: {{ .Release.Name | quote }} | ||
heritage: {{ .Release.Service | quote }} | ||
spec: | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.app_port }} | ||
name: ca-server | ||
selector: | ||
app: {{ template "ca.name" . }}-ca | ||
release: {{ .Release.Name }} |
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,15 @@ | ||
{{- if .Values.persistence.enabled }} | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: nifi-ca | ||
spec: | ||
accessModes: | ||
{{- range .Values.persistence.accessModes }} | ||
- {{ . | quote }} | ||
{{- end }} | ||
storageClassName: {{ .Values.persistence.storageClass | quote }} | ||
resources: | ||
requests: | ||
storage: {{ .Values.persistence.caStorage.size }} | ||
{{- 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,47 @@ | ||
# Default values for ca. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
replicaCount: 1 | ||
|
||
image: | ||
repository: apache/nifi-toolkit | ||
pullPolicy: IfNotPresent | ||
tag: "1.11.4" | ||
|
||
service: | ||
type: ClusterIP | ||
port: 9090 | ||
|
||
## Enable persistence using Persistent Volume Claims | ||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/ | ||
## | ||
persistence: | ||
enabled: false | ||
|
||
# When creating persistent storage, the NiFi helm chart can either reference an already-defined | ||
# storage class by name, such as "standard" or can define a custom storage class by specifying | ||
# customStorageClass: true and providing the "storageClass", "storageProvisioner" and "storageType". | ||
# For example, to use SSD storage on Google Compute Engine see values-gcp.yaml | ||
# | ||
# To use a storage class that already exists on the Kubernetes cluster, we can simply reference it by name. | ||
# For example: | ||
# storageClass: standard | ||
# | ||
# The default storage class is used if this variable is not set. | ||
|
||
accessModes: [ReadWriteOnce] | ||
|
||
## Storage Capacities for persistent volumes | ||
# Storage capacity for the 'data' directory, which is used to hold things such as the flow.xml.gz, configuration, state, etc. | ||
caStorage: | ||
size: 1Gi | ||
|
||
resources: | ||
requests: | ||
memory: "250Mi" | ||
cpu: "0.1" | ||
|
||
app_port: 9090 | ||
|
||
token: sixteenCharacters |
Oops, something went wrong.