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

Upgrade ks-installer chart to v3.2.0 #191

Merged
merged 7 commits into from
Nov 25, 2021

Conversation

mangoGoForward
Copy link
Member

@mangoGoForward mangoGoForward commented Nov 11, 2021

What this PR dose?

Upgrade ks-installer chart to v3.2.0

What this PR does / why we need it:

please see #190.

Which issue(s) this PR fixes:

Fixes #190.

@zheng1
Copy link
Member

zheng1 commented Nov 11, 2021

/cc @pixiake
/cc @misteruly

@pixiake
Copy link
Collaborator

pixiake commented Nov 15, 2021

Many configurations in the clusterConfiguration have changed.
https://github.com/kubesphere/ks-installer/blob/release-3.2/deploy/cluster-configuration.yaml

I think everything in the spec of clusterConfiguration can be defined as a configurable parameter, so we don't have to consider the configuration changes in it.

@mangoGoForward
Copy link
Member Author

Many configurations in the clusterConfiguration have changed. https://github.com/kubesphere/ks-installer/blob/release-3.2/deploy/cluster-configuration.yaml

I think everything in the spec of clusterConfiguration can be defined as a configurable parameter, so we don't have to consider the configuration changes in it.

Do you mean use one parameter spec instead of support detailed configuration items? and do we need verify the spec parameter?

@pixiake
Copy link
Collaborator

pixiake commented Nov 16, 2021

Many configurations in the clusterConfiguration have changed. https://github.com/kubesphere/ks-installer/blob/release-3.2/deploy/cluster-configuration.yaml
I think everything in the spec of clusterConfiguration can be defined as a configurable parameter, so we don't have to consider the configuration changes in it.

Do you mean use one parameter spec instead of support detailed configuration items? and do we need verify the spec parameter?

Yes
The configuration of ks-installer is not a fixed structure, and there are many configuration items, it is not realistic to list each item separately for configuration, so I think it is more flexible to specify the configuration directly with one parameter, such as clusterConfiguration.
How do you like it ?

replicaCount: 1

...

clusterConfiguration:
  persistence:
    storageClass: ""
  authentication:
    jwtSecret: ""  
  local_registry: ""    
  etcd:
    monitoring: false   
    endpointIps: localhost 
    port: 2379  
    tlsEnable: true
  common:
    core:
      console:
        enableMultiLogin: true 
        port: 30880
        type: NodePort
    redis:
      enabled: false
      volumeSize: 2Gi # Redis PVC size.
    openldap:
      enabled: false
      volumeSize: 2Gi   # openldap PVC size.
    minio:
      volumeSize: 20Gi # Minio PVC size.
    monitoring:
      # type: external   # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line.
      endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090 # Prometheus endpoint to get metrics data.
      GPUMonitoring:     # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero. 
        enabled: false
    gpu:                 # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs. 
      kinds:         
      - resourceName: "nvidia.com/gpu"
        resourceType: "GPU"
        default: true
    es:   # Storage backend for logging, events and auditing.
      # master:
      #   volumeSize: 4Gi  # The volume size of Elasticsearch master nodes.
      #   replicas: 1      # The total number of master nodes. Even numbers are not allowed.
      #   resources: {}
      # data:
      #   volumeSize: 20Gi  # The volume size of Elasticsearch data nodes.
      #   replicas: 1       # The total number of data nodes.
      #   resources: {}
      logMaxAge: 7             # Log retention time in built-in Elasticsearch. It is 7 days by default.
      elkPrefix: logstash      # The string making up index names. The index name will be formatted as ks-<elk_prefix>-log.
      basicAuth:
        enabled: false
        username: ""
        password: ""
      externalElasticsearchHost: ""
      externalElasticsearchPort: ""
  alerting:                # (CPU: 0.1 Core, Memory: 100 MiB) It enables users to customize alerting policies to send messages to receivers in time with different time intervals and alerting levels to choose from.
    enabled: false         # Enable or disable the KubeSphere Alerting System.
    # thanosruler:
    #   replicas: 1
    #   resources: {}
  auditing:                # Provide a security-relevant chronological set of records,recording the sequence of activities happening on the platform, initiated by different tenants.
    enabled: false         # Enable or disable the KubeSphere Auditing Log System.
    # operator:
    #   resources: {}
    # webhook:
    #   resources: {}

