diff --git a/deploy/helm/opa-operator/Chart.yaml b/deploy/helm/opa-operator/Chart.yaml index 7d7d214f..9496522a 100644 --- a/deploy/helm/opa-operator/Chart.yaml +++ b/deploy/helm/opa-operator/Chart.yaml @@ -12,19 +12,30 @@ icon: https://raw.githubusercontent.com/stackabletech/opa-operator/main/.readme/ sources: - https://github.com/stackabletech/opa-operator keywords: ["open-policy-agent", "opa", "authorization", "policy", "rego", "kubernetes", "operator"] +# Artifact Hub drops any maintainer entry that has no email. maintainers: - - name: Stackable + - name: Stackable GmbH + email: info@stackable.tech url: https://www.stackable.tech # Consumed by Artifact Hub, see https://artifacthub.io/docs/topics/annotations/helm/ annotations: # The chart package ships no LICENSE file, so Artifact Hub cannot detect this itself. artifacthub.io/license: OSL-3.0 + # Artifact Hub currently infers this from "operator" in the chart name but I don't want to rely on the heuristics. + artifacthub.io/operator: "true" + # Unset means Artifact Hub predicts a category from the keywords, which it gets wrong a lot for our stuff + artifacthub.io/category: security + artifacthub.io/alternativeName: opa # A link named "support" is rendered highlighted by Artifact Hub. Keep it lowercase. artifacthub.io/links: | - name: Documentation url: https://docs.stackable.tech/home/stable/opa/ + - name: Stackable Hub + url: https://hub.stackable.tech/components/opa - name: support url: https://github.com/stackabletech/opa-operator/issues + - name: Operator image on quay.io + url: https://quay.io/repository/stackable/sdp/opa-operator artifacthub.io/crds: |- - kind: OpaCluster version: v1alpha2 diff --git a/deploy/helm/opa-operator/templates/_telemetry.tpl b/deploy/helm/opa-operator/templates/_telemetry.tpl index 458e555f..8dae7f5f 100644 --- a/deploy/helm/opa-operator/templates/_telemetry.tpl +++ b/deploy/helm/opa-operator/templates/_telemetry.tpl @@ -1,3 +1,10 @@ +{{/* +Used by FILE_LOG_DIRECTORY and the log volume mount in deployment.yaml, which have to agree. +*/}} +{{- define "opa-operator.telemetry.fileLogDirectory" -}} +/var/log/{{ include "opa-operator.appname" . }} +{{- end }} + {{/* Create a list of telemetry related env vars. */}} @@ -17,7 +24,7 @@ Create a list of telemetry related env vars. {{ end }} {{- if .fileLog.enabled }} - name: FILE_LOG_DIRECTORY - value: /stackable/logs/{{ include "opa-operator.appname" $ }} + value: {{ include "opa-operator.telemetry.fileLogDirectory" $ }} {{- end }} {{- if and .fileLog.enabled .fileLog.level }} - name: FILE_LOG_LEVEL diff --git a/deploy/helm/opa-operator/templates/deployment.yaml b/deploy/helm/opa-operator/templates/deployment.yaml index df70cf47..41738d03 100644 --- a/deploy/helm/opa-operator/templates/deployment.yaml +++ b/deploy/helm/opa-operator/templates/deployment.yaml @@ -94,6 +94,11 @@ spec: periodSeconds: 3 failureThreshold: 30 timeoutSeconds: 3 + {{- if .Values.telemetry.fileLog.enabled }} + volumeMounts: + - name: log + mountPath: {{ include "opa-operator.telemetry.fileLogDirectory" . }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -109,3 +114,8 @@ spec: {{- with .Values.priorityClassName }} priorityClassName: {{ . }} {{- end }} + {{- if .Values.telemetry.fileLog.enabled }} + volumes: + - name: log + emptyDir: {} + {{- end }} diff --git a/nix/meta.json b/nix/meta.json index 773cd5a6..d2591928 100644 --- a/nix/meta.json +++ b/nix/meta.json @@ -1 +1 @@ -{"operator": {"name": "opa-operator", "pretty_string": "OpenPolicyAgent", "product_string": "opa", "url": "stackabletech/opa-operator.git", "artifacthub_repository_id": "af99c9ca-d938-4416-a154-bc358595b378", "chart_description": "Kubernetes operator for the Open Policy Agent (OPA). Deploy and run OPA for authorization with the Stackable Data Platform (SDP).", "keywords": ["open-policy-agent", "opa", "authorization", "policy", "rego", "kubernetes", "operator"], "config": {"extra_crates": ["stackable-opa-bundle-builder"]}}} +{"operator": {"name": "opa-operator", "pretty_string": "OpenPolicyAgent", "product_string": "opa", "url": "stackabletech/opa-operator.git", "artifacthub_repository_id": "af99c9ca-d938-4416-a154-bc358595b378", "chart_description": "Kubernetes operator for the Open Policy Agent (OPA). Deploy and run OPA for authorization with the Stackable Data Platform (SDP).", "artifacthub_category": "security", "artifacthub_alternative_name": "opa", "keywords": ["open-policy-agent", "opa", "authorization", "policy", "rego", "kubernetes", "operator"], "config": {"extra_crates": ["stackable-opa-bundle-builder"]}}}