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

feat(helm): Make gateway container port configurable. #13294

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

kavirajk
Copy link
Contributor

What this PR does / why we need it:

Avoid gateway container port being hard-coded and make it configurable. Default is still 8080 (previously hard-coded value).

Which issue(s) this PR fixes:
Fixes NA

Special notes for your reviewer:

Checklist

  • Reviewed the CONTRIBUTING.md guide (required)
  • Documentation added
  • Tests updated
  • Title matches the required conventional commits format, see here
    • Note that Promtail is considered to be feature complete, and future development for logs collection will be in Grafana Alloy. As such, feat PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.
  • Changes that require user attention or interaction to upgrade are documented in docs/sources/setup/upgrade/_index.md
  • For Helm chart changes bump the Helm chart version in production/helm/loki/Chart.yaml and update production/helm/loki/CHANGELOG.md and production/helm/loki/README.md. Example PR
  • If the change is deprecating or removing a configuration option, update the deprecated-config.yaml and deleted-config.yaml files respectively in the tools/deprecated-config-checker directory. Example PR

Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
@kavirajk kavirajk requested a review from a team as a code owner June 24, 2024 08:50
@kavirajk kavirajk changed the title helm: Make gateway container port configurable. feat(helm): Make gateway container port configurable. Jun 24, 2024
kavirajk added 2 commits June 24, 2024 10:54
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
@github-actions github-actions bot added the type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories label Jun 24, 2024
@@ -62,7 +62,7 @@ spec:
imagePullPolicy: {{ .Values.gateway.image.pullPolicy }}
ports:
- name: http-metrics
containerPort: 8080
containerPort: {{ .Values.gateway.containerPort }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember something that numbers in YAML may be rendered with scientific notation, e.g. 8.08e3 ... does this work with K8s?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I think this was related to something else (printf)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not aware of that. Will check it in local and confirm before merging. Thanks for the heads up.

Copy link
Contributor Author

@kavirajk kavirajk Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

template rending just fine (custom port 8081)

helm template loki ./ --values distributed-values.yaml | rg nginx -A 4

        - name: nginx
          image: docker.io/nginxinc/nginx-unprivileged:1.24-alpine
          imagePullPolicy: IfNotPresent
          ports:
            - name: http-metrics
              containerPort: 8081

Also rendering default without any overrides.

 - name: nginx
          image: docker.io/nginxinc/nginx-unprivileged:1.24-alpine
          imagePullPolicy: IfNotPresent
          ports:
            - name: http-metrics
              containerPort: 8080

@kavirajk kavirajk merged commit 05176e4 into main Jun 24, 2024
64 checks passed
@kavirajk kavirajk deleted the kavirajk/helm-make-gateway-port-configurable branch June 24, 2024 12:35
mraboosk pushed a commit to mraboosk/loki that referenced this pull request Oct 7, 2024
Signed-off-by: Kaviraj <kavirajkanagaraj@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/helm size/S type/docs Issues related to technical documentation; the Docs Squad uses this label across many repositories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants