GithubHelp home page GithubHelp logo

thomasvitale / cloud-native-spring-in-action Goto Github PK

View Code? Open in Web Editor NEW
366.0 22.0 223.0 1.84 MB

๐Ÿƒ Code samples and projects from the book "Cloud Native Spring in Action - With Spring Boot and Kubernetes" (Manning)

Home Page: https://www.manning.com/books/cloud-native-spring-in-action

License: Apache License 2.0

Java 93.97% Dockerfile 0.03% Shell 3.44% Starlark 2.55%
cloud-native spring kubernetes docker spring-boot spring-cloud java devops jvm buildpacks

cloud-native-spring-in-action's People

Contributors

thomasvitale avatar

Stargazers

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

Watchers

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

cloud-native-spring-in-action's Issues

Can you please share the code for the frontend as well?

I really appreciate your book and have found it super informative. I worked along with it when you had the frontend integrated into the edge-service and was wondering if you could now share the frontend as you have separated the two for comparison. Thank you.

Issues running Keycloak on Digital Ocean Kubernetes cluster

Hi @ThomasVitale ,

Please I am having some difficuties running Keycloak on the production cluster on digital. Each time i run the deploy script it hangs for a while and timeout. So I decided to check the logs of the container on DO. and I got this:

keycloak 14:55:49.97
keycloak 14:55:49.97 Welcome to the Bitnami keycloak container
keycloak 14:55:49.97 Subscribe to project updates by watching https://github.com/bitnami/containers
keycloak 14:55:49.98 Submit issues and feature requests at https://github.com/bitnami/containers/issues
keycloak 14:55:49.98
keycloak 14:55:49.98 INFO ==> ** Starting keycloak setup **
keycloak 14:55:50.00 INFO ==> Validating settings in KEYCLOAK_* env vars...
keycloak 14:55:50.02 INFO ==> Trying to connect to PostgreSQL server polar-keycloak-postgresql...
keycloak 14:55:50.04 INFO ==> Found PostgreSQL server listening at polar-keycloak-postgresql:5432
keycloak 14:55:50.05 INFO ==> Configuring database settings
keycloak 14:55:50.09 INFO ==> Enabling statistics
keycloak 14:55:50.11 INFO ==> Configuring http settings
keycloak 14:55:50.14 INFO ==> Configuring hostname settings
keycloak 14:55:50.15 INFO ==> Configuring cache count
keycloak 14:55:50.17 INFO ==> Configuring log level
keycloak 14:55:50.18 INFO ==> Configuring proxy
keycloak 14:55:50.20 INFO ==> ** keycloak setup finished! **
keycloak 14:55:50.22 INFO ==> ** Starting keycloak **
Appending additional Java properties to JAVA_OPTS: -Dkeycloak.import=/opt/keycloak/data/import/realm-config.json
Updating the configuration and installing your custom providers, if any. Please wait.
2023-04-06 14:55:57,939 WARN [org.keycloak.services] (build-56) KC-SERVICES0047: metrics (org.jboss.aerogear.keycloak.metrics.MetricsEndpointFactory) is implementing the internal SPI realm-restapi-extension. This SPI is internal and may change without notice
2023-04-06 14:55:59,073 WARN [org.keycloak.services] (build-56) KC-SERVICES0047: metrics-listener (org.jboss.aerogear.keycloak.metrics.MetricsEventListenerFactory) is implementing the internal SPI eventsListener. This SPI is internal and may change without notice
2023-04-06 14:56:09,249 INFO [io.quarkus.deployment.QuarkusAugmentor] (main) Quarkus augmentation completed in 15419ms
2023-04-06 14:56:11,997 INFO [org.keycloak.quarkus.runtime.hostname.DefaultHostnameProvider] (main) Hostname settings: Base URL: , Hostname: , Strict HTTPS: false, Path: , Strict BackChannel: false, Admin URL: , Admin: , Port: -1, Proxied: true
2023-04-06 14:56:14,020 INFO [org.keycloak.common.crypto.CryptoIntegration] (main) Detected crypto provider: org.keycloak.crypto.def.DefaultCryptoProvider
2023-04-06 14:56:16,904 WARN [org.infinispan.CONFIG] (keycloak-cache-init) ISPN000569: Unable to persist Infinispan internal caches as no global state enabled
2023-04-06 14:56:16,921 WARN [org.infinispan.PERSISTENCE] (keycloak-cache-init) ISPN000554: jboss-marshalling is deprecated and planned for removal
2023-04-06 14:56:17,023 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000556: Starting user marshaller 'org.infinispan.jboss.marshalling.core.JBossUserMarshaller'
2023-04-06 14:56:17,746 INFO [org.infinispan.CONTAINER] (keycloak-cache-init) ISPN000128: Infinispan version: Infinispan 'Triskaidekaphobia' 13.0.9.Final
2023-04-06 14:56:18,015 INFO [org.infinispan.CLUSTER] (keycloak-cache-init) ISPN000078: Starting JGroups channel ISPN
2023-04-06 14:56:20,079 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (development) mode
2023-04-06 14:56:20,081 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start caches
2023-04-06 14:56:20,082 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: org.infinispan.manager.EmbeddedCacheManagerStartupException: org.infinispan.commons.CacheConfigurationException: ISPN000085: Error while trying to create a channel using the specified configuration file: default-configs/default-jgroups-kubernetes.xml
2023-04-06 14:56:20,083 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: org.infinispan.commons.CacheConfigurationException: ISPN000085: Error while trying to create a channel using the specified configuration file: default-configs/default-jgroups-kubernetes.xml
2023-04-06 14:56:20,083 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: ISPN000085: Error while trying to create a channel using the specified configuration file: default-configs/default-jgroups-kubernetes.xml
2023-04-06 14:56:20,084 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: dns_query can not be null or empty
2023-04-06 14:56:20,085 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) For more details run the same command passing the '--verbose' option. Also you can use '--help' to see the details about the usage of the particular command.

It seems that Keycloak is not starting. would appreciate any assistance.

Regards.

Chapter 06: Unable to Publish COntainer Image

Dear @ThomasVitale,

On package job, the step to Publish Container Image is failing due to "denied: permission_denied: The requested installation does not exist." My Personal Access Token has the following permissions: delete:packages, gist, read:user, repo, user:email, workflow, write:org, write:packages. Here is the snippet of the failing step:

- name: Log into container registry uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Publish container image run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}

What could be the reason to fail the publishing of the image?

Thanks in advance.

catalog-service fails when started from docker-compose in chapter 6 when all 3 services including config-service

The code in the Chapter 06 repository for the docker-compose.yml file catalog service uses depends_on on Postgres and config-service. but depends_on by default only waits until the container starts, not until config-service is ready to accept the connections.

I think we have to add the healthchecks for config-service and add condition in depends_on to wait until config-service status is service_healthy

Script upload disabled on keycloack 18

Hello,

there is an issue with keycloack, script upload is disabled, so it is not loading realms from files:

2022-07-29 19:28:37,548 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to start server in (development) mode
2022-07-29 19:28:37,548 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Failed to import realm: eauction
2022-07-29 19:28:37,548 ERROR [org.keycloak.quarkus.runtime.cli.ExecutionExceptionHandler] (main) ERROR: Script upload is disabled

So it is not loading realm. I found a workaround, with a different image and a parameter:

  keycloak:
    image: quay.io/keycloak/keycloak:17.0.0-legacy
    volumes:
      - ./keycloak:/opt/jboss/keycloak/imports
    environment:
      - KEYCLOAK_USER=admin
      - KEYCLOAK_PASSWORD=admin
      - KEYCLOAK_IMPORT=/opt/jboss/keycloak/imports/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled      
    ports:
        - 8080:8080

what do you think about this? am I doing sth incorrectly? or the docker compose file needs to be updated ?

Regards

15.1.1 Versioning release candidates for continuous delivery

Hello, Thomas.
When i update the commit-stage.yml file to use Gitโ€™s commit hash the pipeline fails. At the โ€œOCI image vulnerability scanningโ€ step, the following message appears:
Executing: grype -o sarif --fail-on high ghcr.io/eduaugustoo/catalog-service:0f9acff30aa3d11cfdb335547c5ff14a6e855192 1 error occurred: * failed to catalog: could not fetch image "ghcr.io/eduaugustoo/catalog-service:0f9acff30aa3d11cfdb335547c5ff14a6e855192": unable to use DockerDaemon source: pull failed: Error response from daemon: manifest unknown
And at the following step, "Upload vulnerability report", it gives the error below:
Processing sarif files: ["./results.sarif"] Error: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at validateSarifFileSchema (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:190:24) at uploadFiles (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:267:9) at Object.uploadFromActions (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-lib.js:139:18) at async run (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:49:30) at async runWrapper (/home/runner/work/_actions/github/codeql-action/v2/lib/upload-sarif-action.js:71:9)

I am using maven instead of gradle, and my commit-stage.yml is as follows:

name: Commit Stage
on: push

env:
  REGISTRY: ghcr.io
  IMAGE_NAME: eduaugustoo/catalog-service
  VERSION: ${{ github.sha }}

jobs:
  build:
    name: Build and Test
    runs-on: ubuntu-22.04
    permissions:
      actions: read
      contents: read
      security-events: write
    steps:
      - name: Checkout source code
        uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v2
        with:
          distribution: zulu
          java-version: 11
          cache: maven
      - name: Code vulnerability scanning
        uses: anchore/scan-action@v3
        id: scan
        with:
          path: "${{ github.workspace }}"
          fail-build: false
          severity-cutoff: high
          acs-report-enable: true
      - name: Upload vulnerability report
        uses: github/codeql-action/upload-sarif@v2
        if: success() || failure()
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}
      - name: Build, unit tests and integration tests
        run: |
          chmod +x mvnw
          ./mvnw install
      - name: Validate Kubernetes manifests
        uses: stefanprodan/kube-tools@v1
        with:
          kubectl: 1.23.4
          kubeval: 0.16.1
          command: |
            kustomize build k8s | kubeval --strict -

  package:
    name: Package and Publish
    if: ${{ github.ref == 'refs/heads/main' }}
    needs: [ build ]
    runs-on: ubuntu-22.04
    permissions:
      contents: read
      packages: write
      security-events: write
    steps:
      - name: Checkout source code
        uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v2
        with:
          distribution: zulu
          java-version: 11
          cache: maven
      - name: Build container image
        run: |
          chmod +x mvnw
          ./mvnw spring-boot:build-image "-Dspring-boot.build-image.imageName=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}"
      - name: OCI image vulnerability scanning
        uses: anchore/scan-action@v3
        id: scan
        with:
          image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
          fail-build: false
          severity-cutoff: high
          acs-report-enable: true
      - name: Upload vulnerability report
        uses: github/codeql-action/upload-sarif@v2
        if: success() || failure()
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}
      - name: Log into container registry
        uses: docker/login-action@v1
        with:
          registry: ${{env.REGISTRY}}
          username: ${{github.actor}}
          password: ${{secrets.GITHUB_TOKEN}}
      - name: Publish container image
        run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }}
      - name: Publish container image (latest)
        run: |
          docker tag \
            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.VERSION }} \
            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
          docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest

Could yout help me out?

[Chapter 13.2.2] Why not including RabbitMQ in the computation of the readiness state

After reviewing the code in Listing 13.10, I examined the application.yml file within the Dispatcher Service. I didn't come across the management.endpoint.health.group.readiness.include property. I was under the impression that this property should be present and include rabbitmq in the computation of the readiness state. Shouldn't this be the case?

Chapter 2: minikube image load failed

Hi,
I have an issue with Docker 25 that not being able to load images into my local cluster via the minikube image load command, and I was able to resolve by downgrading to Docker 24 from here

see the issue for more information: kubernetes/minikube#18021

Below is my environment that I was having the issue.
OS: macOS (intel chip)
Docker Engine: 25.0.3
Minikube: v1.32.0
Kubectl Server Version: v1.28.3

this is the part of the log

$ minikube image load catalog-service:0.0.1-SNAPSHOT

โŒ  Exiting due to GUEST_IMAGE_LOAD: Failed to load image: save to dir: caching images: caching image ".../catalog-service_0.0.1-SNAPSHOT": write: unable to calculate manifest: blob sha256:... not found

Fluent bit docker images are not compatible with Apple M2 chips.

Hello @ThomasVitale

I was trying to run the observability stack of Chapter13-end, the issue is that the stack uses fluent-bit as an agent and the docker image grafana/fluent-bit-plugin-loki:2.6.1-amd64 does not get compiled on Apple M2 chips.

This I conclude from the below error.

 fluent-bit The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

If my conclusion is correct, can you suggest what changes we have to make in order to use pormtail instead of fluent-bit. Or you can point me to a suitable alternative.

Screenshot 2022-12-28 at 2 56 01 AM

However, I do get following logs in loki

Screenshot 2022-12-28 at 3 01 03 AM

If I manually start the catalog-service container then it starts catalog-service.jar

Fluent bit docker images are not compatible with Apple M2 chips.

Hello @ThomasVitale

I was trying to run the observability stack of Chapter13-end, the issues is that the stack uses fluent-bit as agent and the docker image grafana/fluent-bit-plugin-loki:2.6.1-amd64 does not gets compiled on Apple M2 chips.

This I conclude from below error.

 fluent-bit The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

If my conclusion is correct, can you suggest what changes we have to make in order to use pormtail instead of fluent-bit. Or you can point me to a suitable alternative.

minikube not able to pull images

I am going through your book and trying to follow all the lessons, howver, I am now stuck on chapter 07 because the minikube is not able to pull the postgres image.
kubectl apply -f services I get the following when I try to execute kubectl get pod:

NAME READY STATUS RESTARTS AGE
polar-postgres-5b5c6fd948-nm882 0/1 ErrImagePull 0 16s

I am behind a corporate proxy, and I have configured the required HTTPS_PROXY, HTTP_PROXY, and NO_PROXY.

Thanks

Change kubeval by kubeconform

kubeval is no longer maintained. Instead of doing a workaround by providing the schema URL, it would be better to use another tool like kubeconform.

      - name: Validate Kubernetes manifests
        uses: stefanprodan/kube-tools@v1
        with:
          kubectl: 1.26.1
          kubeconform: 0.5.0
          command: |
            kubeconform -strict -debug k8s

-debug is not needed. I just added it to show the schema URLs used to validate k8s yaml files

Chapter 10.4.3 Exercise Solution:Integration test using real world RabbitMQ broker with testcontainers

In chapter 10.4.3, there is a note that presents one exercise for reader. It says:
If you want to test the application against a specific broker (in our case, it would be for RabbitMQ), you can rely on Testcontainers, as you learned in the previous chapter. Iโ€™ll leave that up to you as an exercise.

It stuck me for a long time.The solution code provided below that can serve as a reference for others:

real rabbitMQ broker integration test

package com.polarbookshop.dispatcherservice;

import org.junit.jupiter.api.Test;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitAdmin;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.test.context.DynamicPropertyRegistry;
import org.springframework.test.context.DynamicPropertySource;
import org.testcontainers.containers.RabbitMQContainer;
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;
import org.testcontainers.utility.DockerImageName;

import java.util.concurrent.TimeUnit;

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Testcontainers
class DispatcherServiceApplicationTests {

@Container
static RabbitMQContainer rabbitMQ = new RabbitMQContainer(DockerImageName.parse("rabbitmq:3.10-management"));

// reference document: https://docs.spring.io/spring-boot/docs/2.7.18/reference/html/howto.html#howto.testing.testcontainers
@DynamicPropertySource
static void rabbitMQProperties(DynamicPropertyRegistry registry){
    registry.add("spring.rabbitmq.host", rabbitMQ::getHost);
    registry.add("spring.rabbitmq.port", rabbitMQ::getAmqpPort);
    registry.add("spring.rabbitmq.username", rabbitMQ::getAdminUsername);
    registry.add("spring.rabbitmq.password", rabbitMQ::getAdminPassword);
}

/**
 * @SpringBootTest annotation will auto help you to add beans(e.g. RabbitTemplate, RabbitAdmin etc.)
 * for more details, see: https://docs.spring.io/spring-amqp/docs/current/reference/html/#spring-rabbit-test
  */

@Autowired
private RabbitTemplate rabbitTemplate;

@Autowired
private RabbitAdmin rabbitAdmin; // you can use AmqpAdmin class too

@Test
void contextLoads() {
}

@Test
void packAndLabel(){
    long orderId = 121;

    Queue inputQueue = this.rabbitAdmin.declareQueue();
    assert inputQueue != null;
    Binding inputBinding = new Binding(inputQueue.getName(), Binding.DestinationType.QUEUE, "order-accepted", "dispatcher-service", null);

    Queue outputQueue = this.rabbitAdmin.declareQueue();
    assert outputQueue != null;
    Binding outputBinding = new Binding(outputQueue.getName(), Binding.DestinationType.QUEUE, "order-dispatched", "#", null);

    this.rabbitAdmin.declareBinding(inputBinding);
    this.rabbitAdmin.declareBinding(outputBinding);

    rabbitTemplate.convertAndSend("order-accepted", "dispatcher-service", new OrderAcceptedMessage(orderId));


    await().atMost(5, TimeUnit.SECONDS).untilAsserted(() -> {
        OrderDispatchedMessage message = rabbitTemplate.receiveAndConvert(outputQueue.getName(),
            10000, new ParameterizedTypeReference<OrderDispatchedMessage>(){});

        assert message != null;
        assertThat(message.orderId()).isEqualTo(orderId);
        System.out.println("------------------------------------: " + message.orderId());
    });
}

}

then you need to add awaitility dependency and Jackson2JsonMessageConverter bean for using ParameterizedTypeReference.

testImplementation "org.awaitility:awaitility:${awaitilityVersion}"
package com.polarbookshop.dispatcherservice;

import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * this class is created because the ParameterizedTypeReference is needed in DispatcherServiceApplicationTests
 */

@Configuration
public class RabbitMQConfig {

    @Bean
    public Jackson2JsonMessageConverter messageConverter(){
        return new Jackson2JsonMessageConverter();
    }
}

Reference:

  1. https://www.youtube.com/watch?v=9jZInwFtp44&ab_channel=SivaLabs
  2. https://stackoverflow.com/questions/49816044/connect-to-message-broker-with-spring-cloud-stream-from-test

Chapter 7: Fails to build docker image with Tilt

Hi,
I can successfully build the catalog-service image locally when I run the maven command. All is fine, and testcontainers ITs are ok.
However, when I try to build the image with Tilt, I get a problem with testcontainers when running integration tests :

2024-01-25T09:27:58.911+01:00  WARN 2867 --- [catalog-service] [containers-ryuk] o.t.utility.RyukResourceReaper           : Can not connect to Ryuk at 127.0.0.1:32768

java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.Net.pollConnect(Native Method) ~[na:na]
	at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:549) ~[na:na]
	at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:592) ~[na:na]
	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327) ~[na:na]
	at java.base/java.net.Socket.connect(Socket.java:751) ~[na:na]
	at org.testcontainers.utility.RyukResourceReaper.lambda$null$1(RyukResourceReaper.java:105) ~[testcontainers-1.19.3.jar:1.19.3]
	at org.rnorth.ducttape.ratelimits.RateLimiter.doWhenReady(RateLimiter.java:27) ~[duct-tape-1.0.8.jar:na]
	at org.testcontainers.utility.RyukResourceReaper.lambda$maybeStart$2(RyukResourceReaper.java:101) ~[testcontainers-1.19.3.jar:1.19.3]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]

Any idea ?
Thanks a lot !

I find a blemish when I write slice test in chapter 12.3.2

  1. Through creating the OrderControllerWebFluxTests, I noticed that ReactiveJwtDecoder MockBean was ultimately not utilized. The same appears to be true for JwtDecoder MockBean within the BookControllerMvcTests class in section 12.2.3. These injections seem to be superfluous and may need to be reevaluated.
  2. In my opinion, the endpoint in OrderService would be more logically protected under the customer role, and there are a couple of reasons for this thought process:
    $\quad$ (1) Within the OrderControllerWebFluxTests class, the whenBookNotAvailableThenRejectOrder method utilizes webTestClient to send a mock request with a mock jwt holding the ROLE_customer authority. This test method would render moot if all requests were allowed to pass.
    $\quad$ (2) It seems unreasonable to me that a guest should have the ability to submit an order without the appropriate permissions.

Therefore, restricting this action could be beneficial for our application control.

Chapter 9 minikube addons enable ingress failure in China

Hi, I'm stuck in chapter 9.5.1. When I tried to enable ingress, but always failed.

  1. First, I start a minikube cluster with 2 nodes:
cluster details

โžœ  ~ minikube start -p polar --nodes 2                                                                                                                       
๐Ÿ˜„  [polar] minikube v1.30.1 on Arch "23.0.0"                                                                                                                
โœจ  Automatically selected the docker driver                                                                                                                 
๐Ÿ“Œ  Using Docker driver with root privileges                                                                                                                 
๐Ÿ‘  Starting control plane node polar in cluster polar                                                                                                       
๐Ÿšœ  Pulling base image ...                                                                                                                                   
๐Ÿ”ฅ  Creating docker container (CPUs=2, Memory=2200MB) ...                                                                                                    
๐Ÿณ  Preparing Kubernetes v1.26.3 on Docker 23.0.2 ...                                                                                                        
    โ–ช Generating certificates and keys ...                                                                                                                   
    โ–ช Booting up control plane ...                                                                                                                           
    โ–ช Configuring RBAC rules ...                                                                                                                             
๐Ÿ”—  Configuring CNI (Container Networking Interface) ...                                                                                                     
    โ–ช Using image gcr.io/k8s-minikube/storage-provisioner:v5                                                                                                 
๐ŸŒŸ  Enabled addons: storage-provisioner, default-storageclass                                                                                                
๐Ÿ”Ž  Verifying Kubernetes components...                                                                                                                       

๐Ÿ‘ Starting worker node polar-m02 in cluster polar
๐Ÿšœ Pulling base image ...
๐Ÿ”ฅ Creating docker container (CPUs=2, Memory=2200MB) ...
๐ŸŒ Found network options:
โ–ช NO_PROXY=192.168.49.2
๐Ÿณ Preparing Kubernetes v1.26.3 on Docker 23.0.2 ...
โ–ช env NO_PROXY=192.168.49.2
๐Ÿ”Ž Verifying Kubernetes components...
๐Ÿ„ Done! kubectl is now configured to use "polar" cluster and "default" namespace by default

  1. Then I tried to enable ingress :

โžœ  ~ minikube addons enable ingress -p polar
๐Ÿ’ก  ingress is an addon maintained by Kubernetes. For any concerns contact minikube on GitHub.
You can view the list of minikube maintainers at: https://github.com/kubernetes/minikube/blob/master/OWNERS
    โ–ช Using image registry.k8s.io/ingress-nginx/controller:v1.7.0
    โ–ช Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794
    โ–ช Using image registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794
๐Ÿ”Ž  Verifying ingress addon...

โŒ Exiting due to MK_ADDON_ENABLE: enable failed: run callbacks: running callbacks: [waiting for app.kubernetes.io/name=ingress-nginx pods: timed out waiting for the condition]

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ”‚
โ”‚ ๐Ÿ˜ฟ If the above advice does not help, please let us know: โ”‚
โ”‚ ๐Ÿ‘‰ https://github.com/kubernetes/minikube/issues/new/choose โ”‚
โ”‚ โ”‚
โ”‚ Please run minikube logs --file=logs.txt and attach logs.txt to the GitHub issue. โ”‚
โ”‚ Please also attach the following file to the GitHub issue: โ”‚
โ”‚ - /tmp/minikube_addons_ae4fcb4856619e6ac42e679469959984454bfd00_0.log โ”‚
โ”‚ โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

  1. some infomation (These are all collapsible code blocks, you can expand by clicking them):
  • kubectl get pods -A
    
    โžœ  ~ kubectl get pods -A                                                      
    NAMESPACE       NAME                                        READY   STATUS              RESTARTS      AGE
    ingress-nginx   ingress-nginx-admission-create-wkf7d        0/1     ImagePullBackOff    0             16m
    ingress-nginx   ingress-nginx-admission-patch-2pqg8         0/1     ImagePullBackOff    0             16m
    ingress-nginx   ingress-nginx-controller-6cc5ccb977-q2w47   0/1     ContainerCreating   0             16m
    kube-system     coredns-787d4945fb-xjw4m                    1/1     Running             2 (16m ago)   17m
    kube-system     etcd-polar                                  1/1     Running             0             17m
    kube-system     kindnet-96ksk                               1/1     Running             0             17m
    kube-system     kindnet-q8vlj                               1/1     Running             0             17m
    kube-system     kube-apiserver-polar                        1/1     Running             0             17m
    kube-system     kube-controller-manager-polar               1/1     Running             0             17m
    kube-system     kube-proxy-5l2zn                            1/1     Running             0             17m
    kube-system     kube-proxy-ng6q8                            1/1     Running             0             17m
    kube-system     kube-scheduler-polar                        1/1     Running             0             17m
    kube-system     storage-provisioner                         1/1     Running             1 (17m ago)   17m
    
  • kubectl describe -n ingress-nginx ingress-nginx-controller-6cc5ccb977-q2w47
    
    โžœ  ~ kubectl describe pod -n ingress-nginx ingress-nginx-controller-6cc5ccb977-q2w47                                                                                                                                                                                          
    Name:             ingress-nginx-controller-6cc5ccb977-q2w47                                                                                                                                                                                                                   
    Namespace:        ingress-nginx                                                                                                                                                                                                                                               
    Priority:         0                                                                                                                                                                                                                                                           
    Service Account:  ingress-nginx                                                                                                                                                                                                                                               
    Node:             polar/192.168.49.2                                                                                                                                                                                                                                          
    Start Time:       Thu, 13 Jul 2023 10:02:11 +0800                                                                                                                                                                                                                             
    Labels:           app.kubernetes.io/component=controller                                                                                                                                                                                                                      
                      app.kubernetes.io/instance=ingress-nginx                                                                                                                                                                                                                    
                      app.kubernetes.io/name=ingress-nginx                                                                                                                                                                                                                        
                      gcp-auth-skip-secret=true                                                                                                                                                                                                                                   
                      pod-template-hash=6cc5ccb977                                                                                                                                                                                                                                
    Annotations:                                                                                                                                                                                                                                                            
    Status:           Pending                                                                                                                                                                                                                                                     
    IP:                                                                                                                                                                                                                                                                           
    IPs:                                                                                                                                                                                                                                                                    
    Controlled By:    ReplicaSet/ingress-nginx-controller-6cc5ccb977                                                                                                                                                                                                              
    Containers:                                                                                                                                                                                                                                                                   
      controller:                                                                                                                                                                                                                                                                 
        Container ID:                                                                                                                                                                                                                                                             
        Image:         registry.k8s.io/ingress-nginx/controller:v1.7.0@sha256:7612338342a1e7b8090bef78f2a04fffcadd548ccaabe8a47bf7758ff549a5f7                                                                                                                                    
        Image ID:                                                                                                                                                                                                                                                                 
        Ports:         80/TCP, 443/TCP, 8443/TCP                                                                                                                                                                                                                                  
        Host Ports:    80/TCP, 443/TCP, 0/TCP                                                                             
        Args:                            
          /nginx-ingress-controller                                                                                                                              
          --election-id=ingress-nginx-leader                                                                              
          --controller-class=k8s.io/ingress-nginx                                 
          --watch-ingress-without-class=true                                      
          --configmap=$(POD_NAMESPACE)/ingress-nginx-controller                                                                            
          --tcp-services-configmap=$(POD_NAMESPACE)/tcp-services                                                                                                 
          --udp-services-configmap=$(POD_NAMESPACE)/udp-services                                                                                                 
          --validating-webhook=:8443                                              
          --validating-webhook-certificate=/usr/local/certificates/cert                                                                                          
          --validating-webhook-key=/usr/local/certificates/key                                                                                                                                                                                  
        State:          Waiting                                                                                                                                                                                                                 
          Reason:       ContainerCreating                                         
        Ready:          False                                                                                                                                                                                                                   
        Restart Count:  0                                                                                                                                        
        Requests:                                                                 
          cpu:      100m                      
          memory:   90Mi                                                                                                  
        Liveness:   http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=5                                                                                                                                        
        Readiness:  http-get http://:10254/healthz delay=10s timeout=1s period=10s #success=1 #failure=3                                                                                                                                                                          
        Environment:                                                   
          POD_NAME:       ingress-nginx-controller-6cc5ccb977-q2w47 (v1:metadata.name)                                                                                                                                                                                            
          POD_NAMESPACE:  ingress-nginx (v1:metadata.namespace)                                                                            
          LD_PRELOAD:     /usr/local/lib/libmimalloc.so                                                                                    
        Mounts:                                                        
          /usr/local/certificates/ from webhook-cert (ro)                                                                                  
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-dxd2k (ro)                                                                                                                                                                                           
    Conditions:                                                        
      Type              Status                                         
      Initialized       True                                           
      Ready             False                                          
      ContainersReady   False                                          
      PodScheduled      True
    Volumes:
      webhook-cert:
        Type:        Secret (a volume populated by a Secret)
        SecretName:  ingress-nginx-admission
        Optional:    false
      kube-api-access-dxd2k:
        Type:                    Projected (a volume that contains injected data from multiple sources)
        TokenExpirationSeconds:  3607
        ConfigMapName:           kube-root-ca.crt
        ConfigMapOptional:       
        DownwardAPI:             true
    QoS Class:                   Burstable
    Node-Selectors:              kubernetes.io/os=linux
                                 minikube.k8s.io/primary=true
    Tolerations:                 node-role.kubernetes.io/master:NoSchedule
                                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
    Events:
      Type     Reason       Age                 From               Message
      ----     ------       ----                ----               -------
      Normal   Scheduled    18m                 default-scheduler  Successfully assigned ingress-nginx/ingress-nginx-controller-6cc5ccb977-q2w47 to polar
      Warning  FailedMount  12m (x2 over 16m)   kubelet            Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[kube-api-access-dxd2k webhook-cert]: timed out waiting for the condition
      Warning  FailedMount  63s (x6 over 14m)   kubelet            Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[webhook-cert kube-api-access-dxd2k]: timed out waiting for the condition
      Warning  FailedMount  35s (x17 over 18m)  kubelet            MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not found
    
  • kubectl describe pod -n ingress-nginx ingress-nginx-admission-create-wkf7d
    
    โžœ  ~ kubectl describe pod -n ingress-nginx ingress-nginx-admission-create-wkf7d                                                                                                                                                                                               
    Name:             ingress-nginx-admission-create-wkf7d                                                                                                                                                                                                                        
    Namespace:        ingress-nginx                                                                                                                                                                                                                                               
    Priority:         0                                                                                                                                                                                                                                                           
    Service Account:  ingress-nginx-admission                                                                                                                                                                                                                                     
    Node:             polar/192.168.49.2                                                                                                                                                                                                                                          
    Start Time:       Thu, 13 Jul 2023 10:02:11 +0800                                                                                                                                                                                                                             
    Labels:           app.kubernetes.io/component=admission-webhook                                                                                                                                                                                                               
                      app.kubernetes.io/instance=ingress-nginx                                                                                                                                                                                                                    
                      app.kubernetes.io/name=ingress-nginx                                                                                                                                                                                                                        
                      controller-uid=d5123061-5639-463a-a4fc-5e73dfa3295d                                                                                                                                                                                                         
                      job-name=ingress-nginx-admission-create                                                                                                                                                                                                                     
    Annotations:      
    Status:           Pending
    IP:               10.244.0.4
    IPs:
      IP:           10.244.0.4
    Controlled By:  Job/ingress-nginx-admission-create
    Containers:
      create:
        Container ID:  
        Image:         registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f
        Image ID:      
        Port:          
        Host Port:     
        Args:
          create
          --host=ingress-nginx-controller-admission,ingress-nginx-controller-admission.$(POD_NAMESPACE).svc
          --namespace=$(POD_NAMESPACE)
          --secret-name=ingress-nginx-admission
        State:          Waiting
          Reason:       ImagePullBackOff
        Ready:          False
        Restart Count:  0
        Environment:
          POD_NAMESPACE:  ingress-nginx (v1:metadata.namespace)
        Mounts:
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-82vfm (ro)
    Conditions:
      Type              Status
      Initialized       True 
      Ready             False 
      ContainersReady   False 
      PodScheduled      True 
    Volumes:
      kube-api-access-82vfm:
        Type:                    Projected (a volume that contains injected data from multiple sources)
        TokenExpirationSeconds:  3607
        ConfigMapName:           kube-root-ca.crt
        ConfigMapOptional:       
        DownwardAPI:             true
    QoS Class:                   BestEffort
    Node-Selectors:              kubernetes.io/os=linux
                                 minikube.k8s.io/primary=true
    Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
    Events:
      Type     Reason          Age                   From               Message
      ----     ------          ----                  ----               -------
      Normal   Scheduled       22m                   default-scheduler  Successfully assigned ingress-nginx/ingress-nginx-admission-create-wkf7d to polar
      Normal   SandboxChanged  21m                   kubelet            Pod sandbox changed, it will be killed and re-created.
      Warning  Failed          19m (x6 over 21m)     kubelet            Error: ImagePullBackOff
      Normal   Pulling         18m (x4 over 22m)     kubelet            Pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
      Warning  Failed          18m (x4 over 21m)     kubelet            Failed to pull image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": rpc error: code = Unknown desc = Error response from daemon: Get "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/ingress-nginx/kube-webhook-certgen/manifests/sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": dial tcp 142.251.2.82:443: i/o timeout
      Warning  Failed          18m (x4 over 21m)     kubelet            Error: ErrImagePull
      Warning  Failed          7m26s                 kubelet            Failed to pull image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": rpc error: code = Unknown desc = Error response from daemon: Get "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/ingress-nginx/kube-webhook-certgen/manifests/sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": dial tcp 74.125.137.82:443: i/o timeout
      Normal   BackOff         2m28s (x69 over 21m)  kubelet            Back-off pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
    
  • kubectl describe pod -n ingress-nginx ingress-nginx-admission-patch-2pqg8
    
    โžœ  ~ kubectl describe pod -n ingress-nginx ingress-nginx-admission-patch-2pqg8                                                                                                                                                                                        [10/605]
    Name:             ingress-nginx-admission-patch-2pqg8                                                                                                                                                                                                                         
    Namespace:        ingress-nginx                                                                                                                                                                                                                                               
    Priority:         0                                                                                                                                                                                                                                                           
    Service Account:  ingress-nginx-admission                                                                                                                                                                                                                                     
    Node:             polar/192.168.49.2                                                                                                                                                                                                                                          
    Start Time:       Thu, 13 Jul 2023 10:02:11 +0800                                                                                                                                                                                                                             
    Labels:           app.kubernetes.io/component=admission-webhook                                                                                                                                                                                                               
                      app.kubernetes.io/instance=ingress-nginx                                                                                                                                                                                                                    
                      app.kubernetes.io/name=ingress-nginx                                                                                                                                                                                                                        
                      controller-uid=200118a6-d7cb-434f-b6e1-013cc284f3e1                                                                                                                                                                                                         
                      job-name=ingress-nginx-admission-patch
    Annotations:      
    Status:           Pending
    IP:               10.244.0.3
    IPs:
      IP:           10.244.0.3
    Controlled By:  Job/ingress-nginx-admission-patch
    Containers:
      patch:
        Container ID:  
        Image:         registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f
        Image ID:      
        Port:          
        Host Port:     
        Args:
          patch
          --webhook-name=ingress-nginx-admission
          --namespace=$(POD_NAMESPACE)
          --patch-mutating=false
          --secret-name=ingress-nginx-admission
          --patch-failure-policy=Fail
        State:          Waiting
          Reason:       ImagePullBackOff
        Ready:          False
        Restart Count:  0
        Environment:
          POD_NAMESPACE:  ingress-nginx (v1:metadata.namespace)
        Mounts:
          /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-wswbm (ro)
    Conditions:
      Type              Status
      Initialized       True 
      Ready             False 
      ContainersReady   False 
      PodScheduled      True 
    Volumes:
      kube-api-access-wswbm:
        Type:                    Projected (a volume that contains injected data from multiple sources)
        TokenExpirationSeconds:  3607
        ConfigMapName:           kube-root-ca.crt
        ConfigMapOptional:       
        DownwardAPI:             true
    QoS Class:                   BestEffort
    Node-Selectors:              kubernetes.io/os=linux
                                 minikube.k8s.io/primary=true
    Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
    Events:
      Type     Reason          Age                  From               Message
      ----     ------          ----                 ----               -------
      Normal   Scheduled       26m                  default-scheduler  Successfully assigned ingress-nginx/ingress-nginx-admission-patch-2pqg8 to polar
      Normal   SandboxChanged  26m                  kubelet            Pod sandbox changed, it will be killed and re-created.
      Warning  Failed          23m (x6 over 26m)    kubelet            Error: ImagePullBackOff
      Warning  Failed          22m (x4 over 26m)    kubelet            Error: ErrImagePull
      Normal   BackOff         11m (x48 over 26m)   kubelet            Back-off pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
      Warning  Failed          6m33s (x7 over 26m)  kubelet            Failed to pull image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": rpc error: code = Unknown desc = Error response from daemon: Get "https://us-west2-docker.pkg.dev/v2/k8s-artifacts-prod/images/ingress-nginx/kube-webhook-certgen/manifests/sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f": dial tcp 142.251.2.82:443: i/o timeout
      Normal   Pulling         90s (x9 over 26m)    kubelet            Pulling image "registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230312-helm-chart-4.5.2-28-g66a760794@sha256:01d181618f270f2a96c04006f33b2699ad3ccb02da48d0f89b22abce084b292f"
    
  1. log file:

