Skip to content

Commit

Permalink
Merge branch 'kubevela:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
anoop2811 authored Jul 11, 2024
2 parents 7e61acb + 2c497c6 commit 13bf918
Show file tree
Hide file tree
Showing 30 changed files with 2,656 additions and 757 deletions.
2 changes: 1 addition & 1 deletion addons/chartmuseum/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: chartmuseum
version: 4.1.0
version: 4.2.1
description: ChartMuseum is an open-source and easy to deploy Helm Chart Repository server.
icon: https://raw.githubusercontent.com/helm/chartmuseum/main/logo2.png
url: https://chartmuseum.com
Expand Down
9 changes: 9 additions & 0 deletions addons/chartmuseum/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,13 @@ amazon: {
// +usage=AWS access key secret
accessKeySecret: "secret"
}
```

#### Caching

Override the default for updating the cache index-cache.yaml

```yaml
// +usage=Override the default for updating the cache index-cache.yaml e.g. 5m, 1s
cacheRefresh: string
```
4 changes: 4 additions & 0 deletions addons/chartmuseum/resources/chartmuseum.cue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
}
DEBUG: strconv.FormatBool(parameter.debug)
DISABLE_API: strconv.FormatBool(parameter.disableAPI)
CACHE_INTERVAL: parameter.cacheRefresh
ALLOW_OVERWRITE: strconv.FormatBool(parameter.allowOverwrite)
AUTH_ANONYMOUS_GET: strconv.FormatBool(parameter.authAnonymousGet)
if parameter.basicAuth != _|_ {
Expand Down Expand Up @@ -92,6 +93,9 @@ import (
type: "gateway"
properties: {
domain: parameter.ingressHost.name
if parameter.ingressHost.class != _|_ {
class: parameter.ingressHost.class
}
http: {
"\(parameter.ingressHost.path)": parameter.externalPort
}
Expand Down
8 changes: 6 additions & 2 deletions addons/chartmuseum/resources/parameter.cue
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ parameter: {
// +usage=Server side encryption algorithm
sse?: string
// +usage=AWS access key id
accessKeyID: string
accessKeyID?: string
// +usage=AWS access key secret
accessKeySecret: string
accessKeySecret?: string
}
// +usage=GCP storage backend settings
google?: {
Expand All @@ -59,6 +59,8 @@ parameter: {
debug: *false | bool
// +usage=Disable all routes prefixed with /api
disableAPI: *false | bool
// +usage=Override the default for updating the cache index-cache.yaml e.g. 5m, 1s
cacheRefresh: *"5m" | string
// +usage=Allow chart versions to be re-uploaded
allowOverwrite: *true | bool
// +usage=Allow anonymous GET operations when auth is used
Expand Down Expand Up @@ -95,5 +97,7 @@ parameter: {
tls: *false | bool
// +usage=If TLS is set to true, you must declare what secret will store the key/certificate for TLS. Secrets must be added manually to the vela-system.
tlsSecret?: string
// +usage=Specify the ingress class name to use
class?: string
}
}
43 changes: 32 additions & 11 deletions addons/fluxcd/definitions/helm-release-def.cue
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,36 @@ template: {
outputs: {
if parameter.sourceName == _|_ {
repo: {
apiVersion: "source.toolkit.fluxcd.io/v1beta2"
metadata: {
name: context.name
}
if parameter.repoType == "git" {
kind: "GitRepository"
apiVersion: "source.toolkit.fluxcd.io/v1"
kind: "GitRepository"
spec: {
url: parameter.url
if parameter.git.branch != _|_ {
ref: branch: parameter.git.branch
}
if parameter.git.commit != _|_ {
ref: commit: parameter.git.commit
}
if parameter.git.name != _|_ {
ref: name: parameter.git.name
}
if parameter.git.semver != _|_ {
ref: semver: parameter.git.semver
}
if parameter.git.tag != _|_ {
ref: tag: parameter.git.tag
}
_secret
_sourceCommonArgs
}
}
if parameter.repoType == "oss" {
kind: "Bucket"
apiVersion: "source.toolkit.fluxcd.io/v1beta2"
kind: "Bucket"
spec: {
endpoint: parameter.url
bucketName: parameter.oss.bucketName
Expand All @@ -95,7 +108,8 @@ template: {
}
}
if parameter.repoType == "helm" || parameter.repoType == "oci" {
kind: "HelmRepository"
apiVersion: "source.toolkit.fluxcd.io/v1beta2"
kind: "HelmRepository"
spec: {
url: parameter.url
if parameter.repoType == "oci" {
Expand Down Expand Up @@ -157,7 +171,7 @@ template: {
values: parameter.values
}
if parameter.valuesFrom != _|_ {
valuesFrom: [for v in parameter.valuesFrom {{
valuesFrom: [ for v in parameter.valuesFrom {{
kind: v.kind
name: v.name
if v.valuesKey != _|_ {
Expand All @@ -182,7 +196,7 @@ template: {
}
if parameter.upgradeCRD != _|_ {
if parameter.upgradeCRD {
crds: "CreateReplace"
crds: "CreateReplace"
}
}
}
Expand Down Expand Up @@ -224,8 +238,16 @@ template: {
sourceName?: string

git?: {
// +usage=The Git reference to checkout and monitor for changes, defaults to main branch
branch: *"main" | string
// +usage=The Git branch to checkout and monitor for changes, defaults to main branch
branch?: *"main" | string
// +usage=The Git commit to checkout and monitor for changes, takes precedence over all reference fields
commit?: string
// +usage=The Git reference name to checkout and monitor for changes, takes precendence over branch, tag and semver
name?: string
// +usage=Semver tag expression to checkout and monitor for changes, takes precedence over tag
semver?: string
// +usage=The Git tag to checkout and monitor for changes, takes precedence over branch
tag?: string
}
oss?: {
// +usage=The bucket's name, required if repoType is oss
Expand All @@ -235,10 +257,9 @@ template: {
// +usage=The bucket region, optional
region?: string
}
helmrepository?: {
helmrepository?: {
// +usage=The OIDC provider used for authentication purposes.The generic provider can be used for public repositories or when static credentials are used for authentication, either with spec.secretRef or spec.serviceAccountName
provider: *"generic" | "azure" | "aws" | "gcp"

provider: *"generic" | "azure" | "aws" | "gcp"
}
// +usage=Alternative list of values files to use as the chart values (values.yaml is not included by default), expected to be a relative path in the SourceRef.Values files are merged in the order of this list with the last file overriding the first.
valuesFiles?: [...string]
Expand Down
81 changes: 59 additions & 22 deletions addons/fluxcd/definitions/kustomize.cue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ kustomize: {

template: {
output: {
apiVersion: "kustomize.toolkit.fluxcd.io/v1beta2"
apiVersion: "kustomize.toolkit.fluxcd.io/v1"
kind: "Kustomization"
metadata: {
name: context.name
Expand All @@ -35,6 +35,14 @@ template: {
}
namespace: context.namespace
}
if parameter.decryption != _|_ {
decryption: {
provider: parameter.decryption.provider
secretRef: {
name: parameter.decryption.secretRef.name
}
}
}
path: parameter.path
suspend: parameter.suspend
prune: parameter.prune
Expand All @@ -48,32 +56,37 @@ template: {
outputs: {
if parameter.sourceName == _|_ {
repo: {
apiVersion: "source.toolkit.fluxcd.io/v1beta2"
metadata: {
name: context.name
namespace: context.namespace
}
if parameter.repoType == "git" {
kind: "GitRepository"
apiVersion: "source.toolkit.fluxcd.io/v1"
kind: "GitRepository"
spec: {
url: parameter.url
if parameter.git.branch != _|_ {
ref: branch: parameter.git.branch
}
if parameter.git.provider != _|_ {
if parameter.git.provider == "GitHub" {
gitImplementation: "go-git"
}
if parameter.git.provider == "AzureDevOps" {
gitImplementation: "libgit2"
}
if parameter.git.commit != _|_ {
ref: commit: parameter.git.commit
}
if parameter.git.name != _|_ {
ref: name: parameter.git.name
}
if parameter.git.semver != _|_ {
ref: semver: parameter.git.semver
}
if parameter.git.tag != _|_ {
ref: tag: parameter.git.tag
}
_secret
_sourceCommonArgs
}
}
if parameter.repoType == "oss" {
kind: "Bucket"
apiVersion: "source.toolkit.fluxcd.io/v1beta2"
kind: "Bucket"
spec: {
endpoint: parameter.url
bucketName: parameter.oss.bucketName
Expand All @@ -86,15 +99,22 @@ template: {
}
}
if parameter.repoType == "oci" {
kind: "OCIRepository"
apiVersion: "source.toolkit.fluxcd.io/v1beta2"
kind: "OCIRepository"
spec: {
url: parameter.url
if parameter.oci.provider != _|_ {
provider: parameter.oci.provider
}
if parameter.oci.tag != _|_ {
ref: tag: parameter.oci.tag
}
}
if parameter.oci.semver != _|_ {
ref: semver: parameter.oci.semver
}
if parameter.oci.digest != _|_ {
ref: digest: parameter.oci.digest
}
_secret
_sourceCommonArgs
}
Expand All @@ -104,7 +124,7 @@ template: {

if parameter.imageRepository != _|_ {
imageRepo: {
apiVersion: "image.toolkit.fluxcd.io/v1beta1"
apiVersion: "image.toolkit.fluxcd.io/v1beta2"
kind: "ImageRepository"
metadata: {
name: context.name
Expand All @@ -120,7 +140,7 @@ template: {
}

imagePolicy: {
apiVersion: "image.toolkit.fluxcd.io/v1beta1"
apiVersion: "image.toolkit.fluxcd.io/v1beta2"
kind: "ImagePolicy"
metadata: {
name: context.name
Expand Down Expand Up @@ -243,11 +263,25 @@ template: {
// +usage=The name of the source already existed
sourceName?: string

decryption?: {
// +usage=Determines which decrypt method to use. Defaults to sops
provider: string
secretRef: {
// +usage=Decrypt secretRef to use
name: string
}
}
git?: {
// +usage=The Git reference to checkout and monitor for changes, defaults to master branch
branch: string
// +usage=Determines which git client library to use. Defaults to GitHub, it will pick go-git. AzureDevOps will pick libgit2.
provider?: *"GitHub" | "AzureDevOps"
// +usage=The Git branch to checkout and monitor for changes, defaults to main branch
branch?: *"main" | string
// +usage=The Git commit to checkout and monitor for changes, takes precedence over all reference fields
commit?: string
// +usage=The Git reference name to checkout and monitor for changes, takes precendence over branch, tag and semver
name?: string
// +usage=Semver tag expression to checkout and monitor for changes, takes precedence over tag
semver?: string
// +usage=The Git tag to checkout and monitor for changes, takes precedence over branch
tag?: string
}
oss?: {
// +usage=The bucket's name, required if repoType is oss
Expand All @@ -257,12 +291,15 @@ template: {
// +usage=The bucket region, optional
region?: string
}
oci?: {
oci?: {
// +usage=The OIDC provider used for authentication purposes.The generic provider can be used for public repositories or when static credentials are used for authentication, either with spec.secretRef or spec.serviceAccountName
provider: *"generic" | "azure" | "aws" | "gcp"
// +usage=The image tag
tag: *"latest" | string

tag?: string
// +usage=The image digest, takes precedence over all fields.
digest?: string
// +usage=Semver tag expression to checkout and monitor for changes, takes precedence over tag
semver?: string
}
//+usage=Path to the directory containing the kustomization.yaml file, or the set of plain YAMLs a kustomization.yaml should be generated for.
path: string
Expand Down
2 changes: 1 addition & 1 deletion addons/fluxcd/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: fluxcd
version: 2.3.9
version: 3.0.0
description: Extended workload to do continuous and progressive delivery
icon: https://raw.githubusercontent.com/cncf/artwork/master/projects/flux/horizontal/color/flux-horizontal-color.png
url: https://fluxcd.io
Expand Down
2 changes: 1 addition & 1 deletion addons/fluxcd/resources/components/helm-controller.cue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ helmController: {
dependsOn: ["fluxcd-ns"]
properties: {
imagePullPolicy: "IfNotPresent"
image: _base + "fluxcd/helm-controller:v0.28.1"
image: _base + "fluxcd/helm-controller:v0.36.0"
env: [
{
name: "RUNTIME_NAMESPACE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ imageAutomationController: {
dependsOn: ["fluxcd-ns"]
properties: {
imagePullPolicy: "IfNotPresent"
image: _base + "fluxcd/image-automation-controller:v0.28.0"
image: _base + "fluxcd/image-automation-controller:v0.36.0"
env: [
{
name: "RUNTIME_NAMESPACE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ imageReflectorController: {
dependsOn: ["fluxcd-ns"]
properties: {
imagePullPolicy: "IfNotPresent"
image: _base + "fluxcd/image-reflector-controller:v0.23.1"
image: _base + "fluxcd/image-reflector-controller:v0.30.0"
env: [
{
name: "RUNTIME_NAMESPACE"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ kustomizeController: {
dependsOn: ["fluxcd-ns"]
properties: {
imagePullPolicy: "IfNotPresent"
image: _base + "fluxcd/kustomize-controller:v0.32.0"
image: _base + "fluxcd/kustomize-controller:v1.1.0"
env: [
{
name: "RUNTIME_NAMESPACE"
Expand Down
2 changes: 1 addition & 1 deletion addons/fluxcd/resources/components/source-controller.cue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sourceController: {
dependsOn: ["fluxcd-ns"]
properties: {
imagePullPolicy: "IfNotPresent"
image: _base + "fluxcd/source-controller:v0.33.0"
image: _base + "fluxcd/source-controller:v1.1.0"
env: [
{
name: "RUNTIME_NAMESPACE"
Expand Down
Loading

0 comments on commit 13bf918

Please sign in to comment.