From 03c8529433da7b404526df1507a0db446e9708db Mon Sep 17 00:00:00 2001 From: thanicz Date: Wed, 26 Nov 2025 13:43:21 +0100 Subject: [PATCH 1/2] KNOX-3169: Add Helm chart for Knox --- knox-helmchart/src/knox/.helmignore | 39 +++++++++ knox-helmchart/src/knox/Chart.yaml | 22 +++++ knox-helmchart/src/knox/README.md | 38 +++++++++ knox-helmchart/src/knox/templates/NOTES.txt | 39 +++++++++ .../src/knox/templates/_helpers.tpl | 79 +++++++++++++++++ .../src/knox/templates/deployment.yaml | 84 +++++++++++++++++++ knox-helmchart/src/knox/templates/hpa.yaml | 48 +++++++++++ .../src/knox/templates/ingress.yaml | 59 +++++++++++++ .../src/knox/templates/service.yaml | 31 +++++++ .../src/knox/templates/serviceaccount.yaml | 28 +++++++ .../knox/templates/tests/test-connection.yaml | 31 +++++++ knox-helmchart/src/knox/values.yaml | 67 +++++++++++++++ 12 files changed, 565 insertions(+) create mode 100644 knox-helmchart/src/knox/.helmignore create mode 100644 knox-helmchart/src/knox/Chart.yaml create mode 100644 knox-helmchart/src/knox/README.md create mode 100644 knox-helmchart/src/knox/templates/NOTES.txt create mode 100644 knox-helmchart/src/knox/templates/_helpers.tpl create mode 100644 knox-helmchart/src/knox/templates/deployment.yaml create mode 100644 knox-helmchart/src/knox/templates/hpa.yaml create mode 100644 knox-helmchart/src/knox/templates/ingress.yaml create mode 100644 knox-helmchart/src/knox/templates/service.yaml create mode 100644 knox-helmchart/src/knox/templates/serviceaccount.yaml create mode 100644 knox-helmchart/src/knox/templates/tests/test-connection.yaml create mode 100644 knox-helmchart/src/knox/values.yaml diff --git a/knox-helmchart/src/knox/.helmignore b/knox-helmchart/src/knox/.helmignore new file mode 100644 index 0000000000..b6edc2c467 --- /dev/null +++ b/knox-helmchart/src/knox/.helmignore @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# 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/ diff --git a/knox-helmchart/src/knox/Chart.yaml b/knox-helmchart/src/knox/Chart.yaml new file mode 100644 index 0000000000..97c1863f55 --- /dev/null +++ b/knox-helmchart/src/knox/Chart.yaml @@ -0,0 +1,22 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +apiVersion: v1 +name: knox +description: A Helm chart for Knox +home: https://knox.apache.org/ +icon: https://knox.apache.org/images/knox-logo.gif +version: 3.0.0 diff --git a/knox-helmchart/src/knox/README.md b/knox-helmchart/src/knox/README.md new file mode 100644 index 0000000000..812cb84fa8 --- /dev/null +++ b/knox-helmchart/src/knox/README.md @@ -0,0 +1,38 @@ + +## Knox Helm Chart + +This Helm chart is designed for deploying Knox. + +### Installation + +To install the chart, use the following command: + +```shell +helm install knox . --namespace knox --create-namespace +``` +### Additional Information + +This repository employs Helm for templating both topologies and various Kubernetes objects. The `values.yaml` file +defines default parameters, which can be overridden during deployment using the `helm install` command. + +- **Kubernetes Templates**: + - `deployment.yaml`: Deploys the Knox service. + - `hpa.yaml`: Configures the `HorizontalPodAutoscaler` for dynamic pod scaling based on resource utilization. + - `ingress.yaml`: Manages external access to the services in a cluster. + - `service.yaml`: Exposes an application running in pods as a network service. + - `serviceaccount.yaml`: Provides an identity for processes running in a Pod. diff --git a/knox-helmchart/src/knox/templates/NOTES.txt b/knox-helmchart/src/knox/templates/NOTES.txt new file mode 100644 index 0000000000..e482bb0c25 --- /dev/null +++ b/knox-helmchart/src/knox/templates/NOTES.txt @@ -0,0 +1,39 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +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 }}{{ .path }} + {{- 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 "knox.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 its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "knox.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "knox.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + 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 "knox.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/knox-helmchart/src/knox/templates/_helpers.tpl b/knox-helmchart/src/knox/templates/_helpers.tpl new file mode 100644 index 0000000000..37fd59aca7 --- /dev/null +++ b/knox-helmchart/src/knox/templates/_helpers.tpl @@ -0,0 +1,79 @@ +{{/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/}} +{{/* +Expand the name of the chart. +*/}} +{{- define "knox.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 "knox.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 "knox.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "knox.labels" -}} +helm.sh/chart: {{ include "knox.chart" . }} +{{ include "knox.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "knox.selectorLabels" -}} +app.kubernetes.io/name: {{ include "knox.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "knox.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "knox.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/knox-helmchart/src/knox/templates/deployment.yaml b/knox-helmchart/src/knox/templates/deployment.yaml new file mode 100644 index 0000000000..70d9e3fa37 --- /dev/null +++ b/knox-helmchart/src/knox/templates/deployment.yaml @@ -0,0 +1,84 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "knox.fullname" . }} + labels: + {{- include "knox.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "knox.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "knox.labels" . | nindent 8 }} + spec: + serviceAccountName: {{ include "knox.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: gatewayport + containerPort: 8443 + protocol: TCP + livenessProbe: + tcpSocket: + port: gatewayport + readinessProbe: + tcpSocket: + port: gatewayport + startupProbe: + tcpSocket: + port: gatewayport + initialDelaySeconds: 10 + failureThreshold: 30 + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/knox-helmchart/src/knox/templates/hpa.yaml b/knox-helmchart/src/knox/templates/hpa.yaml new file mode 100644 index 0000000000..eb9c956a9e --- /dev/null +++ b/knox-helmchart/src/knox/templates/hpa.yaml @@ -0,0 +1,48 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "knox.fullname" . }} + labels: + {{- include "knox.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "knox.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/knox-helmchart/src/knox/templates/ingress.yaml b/knox-helmchart/src/knox/templates/ingress.yaml new file mode 100644 index 0000000000..02cf6f9fab --- /dev/null +++ b/knox-helmchart/src/knox/templates/ingress.yaml @@ -0,0 +1,59 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- if .Values.ingress.enabled -}} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: {{ include "knox.fullname" . }} + labels: + {{- include "knox.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- with .Values.ingress.className }} + ingressClassName: {{ . }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- with .pathType }} + pathType: {{ . }} + {{- end }} + backend: + service: + name: {{ include "knox.fullname" $ }} + port: + number: {{ $.Values.service.port }} + {{- end }} + {{- end }} +{{- end }} diff --git a/knox-helmchart/src/knox/templates/service.yaml b/knox-helmchart/src/knox/templates/service.yaml new file mode 100644 index 0000000000..c113f759e6 --- /dev/null +++ b/knox-helmchart/src/knox/templates/service.yaml @@ -0,0 +1,31 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +apiVersion: v1 +kind: Service +metadata: + name: {{ include "knox.fullname" . }} + labels: + {{- include "knox.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.gatewayPort }} + targetPort: gatewayport + protocol: TCP + name: gatewayport + selector: + {{- include "knox.selectorLabels" . | nindent 4 }} diff --git a/knox-helmchart/src/knox/templates/serviceaccount.yaml b/knox-helmchart/src/knox/templates/serviceaccount.yaml new file mode 100644 index 0000000000..30583eedee --- /dev/null +++ b/knox-helmchart/src/knox/templates/serviceaccount.yaml @@ -0,0 +1,28 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "knox.serviceAccountName" . }} + labels: + {{- include "knox.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/knox-helmchart/src/knox/templates/tests/test-connection.yaml b/knox-helmchart/src/knox/templates/tests/test-connection.yaml new file mode 100644 index 0000000000..e201657a84 --- /dev/null +++ b/knox-helmchart/src/knox/templates/tests/test-connection.yaml @@ -0,0 +1,31 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "knox.fullname" . }}-test-connection" + labels: + {{- include "knox.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "knox.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/knox-helmchart/src/knox/values.yaml b/knox-helmchart/src/knox/values.yaml new file mode 100644 index 0000000000..8865b93c18 --- /dev/null +++ b/knox-helmchart/src/knox/values.yaml @@ -0,0 +1,67 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +replicaCount: 1 + +image: + repository: knox-gateway + pullPolicy: IfNotPresent + tag: "3.0.0-SNAPSHOT" + +serviceAccount: + create: true + annotations: {} + name: "" + +podAnnotations: {} +podSecurityContext: {} +securityContext: {} + +service: + type: ClusterIP + gatewayPort: 8443 + gatewayPath: gateway + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + +resources: + requests: + cpu: 250m + memory: 1Gi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + +volumes: [] +volumeMounts: [] + +nodeSelector: {} +tolerations: [] +affinity: {} From 53355ff0466b19bb6ef5037bfea320b4c133e548 Mon Sep 17 00:00:00 2001 From: thanicz Date: Thu, 27 Nov 2025 12:12:26 +0100 Subject: [PATCH 2/2] KNOX-3169: Fix apiVersion error --- knox-helmchart/src/knox/.helmignore | 3 +-- knox-helmchart/src/knox/Chart.yaml | 3 +-- knox-helmchart/src/knox/templates/deployment.yaml | 3 +-- knox-helmchart/src/knox/templates/hpa.yaml | 3 +-- knox-helmchart/src/knox/templates/ingress.yaml | 3 +-- knox-helmchart/src/knox/templates/service.yaml | 3 +-- knox-helmchart/src/knox/templates/serviceaccount.yaml | 3 +-- knox-helmchart/src/knox/templates/tests/test-connection.yaml | 3 +-- knox-helmchart/src/knox/values.yaml | 2 -- 9 files changed, 8 insertions(+), 18 deletions(-) diff --git a/knox-helmchart/src/knox/.helmignore b/knox-helmchart/src/knox/.helmignore index b6edc2c467..be64dcec88 100644 --- a/knox-helmchart/src/knox/.helmignore +++ b/knox-helmchart/src/knox/.helmignore @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + # Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. diff --git a/knox-helmchart/src/knox/Chart.yaml b/knox-helmchart/src/knox/Chart.yaml index 97c1863f55..27f6f98b63 100644 --- a/knox-helmchart/src/knox/Chart.yaml +++ b/knox-helmchart/src/knox/Chart.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + apiVersion: v1 name: knox description: A Helm chart for Knox diff --git a/knox-helmchart/src/knox/templates/deployment.yaml b/knox-helmchart/src/knox/templates/deployment.yaml index 70d9e3fa37..afa1de8666 100644 --- a/knox-helmchart/src/knox/templates/deployment.yaml +++ b/knox-helmchart/src/knox/templates/deployment.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + apiVersion: apps/v1 kind: Deployment metadata: diff --git a/knox-helmchart/src/knox/templates/hpa.yaml b/knox-helmchart/src/knox/templates/hpa.yaml index eb9c956a9e..1fafa899b7 100644 --- a/knox-helmchart/src/knox/templates/hpa.yaml +++ b/knox-helmchart/src/knox/templates/hpa.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +--- {{- if .Values.autoscaling.enabled }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler diff --git a/knox-helmchart/src/knox/templates/ingress.yaml b/knox-helmchart/src/knox/templates/ingress.yaml index 02cf6f9fab..d750533059 100644 --- a/knox-helmchart/src/knox/templates/ingress.yaml +++ b/knox-helmchart/src/knox/templates/ingress.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +--- {{- if .Values.ingress.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress diff --git a/knox-helmchart/src/knox/templates/service.yaml b/knox-helmchart/src/knox/templates/service.yaml index c113f759e6..1013265e4d 100644 --- a/knox-helmchart/src/knox/templates/service.yaml +++ b/knox-helmchart/src/knox/templates/service.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + apiVersion: v1 kind: Service metadata: diff --git a/knox-helmchart/src/knox/templates/serviceaccount.yaml b/knox-helmchart/src/knox/templates/serviceaccount.yaml index 30583eedee..bffb7a1b18 100644 --- a/knox-helmchart/src/knox/templates/serviceaccount.yaml +++ b/knox-helmchart/src/knox/templates/serviceaccount.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +--- {{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount diff --git a/knox-helmchart/src/knox/templates/tests/test-connection.yaml b/knox-helmchart/src/knox/templates/tests/test-connection.yaml index e201657a84..32866ebe6f 100644 --- a/knox-helmchart/src/knox/templates/tests/test-connection.yaml +++ b/knox-helmchart/src/knox/templates/tests/test-connection.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# + apiVersion: v1 kind: Pod metadata: diff --git a/knox-helmchart/src/knox/values.yaml b/knox-helmchart/src/knox/values.yaml index 8865b93c18..80d28c114d 100644 --- a/knox-helmchart/src/knox/values.yaml +++ b/knox-helmchart/src/knox/values.yaml @@ -1,4 +1,3 @@ -# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. @@ -13,7 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# replicaCount: 1 image: