github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/helm/templates/addons/snapshot-controller-addon.yaml (about)

     1  apiVersion: extensions.kubeblocks.io/v1alpha1
     2  kind: Addon
     3  metadata:
     4    name: snapshot-controller
     5    labels:
     6      {{- include "kubeblocks.labels" . | nindent 4 }}
     7      "kubeblocks.io/provider": community
     8    {{- if .Values.keepAddons }}
     9    annotations:
    10      helm.sh/resource-policy: keep
    11    {{- end }}
    12  spec:
    13    description: 'Deploys a Snapshot Controller in a cluster. Snapshot Controllers are
    14      often bundled with the Kubernetes distribution, this chart is meant for cases where
    15      it is not. '
    16    type: Helm
    17  
    18    helm:
    19      {{- include "kubeblocks.addonChartLocationURL" ( dict "name" "snapshot-controller" "version" "1.7.2" "values" .Values) | indent 4 }}
    20      {{- include "kubeblocks.addonChartsImage" . | indent 4 }}
    21  
    22      installOptions:
    23       {{- if hasPrefix "oci://" .Values.addonChartLocationBase }}
    24        version: 1.7.2
    25       {{- end }}
    26  
    27      installValues:
    28        configMapRefs:
    29          - name: snapshot-controller-chart-kubeblocks-values
    30            key: values-kubeblocks-override.yaml
    31  
    32      valuesMapping:
    33        valueMap:
    34          replicaCount: replicaCount
    35          storageClass: volumeSnapshotClasses[0].driver
    36  
    37        jsonMap:
    38          tolerations: tolerations
    39  
    40        resources:
    41          cpu:
    42            requests: resources.requests.cpu
    43            limits: resources.limits.cpu
    44          memory:
    45            requests: resources.requests.memory
    46            limits: resources.limits.memory
    47  
    48    defaultInstallValues:
    49      - enabled: {{ get ( get ( .Values | toYaml | fromYaml ) "snapshot-controller" ) "enabled" }}
    50        {{- with .Values.tolerations }}
    51        tolerations: {{ toJson . | quote }}
    52        {{- end }}
    53  
    54      - selectors:
    55          - key: KubeGitVersion
    56            operator: Contains
    57            values:
    58              - eks
    59        storageClass: ebs.csi.aws.com
    60        {{- with .Values.tolerations }}
    61        tolerations: {{ toJson . | quote }}
    62        {{- end }}
    63  
    64      - selectors:
    65          - key: KubeGitVersion
    66            operator: Contains
    67            values:
    68              - gke
    69        storageClass: pd.csi.storage.gke.io
    70        {{- with .Values.tolerations }}
    71        tolerations: {{ toJson . | quote }}
    72        {{- end }}
    73  
    74      - selectors:
    75          - key: KubeGitVersion
    76            operator: Contains
    77            values:
    78              - aks
    79        storageClass: disk.csi.azure.com
    80        {{- with .Values.tolerations }}
    81        tolerations: {{ toJson . | quote }}
    82        {{- end }}
    83  
    84    installable:
    85      autoInstall:  {{ get ( get ( .Values | toYaml | fromYaml ) "snapshot-controller" ) "enabled" }}
    86      selectors:
    87        - key: KubeGitVersion
    88          operator: DoesNotContain
    89          values:
    90            - tke
    91            - aliyun
    92        - key: KubeProvider
    93          operator: DoesNotContain
    94          values:
    95            - huaweiCloud
    96            - azure