This is an automated email from the ASF dual-hosted git repository.
lewismc pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tika-helm.git
The following commit(s) were added to refs/heads/main by this push:
new 10a629c Namespace & NetworkPolicy Fixes (#22)
10a629c is described below
commit 10a629c59c1859020402d0373af69430f2351fc5
Author: Nicolò Ciraci <[email protected]>
AuthorDate: Thu Dec 12 03:20:03 2024 +0100
Namespace & NetworkPolicy Fixes (#22)
---------
Signed-off-by: Nicolò Ciraci <[email protected]>
---
.gitignore | 129 +++++++++++++++++++++++++++++++++++
Chart.yaml | 2 +-
templates/_helpers.tpl | 12 ++++
templates/configmap.yaml | 1 +
templates/deployment.yaml | 1 +
templates/hpa.yaml | 1 +
templates/ingress.yaml | 1 +
templates/networkpolicy.yaml | 5 +-
templates/service.yaml | 1 +
templates/serviceaccount.yaml | 1 +
templates/tests/test-connection.yaml | 1 +
values.yaml | 1 +
12 files changed, 153 insertions(+), 3 deletions(-)
diff --git a/.gitignore b/.gitignore
index e3343cd..6a29be6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,130 @@
+# Created by
https://www.toptal.com/developers/gitignore/api/macos,intellij+all,helm
+# Edit at
https://www.toptal.com/developers/gitignore?templates=macos,intellij+all,helm
+
+### Helm ###
+# Chart dependencies
+**/charts/*.tgz
+
+### Intellij+all ###
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm,
CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# AWS User-specific
+.idea/**/aws.xml
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/artifacts
+# .idea/compiler.xml
+# .idea/jarRepositories.xml
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# SonarLint plugin
+.idea/sonarlint/
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### Intellij+all Patch ###
+# Ignore everything but code style settings and run configurations
+# that are supposed to be shared within teams.
+
+.idea/*
+
+!.idea/codeStyles
+!.idea/runConfigurations
+
+### macOS ###
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+
+### macOS Patch ###
+# iCloud generated files
+*.icloud
+
+# End of
https://www.toptal.com/developers/gitignore/api/macos,intellij+all,helm
test-output.xml
diff --git a/Chart.yaml b/Chart.yaml
index 09ef35c..9761596 100644
--- a/Chart.yaml
+++ b/Chart.yaml
@@ -20,7 +20,7 @@
apiVersion: v2
name: tika
appVersion: "3.0.0.0-full"
-version: "3.0.0-full"
+version: "3.0.1-full"
description: The official Helm chart for Apache Tika
type: application
keywords:
diff --git a/templates/_helpers.tpl b/templates/_helpers.tpl
index da7b610..4fbd57d 100644
--- a/templates/_helpers.tpl
+++ b/templates/_helpers.tpl
@@ -1,3 +1,15 @@
+{{/*
+Allow the release namespace to be overridden for multi-namespace deployments
in combined charts
+*/}}
+{{- define "tika-helm.namespace" -}}
+ {{- if .Values.namespaceOverride -}}
+ {{- .Values.namespaceOverride -}}
+ {{- else -}}
+ {{- .Release.Namespace -}}
+ {{- end -}}
+{{- end -}}
+
+
{{/*
Expand the name of the chart.
*/}}
diff --git a/templates/configmap.yaml b/templates/configmap.yaml
index a26e972..b588c95 100644
--- a/templates/configmap.yaml
+++ b/templates/configmap.yaml
@@ -21,6 +21,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-config
+ namespace: {{ include "tika-helm.namespace" . }}
data:
tika-config.xml: |-
{{ .Values.tikaConfig | indent 4 }}
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index de1d352..1c99894 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -20,6 +20,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "tika-helm.fullname" . }}
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
spec:
diff --git a/templates/hpa.yaml b/templates/hpa.yaml
index 3c162ed..e46040f 100644
--- a/templates/hpa.yaml
+++ b/templates/hpa.yaml
@@ -21,6 +21,7 @@ apiVersion: {{ .Values.autoscaling.apiVersion }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "tika-helm.fullname" . }}
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
spec:
diff --git a/templates/ingress.yaml b/templates/ingress.yaml
index 716fd6d..3a330e1 100644
--- a/templates/ingress.yaml
+++ b/templates/ingress.yaml
@@ -34,6 +34,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
diff --git a/templates/networkpolicy.yaml b/templates/networkpolicy.yaml
index 4241840..6921751 100644
--- a/templates/networkpolicy.yaml
+++ b/templates/networkpolicy.yaml
@@ -21,6 +21,7 @@ apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ template "tika-helm.fullname" . }}
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
spec:
@@ -35,7 +36,7 @@ spec:
{{- if not .Values.networkPolicy.allowExternal }}
from:
- podSelector:
- matchLabels:
- {{ template "tika-helm.fullname" . }}-client: "true"
+ matchLabels:
+ {{ template "tika-helm.fullname" . }}-client: "true"
{{- end }}
{{- end }}
diff --git a/templates/service.yaml b/templates/service.yaml
index cc3e253..73f4e1f 100644
--- a/templates/service.yaml
+++ b/templates/service.yaml
@@ -20,6 +20,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "tika-helm.fullname" . }}
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
annotations:
diff --git a/templates/serviceaccount.yaml b/templates/serviceaccount.yaml
index 0f708f2..0f33db0 100644
--- a/templates/serviceaccount.yaml
+++ b/templates/serviceaccount.yaml
@@ -21,6 +21,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "tika-helm.serviceAccountName" . }}
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
diff --git a/templates/tests/test-connection.yaml
b/templates/tests/test-connection.yaml
index 5de0a4c..a2a8e9f 100644
--- a/templates/tests/test-connection.yaml
+++ b/templates/tests/test-connection.yaml
@@ -20,6 +20,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "tika-helm.fullname" . }}-test-connection"
+ namespace: {{ include "tika-helm.namespace" . }}
labels:
{{- include "tika-helm.labels" . | nindent 4 }}
annotations:
diff --git a/values.yaml b/values.yaml
index a8da1e0..5eb676d 100644
--- a/values.yaml
+++ b/values.yaml
@@ -28,6 +28,7 @@ image:
imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
+namespaceOverride: ''
serviceAccount:
# Specifies whether a service account should be created