79604036

Date: 2025-05-02 19:53:08
Score: 1
Natty:
Report link

Found it. Apparently there is a lookup function. This works perfectly in my templates:

{{- range .Values.onepass.items }}
{{- if not (lookup "onepassword.com/v1" "OnePasswordItem" .Release.Namespace .name ) -}}
apiVersion: onepassword.com/v1
kind: OnePasswordItem
metadata:
  name: {{ .name }}
  annotations:
    operator.1password.io/auto-restart: {{ .autorestart | default true | quote }}
spec:
  itemPath: {{ .path}}
---
{{- end }}
{{- end }}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Tyler Reid