Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

[WIP] Dex Plugin #130

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ pkg/kfconfig/awsplugin/zz_generated.deepcopy.go: pkg/kfconfig/awsplugin/types.go
${GOPATH}/bin/deepcopy-gen -i github.com/kubeflow/kfctl/v3/pkg/kfconfig/awsplugin/... -O zz_generated.deepcopy && \
mv ${GOPATH}/src/github.com/kubeflow/kfctl/v3/pkg/kfconfig/awsplugin/zz_generated.deepcopy.go pkg/kfconfig/awsplugin/ && rm -rf v3

pkg/kfconfig/dexplugin/zz_generated.deepcopy.go: pkg/kfconfig/dexplugin/types.go
${GOPATH}/bin/deepcopy-gen -i github.com/kubeflow/kfctl/v3/pkg/kfconfig/dexplugin/... -O zz_generated.deepcopy && \
mv ${GOPATH}/src/github.com/kubeflow/kfctl/v3/pkg/kfconfig/dexplugin/zz_generated.deepcopy.go pkg/kfconfig/dexplugin/ && rm -rf v3

pkg/kfconfig/gcpplugin/zz_generated.deepcopy.go: pkg/kfconfig/gcpplugin/types.go
${GOPATH}/bin/deepcopy-gen -i github.com/kubeflow/kfctl/v3/pkg/kfconfig/gcpplugin/... -O zz_generated.deepcopy && \
mv ${GOPATH}/src/github.com/kubeflow/kfctl/v3/pkg/kfconfig/gcpplugin/zz_generated.deepcopy.go pkg/kfconfig/gcpplugin/ && rm -rf v3
Expand All @@ -114,6 +118,7 @@ deepcopy: ${GOPATH}/bin/deepcopy-gen config/zz_generated.deepcopy.go \
pkg/apis/apps/plugins/gcp/v1alpha1/zz_generated.deepcopy.go \
pkg/apis/apps/plugins/aws/v1alpha1/zz_generated.deepcopy.go \
pkg/kfconfig/zz_generated.deepcopy.go \
pkg/kfconfig/dexplugin/zz_generated.deepcopy.go \
pkg/kfconfig/awsplugin/zz_generated.deepcopy.go \
pkg/kfconfig/gcpplugin/zz_generated.deepcopy.go

