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

Add Installation Flags to Telemetry #5586

Merged
merged 15 commits into from
May 22, 2024
Merged

Add Installation Flags to Telemetry #5586

merged 15 commits into from
May 22, 2024

Conversation

AlexFenlon
Copy link
Contributor

@AlexFenlon AlexFenlon commented May 20, 2024

Proposed changes

This adds a list of the arguments/flags set in the deployment to Telemetry.

I have added go tests to test this functionality as well as done several manual tests to verify this change:
I created a deployment using manifests and deployed this file:

kubectl apply -f deployments/deployment/nginx-ingress.yaml -n nginx-ingress

the changes I made to the deployment are below:

      ...
      containers:
      - image: nginx-ingress:local
        imagePullPolicy: IfNotPresent
        name: nginx-ingress
        ports:
        ...
        args:
          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
          - -v=3 # Enables extensive logging. Useful for troubleshooting.
          - include-year
          - version
          - enable-snippets
         ...

the snippet of the telemetry log for this deployment is :

InstallationFlags:[-nginx-configmaps=nginx-ingress/nginx-config -v=3 include-year version enable-snippets]}}

Changing around these flags shows that this the deployment args look like:

      ...
      containers:
      - image: nginx-ingress:local
        imagePullPolicy: IfNotPresent
        name: nginx-ingress
        ports:
        ...
        args:
          -  -v=3 # Enables extensive logging. Useful for troubleshooting.
          - version
          - -nginx-configmaps=$(POD_NAMESPACE)/nginx-config
         ...

the snippet of the telemetry log for this deployment is :

 InstallationFlags:[-v=3 version -nginx-configmaps=nginx-ingress/nginx-config]}}

example using nginx-plus installing using helm:

helm install my-release ./charts/nginx-ingress \
    --set controller.nginxplus=true \
    --set controller.image.tag=local \
    --set controller.logLevel=3 \
    --set controller.image.repository=nginx/nginx-ingress \
    --set controller.enableSnippets=true 

the snippet of the telemetry log of a nginx plus deployment using helm:

IsPlus:true InstallationFlags:[-nginx-plus=true -nginx-reload-timeout=60000 -enable-app-protect=false -enable-app-protect-dos=false -nginx-configmaps=default/my-release-nginx-ingress -ingress-class=nginx -health-status=false -health-status-uri=/nginx-health -nginx-debug=false -v=3 -nginx-status=true -nginx-status-port=8080 -nginx-status-allow-cidrs=127.0.0.1 -report-ingress-status -external-service=my-release-nginx-ingress-controller -enable-leader-election=true -leader-election-lock-name=nginx-ingress-leader -enable-prometheus-metrics=true -prometheus-metrics-listen-port=9113 -prometheus-tls-secret= -enable-service-insight=false -service-insight-listen-port=9114 -service-insight-tls-secret= -enable-custom-resources=true -enable-snippets=true -include-year=false -disable-ipv6=false -enable-tls-passthrough=false -enable-cert-manager=false -enable-oidc=false -enable-external-dns=false -default-http-listener-port=80 -default-https-listener-port=443 -ready-status=true -ready-status-port=8081 -enable-latency-metrics=false -ssl-dynamic-reload=true -enable-telemetry-reporting=true -weight-changes-dynamic-reload=false]}}

Resolves: #5416

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@AlexFenlon AlexFenlon requested review from a team as code owners May 20, 2024 12:58
@github-actions github-actions bot added enhancement Pull requests for new features/feature enhancements documentation Pull requests/issues for documentation go Pull requests that update Go code labels May 20, 2024
Copy link
Contributor

@ADubhlaoich ADubhlaoich left a comment

Choose a reason for hiding this comment

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

LGTM docs-wise

Copy link
Contributor

@ADubhlaoich ADubhlaoich left a comment

Choose a reason for hiding this comment

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

LGTM docs-wise.

Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

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

🚀

Copy link
Contributor

@shaun-nx shaun-nx left a comment

Choose a reason for hiding this comment

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

Nice job Alex 😄

Co-authored-by: Shaun <s.odonovan@f5.com>
Signed-off-by: AlexFenlon <a.fenlon@f5.com>
@AlexFenlon AlexFenlon merged commit 20fb00e into main May 22, 2024
78 checks passed
@AlexFenlon AlexFenlon deleted the feat/telemetry-flags branch May 22, 2024 13:45
ssrahul96 pushed a commit to ssrahul96/kubernetes-ingress that referenced this pull request Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests/issues for documentation enhancement Pull requests for new features/feature enhancements go Pull requests that update Go code
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

Collect installation flag options
5 participants