Skip to content

Commit

Permalink
avoid publishing crd chart
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Sep 11, 2024
1 parent 0eed0b5 commit c228a23
Show file tree
Hide file tree
Showing 20 changed files with 23 additions and 25 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
.DS_Store
.vscode/
charts/*/charts/**
!charts/*/charts/victoria-metrics-crds
!charts/*/charts/victoria-metrics-crds/**
!charts/*/charts/crds
!charts/*/charts/crds/**
.helm/
.local/
tmp/
6 changes: 3 additions & 3 deletions charts/victoria-metrics-k8s-stack/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
- name: victoria-metrics-crds
- name: crds
repository: ""
version: 0.0.*
- name: victoria-metrics-operator
Expand All @@ -20,5 +20,5 @@ dependencies:
- name: prometheus-operator-crds
repository: https://prometheus-community.github.io/helm-charts
version: 11.0.0
digest: sha256:d09712226054afd08dcb221ac42bf478325f9c506bc78ea0cbdc08fd13ec4d58
generated: "2024-09-10T06:27:10.930315795Z"
digest: sha256:6fdb3c9660b219d8832c317f44b83404d8256b4797af21197ab85cad12d29f07
generated: "2024-09-11T09:25:14.443734+03:00"
4 changes: 2 additions & 2 deletions charts/victoria-metrics-k8s-stack/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ dependencies:
- name: victoria-metrics-common
version: "0.0.*"
repository: https://victoriametrics.github.io/helm-charts
- name: victoria-metrics-crds
- name: crds
version: "0.0.*"
condition: victoria-metrics-crds.enabled
condition: crds.enabled
- name: victoria-metrics-operator
version: "0.34.*"
repository: https://victoriametrics.github.io/helm-charts
Expand Down
1 change: 1 addition & 0 deletions charts/victoria-metrics-k8s-stack/charts/crds

This file was deleted.

5 changes: 4 additions & 1 deletion charts/victoria-metrics-k8s-stack/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ victoria-metrics-operator:
crd:
# added temporary till nested chart is not updated
create: false
victoria-metrics-crds:
crds:
# -- we disable crd creation by operator chart as we create them in this chart
enabled: false

Expand All @@ -40,6 +40,9 @@ victoria-metrics-operator:
# -- By default, operator converts prometheus-operator objects.
disable_prometheus_converter: false

crds:
enabled: true

serviceAccount:
# -- Specifies whether a service account should be created
create: true
Expand Down
8 changes: 4 additions & 4 deletions charts/victoria-metrics-operator/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.9
- name: victoria-metrics-crds
version: 0.0.10
- name: crds
repository: ""
version: 0.0.*
digest: sha256:95d88c9acc7d8553c96b82c149d31dcec30a3d54fa197c9cfb7905920e27d01f
generated: "2024-09-09T10:55:25.551646+03:00"
digest: sha256:86d9756bb19f2d2eb21e119f201b25b6c00f443b0ac2aa6f4d51fb71453d159a
generated: "2024-09-11T09:25:01.502701+03:00"
4 changes: 2 additions & 2 deletions charts/victoria-metrics-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ dependencies:
- name: victoria-metrics-common
version: "0.0.*"
repository: https://victoriametrics.github.io/helm-charts
- name: victoria-metrics-crds
- name: crds
version: "0.0.*"
condition: victoria-metrics-crds.enabled
condition: crds.enabled
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: victoria-metrics-crds
name: crds
description: A subchart stores victoriametrics operator CRDs
type: application
version: 0.0.0
Expand Down
Binary file not shown.
File renamed without changes.
File renamed without changes.

This file was deleted.

6 changes: 3 additions & 3 deletions charts/victoria-metrics-operator/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- $rules := default dict }}
{{- if hasKey .Subcharts "victoria-metrics-crds" }}
{{- $files := index .Subcharts "victoria-metrics-crds" "Files" }}
{{- if .Subcharts.crds }}
{{- $files := .Subcharts.crds.Files }}
{{- $fileContentsList := $files.Get "crds/crd.yaml" | splitList "---" }}
{{- $groups := dict }}
{{- range $fileContentsList }}
Expand Down Expand Up @@ -182,7 +182,7 @@ rules:
{{- end }}
{{- end }}

{{- if and (index .Values "victoria-metrics-crds" "enabled") .Values.rbac.aggregatedClusterRoles.enabled }}
{{- if and .Values.crds.enabled .Values.rbac.aggregatedClusterRoles.enabled }}
{{- /* This template generates readonly and admin cluster roles for */ -}}
{{- /* each CRD present in the helm chart. The clusterroles use the */ -}}
{{- /* kubernetes clusterrole aggregation feature to include these */ -}}
Expand Down
2 changes: 1 addition & 1 deletion charts/victoria-metrics-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ image:
# -- Image pull policy
pullPolicy: IfNotPresent

victoria-metrics-crds:
crds:
# -- enables CRD creation and management.
# -- with this option, if you remove this chart, all crd resources will be deleted with it.
enabled: true
Expand Down
2 changes: 0 additions & 2 deletions hack/helm/victoria-metrics-crds/e2e/simple.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions hack/helm/victoria-metrics-crds/lint/simple.yaml

This file was deleted.

0 comments on commit c228a23

Please sign in to comment.