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

Add old readiness probe related ENVs #8009

Merged
merged 4 commits into from
Oct 25, 2024

Conversation

kvalliyurnatt
Copy link
Contributor

We are seeing issues with upgrading to 2.14.0 when there are overrides present for the readiness probe, adding the ENVs that have the credentials for the old readiness probe to run successfully should fix that issues
fixes: #8006

@kvalliyurnatt kvalliyurnatt added >bug Something isn't working v2.15.0 labels Aug 15, 2024
@naemono
Copy link
Contributor

naemono commented Aug 15, 2024

Tested with the following manifest successfully

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch-sample
spec:
  version: 8.15.0
  nodeSets:
  - name: master
    config:
      node.roles: ["master"]
      node.store.allow_mmap: false
    podTemplate:
      metadata:
        labels:
          foo: bar
      spec:
        containers:
        - name: elasticsearch
          readinessProbe:
            exec:
              command:
                - bash
                - -c
                - /mnt/elastic-internal/scripts/readiness-probe-script.sh
            failureThreshold: 3
            initialDelaySeconds: 10
            periodSeconds: 12
            successThreshold: 1
            timeoutSeconds: 12
          resources:
            limits:
              memory: 2Gi
              cpu: 1
    count: 3
  - name: data
    config:
      node.roles: ["data", "ingest", "ml"]
      node.store.allow_mmap: false
    podTemplate:
      metadata:
        labels:
          foo: bar
      spec:
        containers:
        - name: elasticsearch
          readinessProbe:
            exec:
              command:
                - bash
                - -c
                - /mnt/elastic-internal/scripts/readiness-probe-script.sh
            failureThreshold: 3
            initialDelaySeconds: 10
            periodSeconds: 12
            successThreshold: 1
            timeoutSeconds: 12
          resources:
            limits:
              memory: 2Gi
              cpu: 1
          env:
          - name: ES_JAVA_OPTS
            value: "-Xms1g -Xmx1g"
    count: 3

I see the proper env vars set on the sts:

            - name: PROBE_PASSWORD_PATH
              value: /mnt/elastic-internal/pod-mounted-users/elastic-internal-probe
            - name: PROBE_USERNAME
              value: elastic-internal-probe
            - name: READINESS_PROBE_PROTOCOL
              value: https

Copy link
Contributor

@naemono naemono left a comment

Choose a reason for hiding this comment

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

LGTM as a straight-forward fix

@ibalat

This comment was marked as off-topic.

@pebrc
Copy link
Collaborator

pebrc commented Sep 3, 2024

@ibalat can you open a thread in https://discuss.elastic.co/c/orchestration/eck/79 and we can discuss there. Let's reserve this PR for the discussion of the actual PR

@kvalliyurnatt
Copy link
Contributor Author

Closing this, as we don't want to reintroduce these ENVs again, we have updated the documentation on the new readiness probe

@kvalliyurnatt kvalliyurnatt merged commit 41cae15 into elastic:main Oct 25, 2024
5 checks passed
@kvalliyurnatt kvalliyurnatt deleted the add_readniess_cred_back branch October 25, 2024 18:35
kvalliyurnatt added a commit to kvalliyurnatt/cloud-on-k8s that referenced this pull request Oct 25, 2024
* add readiness probe credentials unconditionally

(cherry picked from commit 41cae15)
@kvalliyurnatt
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
2.15

Questions ?

Please refer to the Backport tool documentation

kvalliyurnatt added a commit that referenced this pull request Oct 25, 2024
* add readiness probe credentials unconditionally

(cherry picked from commit 41cae15)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle overrides for Readiness probe with the new readiness port feature
4 participants