-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Add Flux addons provider #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
67f88ed
feat: Make addon provider configurable
jimmidyson 8e3e920
feat: Add Flux addons provider
jimmidyson 56c26d6
build: Export KUBECONFIG when running on kind
jimmidyson 7b9263b
docs: Add kubeconfig setting to flus helm release instructions
jimmidyson 1a3388d
fix: Fix calico helm repo URL
jimmidyson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
clusterctl 1.3.3 | ||
flux2 0.39.0 | ||
gcloud 416.0.0 | ||
gcloud 416.0.0 | ||
ginkgo 2.8.0 | ||
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,115 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"type": "object", | ||
"properties": { | ||
"addons": { | ||
"type": "object", | ||
"properties": { | ||
"provider": { | ||
"type": "string", | ||
"enum": ["ClusterResourceSet", "FluxHelmRelease"] | ||
} | ||
} | ||
}, | ||
"certificate": { | ||
"type": "object", | ||
"properties": { | ||
"issuer": { | ||
"type": "object", | ||
"properties": { | ||
"kind": { | ||
"type": "string", | ||
"enum": ["Issuer", "ClusterIssuer"], | ||
"default": "Issuer" | ||
}, | ||
"name": { | ||
"type": "string" | ||
}, | ||
"selfSigned": { | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"env": { | ||
"type": "object" | ||
}, | ||
"image": { | ||
"type": "object", | ||
"properties": { | ||
"pullPolicy": { | ||
"type": "string", | ||
"default": "IfNotPresent" | ||
}, | ||
"repository": { | ||
"type": "string" | ||
}, | ||
"tag": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"imagePullSecrets": { | ||
"type": "array" | ||
}, | ||
"nodeSelector": { | ||
"type": "object" | ||
}, | ||
"priorityClassName": { | ||
"type": "string" | ||
}, | ||
"resources": { | ||
"type": "object", | ||
"properties": { | ||
"limits": { | ||
"type": "object", | ||
"properties": { | ||
"cpu": { | ||
"type": "string" | ||
}, | ||
"memory": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"requests": { | ||
"type": "object", | ||
"properties": { | ||
"cpu": { | ||
"type": "string" | ||
}, | ||
"memory": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"securityContext": { | ||
"type": "object", | ||
"properties": { | ||
"runAsUser": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"service": { | ||
"type": "object", | ||
"properties": { | ||
"annotations": { | ||
"type": "object" | ||
}, | ||
"port": { | ||
"type": "integer" | ||
}, | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"tolerations": { | ||
"type": "array" | ||
} | ||
} | ||
} |
This file contains hidden or 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
This file contains hidden or 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,47 @@ | ||
// Copyright 2023 D2iQ, Inc. All rights reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package main | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/spf13/pflag" | ||
|
||
"github.com/d2iq-labs/capi-runtime-extensions/pkg/handlers/lifecycle" | ||
) | ||
|
||
type addonProviderValue lifecycle.AddonProvider | ||
|
||
func (v addonProviderValue) String() string { | ||
return string(v) | ||
} | ||
|
||
func (v *addonProviderValue) Set(value string) error { | ||
switch lifecycle.AddonProvider(value) { | ||
case lifecycle.ClusterResourceSetAddonProvider, lifecycle.FluxHelmReleaseAddonProvider: | ||
break | ||
default: | ||
return fmt.Errorf( | ||
"invalid addon provider: %q (must be one of %v)", | ||
value, | ||
[]string{ | ||
string(lifecycle.ClusterResourceSetAddonProvider), | ||
string(lifecycle.FluxHelmReleaseAddonProvider), | ||
}, | ||
) | ||
} | ||
|
||
*v = addonProviderValue(value) | ||
|
||
return nil | ||
} | ||
|
||
func (*addonProviderValue) Type() string { | ||
return "addonProvider" | ||
} | ||
|
||
func newAddonProviderValue(val lifecycle.AddonProvider, p *lifecycle.AddonProvider) pflag.Value { | ||
*p = val | ||
return (*addonProviderValue)(p) | ||
} |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.