jx-api

module
v4.7.4 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0

README

jx-api

Documentation Go Report Card Releases LICENSE Slack Status

Provides an API for JX, can be used with Jenkins X Kube Client to create a programatic interface

Here's an example which also uses Jenkins X logging

import (
    "github.com/jenkins-x/jx-kube-client/v3/pkg/kubeclient"
    "github.com/jenkins-x/jx-logging/v3/pkg/log"
    "github.com/jenkins-x/jx-api/v4/pkg/client/clientset/versioned"
)

func main() {
    f := kubeclient.NewFactory()
    cfg, err := f.CreateKubeConfig()
    if err != nil {
        log.Logger().Fatalf("failed to get kubernetes config: %v", err)
    }


    jxClient, err := versioned.NewForConfig(cfg)
    if err != nil {
        log.Logger().Fatalf("error building jx client: %v", err)
    }
}

See the other modules available

Directories

Path Synopsis
cmd
pkg
apis/core/v4beta1
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v4 is the v4 version of the API.
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v4 is the v4 version of the API.
apis/jenkins.io/v1
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v4 is the v4 version of the API.
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v4 is the v4 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/jenkins.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/jenkins.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

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