Skip to content

Commit

Permalink
Update samples to GA APIs
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed May 3, 2024
1 parent c9c0beb commit b1e207e
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 17 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ jobs:
kubectl -n helm-system rollout status deploy/helm-controller --timeout=1m
env:
KUBEBUILDER_ASSETS: ${{ github.workspace }}/kubebuilder/bin
- name: Test samples
run: |
kubectl create ns samples
kubectl -n samples apply -f config/samples
kubectl -n samples wait hr/podinfo-ocirepository --for=condition=ready --timeout=4m
kubectl -n samples wait hr/podinfo-gitrepository --for=condition=ready --timeout=4m
kubectl -n samples wait hr/podinfo-helmrepository --for=condition=ready --timeout=4m
kubectl delete ns sample
- name: Install sources
run: |
kubectl -n helm-system apply -f config/testdata/sources
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-gitrepository
Expand All @@ -10,9 +10,3 @@ spec:
sourceRef:
kind: GitRepository
name: podinfo
interval: 1m
upgrade:
remediation:
remediateLastFailure: true
test:
enable: true
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-helmrepository
Expand All @@ -11,9 +11,4 @@ spec:
sourceRef:
kind: HelmRepository
name: podinfo
interval: 1m
upgrade:
remediation:
remediateLastFailure: true
test:
enable: true
interval: 10m
13 changes: 13 additions & 0 deletions config/samples/helm_v2_helmrelease_ocirepository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: podinfo-ocirepository
spec:
interval: 5m
chartRef:
kind: OCIRepository
name: podinfo
test:
enable: true
values:
replicaCount: 2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: podinfo
Expand Down
9 changes: 9 additions & 0 deletions config/samples/source_v1beta2_ocirepository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: OCIRepository
metadata:
name: podinfo
spec:
interval: 1m
url: oci://ghcr.io/stefanprodan/charts/podinfo
ref:
semver: 6.x
2 changes: 1 addition & 1 deletion docs/api/v2/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2434,7 +2434,7 @@ string
</div>
</div>
<h3 id="helm.toolkit.fluxcd.io/v2.Snapshots">Snapshots
(<code>[]*github.com/fluxcd/helm-controller/api/v2.Snapshot</code> alias)</h3>
(<code>[]*./api/v2.Snapshot</code> alias)</h3>
<p>
(<em>Appears on:</em>
<a href="#helm.toolkit.fluxcd.io/v2.HelmReleaseStatus">HelmReleaseStatus</a>)
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import (
sourcev1 "github.com/fluxcd/source-controller/api/v1"
sourcev1beta2 "github.com/fluxcd/source-controller/api/v1beta2"

v2 "github.com/fluxcd/helm-controller/api/v2beta2"
v2 "github.com/fluxcd/helm-controller/api/v2"
intdigest "github.com/fluxcd/helm-controller/internal/digest"

// +kubebuilder:scaffold:imports
Expand Down

0 comments on commit b1e207e

Please sign in to comment.