Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support read resources values #4

Open
lazychanger opened this issue Oct 13, 2022 · 0 comments
Open

Support read resources values #4

lazychanger opened this issue Oct 13, 2022 · 0 comments

Comments

@lazychanger
Copy link
Owner

dir

├── Chart.yaml
├── templates
│   ├── NOTES.txt
│   ├── service.yaml
│   ├── ingress.yaml
├── vivs
│   ├── values.yaml
└── values.yaml

templates/service.yaml

{{ if .Values.service.enabled }}
apiVersion: v1
kind: Service
metadata:
  name: {{ include "common.fullname" . }}
  labels:
    {{- include "common.labels" . | nindent 4 }}
spec:
   ...
{{- end -}}

.vivs/values.yaml

ingress
  enabled: {{ .Values.service.enabled }}
  service: {{ resource "v1" "Service" ".metadata.name" }}

go func

func resource(apiVersion, kind, expr string) any {
   ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant