Skip to content

Set preceding/succeeding pathType to range scope #8

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

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

skooNI
Copy link
Contributor

@skooNI skooNI commented Jun 20, 2023

Moved this PR from provectus/kafka-ui#3933

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)
    Yes, but I'm not sure if anyone was using this correctly to begin with. See explanation below.

What changes did you make? (Give an overview)
#3259 introduced the ability to set the prefixType, however the preceedingPaths and succeedingPaths reference a variable that is out of scope of the range.

          {{- range .Values.ingress.succeedingPaths }}
          - path: {{ .path }}
            pathType: {{ .Values.ingress.pathType }}
            backend:
              service:
                name: {{ .serviceName }}
                port:
                  number: {{ .servicePort }}
          {{- end }}

In the range section, .Values.ingress.pathType refers to .Values.ingress.succeedingPaths[n].Values.ingress.pathType which I don't think was the intention.

This change switches it to .pathType, which refers to .Values.ingress.succeedingPaths[n].pathType, similar to path, serviceName, and servicePort variables.

Before this change in order to get the pathType set you'd need to configure the preceding/succeeding path to:

    succeedingPaths:
      - path: "/kafkaui/"
        Values:
          ingress:
            pathType: Prefix
        serviceName: kafkaui-service
        servicePort: 80

After this change it would reference be set by:

    succeedingPaths:
      - path: "/kafkaui/"
        pathType: Prefix
        serviceName: kafkaui-service
        servicePort: 80

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Set new schema value and verified helm deployment worked.

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)
Meet my dog Lupin!

IMG_0830

@skooNI skooNI requested a review from a team as a code owner June 20, 2023 20:10
@skooNI skooNI force-pushed the pre_post_path_range_name_resolution branch from 96e6d9b to 7e7d9cc Compare June 20, 2023 20:13
@Haarolean
Copy link
Contributor

@skooNI hey, sorry for the delay, figured out that I haven't been subscribed to this particular repo so far. We'll take a look

@Narekmat Narekmat merged commit 3e50fa5 into provectus:main Aug 17, 2023
@Haarolean
Copy link
Contributor

@skooNI thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants