Skip to content

Commit

Permalink
TMP
Browse files Browse the repository at this point in the history
Signed-off-by: Hasan Turken <[email protected]>
  • Loading branch information
turkenh committed Nov 30, 2023
1 parent 2898887 commit 5b7b1be
Show file tree
Hide file tree
Showing 21 changed files with 699 additions and 768 deletions.
1 change: 0 additions & 1 deletion apis/release/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 10 additions & 16 deletions apis/release/v1alpha1/zz_generated.managed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/release/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 10 additions & 16 deletions apis/release/v1beta1/zz_generated.managed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion apis/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion apis/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ type IdentityType string
// Supported identity types.
const (
IdentityTypeGoogleApplicationCredentials = "GoogleApplicationCredentials"

IdentityTypeAzureApplicationCredentials = "AzureApplicationCredentials"
)

// Identity used to authenticate.
type Identity struct {
// Type of identity.
// +kubebuilder:validation:Enum=GoogleApplicationCredentials
// +kubebuilder:validation:Enum=GoogleApplicationCredentials;AzureApplicationCredentials
Type IdentityType `json:"type"`

ProviderCredentials `json:",inline"`
Expand Down
1 change: 0 additions & 1 deletion apis/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"os"
"path/filepath"
"sigs.k8s.io/controller-runtime/pkg/cache"
"time"

"github.com/crossplane/crossplane-runtime/pkg/controller"
Expand Down Expand Up @@ -67,7 +68,9 @@ func main() {
kingpin.FatalIfError(err, "Cannot get API server rest config")

mgr, err := ctrl.NewManager(ratelimiter.LimitRESTConfig(cfg, *maxReconcileRate), ctrl.Options{
SyncPeriod: syncInterval,
Cache: cache.Options{
SyncPeriod: syncInterval,
},

// controller-runtime uses both ConfigMaps and Leases for leader
// election by default. Leases expire after 15 seconds, with a
Expand Down
18 changes: 9 additions & 9 deletions examples/provider-config/provider-config-with-secret.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
apiVersion: helm.crossplane.io/v1beta1
kind: ProviderConfig
metadata:
name: helm-provider
name: default
spec:
credentials:
source: Secret
secretRef:
name: cluster-config
name: example-ht-kubeconfig
namespace: crossplane-system
key: kubeconfig
# identity:
# type: GoogleApplicationCredentials
# source: Secret
# secretRef:
# name: gcp-credentials
# namespace: crossplane-system
# key: credentials.json
identity:
type: AzureApplicationCredentials
source: Secret
secretRef:
name: azure-credentials
namespace: crossplane-system
key: credentials.json
3 changes: 1 addition & 2 deletions examples/sample/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ spec:
# writeConnectionSecretToRef:
# name: wordpress-credentials
# namespace: crossplane-system
providerConfigRef:
name: helm-provider

Loading

0 comments on commit 5b7b1be

Please sign in to comment.