mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 20:28:54 +00:00
move secret scanning to main container
This commit is contained in:
@@ -51,16 +51,6 @@ component: {{ .Values.frontend.name | quote }}
|
||||
{{ include "infisical.common.matchLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "infisical.secretScanningGitApp.labels" -}}
|
||||
{{ include "infisical.secretScanningGitApp.matchLabels" . }}
|
||||
{{ include "infisical.common.metaLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "infisical.secretScanningGitApp.matchLabels" -}}
|
||||
component: {{ .Values.secretScanningGitApp.name | quote }}
|
||||
{{ include "infisical.common.matchLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "infisical.mongodb.labels" -}}
|
||||
{{ include "infisical.mongodb.matchLabels" . }}
|
||||
{{ include "infisical.common.metaLabels" . }}
|
||||
@@ -122,24 +112,6 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
||||
{{/*
|
||||
Create a fully qualified secretScanningGitApp name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
*/}}
|
||||
{{- define "infisical.secretScanningGitApp.fullname" -}}
|
||||
{{- if .Values.secretScanningGitApp.fullnameOverride -}}
|
||||
{{- .Values.secretScanningGitApp.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||
{{- if contains $name .Release.Name -}}
|
||||
{{- printf "%s-%s" .Release.Name .Values.secretScanningGitApp.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name .Values.secretScanningGitApp.name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the mongodb connection string.
|
||||
*/}}
|
||||
|
||||
@@ -44,13 +44,6 @@ spec:
|
||||
name: {{ include "infisical.backend.fullname" . }}
|
||||
port:
|
||||
number: 4000
|
||||
- path: {{ $ingress.secretScanningGitApp.path }}
|
||||
pathType: {{ $ingress.secretScanningGitApp.pathType }}
|
||||
backend:
|
||||
service:
|
||||
name: {{ include "infisical.secretScanningGitApp.fullname" . }}
|
||||
port:
|
||||
number: 3001
|
||||
{{- if $ingress.hostName }}
|
||||
host: {{ $ingress.hostName }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
{{- $secretScanningGitApp := .Values.secretScanningGitApp }}
|
||||
{{- $backend := .Values.backend }}
|
||||
{{- if .Values.secretScanningGitApp.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "infisical.secretScanningGitApp.fullname" . }}
|
||||
annotations:
|
||||
updatedAt: {{ now | date "2006-01-01 MST 15:04:05" | quote }}
|
||||
{{- with $secretScanningGitApp.deploymentAnnotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "infisical.secretScanningGitApp.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ $secretScanningGitApp.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "infisical.secretScanningGitApp.matchLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "infisical.secretScanningGitApp.matchLabels" . | nindent 8 }}
|
||||
annotations:
|
||||
updatedAt: {{ now | date "2006-01-01 MST 15:04:05" | quote }}
|
||||
{{- with $secretScanningGitApp.podAnnotations }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: {{ template "infisical.name" . }}-{{ $secretScanningGitApp.name }}
|
||||
image: "{{ $secretScanningGitApp.image.repository }}:{{ $secretScanningGitApp.image.tag | default "latest" }}"
|
||||
imagePullPolicy: {{ $secretScanningGitApp.image.pullPolicy }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 3000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ $backend.kubeSecretRef | default (include "infisical.backend.fullname" .) }}
|
||||
{{- end }}
|
||||
---
|
||||
{{- if .Values.secretScanningGitApp.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "infisical.secretScanningGitApp.fullname" . }}
|
||||
labels:
|
||||
{{- include "infisical.secretScanningGitApp.labels" . | nindent 4 }}
|
||||
{{- with $secretScanningGitApp.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ $secretScanningGitApp.service.type }}
|
||||
selector:
|
||||
{{- include "infisical.secretScanningGitApp.matchLabels" . | nindent 8 }}
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 3001
|
||||
targetPort: 3000 # container port
|
||||
{{- if eq $secretScanningGitApp.service.type "NodePort" }}
|
||||
nodePort: {{ $secretScanningGitApp.service.nodePort }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user