Skip to content

Commit

Permalink
for ContainerCraft#79 moved helm chart, removed dashboard release nam…
Browse files Browse the repository at this point in the history
…e from the certificate secret
  • Loading branch information
mlbiam committed Oct 3, 2024
1 parent b5a7308 commit cb44e90
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ 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.1.0
version: 0.2.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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ metadata:
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/secure-backends: "true"
nginx.ingress.kubernetes.io/session-cookie-hash: sha1
nginx.ingress.kubernetes.io/session-cookie-name: openunison-{{ .Values.orchestra_service_name }}
nginx.org/ssl-services: openunison-{{ .Values.orchestra_service_name }}
nginx.ingress.kubernetes.io/session-cookie-name: {{ .Values.orchestra_service_name }}
nginx.org/ssl-services: {{ .Values.orchestra_service_name }}
labels:
app.kubernetes.io/component: ingress-nginx
app.kubernetes.io/instance: openunison-{{ .Values.orchestra_service_name }}
app.kubernetes.io/instance: {{ .Values.orchestra_service_name }}
app.kubernetes.io/name: openunison
app.kubernetes.io/part-of: openunison
name: openunison-{{ .Values.orchestra_service_name }}-localhost
name: {{ .Values.orchestra_service_name }}-localhost
namespace: openunison
spec:
rules:
Expand All @@ -24,7 +24,7 @@ spec:
paths:
- backend:
service:
name: openunison-{{ .Values.orchestra_service_name }}
name: {{ .Values.orchestra_service_name }}
port:
number: 443
path: /
Expand All @@ -34,7 +34,7 @@ spec:
paths:
- backend:
service:
name: openunison-{{ .Values.orchestra_service_name }}
name: {{ .Values.orchestra_service_name }}
port:
number: 443
path: /
Expand All @@ -44,7 +44,7 @@ spec:
paths:
- backend:
service:
name: openunison-{{ .Values.orchestra_service_name }}
name: {{ .Values.orchestra_service_name }}
port:
number: 443
path: /
Expand All @@ -57,4 +57,4 @@ status:
loadBalancer:
ingress:
- hostname: localhost
{{ else }}
{{ end }}
File renamed without changes.
9 changes: 9 additions & 0 deletions pulumi/src/kubernetes_dashboard/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
import pulumi_kubernetes as k8s
from src.lib.namespace import create_namespace
from src.lib.helm_chart_versions import get_latest_helm_chart_version
import json

def sanitize_name(name: str) -> str:
"""Ensure the name complies with DNS-1035 and RFC 1123."""
name = name.strip('-')
if not name:
raise ValueError("Invalid name: resulting sanitized name is empty")
return name

def deploy_kubernetes_dashboard(
depends: pulumi.Input[list],
Expand Down Expand Up @@ -69,6 +77,7 @@ def deploy_kubernetes_dashboard(
)
)


return version, release

def gen_helm_values(openunison_enabled: bool):
Expand Down
4 changes: 2 additions & 2 deletions pulumi/src/openunison/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def deploy_openunison(
ou_helm_values["dashboard"]["auth_service_name"] = kubernetes_dashboard_release.name.apply(lambda name: sanitize_name(name + '-auth'))
ou_helm_values["dashboard"]["api_service_name"] = kubernetes_dashboard_release.name.apply(lambda name: sanitize_name(name + '-api'))
ou_helm_values["dashboard"]["web_service_name"] = kubernetes_dashboard_release.name.apply(lambda name: sanitize_name(name + '-web'))
ou_helm_values["dashboard"]["cert_name"] = kubernetes_dashboard_release.name.apply(lambda name: sanitize_name(name + "-certs"))


# Apply function to wait for the dashboard release names before proceeding
def wait_for_dashboard_release_names():
Expand Down Expand Up @@ -547,7 +547,7 @@ def deploy_kargo_helm(running_in_gh_spaces: bool,ou_orchestra_release,k8s_provid
kargo_openunison_release = k8s.helm.v3.Release(
'kargo-openunison',
k8s.helm.v3.ReleaseArgs(
chart='helm/openunison-kargo',
chart='src/helm/openunison-kargo',

namespace='openunison',
skip_await=False,
Expand Down

0 comments on commit cb44e90

Please sign in to comment.