Provide more complex examples in template for accessing XR data
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- go
- Ambito
- documentation
Direzione di ricerca
Inizia esaminando gli esempi esistenti di string e string-array del template Go, quindi ispeziona gli accessor di GetObservedCompositeResource, come GetStringObject, GetList e GetValue. Il lavoro è completato quando il template include un esempio chiaro di oggetto annidato o lista che mostri come accedere ai dati XR complessi e iterarvi, con l'approccio previsto documentato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
What problem are you facing?
When working with data provided in the XR, from my perspective, it is going to be more complicated than simple strings or an array of strings. Those are the two examples included in the template.
What I am struggling with, and I'll admit part of the struggle is that I am just not very familiar with Go, Python was my first choice, but I couldn't get it to build, and after seeing the provider type integration with Go I changed my mind.
An example:
containers:
- name: test1
containerAccessType: Private
- name: test2
containerAccessType: Private
I just want to be able to access for the example above, "spec.containers", get an array of something, and be able to iterate over a list and have access to the underlying data.
I spent a bit of time looking at the request returned from GetObservedCompositeResource, e.g. GetString, GetStringObject, GetList, GetValue, etc... and I didn't really find anything that was what the intended way of doing this was because as far as I can find it isn't documented and it isn't in the example template. So I went off several directions, ultimately didn't get to what I had hoped, so still kind of not sure of the best approach, but I have to assume I am missing something, it can't be that hard.
So, given the likelihood of just a simple string array or string value not being something that will scale to anything useful, a decent example of more complex data I think would be extremely valuable.
The ask is for either a V2 template or an improved one with more robust capabilities. Also, if anyone has some pointers as to what approach I would use that aligns with the intended use for functions would be create (citing above example above).
Thanks!
How could this Function help solve your problem?
- Lingua principale
- Go
- Stelle
- 40
- Fork
- 38
- Merge medio
- 11g 19h
- PR unite (30g)
- 1
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna 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 crossplane/function-template-go
-
Standardize environment variablesForse già presa @fernandezcuesta l’ha presa 105 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 48/100
-
Repository initialization has hard assumptionsForse già presa @BigGold1310 l’ha presa 862 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
crossplane/function-template-go#74 · 1 reazione ·
-
Dependency DashboardAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 15/100
Tutte le issue di crossplane/function-template-go
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 76/100
superplanehq/superplane#9007 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
yetone/magpie#3905 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno