Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
review comments
  • Loading branch information
itshacki committed Apr 23, 2023
1 parent 9153a7d commit 3ba4eab
Show file tree
Hide file tree
Showing 22 changed files with 257 additions and 485 deletions.
23 changes: 0 additions & 23 deletions wiz-broker-v2/.helmignore

This file was deleted.

8 changes: 0 additions & 8 deletions wiz-broker-v2/Chart.yaml

This file was deleted.

68 changes: 0 additions & 68 deletions wiz-broker-v2/templates/_helpers.tpl

This file was deleted.

15 changes: 0 additions & 15 deletions wiz-broker-v2/templates/serviceaccount.yaml

This file was deleted.

107 changes: 0 additions & 107 deletions wiz-broker-v2/templates/wiz-broker-deployment.yaml

This file was deleted.

43 changes: 0 additions & 43 deletions wiz-broker-v2/values.yaml

This file was deleted.

24 changes: 4 additions & 20 deletions wiz-broker/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
apiVersion: v2
name: wiz-broker
description: A Helm chart for Kubernetes
name: "wiz-broker"
description: Wiz Broker for tunneling http traffic to Wiz backend

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.4.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
version: 1.0.0
appVersion: "2.0.162274"
9 changes: 0 additions & 9 deletions wiz-broker/templates/NOTES.txt

This file was deleted.

42 changes: 18 additions & 24 deletions wiz-broker/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -38,37 +38,31 @@ app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
Create Wiz broker properties to use
*/}}
{{- define "wiz-broker.serviceAccountName" -}}
{{- default (include "wiz-broker.name" .) .Values.serviceAccount.name }}
{{- end }}

{{/*
Create the name of the service account to use for rbac
*/}}
{{- define "wiz-broker.rbacServiceAccountName" -}}
{{- default (printf "%s-%s" (include "wiz-broker.name" .) "rbac") .Values.rbacServiceAccount.name }}
{{- define "wiz-broker.wizConnectorSecretData" -}}
{{- if .Values.global.broker.createSecret }}
CONNECTOR_ID: {{ required "A valid .Values.global.wizConnector.connectorId entry required!" .Values.global.wizConnector.connectorId | quote}}
CONNECTOR_TOKEN: {{ required "A valid .Values.global.wizConnector.connectorToken entry required!" .Values.global.wizConnector.connectorToken | quote }}
TARGET_DOMAIN: {{ required "A valid .Values.global.wizConnector.targetDomain entry required!" .Values.global.wizConnector.targetDomain | quote }}
TARGET_IP: {{ required "A valid .Values.global.wizConnector.targetIp entry required!" .Values.global.wizConnector.targetIp | quote }}
TARGET_PORT: {{ required "A valid .Values.global.wizConnector.targetPort entry required!" .Values.global.wizConnector.targetPort | quote }}
{{- end }}
{{- end }}

{{/*
Create Wiz connector properties to use
Secrets names
*/}}
{{- define "wiz-broker.wizConnectorID" -}}
{{ required "A valid .Values.wizConnector.connectorId entry required!" .Values.wizConnector.connectorId }}
{{- end }}

{{- define "wiz-broker.wizConnectorSecretData" -}}
CONNECTOR_ID: {{ include "wiz-broker.wizConnectorID" . | quote}}
CONNECTOR_TOKEN: {{ required "A valid .Values.wizConnector.connectorToken entry required!" .Values.wizConnector.connectorToken | quote }}
TARGET_DOMAIN: {{ required "A valid .Values.wizConnector.targetDomain entry required!" .Values.wizConnector.targetDomain | quote }}
TARGET_IP: {{ required "A valid .Values.wizConnector.targetIp entry required!" .Values.wizConnector.targetIp | quote }}
TARGET_PORT: {{ required "A valid .Values.wizConnector.targetPort entry required!" .Values.wizConnector.targetPort | quote }}
TUNNEL_SERVER_ADDR: {{ required "A valid .Values.wizConnector.tunnelServerAddress entry required!" .Values.wizConnector.tunnelServerAddress | quote }}
TUNNEL_SERVER_PORT: {{ required "A valid .Values.wizConnector.tunnelServerPort entry required!" .Values.wizConnector.tunnelServerPort | quote }}
DISABLE_CUSTOM_TLS_FIRST_BYTE: "true"
{{- if .Values.wizConnector.httpProxy }}
HTTP_PROXY: {{ .Values.wizConnector.httpProxy | quote}}
{{- define "wiz-broker.apiTokenSecretName" -}}
{{ coalesce (.Values.global.wizApiToken.secret.name) (printf "%s-api-token" .Release.Name) }}
{{- end }}

{{- define "wiz-broker.proxySecretName" -}}
{{ coalesce (.Values.global.httpProxyConfiguration.secretName) (printf "%s-proxy-configuration" .Release.Name) }}
{{- end }}

{{- define "wiz-broker.connectorSecretName" -}}
{{ coalesce (.Values.global.wizConnector.secretName) (printf "%s-connector" .Release.Name) }}
{{- end }}
File renamed without changes.
Loading

0 comments on commit 3ba4eab

Please sign in to comment.