diff --git a/config.yaml b/config.yaml index 8a6e82a..5c8ff38 100644 --- a/config.yaml +++ b/config.yaml @@ -140,9 +140,9 @@ modules: grafana: enabled: true expose: - type: ingress - + type: ingress # ingress or NodePort domain: grafana.disk.lt.t1.cloud + node_port_http: 30007 tls: enabled: true @@ -155,9 +155,12 @@ modules: argo_cd: expose: - type: ingress + type: ingress # ingress or NodePort domain: argocd.disk.lt.t1.cloud + node_port_http: 30005 + node_port_https: 30006 + tls: enabled: true @@ -196,7 +199,7 @@ modules: secrets_storage: enabled: true expose: - type: ingress # NodePort + type: ingress # ingress or NodePort domain: vault.disk.lt.t1.cloud node_port: 30004 @@ -223,7 +226,7 @@ modules: registry: enabled: true expose: - type: ingress # ingress or NodePort + type: ingress # ingress or nodePort # if expose_type is "ingress" domain: harbor.disk.lt.t1.cloud diff --git a/kubespray/inventory/group_vars/k8s_cluster/addons.yml b/kubespray/inventory/group_vars/k8s_cluster/addons.yml index 58ef5da..cdc4d26 100644 --- a/kubespray/inventory/group_vars/k8s_cluster/addons.yml +++ b/kubespray/inventory/group_vars/k8s_cluster/addons.yml @@ -3585,6 +3585,7 @@ releases: enabled: true serviceMonitor: true domain: &grafanaDomain grafana.disk.lt.t1.cloud + serviceNodePort: 30007 image: repository: grafana/grafana tag: 10.4.1 @@ -3649,7 +3650,7 @@ releases: exporters: [otlphttp] ingress: - enabled: true + enabled: false accountEmail: reversstorm@gmail.com class: nginx annotations: @@ -4205,7 +4206,7 @@ releases: server.insecure: true secret: - argocdServerAdminPassword: $2a$10$uCcC.iMBL3IXOHeIB/HSLOvB8WpZprJPA4dEmaNjU4wmDbPXxwMvK + argocdServerAdminPassword: $2a$10$AORf9Nnyuc.XVCI2XvmVFuU6mo5TMMert83XfUCjepoIZBETe9hWe repositories: # add default helm-repository from harbor diff --git a/pkg/config/modules_cicd.go b/pkg/config/modules_cicd.go index 0f0ddbf..2df76b0 100644 --- a/pkg/config/modules_cicd.go +++ b/pkg/config/modules_cicd.go @@ -9,9 +9,11 @@ type Cicd struct { Autoscaling bool `yaml:"autoscaling"` } `yaml:"ha"` Expose struct { - Type string `yaml:"type"` - Domain string `yaml:"domain"` - Tls struct { + Type string `yaml:"type"` + Domain string `yaml:"domain"` + NodePortHttp int `yaml:"node_port_http" env-default:"30005"` + NodePortHttps int `yaml:"node_port_https" env-default:"30006"` + Tls struct { Enabled bool `yaml:"enabled"` } `yaml:"tls"` } `yaml:"expose"` diff --git a/pkg/config/modules_observability.go b/pkg/config/modules_observability.go index ae09d4a..d93b016 100644 --- a/pkg/config/modules_observability.go +++ b/pkg/config/modules_observability.go @@ -136,9 +136,10 @@ type Visualization struct { Image string `yaml:"image" env-default:"grafana/grafana"` Tag string `yaml:"tag" env-default:"10.4.1"` Expose struct { - Type string `yaml:"type" env-default:"ingress"` - Domain string `yaml:"domain" env-default:""` - Tls struct { + Type string `yaml:"type" env-default:"ingress"` + Domain string `yaml:"domain" env-default:""` + NodePortHttp int `yaml:"node_port_http" env-default:"30007"` + Tls struct { Enabled bool `yaml:"enabled"` } } `yaml:"expose"` diff --git a/pkg/resources/templates/helm-apps/releases/cicd/argo-cd.yml.tmpl b/pkg/resources/templates/helm-apps/releases/cicd/argo-cd.yml.tmpl index 3698ff8..df46a34 100644 --- a/pkg/resources/templates/helm-apps/releases/cicd/argo-cd.yml.tmpl +++ b/pkg/resources/templates/helm-apps/releases/cicd/argo-cd.yml.tmpl @@ -15,7 +15,12 @@ server: certificateSecret: enabled: false - + {{- if eq .Modules.Cicd.ArgoCd.Expose.Type "NodePort" }} + service: + type: "NodePort" + nodePortHttp: {{ .Modules.Cicd.ArgoCd.Expose.NodePortHttp }} + nodePortHttps: {{ .Modules.Cicd.ArgoCd.Expose.NodePortHttps }} + {{- end }} {{- if .Modules.Cicd.ArgoCd.Ha.Enabled }} {{- if .Modules.Cicd.ArgoCd.Ha.Autoscaling }} autoscaling: diff --git a/pkg/resources/templates/helm-apps/releases/observability/observability.yml.tmpl b/pkg/resources/templates/helm-apps/releases/observability/observability.yml.tmpl index 94a709b..0f0431b 100644 --- a/pkg/resources/templates/helm-apps/releases/observability/observability.yml.tmpl +++ b/pkg/resources/templates/helm-apps/releases/observability/observability.yml.tmpl @@ -208,6 +208,10 @@ enabled: {{ and .Modules.Observability.Enabled .Modules.Observability.Visualization.Grafana.Enabled }} serviceMonitor: {{ .Modules.Observability.Monitoring.Enabled }} domain: &grafanaDomain {{ .Modules.Observability.Visualization.Grafana.Expose.Domain }} + {{- if eq .Modules.Observability.Visualization.Grafana.Expose.Type "NodePort" }} + serviceNodePort: {{ .Modules.Observability.Visualization.Grafana.Expose.NodePortHttp }} + + {{- end }} image: repository: {{ .Modules.Observability.Visualization.Grafana.Image }} tag: {{ .Modules.Observability.Visualization.Grafana.Tag }} @@ -281,6 +285,8 @@ ingress: {{- if eq .Modules.Observability.Visualization.Grafana.Expose.Type "ingress" }} enabled: true + {{- else }} + enabled: false {{- end }} accountEmail: {{ .Modules.Additional.CertManager.AccountEmail }} class: {{ .Modules.Additional.Ingress.Type }}