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

idea: automatically inject improvements #89

Open
zegl opened this issue Jan 13, 2019 · 3 comments
Open

idea: automatically inject improvements #89

zegl opened this issue Jan 13, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@zegl
Copy link
Owner

zegl commented Jan 13, 2019

Many tests could easily modify the input object to add the improvements automatically.

For example the "X-has-host-podantiaffinity" tests:

With an input like:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: foobar
spec:
  replicas: 10
  template:
    metadata:
      labels:
        app: foo
    spec:
      containers:
      - name: foobar
        image: foo:bar

The following affinity rule could be added fairly easily:

      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 100
            podAffinityTerm:
              labelSelector:
                matchLabels:
                  app: foo
                topologyKey: kubernetes.io/hostname

The hardest part with this, is to preserve as much of the original YAML (comments etc) as possible. I don't know at the moment if there are any tools that will make this easier.

@zegl zegl added the enhancement New feature or request label Jan 13, 2019
@smsufyian
Copy link

@zegl lets work on this feature together ?

@zegl
Copy link
Owner Author

zegl commented Apr 12, 2020

@s-m-sufyian Sure, do you have any ideas for how to solve this in a reasonable way?

@smsufyian
Copy link

@zegl I think , best practices are more subjective , There should be some common practices which any company should be able to override , lets call this policies/rules . Rules and policies which will not be overridden , will be taken from the base policy or standard .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants