diff --git a/.gitignore b/.gitignore index 963e0b7..602aaf7 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ config.y*ml docker-compose.yml .vscode +helm/values*.y*ml diff --git a/helm/ambient-local-exporter/values.yaml b/helm/ambient-local-exporter/values.yaml index 5d5bb1e..d4ffb70 100644 --- a/helm/ambient-local-exporter/values.yaml +++ b/helm/ambient-local-exporter/values.yaml @@ -1,13 +1,7 @@ # yaml-language-server: $schema=https://raw.githubusercontent.com/vidispine/hull/refs/heads/main/hull/values.schema.json hull: config: - settings: - repo: gitea.libretechconsulting.com/rmcguire/ambient-local-exporter - # tag: _HT!{{ printf "%s%s" "v" _HT**Chart.AppVersion }} - tag: _HT**Chart.AppVersion - otel_service_name: "ambient-local-exporter" - otel_resource_attributes: helm.chart=_HT**Release.Name,app=ambient-local-exporter - otlp_endpoint: "http://otel.otel.svc.cluster.local:4317" # Replace me + ## Ambient-Local-Exporter settings (config.yaml) appConfig: ## App Config environment: production @@ -57,13 +51,48 @@ hull: # discardMetrics: [] # sensorMappings: # TempHumiditySensor1: Deep Freezer + ## Chart settings + settings: + resources: {} # Applies to the exporter container + repo: gitea.libretechconsulting.com/rmcguire/ambient-local-exporter + tag: _HT**Chart.AppVersion + + httpPort: 8080 # Should match appConfig http.listen + grpcPort: 8081 # Should match appConfig grpc.listen + + # Use this as a shortcut, or create your own hull.objects.httproute + httproute: + enabled: true + hostnames: + - ambient-local-exporter.mydomain.com + gatewayName: istio-ingressgateway + gatewayNamespace: istio-system + + # Use this as a shortcut, or create your own hull.objects.grpcroute + grpcroute: + enabled: true + hostnames: + - ambient-local-exporter.mydomain.com + gatewayName: istio-ingressgateway + gatewayNamespace: istio-system + + otelServiceName: ambient-local-exporter + otelResourceAttributes: app=ambient-local-exporter + otlpEndpoint: http://otel.otel.svc.cluster.local:4317 # Replace me + + serviceType: ClusterIP + serviceLbIP: "" # Used if serviceTyps=LoadBalancer + general: rbac: false render: - passes: 3 - metadata: - labels: - app: ambient-local-exporter + passes: 2 + # Applies to all objects + metadata: + labels: + custom: + app: _HT**Release.Name + version: _HT**Chart.AppVersion objects: configmap: @@ -72,18 +101,19 @@ hull: config.yaml: serialization: toYaml inline: - _HT!{{ _HT*hull.config.appConfig | toYaml }} + _HT*hull.config.appConfig environment: data: OTEL_EXPORTER_OTLP_ENDPOINT: serialization: none - inline: _HT*hull.config.settings.otlp_endpoint + inline: _HT*hull.config.settings.otlpEndpoint OTEL_SERVICE_NAME: serialization: none - inline: _HT*hull.config.settings.otel_service_name + inline: _HT*hull.config.settings.otelServiceName OTEL_RESOURCE_ATTRIBUTES: serialization: none - inline: _HT*hull.config.settings.otel_resource_attributes + inline: _HT! + {{ printf "deployment.name=%s,%s" _HT**Release.Name _HT*hull.config.settings.otelResourceAttributes }} serviceaccount: default: enabled: false @@ -95,19 +125,19 @@ hull: enabled: false deployment: - ambient-local-exporter: + main: pod: containers: main: image: repository: _HT*hull.config.settings.repo - tag: _HT*hull.config.settings.tag + tag: _HT!{{ printf "v%s" _HT*hull.config.settings.tag }} imagePullPolicy: Always ports: http: - containerPort: 8080 + containerPort: _HT*hull.config.settings.httpPort grpc: - containerPort: 8081 + containerPort: _HT*hull.config.settings.grpcPort envFrom: main: configMapRef: @@ -126,12 +156,45 @@ hull: name: config service: - ambient-local-exporter: - type: ClusterIP + main: + type: _HT*hull.config.settings.serviceType + loadBalancerIP: _HT*hull.config.settings.serviceLbIP ports: http: - port: 8080 + port: _HT*hull.config.settings.httpPort targetPort: http grpc: - port: 8081 + port: _HT*hull.config.settings.grpcPort targetPort: grpc + + httproute: + main: + enabled: _HT*hull.config.settings.httproute.enabled + hostnames: _HT*hull.config.settings.httproute.hostnames + parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway + name: _HT*hull.config.settings.httproute.gatewayName + namespace: _HT*hull.config.settings.httproute.gatewayNamespace + rules: + - backendRefs: + - group: "" + kind: Service + name: _HT^main + port: _HT*hull.config.settings.httpPort + + grpcroute: + main: + enabled: _HT*hull.config.settings.grpcroute.enabled + hostnames: _HT*hull.config.settings.grpcroute.hostnames + parentRefs: + - group: gateway.networking.k8s.io + kind: Gateway + name: _HT*hull.config.settings.grpcroute.gatewayName + namespace: _HT*hull.config.settings.grpcroute.gatewayNamespace + rules: + - backendRefs: + - group: "" + kind: Service + name: _HT^main + port: _HT*hull.config.settings.grpcPort