Skip to content

Commit

Permalink
fixes 'kfctl - provide option (default) to statically link ksonnet an…
Browse files Browse the repository at this point in the history
…d kustomize into kfctl kubeflow#2635'
  • Loading branch information
Kam D Kasravi committed Mar 11, 2019
1 parent 8c11e3f commit 5b9523d
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 75 deletions.
131 changes: 89 additions & 42 deletions bootstrap/cmd/kfctl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The new `kfctl` client replaces `kfctl.sh` and is implemented in golang.

Note: Additional issues have been opened so this README.md will have additional updates.
Note: This README.md will be updated on an ongoing basis to reflect features, bug fixes.

## Requirements

Expand Down Expand Up @@ -56,6 +56,14 @@ These include:
- platform: **gcp**
- bootstrap/pkg/client/gcp/gcp.go

kfctl also statically links package managers that are used by the platforms
These include:

- package manager: **ksonnet**
- bootstrap/pkg/client/ksonnet/ksonnet.go
- package manager: **kustomize**
- bootstrap/v2/pkg/client/kustomize/kustomize.go

kfctl can dynamically load platforms and package managers that are not statically linked, as
described below in [Extending kfctl](#extending-kfctl).

Expand Down Expand Up @@ -210,60 +218,99 @@ make test-kfctl
### Testing `kfctl init` for all platforms

```
make test-known-platforms-init
make test-init
```

### Testing `kfctl generate` for all platforms

```
make test-known-platforms-generate
make test-generate
```

## KfApp Types used in app.yaml

### ksonnet related types (originally under bootstrap/cmd/bootstrap, moved to pkg/apis/apps/ksonnet/v1alpha1)

```golang
type Ksonnet struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec KsonnetSpec `json:"spec,omitempty"`
Status KsonnetStatus `json:"status,omitempty"`
}
#### app.yaml example for --platform gcp

type NameValue struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
}

// KsonnetSpec defines the desired state of Ksonnet
type KsonnetSpec struct {
Platform string `json:"platform,omitempty"`
Version string `json:"version,omitempty"`
Repo string `json:"repo,omitempty"`
Components []string `json:"components,omitempty"`
Packages []string `json:"packages,omitempty"`
Parameters map[string][]NameValue `json:"parameters,omitempty"`
}
```

#### app.yaml example for --platform minikube

```
apiVersion: ksonnet.apps.kubeflow.org/v1alpha1
kind: Ksonnet
apiVersion: client.apps.kubeflow.org/v1alpha1
kind: Client
metadata:
creationTimestamp: null
name: minikube
name: gcp
namespace: kubeflow
spec:
appdir: /Users/kdkasrav/go/src/github.com/kubeflow/kubeflow/bootstrap/ksonnet
platform: minikube
repo: /Users/kdkasrav/go/src/github.com/kubeflow/kubeflow/bootstrap/ksonnet/.cache/master/kubeflow
version: master
status: {}
```
appdir: /Users/kdkasrav/go/src/github.com/kubeflow/kubeflow/bootstrap/test/gcp
componentParams:
application:
- name: components
value: <list-of-components>
cert-manager:
- initRequired: true
name: acmeEmail
value: gcp-deploy@constant-cubist-173123.iam.gserviceaccount.com
cloud-endpoints:
- name: secretName
value: admin-gcp-sa
iap-ingress:
- initRequired: true
name: ipName
value: gcp-ip
- initRequired: true
name: hostname
value: gcp.endpoints.constant-cubist-173123.cloud.goog
jupyter:
- name: jupyterHubAuthenticator
value: iap
- name: platform
value: gke
pipeline:
- name: mysqlPd
value: gcp-storage-metadata-store
- name: minioPd
value: gcp-storage-artifact-store
components:
- ambassador
- application
- argo
- centraldashboard
- cert-manager
- cloud-endpoints
- iap-ingress
- jupyter
- jupyter-web-app
- katib
- metacontroller
- notebook-controller
- pipeline
- pytorch-operator
- tensorboard
- tf-job-operator
email: gcp-deploy@constant-cubist-173123.iam.gserviceaccount.com
hostname: gcp.endpoints.constant-cubist-173123.cloud.goog
ipName: gcp-ip
packages:
- application
- argo
- common
- examples
- gcp
- jupyter
- katib
- metacontroller
- modeldb
- mpi-job
- pipeline
- pytorch-job
- seldon
- tensorboard
- tf-serving
- tf-training
platform: gcp
project: XXXXXX
repo: /Users/kdkasrav/go/src/github.com/kubeflow/kubeflow/bootstrap/test/gcp/.cache/2673/kubeflow
useBasicAuth: false
version: "2673"
zone: us-east1-d
status: {}
```

## gcp-click-to-deploy (no changes)

Expand Down
33 changes: 0 additions & 33 deletions bootstrap/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,22 @@ module github.com/kubeflow/kubeflow/bootstrap

require (
cloud.google.com/go v0.34.0
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/GeertJohan/go.rice v0.0.0-20181229193832-0af3f3b09a0a // indirect
github.com/MakeNowJust/heredoc v0.0.0-20171113091838-e9091a26100e // indirect
github.com/Masterminds/goutils v1.1.0 // indirect
github.com/Masterminds/semver v1.4.2 // indirect
github.com/Masterminds/sprig v2.18.0+incompatible // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
github.com/cenkalti/backoff v2.1.1+incompatible
github.com/cyphar/filepath-securejoin v0.2.2 // indirect
github.com/daaku/go.zipexe v1.0.0 // indirect
github.com/deckarep/golang-set v1.7.1
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-kit/kit v0.8.0
github.com/go-openapi/jsonpointer v0.18.0
github.com/go-openapi/jsonreference v0.18.0
github.com/go-openapi/swag v0.17.2
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/google/go-github v17.0.0+incompatible // indirect
github.com/google/go-jsonnet v0.12.1 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/googleapis/gax-go v2.0.2+incompatible // indirect
github.com/hashicorp/go-getter v1.0.2
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c // indirect
github.com/huandu/xstrings v1.2.0 // indirect
github.com/imdario/mergo v0.3.6
github.com/ksonnet/ksonnet v0.13.1
github.com/ksonnet/ksonnet-lib v0.1.12 // indirect
github.com/kubeflow/kubeflow/bootstrap/v2 v2.0.0
github.com/mitchellh/go-homedir v1.0.0
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/onrik/logrus v0.2.1
github.com/onsi/gomega v1.4.3
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/pkg/errors v0.8.1 // indirect
github.com/prometheus/client_golang v0.9.2
github.com/russross/blackfriday v0.0.0-00010101000000-000000000000 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.3.0
github.com/spf13/afero v1.2.0
github.com/spf13/cobra v0.0.3
Expand All @@ -56,7 +29,6 @@ require (
google.golang.org/api v0.1.0
google.golang.org/genproto v0.0.0-20190111180523-db91494dd46c
gopkg.in/resty.v1 v1.11.0
gopkg.in/square/go-jose.v2 v2.3.0 // indirect
gopkg.in/yaml.v2 v2.2.2
k8s.io/api v0.0.0-20180308224125-73d903622b73
k8s.io/api/v2 v2.0.0
Expand All @@ -66,13 +38,8 @@ require (
k8s.io/apimachinery/v2 v2.0.0
k8s.io/client-go v7.0.0+incompatible
k8s.io/client-go/v2 v2.0.0
k8s.io/helm v2.13.0+incompatible // indirect
k8s.io/kubernetes v0.0.0-00010101000000-000000000000 // indirect
k8s.io/utils v0.0.0-20190308190857-21c4ce38f2a7 // indirect
sigs.k8s.io/controller-runtime v0.1.1
sigs.k8s.io/controller-runtime/v2 v2.0.0
sigs.k8s.io/kustomize/v2 v2.0.0-00010101000000-000000000000 // indirect
vbom.ml/util v0.0.0-20180919145318-efcd4e0f9787 // indirect
)

replace (
Expand Down

0 comments on commit 5b9523d

Please sign in to comment.