cloudfoundry / cf-for-k8s

The open source deployment manifest for Cloud Foundry on Kubernetes
Apache License 2.0
301 stars 115 forks source link

Cloud controller config change on every deploy #635

Open braunsonm opened 3 years ago

braunsonm commented 3 years ago

Describe the bug

The current guidance is you can have an app domain be the same as your system domain. This works well for local/dev deployments. However when you do this the cloud controller will want to deploy its config over and over again.

To Reproduce*

Steps to reproduce the behavior:

  1. Create a cf-values with the following:
system_domain: "my.domain"
app_domains:
#@overlay/append
- "my.domain"
  1. Deploy CF
  2. Deploy CF again and look at the kapp diff.
  3. Repeat and repeat

You will start to see a pattern. The cloud-controller-ng-yaml will continue to get a new version each time where it adds and removes the same app_domain over and over again.

          + @@ create configmap/cloud-controller-ng-yaml-ver-3 (v1) namespace: cf-system @@
          +   ...
          +  26, 26       - my.domain
          +  27     +     - my.domain
          +  28, 27       reserved_private_domains: /dev/null
          +  29, 28       disable_private_domain_cross_space_context_path_route_sharing: false
          + @@ create configmap/cloud-controller-ng-yaml-ver-4 (v1) namespace: cf-system @@
          +   ...
          +  26, 26       - my.domain
          +  27     -     - my.domain
          +  28, 27       reserved_private_domains: /dev/null
          +  29, 28       disable_private_domain_cross_space_context_path_route_sharing: false

Notice how it adds a duplicate domain, then removes it. This continues each time you deploy. I believe it has something to do with your requirement to have an overlay/append on these values. I'm not sure why you have that requirement.

Expected behavior

The deployment should not add duplicate domains to the CC config.

Additional context

cf-for-k8s SHA

v2.1.1

cf-gitbot commented 3 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/177269540

The labels on this github issue will be updated when the story is started.