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

Fix port name not in effect and nodePort changed failed when update #887

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

gxg001
Copy link
Contributor

@gxg001 gxg001 commented Feb 2, 2023

When grafana instance is created, the port name configured for the service does not take effect. is also not effective when changed grafana nodeport

Description

apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
  name: grafana
  namespace: monitoring
spec:
  client:
    preferService: true
  ingress:
    enabled: False
  config:
    log:
      mode: "console"
      level: "error"
    security:
      admin_user: "root"
      admin_password: "12345"
    log.frontend:
      enabled: true
    auth:
      disable_login_form: False
      disable_signout_menu: False
    auth.anonymous:
      enabled: True
  service:
    name: "grafana-service"
    labels:
      app: "grafana"
      type: "grafana-service"
    ports:
      - { nodePort: 30004, port: 3000, protocol: TCP, name: web }
    type: NodePort
  dashboardLabelSelector:
    - matchExpressions:
        - { key: app, operator: In, values: [grafana] }
  resources:
    # Optionally specify container resources
    limits:
      cpu: 800m
      memory: 800Mi
    requests:
      cpu: 100m
      memory: 100Mi

bug1:When spec.service.port name is web,but deploy name is grafana. It's restricted in the program.
bug2:If the first grafana deployment nodePort is 30001,when I changed cr nodePort to 30002,It didn't work

Relevant issues/tickets

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • This change requires a documentation update
  • I have added tests that prove my fix is effective or that my feature works
  • I have added a test case that will be used to verify my changes
  • Verified independently on a cluster by reviewer

Verification steps

When grafana instance is created, the port name configured for the service does not take effect. is also not effective when changed grafana nodeport
@pb82
Copy link
Collaborator

pb82 commented Feb 7, 2023

@gitgaoxiang can you please rebase?

@gxg001
Copy link
Contributor Author

gxg001 commented Feb 8, 2023

@pb82 Done.

@NissesSenap
Copy link
Collaborator

Don't know why the e2e failes. For some reason it has returned

[
    {
      "id": 1,
      "uid": "He5NIuAVk",
      "title": "grafana-operator-system",
      "uri": "db/grafana-operator-system",
      "url": "/dashboards/f/He5NIuAVk/grafana-operator-system",
      "slug": "",
      "type": "dash-folder",
      "tags": [],
      "isStarred": false,
      "sortMeta": 0
    },
    {
      "id": 3,
      "uid": "0ed390cdb20229700c1741b72138163ce2214445",
      "title": "Node' Exporter 'Full",
      "uri": "db/node-exporter-full",
      "url": "/d/0ed390cdb20229700c1741b72138163ce2214445/node-exporter-full",
      "slug": "",
      "type": "dash-db",
      "tags": [
        "linux"
      ],
      "isStarred": false,
      "folderId": 1,
      "folderUid": "He5NIuAVk",
      "folderTitle": "grafana-operator-system",
      "folderUrl": "/dashboards/f/He5NIuAVk/grafana-operator-system",
      "sortMeta": 0
    },
    {
      "id": 2,
      "uid": "2150edaf610ab34b8f1050e5bcd5d4ca5903e1c2",
      "title": "Simple' 'Dashboard",
      "uri": "db/simple-dashboard",
      "url": "/d/2150edaf610ab34b8f1050e5bcd5d4ca5903e1c2/simple-dashboard",
      "slug": "",
      "type": "dash-db",
      "tags": [],
      "isStarred": false,
      "folderId": 1,
      "folderUid": "He5NIuAVk",
      "folderTitle": "grafana-operator-system",
      "folderUrl": "/dashboards/f/He5NIuAVk/grafana-operator-system",
      "sortMeta": 0
    }
  ]

This haven't happend before and it didn't on another PR that I just ran so I think this should be okay.
I will merge the PR and if there is some issue after I will look in to it.

@NissesSenap NissesSenap merged commit a5eb371 into grafana:master Feb 8, 2023
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