@mangoGoForward
Copy link
Member Author

Many configurations in the clusterConfiguration have changed. https://github.com/kubesphere/ks-installer/blob/release-3.2/deploy/cluster-configuration.yaml
I think everything in the spec of clusterConfiguration can be defined as a configurable parameter, so we don't have to consider the configuration changes in it.

Do you mean use one parameter spec instead of support detailed configuration items? and do we need verify the spec parameter?

Yes The configuration of ks-installer is not a fixed structure, and there are many configuration items, it is not realistic to list each item separately for configuration, so I think it is more flexible to specify the configuration directly with one parameter, such as clusterConfiguration. How do you like it ?

replicaCount: 1

...

clusterConfiguration:
  persistence:
    storageClass: ""
  authentication:
    jwtSecret: ""  
  local_registry: ""    
  etcd:
    monitoring: false   
    endpointIps: localhost 
    port: 2379  
    tlsEnable: true
  common:
    core:
      console:
        enableMultiLogin: true 
        port: 30880
        type: NodePort
    redis:
      enabled: false
      volumeSize: 2Gi # Redis PVC size.
    openldap:
      enabled: false
      volumeSize: 2Gi   # openldap PVC size.
    minio:
      volumeSize: 20Gi # Minio PVC size.
    monitoring:
      # type: external   # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line.
      endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090 # Prometheus endpoint to get metrics data.
      GPUMonitoring:     # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero. 
        enabled: false
    gpu:                 # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs. 
      kinds:         
      - resourceName: "nvidia.com/gpu"
        resourceType: "GPU"
        default: true
    es:   # Storage backend for logging, events and auditing.
      # master:
      #   volumeSize: 4Gi  # The volume size of Elasticsearch master nodes.
      #   replicas: 1      # The total number of master nodes. Even numbers are not allowed.
      #   resources: {}
      # data:
      #   volumeSize: 20Gi  # The volume size of Elasticsearch data nodes.
      #   replicas: 1       # The total number of data nodes.
      #   resources: {}
      logMaxAge: 7             # Log retention time in built-in Elasticsearch. It is 7 days by default.
      elkPrefix: logstash      # The string making up index names. The index name will be formatted as ks-<elk_prefix>-log.
      basicAuth:
        enabled: false
        username: ""
        password: ""
      externalElasticsearchHost: ""
      externalElasticsearchPort: ""
  alerting:                # (CPU: 0.1 Core, Memory: 100 MiB) It enables users to customize alerting policies to send messages to receivers in time with different time intervals and alerting levels to choose from.
    enabled: false         # Enable or disable the KubeSphere Alerting System.
    # thanosruler:
    #   replicas: 1
    #   resources: {}
  auditing:                # Provide a security-relevant chronological set of records,recording the sequence of activities happening on the platform, initiated by different tenants.
    enabled: false         # Enable or disable the KubeSphere Auditing Log System.
    # operator:
    #   resources: {}
    # webhook:
    #   resources: {}

It may let user confused about the structure of cluster configuration.

@pixiake
Copy link
Collaborator

pixiake commented Nov 16, 2021

Many configurations in the clusterConfiguration have changed. https://github.com/kubesphere/ks-installer/blob/release-3.2/deploy/cluster-configuration.yaml
I think everything in the spec of clusterConfiguration can be defined as a configurable parameter, so we don't have to consider the configuration changes in it.

Do you mean use one parameter spec instead of support detailed configuration items? and do we need verify the spec parameter?

Yes The configuration of ks-installer is not a fixed structure, and there are many configuration items, it is not realistic to list each item separately for configuration, so I think it is more flexible to specify the configuration directly with one parameter, such as clusterConfiguration. How do you like it ?

replicaCount: 1

...

clusterConfiguration:
  persistence:
    storageClass: ""
  authentication:
    jwtSecret: ""  
  local_registry: ""    
  etcd:
    monitoring: false   
    endpointIps: localhost 
    port: 2379  
    tlsEnable: true
  common:
    core:
      console:
        enableMultiLogin: true 
        port: 30880
        type: NodePort
    redis:
      enabled: false
      volumeSize: 2Gi # Redis PVC size.
    openldap:
      enabled: false
      volumeSize: 2Gi   # openldap PVC size.
    minio:
      volumeSize: 20Gi # Minio PVC size.
    monitoring:
      # type: external   # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line.
      endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090 # Prometheus endpoint to get metrics data.
      GPUMonitoring:     # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero. 
        enabled: false
    gpu:                 # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs. 
      kinds:         
      - resourceName: "nvidia.com/gpu"
        resourceType: "GPU"
        default: true
    es:   # Storage backend for logging, events and auditing.
      # master:
      #   volumeSize: 4Gi  # The volume size of Elasticsearch master nodes.
      #   replicas: 1      # The total number of master nodes. Even numbers are not allowed.
      #   resources: {}
      # data:
      #   volumeSize: 20Gi  # The volume size of Elasticsearch data nodes.
      #   replicas: 1       # The total number of data nodes.
      #   resources: {}
      logMaxAge: 7             # Log retention time in built-in Elasticsearch. It is 7 days by default.
      elkPrefix: logstash      # The string making up index names. The index name will be formatted as ks-<elk_prefix>-log.
      basicAuth:
        enabled: false
        username: ""
        password: ""
      externalElasticsearchHost: ""
      externalElasticsearchPort: ""
  alerting:                # (CPU: 0.1 Core, Memory: 100 MiB) It enables users to customize alerting policies to send messages to receivers in time with different time intervals and alerting levels to choose from.
    enabled: false         # Enable or disable the KubeSphere Alerting System.
    # thanosruler:
    #   replicas: 1
    #   resources: {}
  auditing:                # Provide a security-relevant chronological set of records,recording the sequence of activities happening on the platform, initiated by different tenants.
    enabled: false         # Enable or disable the KubeSphere Auditing Log System.
    # operator:
    #   resources: {}
    # webhook:
    #   resources: {}

It may let user confused about the structure of cluster configuration.

Otherwise, the template should be modified according to the new configuration. Or do you have any better ideas ?

@mangoGoForward
Copy link
Member Author

mangoGoForward commented Nov 17, 2021

Many configurations in the clusterConfiguration have changed. https://github.com/kubesphere/ks-installer/blob/release-3.2/deploy/cluster-configuration.yaml
I think everything in the spec of clusterConfiguration can be defined as a configurable parameter, so we don't have to consider the configuration changes in it.

Do you mean use one parameter spec instead of support detailed configuration items? and do we need verify the spec parameter?

Yes The configuration of ks-installer is not a fixed structure, and there are many configuration items, it is not realistic to list each item separately for configuration, so I think it is more flexible to specify the configuration directly with one parameter, such as clusterConfiguration. How do you like it ?

replicaCount: 1

...

clusterConfiguration:
  persistence:
    storageClass: ""
  authentication:
    jwtSecret: ""  
  local_registry: ""    
  etcd:
    monitoring: false   
    endpointIps: localhost 
    port: 2379  
    tlsEnable: true
  common:
    core:
      console:
        enableMultiLogin: true 
        port: 30880
        type: NodePort
    redis:
      enabled: false
      volumeSize: 2Gi # Redis PVC size.
    openldap:
      enabled: false
      volumeSize: 2Gi   # openldap PVC size.
    minio:
      volumeSize: 20Gi # Minio PVC size.
    monitoring:
      # type: external   # Whether to specify the external prometheus stack, and need to modify the endpoint at the next line.
      endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090 # Prometheus endpoint to get metrics data.
      GPUMonitoring:     # Enable or disable the GPU-related metrics. If you enable this switch but have no GPU resources, Kubesphere will set it to zero. 
        enabled: false
    gpu:                 # Install GPUKinds. The default GPU kind is nvidia.com/gpu. Other GPU kinds can be added here according to your needs. 
      kinds:         
      - resourceName: "nvidia.com/gpu"
        resourceType: "GPU"
        default: true
    es:   # Storage backend for logging, events and auditing.
      # master:
      #   volumeSize: 4Gi  # The volume size of Elasticsearch master nodes.
      #   replicas: 1      # The total number of master nodes. Even numbers are not allowed.
      #   resources: {}
      # data:
      #   volumeSize: 20Gi  # The volume size of Elasticsearch data nodes.
      #   replicas: 1       # The total number of data nodes.
      #   resources: {}
      logMaxAge: 7             # Log retention time in built-in Elasticsearch. It is 7 days by default.
      elkPrefix: logstash      # The string making up index names. The index name will be formatted as ks-<elk_prefix>-log.
      basicAuth:
        enabled: false
        username: ""
        password: ""
      externalElasticsearchHost: ""
      externalElasticsearchPort: ""
  alerting:                # (CPU: 0.1 Core, Memory: 100 MiB) It enables users to customize alerting policies to send messages to receivers in time with different time intervals and alerting levels to choose from.
    enabled: false         # Enable or disable the KubeSphere Alerting System.
    # thanosruler:
    #   replicas: 1
    #   resources: {}
  auditing:                # Provide a security-relevant chronological set of records,recording the sequence of activities happening on the platform, initiated by different tenants.
    enabled: false         # Enable or disable the KubeSphere Auditing Log System.
    # operator:
    #   resources: {}
    # webhook:
    #   resources: {}

It may let user confused about the structure of cluster configuration.

Otherwise, the template should be modified according to the new configuration. Or do you have any better ideas ?

I have no idea right now, your suggestion solved synchronization problem with the new cluster configuration in ks-installer, I will refactor code firstly, and if have other great ideas, we can deal with it again.

@ks-ci-bot ks-ci-bot added size/L and removed size/S labels Nov 19, 2021
@mangoGoForward
Copy link
Member Author

/hold

@ks-ci-bot ks-ci-bot added size/XL and removed size/L labels Nov 19, 2021
@mangoGoForward
Copy link
Member Author

/unhold

@mangoGoForward
Copy link
Member Author

Hi, I have refactored cc template of ks-installer, could you help me to provide some suggestions? @pixiake

@pixiake
Copy link
Collaborator

pixiake commented Nov 20, 2021

Hi, I have refactored cc template of ks-installer, could you help me to provide some suggestions? @pixiake

{{- if .Values.console.port }}

Thanks,I think this place should be changed to cc.common.core.console.port .

@mangoGoForward
Copy link
Member Author

Hi, I have refactored cc template of ks-installer, could you help me to provide some suggestions? @pixiake

{{- if .Values.console.port }}

Thanks,I think this place should be changed to cc.common.core.console.port .

All right, Done.

@pixiake
Copy link
Collaborator

pixiake commented Nov 22, 2021

/lgtm

@zheng1
Copy link
Member

zheng1 commented Nov 24, 2021

@mangoGoForward please update the version in Chart.yaml

@mangoGoForward
Copy link
Member Author

@mangoGoForward please update the version in Chart.yaml

Done.

@@ -18,9 +18,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.2
version: 1.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to change the chart version to 0.3.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But this update has changed the Values structure which is incompatible with old version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@pixiake
Copy link
Collaborator

pixiake commented Nov 24, 2021

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm label Nov 24, 2021
@pixiake
Copy link
Collaborator

pixiake commented Nov 24, 2021

@zheng1 I think this pr can be merged,and very grateful to @mangoGoForward for this contribution.

@zheng1
Copy link
Member

zheng1 commented Nov 25, 2021

/approve

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mangoGoForward, zheng1

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot merged commit 362a703 into kubesphere:master Nov 25, 2021
@mangoGoForward mangoGoForward deleted the upgrade-ks-installer branch December 27, 2021 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade ks-installer chart to v3.2.x
4 participants