Giter VIP home page Giter VIP logo

envars-from-node-labels's People

Contributors

balonik avatar danfromtitan avatar ivankovnatsky avatar rbarabas avatar

Stargazers

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

Watchers

 avatar  avatar

envars-from-node-labels's Issues

Patching breaks pod rollouts

After adding this addmission controller, sometimes this error breaks helm release rollouts

warning: Upgrade "app" failed: cannot patch "app" with kind Deployment: Deployment.apps "app" is invalid: spec.template.spec.containers[0].env[38].valueFrom: Invalid value: "": may not be specified when `value` is not empty

We're using flux as well, but this error is popping up randomly in some contexts, does not seem to related to flux.

Patching breaks pod rollouts

After adding this addmission controller, sometimes this error breaks helm release rollouts

warning: Upgrade "app" failed: cannot patch "app" with kind Deployment: Deployment.apps "app" is invalid: spec.template.spec.containers[0].env[38].valueFrom: Invalid value: "": may not be specified when `value` is not empty

We're using flux as well, but this error is popping up randomly in some contexts, does not seem to related to flux.

Helm Chart: Multiple namespaces in selector

Hey buddy

Thanks for creating the chart for this, I'm just about to move to it but I noticed that the chart only allows one namespace to be selected as per:

    namespaceSelector:
      matchLabels:
        name: {{ .Values.webhook.namespaceSelector }}

Any chance to get this adjusted to perhaps allow multiple namespaces or a custom label name?

Thanks

Expose Availability Zone ID in addition to name

Currently AZ name is returned e.g. us-east-1c

NODE_TOPOLOGY_KUBERNETES_IO_ZONE=us-east-1c

There is case with Amazon managed Kafka service (MSK) when we can consume data from Kafka broker deployed same AZ with container - docs

In order to make it work both MSK and container should know AZ Identifier (not AZ name). As in particular MSK case Kafka brokers can only know AZ ID (provided by AWS).

AZ ID usually look something like use1-az3. E.g. in my case AZ with name us-east-1e has ID use1-az3.

Sample call to AWS CLI

# aws ec2 describe-availability-zones
{
    "AvailabilityZones": [
..
        {
...
            "RegionName": "us-east-1",
            "ZoneName": "us-east-1e",
            "ZoneId": "use1-az3",
...

Basically I'd like to have ZoneId value too, not only ZoneName currently provided.

Without it I have to make call to AWS API from container to resolve name to id, that kills all the elegance of admission controller usage :)

On pod termination secret envars-* does not exist

We're using spot instances thus pods lifecycle is pretty lively with moving pods to new instances terminating them, etc.

And recently we're started to see these kind of errors keeping our node off of termination gracefully:

secret envars-6659dc1b-d26c-413b-af17-c25ae946f4ec does not exist

Have you encountered something similar?

Service went into `CrashLoopBackOff` failing to create a secret

Something weird started to happen, when had just a common helm deploys, the envars started to log this:

2022/05/13 12:29:20 error creating secret envars-95237cb9-5396-499a-bd0a-dfb2d7660c62 in namespace black: secrets "envars-95237cb9-5396-499a-bd0a-dfb2d7660c62" already exists

Pods got stuck in Terminated/Pending, also can't seem to delete pods in Terminating/Pending state since it wants to communicate with the envars-webook:

Delete failed with Internal error occurred: failed calling webhook "envars-webhook.webhook.svc": Post "https://envars-webhook.webhook.svc:443/mutate?timeout=30s": no
│   Warning  FailedScheduling  44s (x12 over 18m)  default-scheduler  binding rejected: running Bind plugin "DefaultBinder": Internal error occurred: failed calling web │
│ hook "envars-webhook.webhook.svc": Post "https://envars-webhook.webhook.svc:443/mutate?timeout=30s": no endpoints available for service "envars-webhook"   

Our install looks like this:

resource "null_resource" "envars_from_node_labels_tls" {
  count = var.cell_type == "bluestack" ? 1 : 0

  triggers = {
    cluster_instance_ids = filemd5("./scripts/tls.sh")
  }

  provisioner "local-exec" {
    command = "./scripts/tls.sh"
  }

  depends_on = [
    module.eks,
  ]
}

resource "null_resource" "envars_from_node_labels_deployment" {
  count = var.cell_type == "bluestack" ? 1 : 0

  triggers = {
    cluster_instance_ids = filemd5("./manifests/admission-webhook.yaml")
  }

  provisioner "local-exec" {
    command = <<-EOT
export CA_PEM_B64="$(kubectl get secret -n webhook envars-webhook-tls -o 'go-template={{index .data "ca.crt"}}')"
j2 ./manifests/admission-webhook.yaml | kubectl apply -f -
kubectl rollout restart -n webhook deployment envars-webhook || true
EOT
  }

  depends_on = [
    null_resource.envars_from_node_labels_tls,
    module.eks,
  ]
}

Do you know any possible clues for that errors?

From another namespace webhook is not triggering

Hi,

When I am trying to run my pods in another namespace. web hook is not triggering. I changed namespaceSelector to proper namespace and enabled containers also. still it is not working. I don't see any logs in webhook pod also.

Am I missing anything.?

And FYI We are using kustomize

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.