From b4e2824b530fc7509571d5b8de597812feef9799 Mon Sep 17 00:00:00 2001 From: Gaurav Mehta Date: Mon, 3 Jul 2023 09:53:40 +1000 Subject: [PATCH] changes to introduce app version and pass linting --- charts/vcluster/Chart.yaml | 29 +++++++++--------- charts/vcluster/templates/_helpers.tpl | 27 ++--------------- charts/vcluster/values.yaml | 41 ++++++++++++++------------ 3 files changed, 38 insertions(+), 59 deletions(-) diff --git a/charts/vcluster/Chart.yaml b/charts/vcluster/Chart.yaml index 88f4d12a..90af72aa 100644 --- a/charts/vcluster/Chart.yaml +++ b/charts/vcluster/Chart.yaml @@ -3,23 +3,22 @@ description: vcluster - Virtual Kubernetes Clusters home: https://vcluster.com icon: https://static.loft.sh/branding/logos/vcluster/vertical/vcluster_vertical.svg keywords: -- developer -- development -- sharing -- share -- multi-tenancy -- tenancy -- cluster -- space -- namespace -- vcluster -- vclusters + - developer + - development + - sharing + - share + - multi-tenancy + - tenancy + - cluster + - space + - namespace + - vcluster + - vclusters maintainers: -- email: info@loft.sh - name: Loft Labs, Inc. - url: https://twitter.com/loft_sh + - name: LoftLabs name: vcluster sources: -- https://github.com/loft-sh/vcluster + - https://github.com/loft-sh/vcluster type: application version: 0.15.2 +appVersion: 0.15.2 diff --git a/charts/vcluster/templates/_helpers.tpl b/charts/vcluster/templates/_helpers.tpl index a597048e..2bda0207 100644 --- a/charts/vcluster/templates/_helpers.tpl +++ b/charts/vcluster/templates/_helpers.tpl @@ -25,11 +25,7 @@ If release name contains chart name it will be used as a full name. Whether the ingressclasses syncer should be enabled */}} {{- define "vcluster.syncIngressclassesEnabled" -}} -{{- if or - (.Values.sync.ingressclasses).enabled - (and - .Values.sync.ingresses.enabled - (not .Values.sync.ingressclasses)) -}} +{{- if or (.Values.sync.ingressclasses).enabled (and .Values.sync.ingresses.enabled (not .Values.sync.ingressclasses)) -}} {{- true -}} {{- end -}} {{- end -}} @@ -38,26 +34,7 @@ Whether the ingressclasses syncer should be enabled Whether to create a cluster role or not */}} {{- define "vcluster.createClusterRole" -}} -{{- if or - (not - (empty (include "vcluster.serviceMapping.fromHost" . ))) - (not - (empty (include "vcluster.plugin.clusterRoleExtraRules" . ))) - (not - (empty (include "vcluster.generic.clusterRoleExtraRules" . ))) - .Values.rbac.clusterRole.create - .Values.sync.hoststorageclasses.enabled - (index - ((index .Values.sync "legacy-storageclasses") | default (dict "enabled" false)) - "enabled") - (include "vcluster.syncIngressclassesEnabled" . ) - .Values.sync.nodes.enabled - .Values.sync.persistentvolumes.enabled - .Values.sync.storageclasses.enabled - .Values.sync.priorityclasses.enabled - .Values.sync.volumesnapshots.enabled - .Values.proxy.metricsServer.nodes.enabled - .Values.multiNamespaceMode.enabled -}} +{{- if or (not (empty (include "vcluster.serviceMapping.fromHost" . ))) (not (empty (include "vcluster.plugin.clusterRoleExtraRules" . ))) (not (empty (include "vcluster.generic.clusterRoleExtraRules" . ))) .Values.rbac.clusterRole.create .Values.sync.hoststorageclasses.enabled (index ((index .Values.sync "legacy-storageclasses") | default (dict "enabled" false)) "enabled") (include "vcluster.syncIngressclassesEnabled" . ) .Values.sync.nodes.enabled .Values.sync.persistentvolumes.enabled .Values.sync.storageclasses.enabled .Values.sync.priorityclasses.enabled .Values.sync.volumesnapshots.enabled .Values.proxy.metricsServer.nodes.enabled .Values.multiNamespaceMode.enabled -}} {{- true -}} {{- end -}} {{- end -}} diff --git a/charts/vcluster/values.yaml b/charts/vcluster/values.yaml index 522d3899..c6022f0f 100644 --- a/charts/vcluster/values.yaml +++ b/charts/vcluster/values.yaml @@ -50,23 +50,24 @@ sync: enabled: true ingresses: enabled: false - ingressclasses: {} + ingressclasses: + {} # By default IngressClasses sync is enabled when the Ingress sync is enabled # but it can be explicitly disabled by setting: # enabled: false fake-nodes: - enabled: true # will be ignored if nodes.enabled = true + enabled: true fake-persistentvolumes: - enabled: true # will be ignored if persistentvolumes.enabled = true + enabled: true nodes: fakeKubeletIPs: true enabled: false - # If nodes sync is enabled, and syncAllNodes = true, the virtual cluster + # If nodes sync is enabled, and syncAllNodes = true, the virtual cluster # will sync all nodes instead of only the ones where some pods are running. syncAllNodes: false # nodeSelector is used to limit which nodes get synced to the vcluster, # and which nodes are used to run vcluster pods. - # A valid string representation of a label selector must be used. + # A valid string representation of a label selector must be used. nodeSelector: "" # if true, vcluster will run with a scheduler and node changes are possible # from within the virtual cluster. This is useful if you would like to @@ -131,7 +132,8 @@ proxy: hostpathMapper: enabled: false - resources: {} + resources: + {} # limits: # cpu: 40m # memory: 100Mi @@ -202,8 +204,8 @@ storage: size: 5Gi # Optional StorageClass used for the pvc # if empty default StorageClass defined in your host cluster will be used - #className: - + # className: + # Extra volumes that should be created for the StatefulSet volumes: [] @@ -224,7 +226,7 @@ workloadServiceAccount: # Roles & ClusterRoles for the vcluster rbac: clusterRole: - # Deprecated ! + # Deprecated ! # Necessary cluster roles are created based on the enabled syncers (.sync.*.enabled) # Support for this value will be removed in a future version of the vcluster create: false @@ -233,7 +235,7 @@ rbac: # Support for this value will be removed in a future version of the vcluster # and basic role will always be created create: true - # Deprecated ! + # Deprecated ! # Necessary extended roles are created based on the enabled syncers (.sync.*.enabled) # Support for this value will be removed in a future version of the vcluster extended: false @@ -276,7 +278,8 @@ serverToken: # (Note that this token is also used to generate the encryption key for important content in the database e.g., bootstrap data) value: "" # Reference to an existing secret key used as value for the k3s server token - secretKeyRef: {} + secretKeyRef: + {} # name: "" # key: "" @@ -332,7 +335,7 @@ securityContext: # runAsNonRoot: true # Set "enable" to true when running vcluster in an OpenShift host -# This will add an extra rule to the deployed role binding in order +# This will add an extra rule to the deployed role binding in order # to manage service endpoints openshift: enable: false @@ -360,10 +363,10 @@ coredns: requests: cpu: 3m memory: 16Mi -# if below option is configured, it will override the coredns manifests with the following string -# manifests: |- -# apiVersion: ... -# ... + # if below option is configured, it will override the coredns manifests with the following string + # manifests: |- + # apiVersion: ... + # ... podAnnotations: {} podLabels: {} @@ -401,7 +404,7 @@ isolation: scopeSelector: matchExpressions: scopes: - + limitRange: enabled: true default: @@ -431,7 +434,7 @@ init: --- # The contents of manifests-template will be templated using helm # this allows you to use helm values inside, e.g.: {{ .Release.Name }} - manifestsTemplate: '' + manifestsTemplate: "" helm: [] multiNamespaceMode: @@ -440,4 +443,4 @@ multiNamespaceMode: telemetry: disabled: "false" instanceCreator: "helm" - instanceCreatorUID: "" \ No newline at end of file + instanceCreatorUID: ""