Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Make spec.Prometheus.secret field optional #133

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

pleshakov
Copy link
Contributor

  • Make the spec.Prometheus.secret optional so that Prometheus endpoint
    can be enabled without specifying a Secret.
  • Extend the doc for the field.

If the field is not mark as optional, the admin will incorrectly see the following error:

kubectl apply -f ic.yaml
The NginxIngressController "my-nginx-ingress-controller" is invalid: spec.prometheus.secret: Required value

For ic.yaml:

apiVersion: k8s.nginx.org/v1alpha1
kind: NginxIngressController
metadata:
  name: my-nginx-ingress-controller
spec:
  type: deployment
  image:
    repository: nginx/nginx-ingress
    tag: 1.12.0
    pullPolicy: Always
  serviceType: NodePort
  prometheus:
    enable: true

- Make the spec.Prometheus.secret optional so that Prometheus endpoint
can be enabled without specifying a Secret.
- Extend the doc for the field.
@pleshakov pleshakov requested review from lucacome and soneillf5 July 7, 2021 20:53
@github-actions github-actions bot added the documentation Pull requests/issues for documentation label Jul 7, 2021
@pleshakov pleshakov mentioned this pull request Jul 7, 2021
6 tasks
@pleshakov pleshakov added the bug An issue reporting a potential bug label Jul 7, 2021
@ciarams87 ciarams87 merged commit 542e296 into master Jul 8, 2021
@ciarams87 ciarams87 deleted the fix-prometheus-secret-field branch July 8, 2021 10:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug An issue reporting a potential bug documentation Pull requests/issues for documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants