https://pulumi.com logo
#kubernetes
Title
# kubernetes
d

damp-honey-93158

12/07/2022, 3:01 PM
good afternoon! I'm not sure how I should declare an array of YAML as C# code (context is a deployment into AKS), any help appreciated.
schedule:
- name: "daily-backup"
schedule: "0 0 * * *"
keep: 5
storageName: fs-pvc
It's the "- name" part that has me asking questions 🙂 For the other config I've got it worked out, e.g. for the following
volume:
persistentVolumeClaim:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 6G
I just wrote:
["volume"] = new Dictionary<string, object>
{
["persistentVolumeClaim"] = new Dictionary<string, object>
{
["accessModes"] = new InputList<string> { "ReadWriteOnce" },
["resources"] = new Dictionary<string, object>
{
["requests"] = new Dictionary<string, object>
{
["storage"] = "6G"
}
}
}
}
Help appreciated and thank you!
m

many-telephone-49025

12/16/2022, 11:44 AM
Hi John, Did you had success by now? I am not a C# programmer but can ask internally at Pulumi if someone may can help.
d

damp-honey-93158

12/16/2022, 12:20 PM
In the end I did. I searched back a wee bit here and found something similar. Thanks for asking.
4 Views