Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update helm charts #165

Merged
merged 16 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ build-install-nodejs-cli:

# ========================================================================================= #

update-cli:
chmod +x ./horusec-cli/deployments/scripts/update-image.sh
./horusec-cli/deployments/scripts/update-image.sh $UPDATE_TYPE $SEND_NEW_VERSION_TO_S3 $IS_TO_UPDATE_LATEST
# HELM_SERVICE_NAME="horusec-account" make helm-upgrade
HELM_SERVICE_NAME ?= ""
KUBE_NAMESPACE ?= "horus-dev"

helm-upgrade:
helm upgrade --wait -i $(HELM_SERVICE_NAME) ./$(HELM_SERVICE_NAME)/deployments/helm/$(HELM_SERVICE_NAME) -n $(KUBE_NAMESPACE) --debug
20 changes: 10 additions & 10 deletions deployments/docker-compose.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,16 @@ services:
HORUSEC_KEYCLOAK_CLIENT_ID: "account"
HORUSEC_KEYCLOAK_CLIENT_SECRET: "00000000-0000-0000-0000-000000000000" # Get secret inside of keycloak server
HORUSEC_KEYCLOAK_REALM: "master"
HORUS_LDAP_BASE: "dc=example,dc=org"
HORUS_LDAP_HOST: "127.0.0.1"
HORUS_LDAP_PORT: "389"
HORUS_LDAP_USESSL: "false"
HORUS_LDAP_SKIP_TLS: "true"
HORUS_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUS_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUS_LDAP_BINDPASSWORD: "admin"
HORUS_LDAP_USERFILTER: "(uid=%s)"
HORUS_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_BASE: "dc=example,dc=org"
HORUSEC_LDAP_HOST: "127.0.0.1"
HORUSEC_LDAP_PORT: "389"
HORUSEC_LDAP_USESSL: "false"
HORUSEC_LDAP_SKIP_TLS: "true"
HORUSEC_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUSEC_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUSEC_LDAP_BINDPASSWORD: "admin"
HORUSEC_LDAP_USERFILTER: "(uid=%s)"
HORUSEC_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_ADMIN_GROUP: "admin"
HORUSEC_ENABLE_APPLICATION_ADMIN: "false"
HORUSEC_APPLICATION_ADMIN_DATA: "{\"username\": \"horusec-admin\", \"email\":\"horusec-admin@example.com\", \"password\":\"Devpass0*\"}"
Expand Down
20 changes: 10 additions & 10 deletions deployments/docker-compose.test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ services:
HORUSEC_KEYCLOAK_CLIENT_ID: "account"
HORUSEC_KEYCLOAK_CLIENT_SECRET: "00000000-0000-0000-0000-000000000000" # Get secret inside of keycloak server
HORUSEC_KEYCLOAK_REALM: "master"
HORUS_LDAP_BASE: "dc=example,dc=org"
HORUS_LDAP_HOST: "127.0.0.1"
HORUS_LDAP_PORT: "389"
HORUS_LDAP_USESSL: "false"
HORUS_LDAP_SKIP_TLS: "true"
HORUS_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUS_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUS_LDAP_BINDPASSWORD: "admin"
HORUS_LDAP_USERFILTER: "(uid=%s)"
HORUS_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_BASE: "dc=example,dc=org"
HORUSEC_LDAP_HOST: "127.0.0.1"
HORUSEC_LDAP_PORT: "389"
HORUSEC_LDAP_USESSL: "false"
HORUSEC_LDAP_SKIP_TLS: "true"
HORUSEC_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUSEC_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUSEC_LDAP_BINDPASSWORD: "admin"
HORUSEC_LDAP_USERFILTER: "(uid=%s)"
HORUSEC_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_ADMIN_GROUP: "admin"
HORUSEC_ENABLE_APPLICATION_ADMIN: "false"
HORUSEC_APPLICATION_ADMIN_DATA: "{\"username\": \"horusec-admin\", \"email\":\"horusec-admin@example.com\", \"password\":\"Devpass0*\"}"
Expand Down
20 changes: 10 additions & 10 deletions deployments/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,16 @@ services:
HORUSEC_KEYCLOAK_CLIENT_ID: "account"
HORUSEC_KEYCLOAK_CLIENT_SECRET: "00000000-0000-0000-0000-000000000000" # Get secret inside of keycloak server
HORUSEC_KEYCLOAK_REALM: "master"
HORUS_LDAP_BASE: "dc=example,dc=org"
HORUS_LDAP_HOST: "127.0.0.1"
HORUS_LDAP_PORT: "389"
HORUS_LDAP_USESSL: "false"
HORUS_LDAP_SKIP_TLS: "true"
HORUS_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUS_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUS_LDAP_BINDPASSWORD: "admin"
HORUS_LDAP_USERFILTER: "(uid=%s)"
HORUS_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_BASE: "dc=example,dc=org"
HORUSEC_LDAP_HOST: "127.0.0.1"
HORUSEC_LDAP_PORT: "389"
HORUSEC_LDAP_USESSL: "false"
HORUSEC_LDAP_SKIP_TLS: "true"
HORUSEC_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUSEC_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUSEC_LDAP_BINDPASSWORD: "admin"
HORUSEC_LDAP_USERFILTER: "(uid=%s)"
HORUSEC_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_ADMIN_GROUP: "admin"
HORUSEC_ENABLE_APPLICATION_ADMIN: "false"
HORUSEC_APPLICATION_ADMIN_DATA: "{\"username\": \"horusec-admin\", \"email\":\"horusec-admin@example.com\", \"password\":\"Devpass0*\"}"
Expand Down
20 changes: 10 additions & 10 deletions development-kit/pkg/services/ldap/ldap.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ type Service struct {

func NewLDAPClient() ILDAPService {
return &Service{
Base: env.GetEnvOrDefault("HORUS_LDAP_BASE", ""),
Host: env.GetEnvOrDefault("HORUS_LDAP_HOST", ""),
Port: env.GetEnvOrDefaultInt("HORUS_LDAP_PORT", 389),
UseSSL: env.GetEnvOrDefaultBool("HORUS_LDAP_USESSL", false),
SkipTLS: env.GetEnvOrDefaultBool("HORUS_LDAP_SKIP_TLS", true),
InsecureSkipVerify: env.GetEnvOrDefaultBool("HORUS_LDAP_INSECURE_SKIP_VERIFY", true),
BindDN: env.GetEnvOrDefault("HORUS_LDAP_BINDDN", ""),
BindPassword: env.GetEnvOrDefault("HORUS_LDAP_BINDPASSWORD", ""),
UserFilter: env.GetEnvOrDefault("HORUS_LDAP_USERFILTER", ""),
GroupFilter: env.GetEnvOrDefault("HORUS_LDAP_GROUPFILTER", ""),
Base: env.GetEnvOrDefault("HORUSEC_LDAP_BASE", ""),
Host: env.GetEnvOrDefault("HORUSEC_LDAP_HOST", ""),
Port: env.GetEnvOrDefaultInt("HORUSEC_LDAP_PORT", 389),
UseSSL: env.GetEnvOrDefaultBool("HORUSEC_LDAP_USESSL", false),
SkipTLS: env.GetEnvOrDefaultBool("HORUSEC_LDAP_SKIP_TLS", true),
InsecureSkipVerify: env.GetEnvOrDefaultBool("HORUSEC_LDAP_INSECURE_SKIP_VERIFY", true),
BindDN: env.GetEnvOrDefault("HORUSEC_LDAP_BINDDN", ""),
BindPassword: env.GetEnvOrDefault("HORUSEC_LDAP_BINDPASSWORD", ""),
UserFilter: env.GetEnvOrDefault("HORUSEC_LDAP_USERFILTER", ""),
GroupFilter: env.GetEnvOrDefault("HORUSEC_LDAP_GROUPFILTER", ""),
Attributes: []string{"uid", "mail", "givenName"},
}
}
Expand Down
20 changes: 10 additions & 10 deletions horusec-account/deployments/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ services:
HORUSEC_KEYCLOAK_CLIENT_ID: "account"
HORUSEC_KEYCLOAK_CLIENT_SECRET: "00000000-0000-0000-0000-000000000000" # Get secret inside of keycloak server
HORUSEC_KEYCLOAK_REALM: "master"
HORUS_LDAP_BASE: "dc=example,dc=org"
HORUS_LDAP_HOST: "127.0.0.1"
HORUS_LDAP_PORT: "389"
HORUS_LDAP_USESSL: "false"
HORUS_LDAP_SKIP_TLS: "true"
HORUS_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUS_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUS_LDAP_BINDPASSWORD: "admin"
HORUS_LDAP_USERFILTER: "(uid=%s)"
HORUS_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_BASE: "dc=example,dc=org"
HORUSEC_LDAP_HOST: "127.0.0.1"
HORUSEC_LDAP_PORT: "389"
HORUSEC_LDAP_USESSL: "false"
HORUSEC_LDAP_SKIP_TLS: "true"
HORUSEC_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUSEC_LDAP_BINDDN: "cn=admin,dc=example,dc=org"
HORUSEC_LDAP_BINDPASSWORD: "admin"
HORUSEC_LDAP_USERFILTER: "(uid=%s)"
HORUSEC_LDAP_GROUPFILTER: "(memberUid=%s)"
HORUSEC_LDAP_ADMIN_GROUP: "admin"
HORUSEC_ENABLE_APPLICATION_ADMIN: "false"
HORUSEC_APPLICATION_ADMIN_DATA: "{\"username\": \"horusec-admin\", \"email\":\"horusec-admin@example.com\", \"password\":\"Devpass0*\"}"
Expand Down
18 changes: 2 additions & 16 deletions horusec-account/deployments/helm/horusec-account/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed 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: v2
name: horusec-account-helm
description: A Helm chart for Kubernetes
Expand All @@ -29,9 +15,9 @@ 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: 1.0.0
version: 0.1.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.
appVersion: 1.0.0
appVersion: 1.16.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed 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:
Expand All @@ -20,18 +6,18 @@ metadata:
labels:
{{- include "horusec-account-helm.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
{{- end }}
selector:
matchLabels:
{{- include "horusec-account-helm.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
labels:
{{- include "horusec-account-helm.selectorLabels" . | nindent 8 }}
spec:
Expand All @@ -52,17 +38,17 @@ spec:
- name: http
containerPort: 8003
protocol: TCP
env:
env:
{{- range .Values.env }}
- name: {{ .name }}
value: "{{ .value }}"
- name: {{ .name }}
value: "{{ .value }}"
{{- end }}
{{- range .Values.envFromSecret }}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ .key }}
key: {{ .key }}
- name: {{ .name }}
valueFrom:
secretKeyRef:
name: {{ .key }}
key: {{ .key }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed 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/v2beta1
kind: HorizontalPodAutoscaler
Expand All @@ -27,16 +13,16 @@ spec:
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed 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 -}}
{{- $fullName := include "horusec-account-helm.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed 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:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# Copyright 2020 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed 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
Expand Down
Loading