-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Flux to development cluster (#1096)
Preparation for the NativeLink operator.
- Loading branch information
1 parent
1b8e23b
commit 6a40374
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package components | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/pulumi/pulumi-kubernetes/sdk/v4/go/kubernetes/yaml" | ||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" | ||
) | ||
|
||
// The configuration for Flux. | ||
type Flux struct { | ||
Version string | ||
} | ||
|
||
// Install sets up Flux in the cluster. | ||
func (component *Flux) Install( | ||
ctx *pulumi.Context, | ||
name string, | ||
) ([]pulumi.Resource, error) { | ||
flux, err := yaml.NewConfigFile(ctx, name, &yaml.ConfigFileArgs{ | ||
File: fmt.Sprintf( | ||
"https://github.com/fluxcd/flux2/releases/download/v%s/install.yaml", | ||
component.Version, | ||
), | ||
}) | ||
if err != nil { | ||
return nil, fmt.Errorf("%w: %w", errPulumi, err) | ||
} | ||
|
||
return []pulumi.Resource{flux}, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters