feature: mutate spec object references for other published resources
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- go, kubernetes
Direzione di ricerca
Inizia con l’API PublishedResources e la fase di mutazione riabilitata in #19. Traccia come sono rappresentate le regole di ridenominazione per le risorse pubblicate e come potrebbe essere identificato un riferimento come spec.configRef.name. Il lavoro è completo quando l’API può dichiarare la risorsa di destinazione e gli oggetti sincronizzati usano il nome tradotto per le risorse referenziate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature Description
For namespaced resources, syncing from kcp to a Kubernetes cluster (3D space to 2D space, in a way) is usually not a problem because our default resource renaming rules put everything under its own namespace, so e.g. related resources such as Secrets do not create problems with their naming (a secretRef in an object pointing to my-secret is not creating conflicts because everything will happen in a generated namespace of the format WORKSPACE-NAMESPACE [with hashes, but you get the idea]).
This is however not possible with cluster-scoped resources in general, plus referencing other published resources would also create similar problems. Think of the following manifests that I want to create in kcp with both being synced down to a service provider cluster:
apiVersion: service/v1
kind: Config # a cluster-scoped resource
metadata:
name: my-config
spec: {}
---
apiVersion: service/v1
kind: ServiceInstance # a namespace-scoped resource
metadata:
name: my-instance
namespace: my-namespace
spec:
configRef:
name: my-config # a reference to my Config object from above
What is needed is a way to describe object references like this (basically say: spec.configRef.name in the ServiceInstance kind is a reference to another resource that is within the realm of the api-syncagent) in PublishedResources.
Since the api-syncagent knows about the renaming rules of other resources published via PublishedResources, it should mutate spec.configRef.name to the name that it translated the my-config object to. So on the service provider side, these objects should look somewhat like this:
apiVersion: service/v1
kind: Config # a cluster-scoped resource
metadata:
name: iuc6yffea77crveb-7505d64a54e061b7acd5
spec: {}
---
apiVersion: service/v1
kind: ServiceInstance # a namespace-scoped resource
metadata:
name: my-instance
namespace: org-ucdyfdsa7trvfa-sdadsjdjwwewads
spec:
configRef:
name: iuc6yffea77crveb-7505d64a54e061b7acd5 # a reference to my Config object from above
Proposed Solution
I'm not fully clear on how the API should look, but most likely a PublishedResource should have a way to mark object references and define what resource is being referenced here. The api-syncagent would need to hold an internal representation of all renaming rules depending on resources, and would then use those rules in the mutation phase we recently re-enabled in #19.
Alternative Solutions
No response
Want to contribute?
- I would like to work on this issue.
Additional Context
No response
- Lingua principale
- Go
- Stelle
- 25
- Fork
- 29
- Merge medio
- 5g 18h
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di kcp-dev/api-syncagent
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
kcp-dev/api-syncagent#163 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
kcp-dev/api-syncagent#161 ·
-
kind/feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
kcp-dev/api-syncagent#186 · 1 reazione ·
-
bug: PublishedResource updates leave previous sync controllers activeForse di nuovo libera @adoi l’ha presa 70 giorni fa e non c’è nessuna pull request aperta. Apertakind/bug
kcp-dev/api-syncagent#182 · 1 commento · 1 assegnatario ·
-
bug: finalizer "syncagent.kcp.io/cleanup" on related resources block deletion of primary objectApertakind/bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
kcp-dev/api-syncagent#172 · 1 commento · 1 reazione ·
Tutte le issue di kcp-dev/api-syncagent
Issue simili
-
priority: low 🌱 type: enhancement 💅🏼
Difficoltà 2/5 Mezza giornata Idoneità per principianti 84/100
nebari-dev/llm-serving-pack#199 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area/helm kind/bug priority/backlog triage/accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
lexfrei/cloudflare-tunnel-gateway-controller#889 ·
I maintainer di solito rispondono entro 1 giorno
-
bug difficulty: beginner documentation good first issue help wanted localization
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
wavefnd/wave-platform#140 ·
-
compiler/runtime
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
golang/go#81797 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno