Giter Site home page Giter Site logo

Comments (8)

ryanemerson avatar ryanemerson commented on May 29, 2024

That's not currently possible. PRs are welcome though 🙂

We could add deploy.affinity to the values.yaml and make it so the default value is what's currently specified in the template, e.g. values.yaml would look like:

deploy:
  affinity:
    podAntiAffinity:
      preferredDuringSchedulingIgnoredDuringExecution:
        - podAffinityTerm:
            labelSelector:
              matchLabels:
                clusterName: {{ include "infinispan-helm-charts.name" . }}
                app: infinispan-pod
            topologyKey: kubernetes.io/hostname
          weight: 100

from infinispan-helm-charts.

oburd avatar oburd commented on May 29, 2024

You mean it's me need to create PR ?
About affinity, so i can add in values.yml ?
Something like this
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchLabels:
clusterName: {{ include "infinispan-helm-charts.name" . }}
app: infinispan-pod
topologyKey: topology.kubernetes.io/zone

from infinispan-helm-charts.

ryanemerson avatar ryanemerson commented on May 29, 2024

You mean it's me need to create PR ?

The feature may get added in the future by someone else (thanks for raising the issue), but submitting a PR yourself will definitely speed things up and ensure the feature is added.

About affinity, so i can add in values.yml ?

In order for us to support this there are two changes required:

  1. We need to update the default values.yaml included with the chart to include the yaml I posted. This is to ensure that the existing behaviour doesn't changes.
  2. The templates/statefulset.yaml template needs to be updated to remove the existing podAntiAffinity and instead include .Values.deploy.affinity. See how the spec.nodeSelector value is configured in this template for a similar example.

from infinispan-helm-charts.

oburd avatar oburd commented on May 29, 2024

If i right understand
in stateful.yml
instead of this

affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchLabels:
                    clusterName: {{ include "infinispan-helm-charts.name" . }}
                    app: infinispan-pod
                topologyKey: kubernetes.io/hostname
              weight: 100

add this to statefulset template

 {{- if .Values.deploy.affinity }}
      affinity :
      {{- with .Values.deploy.affinity }}
        {{- toYaml . | nindent 8 }}
      {{- end }}
      {{- end }}

And need to add in value.yml:

affinity: {}

from infinispan-helm-charts.

ryanemerson avatar ryanemerson commented on May 29, 2024

That looks correct 👍

from infinispan-helm-charts.

oburd avatar oburd commented on May 29, 2024

So should i do the PR ? for this ?

from infinispan-helm-charts.

ryanemerson avatar ryanemerson commented on May 29, 2024

If you're able to, it would be much appreciated!

from infinispan-helm-charts.

oburd avatar oburd commented on May 29, 2024

Hello!
I will do little later

from infinispan-helm-charts.

Related Issues (20)

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.