Expand Down
6 changes: 6 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ require (
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/Sirupsen/logrus v0.0.0-00010101000000-000000000000 // indirect
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf
github.com/aws/aws-sdk-go v1.16.26
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/chai2010/gettext-go v0.0.0-20170215093142-bf70f2a70fb1 // indirect
github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d // indirect
github.com/deckarep/golang-set v1.7.1
github.com/docker/docker v1.13.1 // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
Expand All @@ -23,9 +25,11 @@ require (
github.com/gogo/protobuf v1.2.1
github.com/google/go-cmp v0.3.0
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.5.0 // indirect
github.com/hashicorp/go-getter v1.0.2
github.com/imdario/mergo v0.3.7
github.com/jonboulle/clockwork v0.1.0 // indirect
github.com/kr/pty v1.1.3 // indirect
github.com/kubeflow/kubeflow/components/profile-controller v0.0.0-20190614045418-7ca3cfb39368 // indirect
github.com/kubernetes-sigs/application v0.8.0
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
Expand All @@ -34,6 +38,8 @@ require (
github.com/otiai10/curr v0.0.0-20190513014714-f5a3d24e5776 // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/common v0.2.0
github.com/russross/blackfriday v1.5.2 // indirect
github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95 // indirect
github.com/sirupsen/logrus v1.4.2
github.com/spf13/cobra v0.0.3
github.com/spf13/viper v1.3.1
Expand Down
1 change: 1 addition & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ github.com/appscode/jsonpatch v0.0.0-20190108182946-7c0e3b262f30/go.mod h1:4AJxU
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf h1:eg0MeVzsP1G42dRafH3vf+al2vQIJU0YHX+1Tw87oco=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM=
github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM=
Expand Down
12 changes: 7 additions & 5 deletions pkg/apis/apps/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ const (
DefaultAppLabel = "app.kubernetes.io/name"
DefaultAppVersion = "app.kubernetes.io/version"
DefaultAppType = "kubeflow"
KUBEFLOW_USERNAME = "KUBEFLOW_USERNAME"
KubeflowDomain = "KUBEFLOW_DOMAIN"
KubeflowEmail = "KUBEFLOW_EMAIL"
KUBEFLOW_PASSWORD = "KUBEFLOW_PASSWORD"
KUBEFLOW_USERNAME = "KUBEFLOW_USERNAME"
DefaultSwaggerFile = "bootstrap/k8sSpec/v1.11.7/api/openapi-spec/swagger.json"
YamlSeparator = "(?m)^---[ \t]*$"
Dns1123LabelFmt = "[a-z0-9]([-a-z0-9]*[a-z0-9])?"
Expand Down Expand Up @@ -156,10 +158,10 @@ func RemoveItem(defaults []string, name string) []string {

// Platforms
const (
AWS = "aws"
GCP = "gcp"
MINIKUBE = "minikube"
EXISTING_ARRIKTO = "existing_arrikto"
AWS = "aws"
GCP = "gcp"
MINIKUBE = "minikube"
DEX = "dex"
)

// PackageManagers
Expand Down
8 changes: 4 additions & 4 deletions pkg/apis/apps/kfconfig/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ const (

// Plugin kind used starting from v1beta1
const (
AWS_PLUGIN_KIND PluginKindType = "KfAwsPlugin"
GCP_PLUGIN_KIND PluginKindType = "KfGcpPlugin"
MINIKUBE_PLUGIN_KIND PluginKindType = "KfMinikubePlugin"
EXISTING_ARRIKTO_PLUGIN_KIND PluginKindType = "KfExistingArriktoPlugin"
AWS_PLUGIN_KIND PluginKindType = "KfAwsPlugin"
DEX_PLUGIN_KIND PluginKindType = "KfDexPlugin"
GCP_PLUGIN_KIND PluginKindType = "KfGcpPlugin"
MINIKUBE_PLUGIN_KIND PluginKindType = "KfMinikubePlugin"
)

type ConditionType string
Expand Down
1 change: 1 addition & 0 deletions pkg/apis/apps/plugins/gcp/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package v1alpha1

import (
"fmt"

kfdeftypes "github.com/kubeflow/kfctl/v3/pkg/apis/apps/kfdef/v1beta1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
6 changes: 3 additions & 3 deletions pkg/kfapp/coordinator/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
kfdefsv1alpha1 "github.com/kubeflow/kfctl/v3/pkg/apis/apps/kfdef/v1alpha1"
kfdefsv1beta1 "github.com/kubeflow/kfctl/v3/pkg/apis/apps/kfdef/v1beta1"
"github.com/kubeflow/kfctl/v3/pkg/kfapp/aws"
"github.com/kubeflow/kfctl/v3/pkg/kfapp/existing_arrikto"
"github.com/kubeflow/kfctl/v3/pkg/kfapp/dex"
"github.com/kubeflow/kfctl/v3/pkg/kfapp/gcp"
"github.com/kubeflow/kfctl/v3/pkg/kfapp/kustomize"
"github.com/kubeflow/kfctl/v3/pkg/kfapp/minikube"
Expand Down Expand Up @@ -59,8 +59,8 @@ func getPlatform(kfdef *kfconfig.KfConfig) (kftypesv3.Platform, error) {
return minikube.Getplatform(kfdef), nil
case string(kftypesv3.GCP):
return gcp.GetPlatform(kfdef)
case string(kftypesv3.EXISTING_ARRIKTO):
return existing_arrikto.GetPlatform(kfdef)
case string(kftypesv3.DEX):
return dex.GetPlatform(kfdef)
case string(kftypesv3.AWS):
return aws.GetPlatform(kfdef)
default:
Expand Down
Loading