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

Expired Token on refreshed AWS keys #3713

Closed
lee5i3 opened this issue Jun 20, 2023 · 7 comments
Closed

Expired Token on refreshed AWS keys #3713

lee5i3 opened this issue Jun 20, 2023 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@lee5i3
Copy link

lee5i3 commented Jun 20, 2023

I am using Hashicorp Vault to rotate my AWS keys automatically, however after they are rotated, I was able to verify the keys were updated but external-dns is still showing they were expired, requiring me to restart my pod in order to get external-dns to access AWS again

I'm using helm to install external-dns from here https://kubernetes-sigs.github.io/external-dns v1.13.0

My values look like this

  env:
    - name: AWS_SHARED_CREDENTIALS_FILE
      value: "/.aws/credentials"
 
  domainFilters: 
    - <my domain>.com
  
  podAnnotations:
    vault.hashicorp.com/agent-inject: 'true'
    vault.hashicorp.com/role: 'vault'
    vault.hashicorp.com/agent-inject-secret-credentials: '/aws/creds/external-dns'
    vault.hashicorp.com/secret-volume-path: '/.aws'
    vault.hashicorp.com/agent-inject-template-credentials: |
      {{ with secret "/aws/creds/external-dns" }}
      [default]
      aws_access_key_id = {{ .Data.access_key }}
      aws_secret_access_key = {{ .Data.secret_key }}
      aws_session_token = {{ .Data.security_token }}
      {{ end }}

vault is refreshing them in the .aws/credentials, im not sure why external-dns is unable to see the new keys
my workaround was to add this which tells vault to kill the process every time vault refreshes the keys

  shareProcessNamespace: true
  podAnnotations:
    vault.hashicorp.com/agent-inject-command-credentials: |
          kill -TERM $(pidof external-dns) || true
@lee5i3 lee5i3 added the kind/bug Categorizes issue or PR as related to a bug. label Jun 20, 2023
@Nexarian
Copy link

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 30, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 29, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

@k8s-ci-robot k8s-ci-robot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2024
@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rajeshkio
Copy link

@lee5i3 I am facing the same issue. How did you fix it? Still restarting the container? kill -TERM $(pidof external-dns) || true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

5 participants