Skip to content

feat: Add lifecycle hook #5397

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

Merged
merged 4 commits into from
Aug 9, 2022
Merged

Conversation

inerplat
Copy link

@inerplat inerplat commented Aug 2, 2022

Add container lifecycle hook to helm chart of code-server deployment

It was tested in my self-hosted k8s cluster:

  1. Write custom-values.yaml for helm deploy
    # custom-values.yaml
    replicaCount: 1
    service:
      type: ClusterIP
      port: 8080
    lifecycle:
      enabled: true
      postStart:
        exec:
          command:
            - /bin/bash
            - -c
            - curl -s -L https://<my-script-url> | bash
  2. Deploy helm chart with values
    helm upgrade --install code-server . -f custom-values.yaml
    
  3. Check deployed manifest by kubectl
    $ kubectl get deploy code-server -o yaml | grep lifecycle -A7 -B0
    
            lifecycle:
              postStart:
                exec:
                  command:
                  - /bin/bash
                  - -c
                  - curl -s -L https://<my-script-url> | bash

Related to #5382

Signed-off-by: DH Kim <[email protected]>
@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #5397 (c252510) into main (6b9bb89) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5397   +/-   ##
=======================================
  Coverage   72.42%   72.42%           
=======================================
  Files          30       30           
  Lines        1672     1672           
  Branches      366      366           
=======================================
  Hits         1211     1211           
  Misses        398      398           
  Partials       63       63           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b9bb89...c252510. Read the comment docs.

@jsjoeio jsjoeio requested a review from bpmct August 3, 2022 18:41
@jsjoeio jsjoeio self-assigned this Aug 3, 2022
@jsjoeio jsjoeio modified the milestone: August 2022 Aug 3, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Aug 3, 2022

@bpmct @Matthew-Beckett do you mind helping us review this?

Copy link
Member

@bpmct bpmct left a comment

Choose a reason for hiding this comment

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

LGTM

@jsjoeio jsjoeio enabled auto-merge (squash) August 8, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants