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

[BUG] Required value for terminationPolicy lost when generating yaml by helm template #8380

Closed
tianyue86 opened this issue Nov 1, 2024 · 1 comment
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@tianyue86
Copy link

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Get the latest 1.0 redis cluster yaml by helm template
tianyue@192 kbcli % helm template redisclu02 kubeblocks-addons/redis-cluster --version 1.0.0-alpha.0
---
# Source: redis-cluster/templates/rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: kb-redisclu02
  namespace: default
  labels:
    helm.sh/chart: redis-cluster-1.0.0-alpha.0
    app.kubernetes.io/version: "7.2.4"
    app.kubernetes.io/instance: redisclu02
---
# Source: redis-cluster/templates/rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
  name: kb-redisclu02
  labels:
    helm.sh/chart: redis-cluster-1.0.0-alpha.0
    app.kubernetes.io/version: "7.2.4"
    app.kubernetes.io/instance: redisclu02
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: kubeblocks-cluster-pod-role
subjects:
  - kind: ServiceAccount
    name: kb-redisclu02
    namespace: default
---
# Source: redis-cluster/templates/cluster.yaml
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
  name: redisclu02
  namespace: default
  labels: 
    helm.sh/chart: redis-cluster-1.0.0-alpha.0
    app.kubernetes.io/version: "7.2.4"
    app.kubernetes.io/instance: redisclu02
spec:
  terminationPolicy: 
  clusterDef: redis
  topology: replication
  componentSpecs:  
  - name: redis  
    replicas: 2  
    disableExporter: false
    serviceAccountName: kb-redisclu02  
    resources:
      limits:
        cpu: "0.5"
        memory: "0.5Gi"
      requests:
        cpu: "0.5"
        memory: "0.5Gi"  
    volumeClaimTemplates:
      - name: data # ref clusterDefinition components.containers.volumeMounts.name
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 20Gi  
  - name: redis-sentinel
    replicas: 3
    serviceAccountName: kb-redisclu02
    resources:
      limits:
        cpu: "0.2"
        memory:  "0.2Gi"
      requests:
        cpu: "0.2"
        memory:  "0.2Gi"
    volumeClaimTemplates:
      - name: data
        spec:
          accessModes:
            - ReadWriteOnce
          resources:
            requests:
              storage: 20Gi
  1. Apply the yaml to create cluster
* spec.terminationPolicy: Required value
* <nil>: Invalid value: "null": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation

---- mongodb has the same problem, please fix them together.

@tianyue86 tianyue86 added the kind/bug Something isn't working label Nov 1, 2024
@tianyue86
Copy link
Author

Fixed.

@github-actions github-actions bot added this to the Release 0.9.2 milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants