Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent dublicate resource. #28

Closed
iocanel opened this issue Nov 23, 2018 · 3 comments
Closed

Prevent dublicate resource. #28

iocanel opened this issue Nov 23, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@iocanel
Copy link
Member

iocanel commented Nov 23, 2018

Currently, we heavily rely on visitor to perform any sort of config and model updates.

This is powerful, but if not carefull its possible to register a visitor twice leading to dublicate entries in the generated resources.

We need to prevent duplicates but also have a better way to track which visitor is registered from where.

@cmoulliard
Copy link
Collaborator

I think that this problem is resolved since PR #43 and thus the ticket could be closed @iocanel

@cmoulliard cmoulliard added the bug Something isn't working label Nov 28, 2018
@cmoulliard
Copy link
Collaborator

Can we close it @iocanel ?

@cmoulliard
Copy link
Collaborator

I still get some double resources

Example

---
apiVersion: "v1"
kind: "List"
items:
- apiVersion: "component.k8s.io/v1alpha1"
  kind: "Component"
  metadata:
    name: ""
  spec:
    deploymentMode: "innerloop"
    runtime: "spring-boot"
    exposeService: true
    env:
    - name: "SPRING_PROFILES_ACTIVE"
      value: "openshift-catalog"
    - name: "SPRING_PROFILES_ACTIVE"
      value: "openshift-catalog"

Class

@CompositeApplication(
        exposeService = true,
        envVars = @Env(name = "SPRING_PROFILES_ACTIVE", value = "openshift-catalog"))
@ServiceCatalog(
   instances = @ServiceCatalogInstance(
        name = "postgresql-db",
        serviceClass = "dh-postgresql-apb",
        servicePlan = "dev",
        bindingSecret = "postgresql-db",
        parameters = {
                @Parameter(key = "postgresql_user", value = "luke"),
                @Parameter(key = "postgresql_password", value = "secret"),
                @Parameter(key = "postgresql_database", value = "my_data"),
                @Parameter(key = "postgresql_version", value = "9.6")
        }
   )
)

Any idea to resolve it ? @iocanel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants