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

[WIP] Kubelogin Integration #203

Closed
wants to merge 1 commit into from
Closed
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: 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
Loading