k8s

package
v0.0.0-...-4e66905 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

* Doing this manually for now, but should probably look at bring in the service catalog client at some point or just calling the api from the ui client https://github.com/kubernetes-incubator/service-catalog/issues/1367 . Longer term this is likely to be removed once OSCP 3.7 is released and supports binding parameters

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientForInCluster

func ClientForInCluster(token string) (kubernetes.Interface, error)

func ClientForOutsideCluster

func ClientForOutsideCluster(host, token string) (kubernetes.Interface, error)

func NewClientBuilder

func NewClientBuilder(namespace, host string, incluster bool) mobile.K8ClientBuilder

Types

type Binding

type Binding struct {
	meta_v1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	meta_v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Spec               struct {
		InstanceRef struct {
			Name string `json:"name"`
		} `json:"instanceRef"`
		Parameters struct {
			Test string `json:"test"`
		} `json:"parameters"`
		SecretName string `json:"secretName"`
	} `json:"spec"`
}

type ClientBuilder

type ClientBuilder struct {
	// contains filtered or unexported fields
}

func (*ClientBuilder) BuildClient

func (cb *ClientBuilder) BuildClient() (kubernetes.Interface, error)

func (*ClientBuilder) WithHost

func (cb *ClientBuilder) WithHost(host string) mobile.K8ClientBuilder

func (*ClientBuilder) WithHostAndNamespace

func (cb *ClientBuilder) WithHostAndNamespace(host, ns string) mobile.K8ClientBuilder

func (*ClientBuilder) WithNamespace

func (cb *ClientBuilder) WithNamespace(ns string) mobile.K8ClientBuilder

func (*ClientBuilder) WithToken

func (cb *ClientBuilder) WithToken(token string) mobile.K8ClientBuilder

type Metadata

type Metadata struct {
	Issuer                        string   `json:"issuer"`
	AuthorizationEndpoint         string   `json:"authorization_endpoint"`
	TokenEndpoint                 string   `json:"token_endpoint"`
	ScopesSupported               []string `json:"scopes_supported"`
	ResponseTypesSupported        []string `json:"response_types_supported"`
	GrantTypesSupported           []string `json:"grant_types_supported"`
	CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"`
}

func GetMetadata

func GetMetadata(k8shost string, requester mobile.ExternalHTTPRequester) (*Metadata, error)

func (*Metadata) GetK8IssuerHost

func (m *Metadata) GetK8IssuerHost() (string, error)

GetK8IssuerHost will parse out the host from the meta response

type ServiceCatalogClientBuilder

type ServiceCatalogClientBuilder struct {
	// contains filtered or unexported fields
}

func NewServiceCatalogClientBuilder

func NewServiceCatalogClientBuilder(builder mobile.K8ClientBuilder, httpClient mobile.ExternalHTTPRequester, saToken, namespace, k8host string, logger *logrus.Logger) *ServiceCatalogClientBuilder

func (*ServiceCatalogClientBuilder) Build

func (*ServiceCatalogClientBuilder) UseDefaultSAToken

func (scb *ServiceCatalogClientBuilder) UseDefaultSAToken() mobile.SCClientBuilder

func (*ServiceCatalogClientBuilder) WithHost

func (*ServiceCatalogClientBuilder) WithToken

type ServiceClass

type ServiceClass struct {
	meta_v1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	meta_v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	Spec struct {
		ExternalMetadata map[string]string `json:"externalMetadata"`
		ExternalName     string            `json:"externalName"`
	} `json:"spec"`
}

type ServiceClassList

type ServiceClassList struct {
	Items []ServiceClass `json:"items"`
}

type ServiceInstance

type ServiceInstance struct {
	meta_v1.TypeMeta `json:",inline"`
	// Standard object's metadata.
	// More info: http://releases.k8s.io/HEAD/docs/devel/api-conventions.md#metadata
	// +optional
	meta_v1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Spec               struct {
		ServiceClassName string `json:"clusterServiceClassExternalName"`
	} `json:"spec"`
}

type ServiceInstanceList

type ServiceInstanceList struct {
	Items []ServiceInstance `json:"items"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL