Skip to content
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

Vendor the Helm chart in the local registry #1

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Brewfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
brew "kubectl"
brew "kind"
brew "helm"
brew "crane"

# Flux
tap "fluxcd/tap"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ git clone https://github.com/stefanprodan/flux-benchmark.git
cd flux-benchmark
```

Install Kubernetes kind, flux, timoni and other CLI tools with Homebrew:
Install Kubernetes kind, flux, timoni, crane and other CLI tools with Homebrew:

```shell
make tools
Expand Down
3 changes: 2 additions & 1 deletion manifests/bases/source-controller/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/fluxcd/source-controller/releases/download/v1.1.2/source-controller.crds.yaml
#- https://github.com/fluxcd/source-controller/releases/download/v1.1.2/source-controller.crds.yaml
- https://github.com/fluxcd/source-controller/config/crd?ref=helm-repo-insecure
- https://github.com/fluxcd/source-controller/releases/download/v1.1.2/source-controller.deployment.yaml
- account.yaml
transformers:
Expand Down
3 changes: 2 additions & 1 deletion manifests/install/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ transformers:
images:
- name: fluxcd/source-controller
newName: ghcr.io/fluxcd/source-controller
newTag: preview-4b230f30
- name: fluxcd/kustomize-controller
newName: ghcr.io/fluxcd/kustomize-controller
- name: fluxcd/helm-controller
newName: ghcr.io/fluxcd/helm-controller
newTag: v2beta2-07bf73ee
newTag: v2beta2-c520a3e7
- name: fluxcd/notification-controller
newName: ghcr.io/fluxcd/notification-controller
- name: fluxcd/image-reflector-controller
Expand Down
1 change: 1 addition & 0 deletions scripts/timoni-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ repo_root=$(git rev-parse --show-toplevel)
timoni mod push $repo_root/timoni/modules/flux-hr-bench oci://localhost:5555/modules/flux-hr-bench -v 1.0.0
timoni mod push $repo_root/timoni/modules/flux-ks-bench oci://localhost:5555/modules/flux-ks-bench -v 1.0.0
timoni artifact push oci://localhost:5555/manifests/podinfo -f $repo_root/manifests/podinfo -t 1.0.0 -t latest
crane copy ghcr.io/stefanprodan/charts/podinfo:6.5.3 localhost:5555/charts/podinfo:6.5.3
2 changes: 1 addition & 1 deletion timoni/bundles/flux-benchmark.cue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ bundle: {
values: {
chart: {
name: "podinfo"
version: "6.5.3"
version: "*"
interval: 60
}
releases: _hr
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by timoni. DO NOT EDIT.

//timoni:generate timoni vendor crd -f https://github.com/fluxcd/source-controller/releases/download/v1.1.2/source-controller.crds.yaml
//timoni:generate timoni vendor crd -f https://raw.githubusercontent.com/fluxcd/source-controller/helm-repo-insecure/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml

package v1beta1

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Code generated by timoni. DO NOT EDIT.

//timoni:generate timoni vendor crd -f https://github.com/fluxcd/source-controller/releases/download/v1.1.2/source-controller.crds.yaml
//timoni:generate timoni vendor crd -f https://raw.githubusercontent.com/fluxcd/source-controller/helm-repo-insecure/config/crd/bases/source.toolkit.fluxcd.io_helmrepositories.yaml

package v1beta2

Expand Down Expand Up @@ -64,6 +64,11 @@ import "strings"
name: string
}

// Insecure allows connecting to a non-TLS HTTP container
// registry. This field is only taken into account if the
// .spec.type field is set to 'oci'.
insecure?: bool

// Interval at which the HelmRepository URL is checked for
// updates. This interval is approximate and may be subject to
// jitter to ensure efficient use of resources.
Expand Down
2 changes: 1 addition & 1 deletion timoni/modules/flux-hr-bench/templates/config.cue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
role: "namespace-admin" | "cluster-admin" | *"namespace-admin"

repository: {
url: string | *"oci://ghcr.io/stefanprodan/charts"
url: string | *"oci://flux-registry:5000/charts"
type: string | *"oci"
}

Expand Down
1 change: 1 addition & 0 deletions timoni/modules/flux-hr-bench/templates/helmrepository.cue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
spec: fluxv1.#HelmRepositorySpec & {
interval: "12h"
timeout: "2m"
insecure: true

url: _config.repository.url
type: _config.repository.type
Expand Down