{"id":16928091,"url":"https://github.com/dirien/pulumi-aiven-openfaas","last_synced_at":"2025-10-08T13:19:02.049Z","repository":{"id":103803825,"uuid":"392320235","full_name":"dirien/pulumi-aiven-openfaas","owner":"dirien","description":"Running OpenFaas Pro on Linode K8s (feat. Aiven and Pulumi)","archived":false,"fork":false,"pushed_at":"2022-02-16T22:06:42.000Z","size":94,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T23:08:58.710Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirien.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-03T13:04:21.000Z","updated_at":"2022-04-26T04:51:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"263ca92e-c994-4ed9-87d6-12eadc89eec2","html_url":"https://github.com/dirien/pulumi-aiven-openfaas","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fpulumi-aiven-openfaas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fpulumi-aiven-openfaas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fpulumi-aiven-openfaas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirien%2Fpulumi-aiven-openfaas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirien","download_url":"https://codeload.github.com/dirien/pulumi-aiven-openfaas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248451666,"owners_count":21105912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T20:35:51.748Z","updated_at":"2025-10-08T13:18:57.008Z","avatar_url":"https://github.com/dirien.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Running OpenFaas Pro on Linode K8s (feat. Aiven and Pulumi)\n\nAlex Ellis did a great job, when he wrote a tutorial\nabout [Event-driven OpenFaaS with Managed Kafka from Aiven](https://www.openfaas.com/blog/openfaas-kafka-aiven/).\n\nSo this got me hooked. My personal challenge was: **How can I fully automate the deployment of the whole stack.**\n\nTo spice up the challenge, I decided to use only Pulumi for this in Go.\n\n## Preparation\n\nSet the API keys for Linode and Aiven and th OpenFaas Pro license via the\n\n```bash\ncd 00-infrastructure\npulumi config set linode:token xxx --secret\n\ncd 01-aiven\npulumi config set aiven:apiToken xxx --secret\n\n02-openfaas\npulumi config set openfaas xxx --secret\n```\n\nOtherwise, you can't replay the deployment.\n\n## How to\n\nFirs I cut the whole stack into three different Pulumi `Stacks`:\n\n- 00-infrastructure\n- 01-aiven\n- 02-openfaas\n\nCreating this kind of independent IaC modules, I would consider as good practice. So at the end you can work independent\non a specific stack, without running having this all-in-one single deployment files.\n\nThe only dependency we have between the different stacks are the:\n\n[Export](https://www.pulumi.com/docs/intro/concepts/stack/#outputs) of properties, a different stack would need for the\nservices to provision.\n\n```go\nctx.Export(\"caCert\", pulumi.ToSecret(project.CaCert))\n```\n\nOn the other side to consume the outputs in a different stack, you just need to get\nthe [stack reference](https://www.pulumi.com/docs/intro/concepts/stack/#stackreferences).\n\n```go\naiven, err := pulumi.NewStackReference(ctx, \"dirien/01-aiven/dev\", nil)\nif err != ...\ncaCert := aiven.GetStringOutput(pulumi.String(\"caCert\"))\n```\n\nNow you can `pulumi up` every folder and your whole stack gets deployed.\n\nSo running a deployment of a larger app with different layers (infra, managed services and app) is becoming more and\nmore accessible and enables us to work more in a DevOps fashion inside our team.\n\n## Alternative solutions\n\nAn alternative solution would be, to use Pulumi for the provisioning of the infrastructure and manged services and\nbootstrapping a GitOps engine (like Flux2 or ArgoCD).\n\nAnother solution could be to just provision your kubernetes infrastructure and use [Crossplane](https://crossplane.io/)\nto provision the \"real\" infrastructure.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Fpulumi-aiven-openfaas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirien%2Fpulumi-aiven-openfaas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirien%2Fpulumi-aiven-openfaas/lists"}