spring-cloud / spring-cloud/spring-cloud-vault

Kubernetes DiscoveryClient unavailable during Vault Bootstrap Configuration

Open
#586 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
291
Forks
152
Avg merge
11h 24m
Merged PRs (30d)
3

Description

Describe the bug
Parameter 0 of method vaultServerInstanceProvider in org.springframework.cloud.vault.config.DiscoveryClientVaultBootstrapConfiguration required a bean of type 'org.springframework.cloud.client.discovery.DiscoveryClient' that could not be found.

Error log
error.log

spring-boot
org.springframework.boot:spring-boot:2.4.5-SNAPSHOT
spring-cloud-vault
org.springframework.cloud:spring-cloud-starter-vault-config:3.0.3-SNAPSHOT
spring-cloud-kubernetes
org.springframework.cloud:spring-cloud-kubernetes-fabric8-discovery:2.0.3-SNAPSHOT

bootstrap.yaml

spring:
  application:
    name: vault-kubernetes-application
  cloud:
    discovery:
      enabled: true
    kubernetes:
      config:
        enabled: true
        enable-api: true
        sources:
          - name: vault-kubernetes-application
      discovery:
        enabled: true
        primary-port-name: backend
        catalog-services-watch:
          enabled: true
          catalog-services-watch: 5000
    vault:
      authentication: kubernetes
      connection-timeout: 5000
      read-timeout: 15000
      discovery:
        enabled: true
        service-id: vault
      kv:
        application-name: vault-kubernetes-application
        backend: backend-secrets
        enabled: true
      kubernetes:
        role: backend-read-role
        kubernetes-path: kubernetes

Sample
sample.zip

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the bootstrap.yaml configuration, error.log, and sample.zip, then inspect DiscoveryClientVaultBootstrapConfiguration and its vaultServerInstanceProvider entry point. Reproduce the startup failure and verify that a Kubernetes DiscoveryClient is available during Vault bootstrap configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kubernetes, spring
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.