minikube logs --file=logs.txt

logs.txt

Chapter13 end: connection error from edge-service

Hi, I wanted to test the tracing functionality by calling the edge-service /books endpoint.
However, when running the edge-service (docker-compose up edge-service), the service startup fails with the logs attached.
It seems that it cannot resolve "host.docker.internal". I'm running the services on WSL (Windows 11).

Note that all the other dependencies are running (grafana, keycloak, etc) and by running "http :8080/realms/PolarBookshop" I get a valid response containing the public key.

Edge service logs:

edge-service  | 2023-03-09 12:13:30.094  WARN [edge-service,,] 1 --- [           main] onfigReactiveWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ServerHttpSecurityConfiguration': Unsatisfied dependency expressed through method 'setAdapterRegistry' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  | 2023-03-09 12:13:30.136  INFO [edge-service,,] 1 --- [           main] ConditionEvaluationReportLoggingListener :
edge-service  |
edge-service  | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
edge-service  | 2023-03-09 12:13:30.194 ERROR [edge-service,,] 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
edge-service  |
edge-service  | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ServerHttpSecurityConfiguration': Unsatisfied dependency expressed through method 'setAdapterRegistry' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.3.jar:2.7.3]
edge-service  |         at com.polarbookshop.edgeservice.EdgeServiceApplication.main(EdgeServiceApplication.java:11) ~[classes/:na]
edge-service  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
edge-service  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service  |         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service  |         at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
edge-service  |         at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[workspace/:na]
edge-service  |         at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[workspace/:na]
edge-service  |         at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[workspace/:na]
edge-service  |         at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[workspace/:na]
edge-service  | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:410) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         ... 28 common frames omitted
edge-service  | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.security.config.annotation.web.reactive.ReactiveOAuth2ClientImportSelector$OAuth2ClientWebFluxSecurityConfiguration': Unsatisfied dependency expressed through method 'setAuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:767) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:719) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         ... 51 common frames omitted
edge-service  | Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'gatewayReactiveOAuth2AuthorizedClientManager' defined in class path resource [org/springframework/cloud/gateway/config/GatewayReactiveOAuth2AutoConfiguration.class]: Unsatisfied dependency expressed through method 'gatewayReactiveOAuth2AuthorizedClientManager' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1462) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.resolveMethodArguments(AutowiredAnnotationBeanPostProcessor.java:759) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         ... 68 common frames omitted
edge-service  | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientRegistrationRepository' defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/reactive/ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         ... 84 common frames omitted
edge-service  | Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.oauth2.client.registration.InMemoryReactiveClientRegistrationRepository]: Factory method 'clientRegistrationRepository' threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         ... 98 common frames omitted
edge-service  | Caused by: java.lang.IllegalArgumentException: Unable to resolve Configuration with the provided Issuer of "http://host.docker.internal:8080/realms/PolarBookshop"
edge-service  |         at org.springframework.security.oauth2.client.registration.ClientRegistrations.getBuilder(ClientRegistrations.java:220) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service  |         at org.springframework.security.oauth2.client.registration.ClientRegistrations.fromIssuerLocation(ClientRegistrations.java:144) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service  |         at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getBuilderFromIssuerIfPossible(OAuth2ClientPropertiesRegistrationAdapter.java:83) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getClientRegistration(OAuth2ClientPropertiesRegistrationAdapter.java:59) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.lambda$getClientRegistrations$0(OAuth2ClientPropertiesRegistrationAdapter.java:53) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service  |         at java.base/java.util.HashMap.forEach(Unknown Source) ~[na:na]
edge-service  |         at org.springframework.boot.autoconfigure.security.oauth2.client.OAuth2ClientPropertiesRegistrationAdapter.getClientRegistrations(OAuth2ClientPropertiesRegistrationAdapter.java:52) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service  |         at org.springframework.boot.autoconfigure.security.oauth2.client.reactive.ReactiveOAuth2ClientConfigurations$ReactiveClientRegistrationRepositoryConfiguration.clientRegistrationRepository(ReactiveOAuth2ClientConfigurations.java:56) ~[spring-boot-autoconfigure-2.7.3.jar:2.7.3]
edge-service  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
edge-service  |         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service  |         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:na]
edge-service  |         at java.base/java.lang.reflect.Method.invoke(Unknown Source) ~[na:na]
edge-service  |         at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.22.jar:5.3.22]
edge-service  |         ... 99 common frames omitted
edge-service  | Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://host.docker.internal:8080/realms/PolarBookshop/.well-known/openid-configuration": Connection timed out; nested exception is java.net.ConnectException: Connection timed out
edge-service  |         at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:785) ~[spring-web-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:670) ~[spring-web-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.security.oauth2.client.registration.ClientRegistrations.lambda$oidc$0(ClientRegistrations.java:155) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service  |         at org.springframework.security.oauth2.client.registration.ClientRegistrations.getBuilder(ClientRegistrations.java:208) ~[spring-security-oauth2-client-5.7.3.jar:5.7.3]
edge-service  |         ... 111 common frames omitted
edge-service  | Caused by: java.net.ConnectException: Connection timed out
edge-service  |         at java.base/sun.nio.ch.Net.connect0(Native Method) ~[na:na]
edge-service  |         at java.base/sun.nio.ch.Net.connect(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.nio.ch.Net.connect(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.nio.ch.NioSocketImpl.connect(Unknown Source) ~[na:na]
edge-service  |         at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
edge-service  |         at java.base/java.net.Socket.connect(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.NetworkClient.doConnect(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.http.HttpClient.openServer(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.http.HttpClient.openServer(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.http.HttpClient.<init>(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.http.HttpClient.New(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.http.HttpClient.New(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[na:na]
edge-service  |         at java.base/sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source) ~[na:na]
edge-service  |         at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:76) ~[spring-web-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:66) ~[spring-web-5.3.22.jar:5.3.22]
edge-service  |         at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:776) ~[spring-web-5.3.22.jar:5.3.22]
edge-service  |         ... 114 common frames omitted
edge-service  |
edge-service  |
edge-service  | Native Memory Tracking:
edge-service  |
edge-service  | Total: reserved=13113770919, committed=366080935
edge-service  |        malloc: 68260775 #387651
edge-service  |        mmap:   reserved=13045510144, committed=297820160
edge-service  |
edge-service  | -                 Java Heap (reserved=12087984128, committed=167772160)
edge-service  |                             (mmap: reserved=12087984128, committed=167772160)
edge-service  |
edge-service  | -                     Class (reserved=122767701, committed=8735061)
edge-service  |                             (classes #12613)
edge-service  |                             (  instance classes #11714, array classes #899)
edge-service  |                             (malloc=1132885 #24697)
edge-service  |                             (mmap: reserved=121634816, committed=7602176)
edge-service  |                             (  Metadata:   )
edge-service  |                             (    reserved=50331648, committed=48365568)
edge-service  |                             (    used=48128608)
edge-service  |                             (    waste=236960 =0.49%)
edge-service  |                             (  Class space:)
edge-service  |                             (    reserved=121634816, committed=7602176)
edge-service  |                             (    used=7390552)
edge-service  |                             (    waste=211624 =2.78%)
edge-service  |
edge-service  | -                    Thread (reserved=36903512, committed=2071128)
edge-service  |                             (thread #36)
edge-service  |                             (stack: reserved=36786176, committed=1953792)
edge-service  |                             (malloc=66256 #274)
edge-service  |                             (arena=51080 #87)
edge-service  |
edge-service  | -                      Code (reserved=255292808, committed=22599048)
edge-service  |                             (malloc=1660296 #7376)
edge-service  |                             (mmap: reserved=253632512, committed=20938752)
edge-service  |
edge-service  | -                        GC (reserved=505036284, committed=62684668)
edge-service  |                             (malloc=22523388 #6084)
edge-service  |                             (mmap: reserved=482512896, committed=40161280)
edge-service  |
edge-service  | -                  Compiler (reserved=17065000, committed=17065000)
edge-service  |                             (malloc=77088 #845)
edge-service  |                             (arena=16987912 #20)
edge-service  |
edge-service  | -                  Internal (reserved=2229004, committed=2229004)
edge-service  |                             (malloc=2192140 #18525)
edge-service  |                             (mmap: reserved=36864, committed=36864)
edge-service  |
edge-service  | -                     Other (reserved=8224, committed=8224)
edge-service  |                             (malloc=8224 #3)
edge-service  |
edge-service  | -                    Symbol (reserved=14049720, committed=14049720)
edge-service  |                             (malloc=12993792 #310555)
edge-service  |                             (arena=1055928 #1)
edge-service  |
edge-service  | -    Native Memory Tracking (reserved=6210840, committed=6210840)
edge-service  |                             (malloc=8408 #117)
edge-service  |                             (tracking overhead=6202432)
edge-service  |
edge-service  | -        Shared class space (reserved=12582912, committed=10981376)
edge-service  |                             (mmap: reserved=12582912, committed=10981376)
edge-service  |
edge-service  | -               Arena Chunk (reserved=530000, committed=530000)
edge-service  |                             (malloc=530000)
edge-service  |
edge-service  | -                   Tracing (reserved=345, committed=345)
edge-service  |                             (malloc=345 #9)
edge-service  |
edge-service  | -                 Arguments (reserved=169, committed=169)
edge-service  |                             (malloc=169 #5)
edge-service  |
edge-service  | -                    Module (reserved=286000, committed=286000)
edge-service  |                             (malloc=286000 #2292)
edge-service  |
edge-service  | -                 Safepoint (reserved=8192, committed=8192)
edge-service  |                             (mmap: reserved=8192, committed=8192)
edge-service  |
edge-service  | -           Synchronization (reserved=115464, committed=115464)
edge-service  |                             (malloc=115464 #811)
edge-service  |
edge-service  | -            Serviceability (reserved=1034104, committed=1034104)
edge-service  |                             (malloc=1034104 #9911)
edge-service  |
edge-service  | -                 Metaspace (reserved=50533040, committed=48566960)
edge-service  |                             (malloc=201392 #107)
edge-service  |                             (mmap: reserved=50331648, committed=48365568)
edge-service  |
edge-service  | -      String Deduplication (reserved=704, committed=704)
edge-service  |                             (malloc=704 #8)
edge-service  |
edge-service  | -           Object Monitors (reserved=1132768, committed=1132768)
edge-service  |                             (malloc=1132768 #5446)
edge-service  |
edge-service exited with code 1

ArgoCD LoadBalancer not provisioning

Hi,

I am having an issue with deployment of ArgoCD in Digital Ocean from the shell script (polar-deployment/kubernetes/platform/production/argocd/deploy.sh), as the External-IP for the LoadBalancer simply does not become available, even if it is left for hours to be provisioned. After checking the logs of the argocd-server pod, it seems that the activity stops after adding an RBAC ConfigMap, which is then followed by a status check every 10 minutes:

argocd % kubectl -n argocd get service argocd-server
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
argocd-server LoadBalancer 10.245.186.28 80:31173/TCP,443:30104/TCP 22m

argocd % kubectl -n argocd get pods
NAME READY STATUS RESTARTS AGE
argocd-application-controller-0 1/1 Running 0 23m
argocd-applicationset-controller-57f8479986-xkrb6 1/1 Running 0 23m
argocd-dex-server-b57ffc474-hfrqz 1/1 Running 0 23m
argocd-notifications-controller-585d496999-wrggh 1/1 Running 0 23m
argocd-redis-948ff45c8-kwdm2 1/1 Running 0 23m
argocd-repo-server-5dbccb487c-8nr2m 1/1 Running 0 23m
argocd-server-976589cdf-bmfqb 1/1 Running 0 23m

argocd % kubectl -n argocd logs argocd-server-976589cdf-bmfqb
time="2023-04-28T08:50:56Z" level=info msg="Starting configmap/secret informers"
time="2023-04-28T08:50:56Z" level=info msg="Configmap/secret informer synced"
time="2023-04-28T08:50:56Z" level=info msg="Initialized server signature"
time="2023-04-28T08:50:56Z" level=info msg="Initialized admin password"
time="2023-04-28T08:50:56Z" level=info msg="Starting configmap/secret informers"
time="2023-04-28T08:50:56Z" level=info msg="secrets informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="configmap informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="Configmap/secret informer synced"
time="2023-04-28T08:50:56Z" level=info msg="Initialized TLS certificate"
time="2023-04-28T08:50:56Z" level=info msg="Starting configmap/secret informers"
time="2023-04-28T08:50:56Z" level=info msg="secrets informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="configmap informer cancelled"
time="2023-04-28T08:50:56Z" level=info msg="Configmap/secret informer synced"
time="2023-04-28T08:50:56Z" level=info msg="argocd v2.4.15+05acf7a serving on port 8080 (url: , tls: true, namespace: argocd, sso: false)"
time="2023-04-28T08:50:56Z" level=info msg="0xc00106c9c0 subscribed to settings updates"
time="2023-04-28T08:50:56Z" level=info msg="Starting rbac config informer"
time="2023-04-28T08:50:56Z" level=info msg="RBAC ConfigMap 'argocd-rbac-cm' added"
time="2023-04-28T09:00:56Z" level=info msg="Alloc=10172 TotalAlloc=29323 Sys=28497 NumGC=9 Goroutines=74"
time="2023-04-28T09:10:56Z" level=info msg="Alloc=10177 TotalAlloc=33411 Sys=28497 NumGC=14 Goroutines=74"
time="2023-04-28T09:20:56Z" level=info msg="Alloc=10185 TotalAlloc=37573 Sys=28497 NumGC=19 Goroutines=74"

I've tried substituting the argo-cd manifest version from gitHub in the argocd/resources/kustomization.yml with 'stable' (as recommended by https://argo-cd.readthedocs.io/en/stable/getting_started/), but I get the same behaviour.

I don't see what I am missing/ doing wrong as the manifests in the argocd folder are fairly straightforward, the only cause I can think of is that argocd may have a permissions issue within my cluster in Digital Ocean.

Any ideas or suggestions?

Screenshot 2023-04-28 at 11 16 52

Incorrect initialize Greeting Service

Hi, Thomas Vitale!

I noticed that when initializing the Greeting Service project from Chapter 02 - Begin, the link to spring.io starter is incorrectly specified. In your case, the link is https://start.spring.io/starter.tgz (!.tgz), with the key -o greeting-service.zip (!.zip) and when downloading the project, the archive turns out to be broken.
I will offer two solutions:

  1. You can leave the tgz, but then the -o greeting-service.zip parameter must be removed and added at the end of | tar -xzvf -.
    For example for Gradle: curl https://start.spring.io/starter.tgz -d groupId=com.arcticgreetings -d artifactId=greeting-service -d name=greeting-service -d packageName=com.arcticgreetings.greetingservice -d dependencies=web -d javaVersion=16 -d bootVersion=2.5.2 -d type=gradle-project | tar -xzvf -

  2. You can change the starter link by specifying it https://start.spring.io/starter.zip
    For example for Gardle: curl https://start.spring.io/starter.zip -d groupId=com.arcticgreetings -d artifactId=greeting-service -d name=greeting-service -d packageName=com.arcticgreetings.greetingservice -d dependencies=web -d javaVersion=16 -d bootVersion=2.5.2 -d type=gradle-project -o greeting-service.zip

Chapter 15: Fail to deploy ArgoCD to DigitalOcean K8s

/bin/bash /home/thainguyen/codespace/workspace/cloud-native-in-spring/polar-bookshop/polar-deployment/kubernetes/platform/production/argocd/deploy.sh
\n๐Ÿ“ฆ Installing ArgoCD...

Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.

namespace/argocd unchanged
customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io unchanged
customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io unchanged
customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io unchanged
serviceaccount/argocd-application-controller unchanged
serviceaccount/argocd-applicationset-controller unchanged
serviceaccount/argocd-dex-server unchanged
serviceaccount/argocd-notifications-controller unchanged
serviceaccount/argocd-redis unchanged
serviceaccount/argocd-repo-server unchanged
serviceaccount/argocd-server unchanged
role.rbac.authorization.k8s.io/argocd-application-controller unchanged
role.rbac.authorization.k8s.io/argocd-applicationset-controller unchanged
role.rbac.authorization.k8s.io/argocd-dex-server unchanged
role.rbac.authorization.k8s.io/argocd-notifications-controller unchanged
role.rbac.authorization.k8s.io/argocd-server unchanged
clusterrole.rbac.authorization.k8s.io/argocd-application-controller unchanged
clusterrole.rbac.authorization.k8s.io/argocd-server unchanged
rolebinding.rbac.authorization.k8s.io/argocd-application-controller unchanged
rolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller unchanged
rolebinding.rbac.authorization.k8s.io/argocd-dex-server unchanged
rolebinding.rbac.authorization.k8s.io/argocd-notifications-controller unchanged
rolebinding.rbac.authorization.k8s.io/argocd-server unchanged
clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller unchanged
clusterrolebinding.rbac.authorization.k8s.io/argocd-server unchanged
configmap/argocd-cm unchanged
configmap/argocd-cmd-params-cm unchanged
configmap/argocd-gpg-keys-cm unchanged
configmap/argocd-notifications-cm unchanged
configmap/argocd-rbac-cm unchanged
configmap/argocd-ssh-known-hosts-cm unchanged
configmap/argocd-tls-certs-cm unchanged
secret/argocd-notifications-secret unchanged
secret/argocd-secret unchanged
service/argocd-applicationset-controller unchanged
service/argocd-dex-server unchanged
service/argocd-metrics unchanged
service/argocd-notifications-controller-metrics unchanged
service/argocd-redis unchanged
service/argocd-repo-server unchanged
service/argocd-server-metrics unchanged
deployment.apps/argocd-applicationset-controller unchanged
deployment.apps/argocd-dex-server unchanged
deployment.apps/argocd-notifications-controller unchanged
deployment.apps/argocd-redis unchanged
deployment.apps/argocd-repo-server unchanged
deployment.apps/argocd-server unchanged
statefulset.apps/argocd-application-controller unchanged
networkpolicy.networking.k8s.io/argocd-application-controller-network-policy configured
networkpolicy.networking.k8s.io/argocd-applicationset-controller-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-dex-server-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-notifications-controller-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-redis-network-policy unchanged
networkpolicy.networking.k8s.io/argocd-repo-server-network-policy configured
networkpolicy.networking.k8s.io/argocd-server-network-policy unchanged
Error from server (Forbidden): error when creating "resources": admission webhook "validation-webhook.cloud-controller-manager.digitalocean.com" denied the request: invalid load balancer definition: POST https://api.digitalocean.com/v2/load_balancers: 429 (request "5d08ff28-48db-4cc9-afb2-9c9a13c7650c") You have reached your Load Balancer limit, maximum allowed 2. Please contact support to raise your Load Balancer limit.

Issues with Tiltfile

Hi, there seems to be an issues with the tilt file in the custom_build part.

The output of the $EXPRECTED_REF seems not to comply with the image name expected for the the OCI image being built with buildPack and as such throws this exception:

STEP 1/3 โ€” Building Custom Build: [config-service]
Custom Build: Injecting Environment Variables
EXPECTED_REF=config-service:tilt-build-1676992767
EXPECTED_IMAGE=library/config-service
EXPECTED_TAG=tilt-build-1676992767
DOCKER_CERT_PATH=C:\Users\emmsewah.minikube\certs
DOCKER_HOST=tcp://127.0.0.1:49181
DOCKER_TLS_VERIFY=1
MINIKUBE_ACTIVE_DOCKERD=polar
Running cmd: gradlew bootBuildImage --imageName $EXPECTED_REF
Starting a Gradle Daemon, 2 busy and 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

Task :compileJava UP-TO-DATE
Task :processResources UP-TO-DATE
Task :classes UP-TO-DATE
Task :resolveMainClassName UP-TO-DATE
Task :bootJar UP-TO-DATE
Task :bootBuildImage FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':bootBuildImage'.

Unable to parse image reference "$EXPECTED_REF". Image reference must be in the form '[domainHost:port/][path/]name[:tag][@digest]', with 'path' and 'name' containing only [a-z0-9][.][_][-]

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 7s
5 actionable tasks: 1 executed, 4 up-to-date
gradlew bootBuildImage --imageName $EXPECTED_REF exited with exit code 1

Build Failed: Custom build "gradlew bootBuildImage --imageName $EXPECTED_REF" failed: exit status 1

spring boot 3

Guess the book uses spring boot 2 right? Will there be an update to spring boot 3?

[chapter 11.5.2] I am uncertain about the complete overview of the entire workflow.

I only have a vague understanding of what is discussed in the book, and I lack a clear panoramic view of the entire authentication process. Therefore, I would like to present my current understanding here and kindly ask for any corrections if there are any. (As a beginner, I genuinely feel that this section should include a diagram similar to Figure 11.3).

workflow steps(I guessed):

  1. The first request sent by Angular is an HTTP standard request. (This will trigger the authentication flow)
  2. Subsequently, all requests sent are AJAX requests, which are considered unauthenticated requests.
  3. Then, we instruct Spring Security to respond with an HTTP 401 response.
  4. After receiving the HTTP 401 response, the SPA handles this error and initiates the authentication flow. (In other words, initiate authentication flow is required for every AJAX request).
  5. Since the SPA is responsible for the authentication flow, it is necessary to allow unauthorized requests for static resources at this point.

Chapter 2 bug in commit-stage.yaml example

Hi,
Looks like there is a bug in commit-stage.yaml file.
Security scans should be run after running gradle build and dependency resolution.

      - name: Build, unit tests and integration tests
        run: ./gradlew build
      - name: Code vulnerability scanning
        uses: anchore/scan-action@v3
        id: scan
        with:
          path: "${{ github.workspace }}"
          severity-cutoff: critical
      - name: upload Anchore scan SARIF report
        uses: github/codeql-action/upload-sarif@v2
        if: success() || failure()
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}

Running them before causes dependencies to not be scanned and always shows that no vulnerabilities were found.

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.