Skip to content

Commit

Permalink
Implement OCIRepository controller for public repos
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Jun 21, 2022
1 parent 4ddf13f commit 37a7bc5
Show file tree
Hide file tree
Showing 9 changed files with 1,159 additions and 17 deletions.
4 changes: 2 additions & 2 deletions api/v1beta2/ocirepository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,13 @@ func (in *OCIRepository) SetConditions(conditions []metav1.Condition) {
in.Status.Conditions = conditions
}

// GetRequeueAfter returns the duration after which the GitRepository must be
// GetRequeueAfter returns the duration after which the OCIRepository must be
// reconciled again.
func (in OCIRepository) GetRequeueAfter() time.Duration {
return in.Spec.Interval.Duration
}

// GetArtifact returns the latest Artifact from the GitRepository if present in
// GetArtifact returns the latest Artifact from the OCIRepository if present in
// the status sub-resource.
func (in *OCIRepository) GetArtifact() *Artifact {
return in.Status.Artifact
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: ocirepository-sample
spec:
interval: 1m
url: ghcr.io/stefanprodan/manifests/podinfo
ref:
tag: 6.1.6
Loading

0 comments on commit 37a7bc5

Please sign in to comment.