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

Expose Kibana configuration #740

Closed
nkvoll opened this issue May 6, 2019 · 3 comments · Fixed by #1030
Closed

Expose Kibana configuration #740

nkvoll opened this issue May 6, 2019 · 3 comments · Fixed by #1030
Assignees
Labels
>feature Adds or discusses adding a feature to the product

Comments

@nkvoll
Copy link
Member

nkvoll commented May 6, 2019

It should be possible to configure custom Kibana settings

@nkvoll
Copy link
Member Author

nkvoll commented May 6, 2019

Example CRD sample:

# This sample sets up a single Kibana instance pointing to a remote Elasticsearch cluster
apiVersion: kibana.k8s.elastic.co/v1alpha1
kind: Kibana
metadata:
  labels:
    controller-tools.k8s.io: "1.0"
  name: kibana-sample
spec:
  version: "6.7.0"

  # association format TBD:
  elasticsearch:
    inCluster:
      name: <name of es resource>
      namespace: <namespace of es resource>


  # exposing the config:
  config:
    elasticsearch:
      url: https://url.to.elasticsearch:9200
      username: ...
      password: ... <should be done via kibana-keystore>

      # provide a defaulted "secrets" mount
      ssl.cert: config/secrets/elasticsearch.http.cert.pem
      ssl.certificate_verification_mode: certificate

  podTemplate:
    spec:
      affinity: ...

      containers:
      - name: kibana
        resources:
          limits:
            memory: 1Gi
            cpu: 1000m
        volumeMounts:
        - name: my-certs
          mountPath: /usr/share/kibana/config/my-certs

      volumes:
      - name: my-certs
        secret:
          secretName: my-certs

  nodeCount: 1

  http:
    service:
      metadata:
        annotations:
          service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
      spec:
        # supports automatically creating a LoadBalancer for the HTTP endpoints.
        type: LoadBalancer
    # tls settings for Kibana:
    tls:
      selfSignedCertificate:
        # subjectAlternativeNames allows providing a custom set of alternative names the certificate should contain.
        subjectAlternativeNames:
          - dns: foo.example.com
          - ip: 4.3.2.1

@pebrc pebrc added this to the Alpha milestone May 6, 2019
@pebrc pebrc self-assigned this May 7, 2019
@pebrc pebrc modified the milestones: Alpha, Beta May 7, 2019
@pebrc pebrc removed their assignment May 21, 2019
@pebrc pebrc added the >feature Adds or discusses adding a feature to the product label May 24, 2019
@djschny
Copy link

djschny commented May 30, 2019

Excuse my ignorance, but why not just mirror the way this is handled in the Kibana docker image today where env is provided in the pod template?

For example:

  podTemplate:                                                                                                                                                                                                        
    metadata:                                                                                                                                                                                                         
      labels:                                                                                                                                                                                                         
        app: kibana                                                                                                                                                                                                   
        function: logging                                                                                                                                                                                             
    spec:                                                                                                                                                                                                             
      containers:                                                                                                                                                                                                     
      - name: kibana                                                                                                                                                                                                  
        env:                                                                                                                                                                                                          
          - name: SERVER_BASEPATH                                                                                                                                                                                     
            value: /kibana 

@nkvoll nkvoll self-assigned this Jun 8, 2019
@nkvoll
Copy link
Member Author

nkvoll commented Jun 8, 2019

@djschny We'll be supporting that as well (we already do in master), but we also want to provide people with the flexibility of specifying the contents of their kibana.yml file as well. Some would also argue that it's a bit more of a convenient format than having to translate settings to the environment-equivalent.

nkvoll added a commit to nkvoll/cloud-on-k8s that referenced this issue Jun 8, 2019
Any YAML here ends up in `kibana.yml`.

Example usage:

```yaml
apiVersion: kibana.k8s.elastic.co/v1alpha1
kind: Kibana
metadata:
  name: kibana-sample
spec:
  version: "7.1.0"
  nodeCount: 1
  elasticsearchRef:
    name: "elasticsearch-sample"
  config:
    xpack.security.sessionTimeout: 600000
```

Closes: elastic#740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature Adds or discusses adding a feature to the product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants