-
Notifications
You must be signed in to change notification settings - Fork 374
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
Configurable service type #48
Conversation
Hi @pb82, I have verified that the NodePort service gets created; however, I am not able to access Grafana. Here is my manifest: apiVersion: integreatly.org/v1alpha1
kind: Grafana
metadata:
name: example-grafana
spec:
config:
log:
mode: "console"
level: "warn"
security:
admin_user: "root"
admin_password: "secret"
auth:
disable_login_form: False
disable_signout_menu: True
auth.basic:
enabled: False
auth.anonymous:
enabled: True
dashboardLabelSelector:
- matchExpressions:
- {key: app, operator: In, values: [grafana]} I am able to access Grafana when I use a ClusterIP service with |
@jsanda Is the Ingress assigned an IP when you use |
@pb82 The Ingress is assigned an IP: apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
ingress.kubernetes.io/backends: '{"k8s-be-30250--d5cbb4a3db91b92d":"Unknown","k8s-be-32028--d5cbb4a3db91b92d":"Unknown"}'
ingress.kubernetes.io/forwarding-rule: k8s-fw-default-grafana-ingress--d5cbb4a3db91b92d
ingress.kubernetes.io/target-proxy: k8s-tp-default-grafana-ingress--d5cbb4a3db91b92d
ingress.kubernetes.io/url-map: k8s-um-default-grafana-ingress--d5cbb4a3db91b92d
creationTimestamp: "2019-09-17T18:37:46Z"
generation: 1
labels:
app: grafana
name: grafana-ingress
namespace: default
ownerReferences:
- apiVersion: integreatly.org/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Grafana
name: example-grafana
uid: 3dfb5ea6-d97a-11e9-91a9-42010a8e0166
resourceVersion: "2165"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/grafana-ingress
uid: 3e3b22b7-d97a-11e9-91a9-42010a8e0166
spec:
rules:
- http:
paths:
- backend:
serviceName: grafana-service
servicePort: 3000
path: /
status:
loadBalancer:
ingress:
- ip: 1.2.3.4
kind: List
metadata:
resourceVersion: ""
selfLink: "" I am not sure how access the Grafana UI though. |
After a bit longer I did get a response from the load balancer IP, but something is not working correctly. I got an error response page:
|
@jsanda I think you need the external IP:
You should be able to reach Grafana under the IP listed with this command. |
@jsanda That looks like the Grafana frontend was not able to make requests to the backend. I'd say inspecting the connections it makes in the browser debug tools would be a first step to start debugging this. |
Implemented with service configuration options: https://github.com/integr8ly/grafana-operator/blob/master/documentation/deploy_grafana.md#configuring-the-service |
* Set default securityContext for grafana instances * Change how we check if we are in a OCP cluster or not.
* Set default securityContext for grafana instances * Change how we check if we are in a OCP cluster or not.
* Set default securityContext for grafana instances * Change how we check if we are in a OCP cluster or not.
Allow setting the type of the grafana service (ClusterIP, NodePort or LoadBalancer) via an operator flag. This PR adds a new optional operator flag
--service-type
which can be used to set the type of the grafana service. Defaults toClusterIP
(if not set).The
latest
tag has been updated and contains this change.Use case: en GCE only
NodePort
orLoadBalancer
type services can be used with Ingresses.Fixes #46
Verification steps:
NodePort
orLoadBalancer
.ping @jsanda