Skip to content

Commit

Permalink
Merge pull request #381 from souleb/fix-api-version
Browse files Browse the repository at this point in the history
Update flux types api versions
  • Loading branch information
stefanprodan authored Jun 7, 2022
2 parents 42558a4 + 44f5b43 commit b897673
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
32 changes: 16 additions & 16 deletions docs/spec/v1beta1/receiver.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
name: webapp
namespace: default
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
name: webapp
namespace: default
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: Bucket
name: webapp
namespace: default
- apiVersion: image.toolkit.fluxcd.io/v1alpha1
- apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
name: webapp
namespace: default
Expand All @@ -134,7 +134,7 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
name: webapp
namespace: default
Expand Down Expand Up @@ -188,10 +188,10 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
name: webapp
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
name: webapp
```
Expand Down Expand Up @@ -221,10 +221,10 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
name: webapp-frontend
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
name: webapp-backend
```
Expand All @@ -247,7 +247,7 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: GitRepository
name: webapp
```
Expand All @@ -272,10 +272,10 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: source.toolkit.fluxcd.io/v1beta1
- apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
name: webapp
- apiVersion: image.toolkit.fluxcd.io/v1alpha1
- apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
name: webapp
```
Expand All @@ -296,7 +296,7 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: image.toolkit.fluxcd.io/v1alpha1
- apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
name: webapp
```
Expand All @@ -314,7 +314,7 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: image.toolkit.fluxcd.io/v1alpha1
- apiVersion: image.toolkit.fluxcd.io/vbeta1
kind: ImageRepository
name: webapp
```
Expand All @@ -332,7 +332,7 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: image.toolkit.fluxcd.io/v1alpha1
- apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
name: webapp
```
Expand All @@ -354,7 +354,7 @@ spec:
secretRef:
name: webhook-token
resources:
- apiVersion: image.toolkit.fluxcd.io/v1alpha1
- apiVersion: image.toolkit.fluxcd.io/v1beta1
kind: ImageRepository
name: webapp
namespace: default
Expand Down
8 changes: 4 additions & 4 deletions internal/server/receiver_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,10 +356,10 @@ func (s *ReceiverServer) annotate(ctx context.Context, resource v1beta1.CrossNam
}

apiVersionMap := map[string]string{
"Bucket": "source.toolkit.fluxcd.io/v1beta1",
"HelmRepository": "source.toolkit.fluxcd.io/v1beta1",
"GitRepository": "source.toolkit.fluxcd.io/v1beta1",
"ImageRepository": "image.toolkit.fluxcd.io/v1alpha1",
"Bucket": "source.toolkit.fluxcd.io/v1beta2",
"HelmRepository": "source.toolkit.fluxcd.io/v1beta2",
"GitRepository": "source.toolkit.fluxcd.io/v1beta2",
"ImageRepository": "image.toolkit.fluxcd.io/v1beta1",
}

apiVersion := resource.APIVersion
Expand Down

0 comments on commit b897673

Please sign in to comment.