{{- $hasRepair := ne (printf "%v" (default "" .Values.database.repair.version) | trim) "" }}
Boundary controller chart has been {{ if .Release.IsInstall }}installed{{ else }}upgraded{{ end }} successfully.

Release:   {{ .Release.Name }}
Namespace: {{ include "boundary.namespace" . }}

Controller:
- Replicas:         {{ .Values.controller.replicas }}
- API Service:      {{ include "boundary.controller.apiServiceName" . }} (port {{ .Values.controller.service.api.port }})
- Cluster Service:  {{ include "boundary.controller.clusterServiceName" . }} (port {{ .Values.controller.service.cluster.port }})
- Ops Service:      {{ include "boundary.controller.opsServiceName" . }} (port {{ .Values.controller.service.ops.port }})
- TLS:              {{ if .Values.tls.disabled }}disabled{{ else }}enabled (cert from Secret "{{ .Values.tls.secretName }}"){{ end }}

Secret:
- Name:          {{ include "boundary.controller.secretName" . }}
- Required keys: {{ .Values.secretRefs.keys.databaseUrl }}, {{ .Values.secretRefs.keys.license }}{{- if eq (include "boundary.controller.usesEnvMigrationUrl" . | trim) "true" }}, {{ .Values.secretRefs.keys.migrationUrl }}{{- end }}{{- if .Values.bootstrapAdmin.enabled }}, {{ .Values.secretRefs.keys.adminUsername }}, {{ .Values.secretRefs.keys.adminPassword }}{{- end }}{{- if eq (include "boundary.controller.usesEnvAeadKms" . | trim) "true" }}, {{ .Values.secretRefs.keys.kmsRoot }}, {{ .Values.secretRefs.keys.kmsWorkerAuth }}, {{ .Values.secretRefs.keys.kmsRecovery }}{{- end }}

Next steps:

{{- if .Release.IsInstall }}
1. To check install-hook jobs:

   kubectl get jobs -n {{ include "boundary.namespace" . }}
{{- if .Values.database.init.enabled }}
   kubectl logs -n {{ include "boundary.namespace" . }} job/{{ include "boundary.controller.serviceName" . }}-init-db
{{- end }}
{{- if .Values.bootstrapAdmin.enabled }}
   kubectl logs -n {{ include "boundary.namespace" . }} job/{{ include "boundary.controller.serviceName" . }}-bootstrap-admin
{{- end }}
{{- else if and .Values.database.migrate.enabled $hasRepair }}
1. To check pre-upgrade repair and migration hook jobs:

   kubectl get jobs -n {{ include "boundary.namespace" . }}
   kubectl logs -n {{ include "boundary.namespace" . }} job/{{ include "boundary.controller.serviceName" . }}-database-repair
   kubectl logs -n {{ include "boundary.namespace" . }} job/{{ include "boundary.controller.serviceName" . }}-database-migration
{{- else if .Values.database.migrate.enabled }}
1. To check pre-upgrade migration hook job:

   kubectl get jobs -n {{ include "boundary.namespace" . }}
   kubectl logs -n {{ include "boundary.namespace" . }} job/{{ include "boundary.controller.serviceName" . }}-database-migration
{{- else }}
1. To verify rollout and pod status:

   kubectl rollout status deployment/{{ include "boundary.controller.serviceName" . }} -n {{ include "boundary.namespace" . }}
   kubectl get pods -n {{ include "boundary.namespace" . }} -l app.kubernetes.io/component=controller
{{- end }}

2. To fetch external addresses on LoadBalancer Services:

   kubectl get svc {{ include "boundary.controller.apiServiceName" . }} -n {{ include "boundary.namespace" . }}
{{- if eq .Values.controller.service.cluster.type "LoadBalancer" }}

   kubectl get svc {{ include "boundary.controller.clusterServiceName" . }} -n {{ include "boundary.namespace" . }}
{{- end }}
{{- if eq .Values.controller.service.ops.type "LoadBalancer" }}

   kubectl get svc {{ include "boundary.controller.opsServiceName" . }} -n {{ include "boundary.namespace" . }}
{{- end }}

3. To access the Boundary UI using the API Service external address:

   {{ if .Values.tls.disabled }}http{{ else }}https{{ end }}://<EXTERNAL_ADDRESS>:{{ .Values.controller.service.api.port }}

For more information, visit https://www.boundaryproject.io/