Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.5 KB

cr_role.md

File metadata and controls

47 lines (38 loc) · 1.5 KB

User Role (elasticsearchroles.es.eck.github.com)

Representation of User role. The name ElasticsearchRole (instead of plain Role) was chosen to avoid clash with RBAC resources.

Lifecycle

No special lifecycle is applied for User role - when the role is deleted from K8s, it is also deleted from ES.

Create and Update are done using the same PUT /_security/role/ API. See Create or update roles API in official documentation.

Fields

Key Type Description
metadata.name string Name of the Snapshot Lifecycle Policy
spec.targetInstance.name string Name of the Elasticsearch Instance to which this ElasticsearchRole will be deployed to
spec.body string Role definition - same you would use when creating role using ES REST API

Example

apiVersion: es.eck.github.com/v1alpha1
kind: ElasticsearchRole
metadata:
  name: elasticsearchrole-sample
spec:
  targetInstance:
    name: elasticsearch-quickstart
  body: |
    {
      "cluster": ["all"],
      "indices": [
        {
          "names": [ "index-sample"],
          "privileges": ["all"]
        }
      ],
      "metadata" : {
        "version" : 1
      }
    }