Giter Club home page Giter Club logo

charts's People

Contributors

akarshsatija avatar akshay201 avatar bsushmith avatar chakravarthyvp avatar kevinbheda avatar krtkvrm avatar kushsharma avatar mabdh avatar nncrawler avatar prakharmathur82 avatar rahmatrhd avatar ravisuhag avatar rohilsurana avatar rsbh avatar sbchaos avatar smarchint avatar snorlacs avatar spy16 avatar stewartjingga avatar sudo-suhas avatar sumitaich1998 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

charts's Issues

Migrate Siren chart to use `app/templates`

Summary
Siren has its own template. We can reuse app/templates and remove templates in siren.

Proposed solution
Reusing app/templates for siren will make sure that every updates in app/templates can be utilized siren and making a single source of truth for templates. This is also to avoid unnecessary duplication in the charts.

Should the service or ingress annotations be part of the charts

Summary
Should the service or ingress annotations be part of the charts, since the current values are based on our internal infra, and users can have their own different controllers?

Example:

  • Service annotation
  service:
    annotations:
      projectcontour.io/upstream-protocol.h2c: tcp

https://github.com/odpf/charts/blob/main/stable/guardian/values.yaml#L33

  • Ingress annotation:
  ingress:
    enabled: true
    annotations:
      kubernetes.io/ingress.class: contour

https://github.com/odpf/charts/blob/main/stable/guardian/values.yaml#L66

Related discussion - #66 (comment)

Support livenessProbe and readinessProbe with `exec`

In siren chart, we have 2 workers and require to use livenessProbe and readinessProbe with exec.

    livenessProbe:
      exec:
        command:
        - /bin/sh
        - -c
        - ps -ef | grep siren | grep -v grep
      httpGet: null
      initialDelaySeconds: 10
      periodSeconds: 10
    readinessProbe:
      exec:
        command:
        - /bin/sh
        - -c
        - ps -ef | grep siren | grep -v grep
      httpGet: null
      initialDelaySeconds: 10
      periodSeconds: 10

And there is already a default httpGet value in both probes in charts/app. I expect setting this as httpGet=null would unset the httpGet value. But turns out both probes exec and httpGet are rendered and this caused an error when doing helm upgrade

Error: failed to create resource: Deployment.apps "xxx" is invalid: [spec.template.spec.containers[0].livenessProbe.httpGet: Forbidden: may not specify more than 1 handler type, spec.template.spec.containers[0].readinessProbe.httpGet: Forbidden: may not specify more than 1 handler type]

This is a long pending issue since helm 3. Refer here.

Solution

In this PR, I add if-else checking in deployment template. If exec probe exists, use it only, if not use whatever the value in the livenessProbe or readinessProbe.

Allow passing annotations to service object for app chart

Currently, the app chart does not allow to pass custom annotation to the service object

Since the app chart is a generic chart and if the implementing chart has GRPC endpoint exposed. To make it accessible via ingress custom annotations need to be added to the service object.

In case if we are using contour ingress the annotation is
projectcontour.io/upstream-protocol.h2c: "<port-number>"
if plain HTTP/2 is used, for grpc without tls

bug: migration job is not cleaned up post job completion

The current migration-job template does not clean up post the job completion. During app redeployments, this poses an issue, and one has to manually delete the completed migration job.

The error that is being generated during redeployment currently -

Error: cannot patch "columbus-app-migration-job" with kind Job: Job.batch "columbus-app-migration-job" is invalid:
spec.template: Invalid value: core.PodTemplateSpec{ .... }:  field is immutable

skip secret creation when secrets are empty in meteor chart

Summary
In the current meteor chart, even if values.secretConfig are empty, k8s secrets are created.

(⎈ |core-sourcing:meteor)➜  ~ kgsec core-meteor-kafka-secret -oyaml
apiVersion: v1
kind: Secret
metadata:
  annotations:
    meta.helm.sh/release-name: core-meteor-kafka
    meta.helm.sh/release-namespace: meteor
  creationTimestamp: "2022-06-06T15:46:08Z"
  labels:
    app.kubernetes.io/managed-by: Helm
  name: core-meteor-kafka-secret
  namespace: meteor
  resourceVersion: "297849918"
  uid: cbabakea-126b-4bf8-be37-2efeghifd084
type: Opaque
(⎈ |core-sourcing:meteor)➜  ~

Proposed solution
Create k8s secret only when there are secrets present

bug: inconsistent behaviour with hooked configmap

Description
With helm version v3.5.3, used by terraform helm provider v2.1.2.

Helm hook annotation are added in configmap and secret in this commit. During helm upgrade, the migration job pods are terminated along with the deletion of configmap and secret resources.

However, running helm upgrade multiple times cause different final states of upgrade.

Behaviour:
1st upgrade
Initial state:

  • Config exist
  • App pod exist

Hook running:

  • Config removed
  • Config added
  • Migration pod running
  • Migration terminated
  • Config removed

Final state:

  • Config not exist
  • Old pods are running
  • Some new pods are created with CreateContainerConfigError

2nd upgrade
Initial state:

  • Config not exist
  • Old app pods are running, New app pods are created with CreateContainerConfigError

Hook running:

  • Config removed
  • Config added
  • Migration pod running
  • Migration terminated
  • Config removed

Final state:

  • Config not exist
  • Old pods are terminated
  • Some new app pods are running, the other new app pods are created with CreateContainerConfigError

3rd upgrade
Initial state:

  • Config not exist
  • Some new app pods are running, some new app pods are created with CreateContainerConfigError

Hook running:

  • Config removed
  • Config added
  • Migration pod running
  • Migration terminated
  • Config removed

Final state:

  • Config not exist
  • All new app pods are running

4th upgrade
Initial state:

  • Config not exist
  • All new app pods are running

Hook running:

  • Config removed
  • Config added
  • Migration pod running
  • Migration terminated
  • Config removed

Final state:

  • Config exist
  • All new app pods are running (no-op)

To Reproduce
Run helm upgrade with odpf app chart version v0.4.0

Expected behavior
Regardless failed or success, the migration jobs pods and configmap should not be removed when deployment is finished

feat(app): running db migration command on each new deployment

Is your feature request related to a problem? Please describe.
I want to use app chart for deploying my service. My service happens to have a db migration command that needs to be run before running my service. Right now app chart does not support a direct way to do that.

Describe the solution you'd like
Have a migration config and values that we can toggle and fill to create a k8s job for running db migration.
e.g.

# values.yaml
...
migration:
  enabled: false
  command: ~
  args:
    - migrate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.