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

[Enhancement] support lifecycle #456

Merged

Conversation

yandongxiao
Copy link
Collaborator

@yandongxiao yandongxiao commented Feb 23, 2024

Description

support lifecycle in container

Checklist

For operator, please complete the following checklist:

  • run make generate to generate the code.
  • run golangci-lint run to check the code style.
  • run make test to run UT.
  • run make manifests to update the yaml files of CRD.

For helm chart, please complete the following checklist:

  • make sure you have updated the values.yaml
    file of starrocks chart.
  • In scripts directory, run bash create-parent-chart-values.sh to update the values.yaml file of the parent
    chart( kube-starrocks chart).

Signed-off-by: yandongxiao <yandongxiao@starrocks.com>
Copy link
Collaborator

@dengliu dengliu left a comment

Choose a reason for hiding this comment

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

Thanks for adding this support!

@yandongxiao yandongxiao marked this pull request as ready for review March 4, 2024 03:10
@yandongxiao
Copy link
Collaborator Author

yandongxiao commented Mar 4, 2024

values.yaml file. The result has been verified.

operator:
  starrocksOperator:
    image:
      repository: starrocks-kubernetes-operator
      tag: v1.9.3-rc1-20240304-1
    imagePullPolicy: IfNotPresent
starrocks:
  initPassword:
    enabled: true
    password: "123456"
  metrics:
    serviceMonitor:
      enabled: true
  starrocksBeSpec:
    lifecycle:
      postStart:
        exec:
          command:
          - /bin/sh
          - -c
          - touch /opt/my-be-txt
    beEnvVars:
    - name: LOG_CONSOLE
      value: "1"
    configMapInfo:
      configMapName: kube-starrocks-be-cm
      resolveKey: be.conf
    image:
      repository: starrocks/be-ubuntu
      tag: 3.2.2
    replicas: 1
    resources:
      limits:
        cpu: 8
        memory: 8Gi
      requests:
        cpu: 101m
        memory: 100Mi
    service:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: "8040"
        prometheus.io/scrape: "true"
      type: ClusterIP
    storageSpec:
      logStorageSize: 1Gi
      name: be-storage
      storageSize: 10Gi
  starrocksCluster:
    enabledBe: true
    enabledCn: true
  starrocksCnSpec:
    lifecycle:
      postStart:
        exec:
          command:
          - /bin/sh
          - -c
          - touch /opt/my-cn-txt
    cnEnvVars:
    - name: LOG_CONSOLE
      value: "1"
    image:
      repository: starrocks/cn-ubuntu
      tag: 3.2.2
    replicas: 1
    resources:
      limits:
        cpu: 8
        memory: 8Gi
      requests:
        cpu: 101m
        memory: 100Mi
    service:
      annotations:
        prometheus.io/path: /metrics
        prometheus.io/port: "8040"
        prometheus.io/scrape: "true"
  starrocksFESpec:
    lifecycle:
      postStart:
        exec:
          command:
          - /bin/sh
          - -c
          - touch /opt/my-fe-txt
    image:
      repository: starrocks/fe-ubuntu
      tag: 3.2.2
    resources:
      limits:
        cpu: 2
        memory: 4Gi
      requests:
        cpu: 100m
        memory: 200Mi
    service:
      annotations:
        aaa: bbb
        prometheus.io/path: /metrics
        prometheus.io/port: "8030"
        prometheus.io/scrape: "true"
      type: LoadBalancer
    storageSpec:
      logStorageSize: 1Gi
      name: fe-storage
      storageSize: 10Gi

@yandongxiao yandongxiao merged commit cd02ea3 into StarRocks:main Mar 4, 2024
6 checks passed
@yandongxiao yandongxiao added v1.9.3 enhancement New feature or request labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.9.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants