banzaicloud/terraform-provider-k8s

'Ready' status for CRD resource

RenaudDemarneffe opened this issue · 0 comments

Describe the bug
For some resource, like 'Elasticsearch' (when using Elastic-on-Cloud), the 'status.phase' value is not comprised into the values managed by the provider.
The value not handled by the provider is 'Ready'.

This bug is that the resource is never seen as created by the provider.

Steps to reproduce the issue:
Deploy Elastic-on-Cloud (https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html) through the provider (resource 'Elasticsearch').

Expected behavior
The resource is correctly seen as created by the provider.

Additional context

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  annotations:
    common.k8s.elastic.co/controller-version: 1.0.1
    elasticsearch.k8s.elastic.co/cluster-uuid: DWuiuwsnSXWsi5QFgehLOQ
  creationTimestamp: '2020-03-06T09:55:26Z'
  generation: 2
  name: elasticsearch
  namespace: logging
  resourceVersion: '1539639'
  selfLink: >-
    /apis/elasticsearch.k8s.elastic.co/v1/namespaces/logging/elasticsearches/elasticsearch
  uid: c1018f4c-da21-4c80-9865-93f2a585678f
spec:
  http:
    service:
      metadata:
        creationTimestamp: null
      spec: {}
    tls:
      certificate: {}
      selfSignedCertificate:
        disabled: true
  nodeSets:
    - config:
        node.data: false
        node.ingest: false
        node.master: true
        node.ml: false
        node.store.allow_mmap: true
      count: 1
      name: master-data
      podTemplate:
        metadata:
          annotations:
            traffic.sidecar.istio.io/excludeInboundPorts: '9300'
            traffic.sidecar.istio.io/excludeOutboundPorts: '9300'
          creationTimestamp: null
          labels:
            app: elasticsearch
        spec:
          containers:
            - env:
                - name: ES_JAVA_OPTS
                  value: '-Xms2g -Xmx2g'
              name: elasticsearch
              resources:
                limits:
                  cpu: '2'
                  memory: 4Gi
                requests:
                  cpu: '1'
                  memory: 4Gi
          initContainers:
            - command:
                - sh
                - '-c'
                - sysctl -w vm.max_map_count=262144
              name: sysctl
              resources: {}
              securityContext:
                privileged: true
            - command:
                - chown
                - '-R'
                - '1000:1000'
                - /usr/share/elasticsearch/data
              image: 'docker.elastic.co/elasticsearch/elasticsearch:7.6.1'
              name: file-permissions
              resources: {}
              securityContext:
                privileged: true
                runAsUser: 0
              volumeMounts:
                - mountPath: /usr/share/elasticsearch/data
                  name: elasticsearch-data
            - command:
                - sh
                - '-c'
                - |
                  bin/elasticsearch-plugin install --batch repository-s3
              name: install-snapshot-plugin
              resources: {}
      volumeClaimTemplates:
        - metadata:
            creationTimestamp: null
            name: elasticsearch-data
          spec:
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 100Gi
          status: {}
  secureSettings:
    - secretName: elasticsearchsnapshot-s3-credentials
  updateStrategy:
    changeBudget: {}
  version: 7.6.1
status:
  availableNodes: 1
  health: green
  phase: Ready