stackabletech / stackabletech/zookeeper-operator

Add back-reference to ZookeeperCluster to Znode discovery CM

Open
#644 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
37
Forks
11
Avg merge
1d 8h
Merged PRs (30d)
10

Description

Currently a ZNode discovery CM looks like shown below.
It would be great to have an easy way of retrieving the name + namespace of the underlying zk cluster. This is e.g. needed for affinities

apiVersion: v1                                                                                                                                                                                                                              
data:                                                                                                                                                                                                                                       
  ZOOKEEPER: zookeeper-server-default-0.zookeeper-server-default.default.svc.cluster.local:2282,zookeeper-server-default-1.zookeeper-server-default.default.svc.cluster.local:2282,zookeeper-server-default-2.zookeeper-server-default.defau
lt.svc.cluster.local:2282/znode-d9d46348-caa0-4b8c-aee3-e007fac2e6a4                                                                                                                                                                        
  ZOOKEEPER_CHROOT: /znode-d9d46348-caa0-4b8c-aee3-e007fac2e6a4                                                                                                                                                                             
  ZOOKEEPER_HOSTS: zookeeper-server-default-0.zookeeper-server-default.default.svc.cluster.local:2282,zookeeper-server-default-1.zookeeper-server-default.default.svc.cluster.local:2282,zookeeper-server-default-2.zookeeper-server-default
.default.svc.cluster.local:2282                                                                                                                                                                                                             
kind: ConfigMap                                                                                                                                                                                                                             
metadata:                                                                                                                                                                                                                                   
  creationTimestamp: "2023-02-17T08:02:28Z"                                                                                                                                                                                                 
  labels:                                                                                                                                                                                                                                   
    app.kubernetes.io/component: server                                                                                                                                                                                                     
    app.kubernetes.io/instance: hdfs-znode                                                                                                                                                                                                  
    app.kubernetes.io/managed-by: zookeeper.stackable.tech_znode                                                                                                                                                                            
    app.kubernetes.io/name: zookeeper                                                                                                                                                                                                       
    app.kubernetes.io/role-group: discovery                                                                                                                                                                                                 
    app.kubernetes.io/version: 3.8.0-3.8.0-stackable0.7.1-dns-fix                                                                                                                                                                           
  name: hdfs-znode                                                                                                                                                                                                                          
  namespace: default                                                                                                                                                                                                                        
  ownerReferences:                                                                                                                                                                                                                          
  - apiVersion: zookeeper.stackable.tech/v1alpha1                                                                                                                                                                                           
    controller: true                                                                                                                                                                                                                        
    kind: ZookeeperZnode                                                                                                                                                                                                                    
    name: hdfs-znode                                                                                                                                                                                                                        
    uid: d9d46348-caa0-4b8c-aee3-e007fac2e6a4                                                                                                                                                                                               
  resourceVersion: "31039352518"                                                                                                                                                                                                            
  uid: 6bb938cc-4d71-4d60-99fc-f6b280543bec

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Znode discovery ConfigMap reconciliation and trace how the underlying ZookeeperCluster is identified. Check the generated ConfigMap metadata and related Kubernetes resources for the available association fields. Done means the ConfigMap exposes an easy way to retrieve the cluster name and namespace for affinity use cases, with coverage for the generated metadata.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, rust
Domain
infrastructure
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.