├── sdk
├── .gitignore
├── dotnet
│ ├── version.txt
│ ├── Config
│ │ ├── README.md
│ │ └── Config.cs
│ ├── logo.png
│ ├── pulumi-plugin.json
│ ├── Outputs
│ │ ├── K0sMetadata.cs
│ │ ├── ClusterMetadata.cs
│ │ ├── K0sKine.cs
│ │ ├── K0sTelemetry.cs
│ │ ├── ClusterLocalhost.cs
│ │ ├── K0sInstallConfig.cs
│ │ ├── K0sPodSecurityPolicy.cs
│ │ ├── K0sScheduler.cs
│ │ ├── K0sControllerManager.cs
│ │ ├── K0sImage.cs
│ │ ├── K0sKonnectivity.cs
│ │ ├── ClusterHook.cs
│ │ ├── K0sWorkerProfile.cs
│ │ ├── ClusterSpec.cs
│ │ ├── K0sKubeRouterImage.cs
│ │ ├── K0sStorage.cs
│ │ ├── K0sFeatureGate.cs
│ │ ├── ClusterHooks.cs
│ │ ├── K0sDualStack.cs
│ │ ├── K0sNodeLocalLoadBalancing.cs
│ │ ├── K0s.cs
│ │ ├── K0sEtcd.cs
│ │ ├── ClusterK0s.cs
│ │ ├── K0sKubeProxyIPTables.cs
│ │ ├── K0sCalicoImage.cs
│ │ ├── K0sEnvoyProxy.cs
│ │ ├── K0sEtcdExternalCluster.cs
│ │ ├── ClusterSSH.cs
│ │ ├── K0sKubeProxy.cs
│ │ ├── K0sInstallConfigUser.cs
│ │ ├── K0sKubeRouter.cs
│ │ ├── K0sAPI.cs
│ │ ├── ClusterFile.cs
│ │ ├── ClusterOpenSSH.cs
│ │ ├── K0sKubeProxyIPVS.cs
│ │ ├── K0sCalico.cs
│ │ ├── K0sImages.cs
│ │ ├── K0sNetwork.cs
│ │ ├── ClusterWinRM.cs
│ │ ├── K0sSpec.cs
│ │ └── ClusterHost.cs
│ ├── Inputs
│ │ ├── K0sTelemetryArgs.cs
│ │ ├── K0sMetadataArgs.cs
│ │ ├── ClusterLocalhostArgs.cs
│ │ ├── ClusterMetadataArgs.cs
│ │ ├── K0sInstallConfigArgs.cs
│ │ ├── K0sPodSecurityPolicyArgs.cs
│ │ ├── K0sImageArgs.cs
│ │ ├── K0sKonnectivityArgs.cs
│ │ ├── K0sKubeRouterImageArgs.cs
│ │ ├── K0sStorageArgs.cs
│ │ ├── K0sSchedulerArgs.cs
│ │ ├── K0sDualStackArgs.cs
│ │ ├── ClusterHooksArgs.cs
│ │ ├── K0sControllerManagerArgs.cs
│ │ ├── K0sArgs.cs
│ │ ├── K0sNodeLocalLoadBalancingArgs.cs
│ │ ├── ClusterK0sArgs.cs
│ │ ├── K0sWorkerProfileArgs.cs
│ │ ├── K0sKineArgs.cs
│ │ ├── ClusterSpecArgs.cs
│ │ ├── K0sCalicoImageArgs.cs
│ │ ├── K0sEnvoyProxyArgs.cs
│ │ ├── K0sKubeProxyIPTablesArgs.cs
│ │ ├── K0sEtcdArgs.cs
│ │ ├── K0sFeatureGateArgs.cs
│ │ ├── K0sKubeProxyArgs.cs
│ │ ├── ClusterHookArgs.cs
│ │ ├── K0sInstallConfigUserArgs.cs
│ │ ├── ClusterFileArgs.cs
│ │ ├── K0sKubeRouterArgs.cs
│ │ ├── K0sKubeProxyIPVSArgs.cs
│ │ ├── ClusterSSHArgs.cs
│ │ ├── K0sAPIArgs.cs
│ │ ├── K0sImagesArgs.cs
│ │ ├── K0sNetworkArgs.cs
│ │ ├── K0sCalicoArgs.cs
│ │ ├── ClusterOpenSSHArgs.cs
│ │ ├── K0sEtcdExternalClusterArgs.cs
│ │ ├── K0sSpecArgs.cs
│ │ ├── ClusterHostArgs.cs
│ │ └── ClusterWinRMArgs.cs
│ ├── README.md
│ ├── Pulumi.K0s.csproj
│ ├── Utilities.cs
│ ├── Provider.cs
│ └── Cluster.cs
├── python
│ ├── pulumi_k0s
│ │ ├── py.typed
│ │ ├── README.md
│ │ ├── pulumi-plugin.json
│ │ ├── config
│ │ │ ├── __init__.py
│ │ │ ├── __init__.pyi
│ │ │ └── vars.py
│ │ └── __init__.py
│ ├── setup.py
│ └── README.md
├── nodejs
│ ├── README.md
│ ├── config
│ │ ├── index.ts
│ │ └── vars.ts
│ ├── types
│ │ └── index.ts
│ ├── package.json
│ ├── tsconfig.json
│ ├── index.ts
│ ├── provider.ts
│ ├── utilities.ts
│ └── cluster.ts
├── go
│ └── k0s
│ │ ├── doc.go
│ │ ├── pulumi-plugin.json
│ │ ├── internal
│ │ ├── pulumiVersion.go
│ │ └── pulumiUtilities.go
│ │ ├── init.go
│ │ ├── config
│ │ └── config.go
│ │ ├── provider.go
│ │ └── cluster.go
└── go.mod
├── examples
├── python
│ ├── .gitignore
│ ├── requirements.txt
│ ├── Pulumi.yaml
│ └── __main__.py
├── nodejs
│ ├── .gitignore
│ ├── Pulumi.yaml
│ ├── package.json
│ ├── tsconfig.json
│ └── index.ts
├── go
│ ├── go.mod
│ ├── Pulumi.yaml
│ └── main.go
├── dotnet
│ ├── Pulumi.yaml
│ ├── provider-k0s.csproj
│ └── Program.cs
└── yaml
│ ├── Pulumi.yaml
│ └── README.md
├── go.work
├── .gitignore
├── provider
├── cmd
│ └── pulumi-resource-k0s
│ │ └── main.go
├── provider.go
├── helpers.go
├── internal
│ └── introspect
│ │ ├── propertiesMap_test.go
│ │ └── propertiesMap.go
├── config.go
└── k0sctl.go
├── tests
├── provider_test.go
├── common.go
└── cluster_test.go
├── .goreleaser.yml
├── .github
└── workflows
│ ├── makefile.yaml
│ └── release.yml
├── README.md
├── .devcontainer.json
└── Makefile
/sdk/.gitignore:
--------------------------------------------------------------------------------
1 | schema/
2 |
--------------------------------------------------------------------------------
/sdk/dotnet/version.txt:
--------------------------------------------------------------------------------
1 | 0.3.0
2 |
--------------------------------------------------------------------------------
/sdk/python/pulumi_k0s/py.typed:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/python/.gitignore:
--------------------------------------------------------------------------------
1 | *.pyc
2 | venv/
--------------------------------------------------------------------------------
/examples/nodejs/.gitignore:
--------------------------------------------------------------------------------
1 | /bin/
2 | /node_modules/
--------------------------------------------------------------------------------
/examples/python/requirements.txt:
--------------------------------------------------------------------------------
1 | pulumi>=3.0.0,<4.0.0
2 | pulumi-k0s==0.3.0
3 |
--------------------------------------------------------------------------------
/sdk/nodejs/README.md:
--------------------------------------------------------------------------------
1 | A Pulumi package for creating and managing k0s clusters.
2 |
--------------------------------------------------------------------------------
/sdk/dotnet/Config/README.md:
--------------------------------------------------------------------------------
1 | A Pulumi package for creating and managing k0s clusters.
2 |
--------------------------------------------------------------------------------
/sdk/dotnet/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ydkn/pulumi-k0s/HEAD/sdk/dotnet/logo.png
--------------------------------------------------------------------------------
/sdk/python/pulumi_k0s/README.md:
--------------------------------------------------------------------------------
1 | A Pulumi package for creating and managing k0s clusters.
2 |
--------------------------------------------------------------------------------
/sdk/go/k0s/doc.go:
--------------------------------------------------------------------------------
1 | // A Pulumi package for creating and managing k0s clusters.
2 | package k0s
3 |
--------------------------------------------------------------------------------
/go.work:
--------------------------------------------------------------------------------
1 | go 1.23.3
2 |
3 | toolchain go1.23.3
4 |
5 | use (
6 | ./provider
7 | ./sdk
8 | ./tests
9 | )
10 |
--------------------------------------------------------------------------------
/examples/go/go.mod:
--------------------------------------------------------------------------------
1 | module provider-k0s
2 |
3 | go 1.20
4 |
5 | require (
6 | github.com/pulumi/pulumi/sdk/v3 v3.30.0
7 | )
--------------------------------------------------------------------------------
/examples/go/Pulumi.yaml:
--------------------------------------------------------------------------------
1 | name: provider-k0s
2 | runtime: go
3 | plugins:
4 | providers:
5 | - name: k0s
6 | path: ../../bin
7 |
--------------------------------------------------------------------------------
/sdk/dotnet/pulumi-plugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "resource": true,
3 | "name": "k0s",
4 | "server": "https://repo.ydkn.io/pulumi-k0s"
5 | }
6 |
--------------------------------------------------------------------------------
/sdk/go/k0s/pulumi-plugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "resource": true,
3 | "name": "k0s",
4 | "server": "https://repo.ydkn.io/pulumi-k0s"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/dotnet/Pulumi.yaml:
--------------------------------------------------------------------------------
1 | name: provider-k0s
2 | runtime: dotnet
3 | plugins:
4 | providers:
5 | - name: k0s
6 | path: ../../bin
7 |
--------------------------------------------------------------------------------
/examples/nodejs/Pulumi.yaml:
--------------------------------------------------------------------------------
1 | name: provider-k0s
2 | runtime: nodejs
3 | plugins:
4 | providers:
5 | - name: k0s
6 | path: ../../bin
7 |
--------------------------------------------------------------------------------
/examples/python/Pulumi.yaml:
--------------------------------------------------------------------------------
1 | name: provider-k0s
2 | runtime: python
3 | plugins:
4 | providers:
5 | - name: k0s
6 | path: ../../bin
7 |
--------------------------------------------------------------------------------
/sdk/python/pulumi_k0s/pulumi-plugin.json:
--------------------------------------------------------------------------------
1 | {
2 | "resource": true,
3 | "name": "k0s",
4 | "server": "https://repo.ydkn.io/pulumi-k0s"
5 | }
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor/
2 | **/bin/
3 | **/obj/
4 | **/node_modules/
5 | **/.vs
6 | **/.idea
7 | **/.ionide
8 | .pulumi
9 | Pulumi.*.yaml
10 | yarn.lock
11 | ci-scripts
12 | /nuget/
13 | provider/**/schema-embed.json
14 | go.work.sum
15 |
--------------------------------------------------------------------------------
/sdk/nodejs/config/index.ts:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | // Export members:
5 | export * from "./vars";
6 |
--------------------------------------------------------------------------------
/examples/nodejs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "provider-k0s",
3 | "devDependencies": {
4 | "@types/node": "^14"
5 | },
6 | "dependencies": {
7 | "typescript": "^4.0.0",
8 | "@pulumi/pulumi": "^3.0.0",
9 | "@pulumi/k0s": "0.3.0"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/sdk/python/pulumi_k0s/config/__init__.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # *** WARNING: this file was generated by pulumi-language-python. ***
3 | # *** Do not edit by hand unless you're certain you know what you are doing! ***
4 |
5 | import sys
6 | from .vars import _ExportableConfig
7 |
8 | sys.modules[__name__].__class__ = _ExportableConfig
9 |
--------------------------------------------------------------------------------
/sdk/go/k0s/internal/pulumiVersion.go:
--------------------------------------------------------------------------------
1 | // Code generated by pulumi-language-go DO NOT EDIT.
2 | // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | package internal
5 |
6 | import (
7 | "github.com/blang/semver"
8 | )
9 |
10 | var SdkVersion semver.Version = semver.Version{}
11 | var pluginDownloadURL string = ""
12 |
--------------------------------------------------------------------------------
/sdk/nodejs/types/index.ts:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi-language-nodejs. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | import * as utilities from "../utilities";
5 |
6 | // Export sub-modules:
7 | import * as input from "./input";
8 | import * as output from "./output";
9 |
10 | export {
11 | input,
12 | output,
13 | };
14 |
--------------------------------------------------------------------------------
/examples/dotnet/provider-k0s.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net6.0
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/examples/nodejs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "strict": true,
4 | "outDir": "bin",
5 | "target": "es2016",
6 | "module": "commonjs",
7 | "moduleResolution": "node",
8 | "sourceMap": true,
9 | "experimentalDecorators": true,
10 | "pretty": true,
11 | "noFallthroughCasesInSwitch": true,
12 | "noImplicitReturns": true,
13 | "forceConsistentCasingInFileNames": true
14 | },
15 | "files": [
16 | "index.ts",
17 | ]
18 | }
--------------------------------------------------------------------------------
/provider/cmd/pulumi-resource-k0s/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "fmt"
5 | "os"
6 |
7 | p "github.com/pulumi/pulumi-go-provider"
8 | k0s "github.com/ydkn/pulumi-k0s/provider"
9 | )
10 |
11 | // Serve the provider against Pulumi's Provider protocol.
12 | func main() {
13 | if err := p.RunProvider(k0s.Name, k0s.Version, k0s.Provider()); err != nil {
14 | fmt.Fprintf(os.Stderr, "Error: %s", err.Error())
15 |
16 | os.Exit(1)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/examples/nodejs/index.ts:
--------------------------------------------------------------------------------
1 | import * as pulumi from "@pulumi/pulumi";
2 | import * as k0s from "@pulumi/k0s";
3 |
4 | const myProvider = new k0s.Provider("myProvider", {noDrain: true});
5 | const myCluster = new k0s.Cluster("myCluster", {spec: {
6 | hosts: [{
7 | role: "controller+worker",
8 | localhost: {
9 | enabled: true,
10 | },
11 | }],
12 | }}, {
13 | provider: myProvider,
14 | });
15 | export const output = {
16 | value: myCluster.kubeconfig,
17 | };
18 |
--------------------------------------------------------------------------------
/examples/python/__main__.py:
--------------------------------------------------------------------------------
1 | import pulumi
2 | import pulumi_k0s as k0s
3 |
4 | my_provider = k0s.Provider("myProvider", no_drain=True)
5 | my_cluster = k0s.Cluster("myCluster", spec=k0s.ClusterSpecArgs(
6 | hosts=[k0s.ClusterHostArgs(
7 | role="controller+worker",
8 | localhost=k0s.ClusterLocalhostArgs(
9 | enabled=True,
10 | ),
11 | )],
12 | ),
13 | opts=pulumi.ResourceOptions(provider=my_provider))
14 | pulumi.export("output", {
15 | "value": my_cluster.kubeconfig,
16 | })
17 |
--------------------------------------------------------------------------------
/tests/provider_test.go:
--------------------------------------------------------------------------------
1 | package tests
2 |
3 | import (
4 | "testing"
5 |
6 | p "github.com/pulumi/pulumi-go-provider"
7 | "github.com/pulumi/pulumi/sdk/v3/go/common/resource"
8 | "github.com/stretchr/testify/require"
9 | )
10 |
11 | func TestProviderConfigure(t *testing.T) {
12 | prov := integrationServer()
13 |
14 | err := prov.Configure(p.ConfigureRequest{
15 | Args: resource.PropertyMap{
16 | "noDrain": resource.NewBoolProperty(true),
17 | "skipDowngradeCheck": resource.NewBoolProperty(true),
18 | },
19 | })
20 | require.NoError(t, err)
21 | }
22 |
--------------------------------------------------------------------------------
/examples/yaml/Pulumi.yaml:
--------------------------------------------------------------------------------
1 | name: provider-k0s
2 | runtime: yaml
3 | plugins:
4 | providers:
5 | - name: k0s
6 | path: ../../bin
7 |
8 | resources:
9 | myProvider:
10 | type: pulumi:providers:k0s
11 | properties:
12 | noDrain: true
13 | myCluster:
14 | type: k0s:Cluster
15 | properties:
16 | spec:
17 | hosts:
18 | - role: controller+worker
19 | localhost:
20 | enabled: true
21 | options:
22 | provider: ${myProvider}
23 |
24 | outputs:
25 | output:
26 | value: ${myCluster.kubeconfig}
27 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sMetadata.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sMetadata
15 | {
16 | public readonly string Name;
17 |
18 | [OutputConstructor]
19 | private K0sMetadata(string name)
20 | {
21 | Name = name;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/ClusterMetadata.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class ClusterMetadata
15 | {
16 | public readonly string Name;
17 |
18 | [OutputConstructor]
19 | private ClusterMetadata(string name)
20 | {
21 | Name = name;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sKine.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sKine
15 | {
16 | public readonly string DataSource;
17 |
18 | [OutputConstructor]
19 | private K0sKine(string dataSource)
20 | {
21 | DataSource = dataSource;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sTelemetry.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sTelemetry
15 | {
16 | public readonly bool? Enabled;
17 |
18 | [OutputConstructor]
19 | private K0sTelemetry(bool? enabled)
20 | {
21 | Enabled = enabled;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/ClusterLocalhost.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class ClusterLocalhost
15 | {
16 | public readonly bool? Enabled;
17 |
18 | [OutputConstructor]
19 | private ClusterLocalhost(bool? enabled)
20 | {
21 | Enabled = enabled;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/tests/common.go:
--------------------------------------------------------------------------------
1 | package tests
2 |
3 | import (
4 | "github.com/blang/semver"
5 | p "github.com/pulumi/pulumi-go-provider"
6 | "github.com/pulumi/pulumi-go-provider/integration"
7 | "github.com/pulumi/pulumi/sdk/v3/go/common/resource"
8 | "github.com/pulumi/pulumi/sdk/v3/go/common/tokens"
9 |
10 | k0s "github.com/ydkn/pulumi-k0s/provider"
11 | )
12 |
13 | func urn(typ, name string) resource.URN {
14 | return resource.NewURN("stack", "project", "", tokens.Type("test:index:"+typ), name)
15 | }
16 |
17 | func provider() p.Provider {
18 | return k0s.Provider()
19 | }
20 |
21 | func integrationServer() integration.Server {
22 | return integration.NewServer(k0s.Name, semver.MustParse("1.0.0"), provider())
23 | }
24 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sInstallConfig.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sInstallConfig
15 | {
16 | public readonly Outputs.K0sInstallConfigUser? Users;
17 |
18 | [OutputConstructor]
19 | private K0sInstallConfig(Outputs.K0sInstallConfigUser? users)
20 | {
21 | Users = users;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sPodSecurityPolicy.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sPodSecurityPolicy
15 | {
16 | public readonly string? DefaultPolicy;
17 |
18 | [OutputConstructor]
19 | private K0sPodSecurityPolicy(string? defaultPolicy)
20 | {
21 | DefaultPolicy = defaultPolicy;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sTelemetryArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sTelemetryArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("enabled")]
16 | public Input? Enabled { get; set; }
17 |
18 | public K0sTelemetryArgs()
19 | {
20 | }
21 | public static new K0sTelemetryArgs Empty => new K0sTelemetryArgs();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sMetadataArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sMetadataArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("name", required: true)]
16 | public Input Name { get; set; } = null!;
17 |
18 | public K0sMetadataArgs()
19 | {
20 | }
21 | public static new K0sMetadataArgs Empty => new K0sMetadataArgs();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sScheduler.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sScheduler
15 | {
16 | public readonly ImmutableDictionary? ExtraArgs;
17 |
18 | [OutputConstructor]
19 | private K0sScheduler(ImmutableDictionary? extraArgs)
20 | {
21 | ExtraArgs = extraArgs;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/nodejs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@ydkn/pulumi-k0s",
3 | "version": "${VERSION}",
4 | "keywords": [
5 | "pulumi",
6 | "kubernetes",
7 | "k0s"
8 | ],
9 | "homepage": "https://github.com/ydkn/pulumi-k0s",
10 | "repository": "https://github.com/ydkn/pulumi-k0s",
11 | "license": "Apache-2.0",
12 | "scripts": {
13 | "build": "tsc"
14 | },
15 | "dependencies": {
16 | "@pulumi/pulumi": "^3.136.0"
17 | },
18 | "devDependencies": {
19 | "@types/node": "^14",
20 | "typescript": "^4.3.5"
21 | },
22 | "pulumi": {
23 | "resource": true,
24 | "name": "k0s",
25 | "server": "https://repo.ydkn.io/pulumi-k0s"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/ClusterLocalhostArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class ClusterLocalhostArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("enabled")]
16 | public Input? Enabled { get; set; }
17 |
18 | public ClusterLocalhostArgs()
19 | {
20 | }
21 | public static new ClusterLocalhostArgs Empty => new ClusterLocalhostArgs();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/ClusterMetadataArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class ClusterMetadataArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("name", required: true)]
16 | public Input Name { get; set; } = null!;
17 |
18 | public ClusterMetadataArgs()
19 | {
20 | }
21 | public static new ClusterMetadataArgs Empty => new ClusterMetadataArgs();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sControllerManager.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sControllerManager
15 | {
16 | public readonly ImmutableDictionary? ExtraArgs;
17 |
18 | [OutputConstructor]
19 | private K0sControllerManager(ImmutableDictionary? extraArgs)
20 | {
21 | ExtraArgs = extraArgs;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/sdk/nodejs/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "outDir": "bin",
4 | "target": "es2016",
5 | "module": "commonjs",
6 | "moduleResolution": "node",
7 | "declaration": true,
8 | "sourceMap": true,
9 | "stripInternal": true,
10 | "experimentalDecorators": true,
11 | "noFallthroughCasesInSwitch": true,
12 | "forceConsistentCasingInFileNames": true,
13 | "strict": true
14 | },
15 | "files": [
16 | "cluster.ts",
17 | "config/index.ts",
18 | "config/vars.ts",
19 | "index.ts",
20 | "provider.ts",
21 | "types/index.ts",
22 | "types/input.ts",
23 | "types/output.ts",
24 | "utilities.ts"
25 | ]
26 | }
27 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sInstallConfigArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sInstallConfigArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("users")]
16 | public Input? Users { get; set; }
17 |
18 | public K0sInstallConfigArgs()
19 | {
20 | }
21 | public static new K0sInstallConfigArgs Empty => new K0sInstallConfigArgs();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/.goreleaser.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | archives:
3 | - id: archive
4 | name_template: "{{ .Binary }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}"
5 | before:
6 | hooks:
7 | - make provider
8 | builds:
9 | - binary: pulumi-resource-k0s
10 | dir: provider
11 | env:
12 | - CGO_ENABLED=0
13 | goarch:
14 | - amd64
15 | - arm64
16 | goos:
17 | - darwin
18 | - windows
19 | - linux
20 | ldflags:
21 | # The line below MUST align with the module in current provider/go.mod
22 | - -X github.com/ydkn/pulumi-k0s/provider.Version={{ .Tag }}
23 | main: ./cmd/pulumi-resource-k0s/
24 | changelog:
25 | disable: false
26 | release:
27 | disable: false
28 | prerelease: auto
29 | snapshot:
30 | version_template: "{{ .Tag }}-SNAPSHOT"
31 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sPodSecurityPolicyArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sPodSecurityPolicyArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("defaultPolicy")]
16 | public Input? DefaultPolicy { get; set; }
17 |
18 | public K0sPodSecurityPolicyArgs()
19 | {
20 | }
21 | public static new K0sPodSecurityPolicyArgs Empty => new K0sPodSecurityPolicyArgs();
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sImage.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sImage
15 | {
16 | public readonly string? Image;
17 | public readonly string? Version;
18 |
19 | [OutputConstructor]
20 | private K0sImage(
21 | string? image,
22 |
23 | string? version)
24 | {
25 | Image = image;
26 | Version = version;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sImageArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sImageArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("image")]
16 | public Input? Image { get; set; }
17 |
18 | [Input("version")]
19 | public Input? Version { get; set; }
20 |
21 | public K0sImageArgs()
22 | {
23 | }
24 | public static new K0sImageArgs Empty => new K0sImageArgs();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sKonnectivity.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sKonnectivity
15 | {
16 | public readonly int? AdminPort;
17 | public readonly int? AgentPort;
18 |
19 | [OutputConstructor]
20 | private K0sKonnectivity(
21 | int? adminPort,
22 |
23 | int? agentPort)
24 | {
25 | AdminPort = adminPort;
26 | AgentPort = agentPort;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sKonnectivityArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sKonnectivityArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("adminPort")]
16 | public Input? AdminPort { get; set; }
17 |
18 | [Input("agentPort")]
19 | public Input? AgentPort { get; set; }
20 |
21 | public K0sKonnectivityArgs()
22 | {
23 | }
24 | public static new K0sKonnectivityArgs Empty => new K0sKonnectivityArgs();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/ClusterHook.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class ClusterHook
15 | {
16 | public readonly ImmutableArray After;
17 | public readonly ImmutableArray Before;
18 |
19 | [OutputConstructor]
20 | private ClusterHook(
21 | ImmutableArray after,
22 |
23 | ImmutableArray before)
24 | {
25 | After = after;
26 | Before = before;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/examples/yaml/README.md:
--------------------------------------------------------------------------------
1 | # YAML Example Program
2 |
3 | Test Pulumi program written in YAML for testing this provider locally.
4 |
5 | Edit this yaml program to test features of your provider locally. You can run this program using the following command:
6 |
7 | ```bash
8 | pulumi login
9 | pulumi stack init local
10 | pulumi up
11 | ```
12 |
13 | Note that unlike the rest of the auto-generated examples in the ./examples directory, this example is not automatically generated. It is intended to be a place for you to test your provider locally.
14 |
15 | The remaining examples are language specific examples derived from the `make gen_examples` command supported in this provider's Makefile. These examples are automatically generated and should not be edited directly. To regenerate these examples, run `make gen_examples` in the root of this provider's repository.
16 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sWorkerProfile.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sWorkerProfile
15 | {
16 | public readonly string Name;
17 | public readonly ImmutableDictionary Values;
18 |
19 | [OutputConstructor]
20 | private K0sWorkerProfile(
21 | string name,
22 |
23 | ImmutableDictionary values)
24 | {
25 | Name = name;
26 | Values = values;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/ClusterSpec.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class ClusterSpec
15 | {
16 | public readonly ImmutableArray Hosts;
17 | public readonly Outputs.ClusterK0s? K0s;
18 |
19 | [OutputConstructor]
20 | private ClusterSpec(
21 | ImmutableArray hosts,
22 |
23 | Outputs.ClusterK0s? k0s)
24 | {
25 | Hosts = hosts;
26 | K0s = k0s;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sKubeRouterImage.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sKubeRouterImage
15 | {
16 | public readonly Outputs.K0sImage? Cni;
17 | public readonly Outputs.K0sImage? CniInstaller;
18 |
19 | [OutputConstructor]
20 | private K0sKubeRouterImage(
21 | Outputs.K0sImage? cni,
22 |
23 | Outputs.K0sImage? cniInstaller)
24 | {
25 | Cni = cni;
26 | CniInstaller = cniInstaller;
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sKubeRouterImageArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sKubeRouterImageArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("cni")]
16 | public Input? Cni { get; set; }
17 |
18 | [Input("cniInstaller")]
19 | public Input? CniInstaller { get; set; }
20 |
21 | public K0sKubeRouterImageArgs()
22 | {
23 | }
24 | public static new K0sKubeRouterImageArgs Empty => new K0sKubeRouterImageArgs();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sStorageArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sStorageArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("etcd")]
16 | public Input? Etcd { get; set; }
17 |
18 | [Input("kine")]
19 | public Input? Kine { get; set; }
20 |
21 | [Input("type")]
22 | public Input? Type { get; set; }
23 |
24 | public K0sStorageArgs()
25 | {
26 | }
27 | public static new K0sStorageArgs Empty => new K0sStorageArgs();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sSchedulerArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sSchedulerArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("extraArgs")]
16 | private InputMap? _extraArgs;
17 | public InputMap ExtraArgs
18 | {
19 | get => _extraArgs ?? (_extraArgs = new InputMap());
20 | set => _extraArgs = value;
21 | }
22 |
23 | public K0sSchedulerArgs()
24 | {
25 | }
26 | public static new K0sSchedulerArgs Empty => new K0sSchedulerArgs();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sStorage.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sStorage
15 | {
16 | public readonly Outputs.K0sEtcd? Etcd;
17 | public readonly Outputs.K0sKine? Kine;
18 | public readonly string? Type;
19 |
20 | [OutputConstructor]
21 | private K0sStorage(
22 | Outputs.K0sEtcd? etcd,
23 |
24 | Outputs.K0sKine? kine,
25 |
26 | string? type)
27 | {
28 | Etcd = etcd;
29 | Kine = kine;
30 | Type = type;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/examples/go/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "github.com/pulumi/pulumi-k0s/sdk/go/k0s"
5 | "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
6 | )
7 |
8 | func main() {
9 | pulumi.Run(func(ctx *pulumi.Context) error {
10 | myProvider, err := k0s.NewProvider(ctx, "myProvider", &k0s.ProviderArgs{
11 | NoDrain: pulumi.Bool(true),
12 | })
13 | if err != nil {
14 | return err
15 | }
16 | myCluster, err := k0s.NewCluster(ctx, "myCluster", &k0s.ClusterArgs{
17 | Spec: &k0s.ClusterSpecArgs{
18 | Hosts: []k0s.ClusterHostArgs{
19 | {
20 | Role: pulumi.String("controller+worker"),
21 | Localhost: {
22 | Enabled: pulumi.Bool(true),
23 | },
24 | },
25 | },
26 | },
27 | }, pulumi.Provider(myProvider))
28 | if err != nil {
29 | return err
30 | }
31 | ctx.Export("output", map[string]interface{}{
32 | "value": myCluster.Kubeconfig,
33 | })
34 | return nil
35 | })
36 | }
37 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sDualStackArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sDualStackArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("IPv6podCIDR")]
16 | public Input? IPv6podCIDR { get; set; }
17 |
18 | [Input("IPv6serviceCIDR")]
19 | public Input? IPv6serviceCIDR { get; set; }
20 |
21 | [Input("enabled")]
22 | public Input? Enabled { get; set; }
23 |
24 | public K0sDualStackArgs()
25 | {
26 | }
27 | public static new K0sDualStackArgs Empty => new K0sDualStackArgs();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/ClusterHooksArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class ClusterHooksArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("apply")]
16 | public Input? Apply { get; set; }
17 |
18 | [Input("backup")]
19 | public Input? Backup { get; set; }
20 |
21 | [Input("reset")]
22 | public Input? Reset { get; set; }
23 |
24 | public ClusterHooksArgs()
25 | {
26 | }
27 | public static new ClusterHooksArgs Empty => new ClusterHooksArgs();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sControllerManagerArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sControllerManagerArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("extraArgs")]
16 | private InputMap? _extraArgs;
17 | public InputMap ExtraArgs
18 | {
19 | get => _extraArgs ?? (_extraArgs = new InputMap());
20 | set => _extraArgs = value;
21 | }
22 |
23 | public K0sControllerManagerArgs()
24 | {
25 | }
26 | public static new K0sControllerManagerArgs Empty => new K0sControllerManagerArgs();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sFeatureGate.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sFeatureGate
15 | {
16 | public readonly ImmutableArray Components;
17 | public readonly bool? Enabled;
18 | public readonly string Name;
19 |
20 | [OutputConstructor]
21 | private K0sFeatureGate(
22 | ImmutableArray components,
23 |
24 | bool? enabled,
25 |
26 | string name)
27 | {
28 | Components = components;
29 | Enabled = enabled;
30 | Name = name;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/ClusterHooks.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class ClusterHooks
15 | {
16 | public readonly Outputs.ClusterHook? Apply;
17 | public readonly Outputs.ClusterHook? Backup;
18 | public readonly Outputs.ClusterHook? Reset;
19 |
20 | [OutputConstructor]
21 | private ClusterHooks(
22 | Outputs.ClusterHook? apply,
23 |
24 | Outputs.ClusterHook? backup,
25 |
26 | Outputs.ClusterHook? reset)
27 | {
28 | Apply = apply;
29 | Backup = backup;
30 | Reset = reset;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sDualStack.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sDualStack
15 | {
16 | public readonly string? IPv6podCIDR;
17 | public readonly string? IPv6serviceCIDR;
18 | public readonly bool? Enabled;
19 |
20 | [OutputConstructor]
21 | private K0sDualStack(
22 | string? IPv6podCIDR,
23 |
24 | string? IPv6serviceCIDR,
25 |
26 | bool? enabled)
27 | {
28 | this.IPv6podCIDR = IPv6podCIDR;
29 | this.IPv6serviceCIDR = IPv6serviceCIDR;
30 | Enabled = enabled;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("apiVersion")]
16 | public Input? ApiVersion { get; set; }
17 |
18 | [Input("kind")]
19 | public Input? Kind { get; set; }
20 |
21 | [Input("metadata")]
22 | public Input? Metadata { get; set; }
23 |
24 | [Input("spec")]
25 | public Input? Spec { get; set; }
26 |
27 | public K0sArgs()
28 | {
29 | }
30 | public static new K0sArgs Empty => new K0sArgs();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sNodeLocalLoadBalancingArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sNodeLocalLoadBalancingArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("enabled")]
16 | public Input? Enabled { get; set; }
17 |
18 | [Input("envoyProxy")]
19 | public Input? EnvoyProxy { get; set; }
20 |
21 | [Input("type")]
22 | public Input? Type { get; set; }
23 |
24 | public K0sNodeLocalLoadBalancingArgs()
25 | {
26 | }
27 | public static new K0sNodeLocalLoadBalancingArgs Empty => new K0sNodeLocalLoadBalancingArgs();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/sdk/dotnet/Outputs/K0sNodeLocalLoadBalancing.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Outputs
11 | {
12 |
13 | [OutputType]
14 | public sealed class K0sNodeLocalLoadBalancing
15 | {
16 | public readonly bool? Enabled;
17 | public readonly Outputs.K0sEnvoyProxy? EnvoyProxy;
18 | public readonly string? Type;
19 |
20 | [OutputConstructor]
21 | private K0sNodeLocalLoadBalancing(
22 | bool? enabled,
23 |
24 | Outputs.K0sEnvoyProxy? envoyProxy,
25 |
26 | string? type)
27 | {
28 | Enabled = enabled;
29 | EnvoyProxy = envoyProxy;
30 | Type = type;
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/tests/cluster_test.go:
--------------------------------------------------------------------------------
1 | package tests
2 |
3 | import (
4 | "testing"
5 |
6 | p "github.com/pulumi/pulumi-go-provider"
7 | "github.com/pulumi/pulumi/sdk/v3/go/common/resource"
8 | "github.com/stretchr/testify/assert"
9 | "github.com/stretchr/testify/require"
10 | )
11 |
12 | func TestClusterCreatePreview(t *testing.T) {
13 | prov := integrationServer()
14 | name := "test-cluster"
15 | validPropertyKeys := []resource.PropertyKey{"apiVersion", "kind", "metadata", "spec", "kubeconfig"}
16 |
17 | response, err := prov.Create(p.CreateRequest{
18 | Urn: urn("Cluster", name),
19 | Properties: resource.PropertyMap{},
20 | Preview: true,
21 | })
22 | require.NoError(t, err)
23 | assert.Equal(t, name, response.ID)
24 |
25 | for k := range response.Properties {
26 | found := false
27 |
28 | for _, pKey := range validPropertyKeys {
29 | if k == pKey {
30 | found = true
31 | }
32 | }
33 |
34 | if !found {
35 | t.Errorf("unexpected property key: %s", k)
36 | t.Fail()
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/ClusterK0sArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class ClusterK0sArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("config")]
16 | public Input? Config { get; set; }
17 |
18 | [Input("dynamicConfig")]
19 | public Input? DynamicConfig { get; set; }
20 |
21 | [Input("version")]
22 | public Input? Version { get; set; }
23 |
24 | [Input("versionChannel")]
25 | public Input? VersionChannel { get; set; }
26 |
27 | public ClusterK0sArgs()
28 | {
29 | }
30 | public static new ClusterK0sArgs Empty => new ClusterK0sArgs();
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/sdk/python/pulumi_k0s/__init__.py:
--------------------------------------------------------------------------------
1 | # coding=utf-8
2 | # *** WARNING: this file was generated by pulumi-language-python. ***
3 | # *** Do not edit by hand unless you're certain you know what you are doing! ***
4 |
5 | from . import _utilities
6 | import typing
7 | # Export this package's modules as members:
8 | from .cluster import *
9 | from .provider import *
10 | from ._inputs import *
11 | from . import outputs
12 |
13 | # Make subpackages available:
14 | if typing.TYPE_CHECKING:
15 | import pulumi_k0s.config as __config
16 | config = __config
17 | else:
18 | config = _utilities.lazy_import('pulumi_k0s.config')
19 |
20 | _utilities.register(
21 | resource_modules="""
22 | [
23 | {
24 | "pkg": "k0s",
25 | "mod": "index",
26 | "fqn": "pulumi_k0s",
27 | "classes": {
28 | "k0s:index:Cluster": "Cluster"
29 | }
30 | }
31 | ]
32 | """,
33 | resource_packages="""
34 | [
35 | {
36 | "pkg": "k0s",
37 | "token": "pulumi:providers:k0s",
38 | "fqn": "pulumi_k0s",
39 | "class": "Provider"
40 | }
41 | ]
42 | """
43 | )
44 |
--------------------------------------------------------------------------------
/sdk/dotnet/Inputs/K0sWorkerProfileArgs.cs:
--------------------------------------------------------------------------------
1 | // *** WARNING: this file was generated by pulumi. ***
2 | // *** Do not edit by hand unless you're certain you know what you are doing! ***
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Collections.Immutable;
7 | using System.Threading.Tasks;
8 | using Pulumi.Serialization;
9 |
10 | namespace Pulumi.K0s.Inputs
11 | {
12 |
13 | public sealed class K0sWorkerProfileArgs : global::Pulumi.ResourceArgs
14 | {
15 | [Input("name", required: true)]
16 | public Input Name { get; set; } = null!;
17 |
18 | [Input("values", required: true)]
19 | private InputMap