Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Releases: ericchiang/k8s

v1.2.0

23 Aug 04:31
d1bbc0c
Compare
Choose a tag to compare

Action required:

Features:

  • Add options for setting the body of a DELETE request (#92)

Bug fixes:

v1.1.0

27 Apr 01:00
677cf33
Compare
Choose a tag to compare

Features:

  • Add support for subresources (#84)
  • Updated to Kubernetes 1.10 API types (#86)

Bug fixes:

  • Fix deserialization of errors when using JSON content type (#83)

v1.0.0

20 Jan 20:46
5912993
Compare
Choose a tag to compare

v1.0.0 introduces breaking changes from the previous release. Most noticeably, v1 removes generated clients per-API group. The base client handles any resource:

cm := &v1.ConfigMap{
    Metadata: &metav1.ObjectMeta{
        Name:      &name,
        Namespace: &client.Namespace,
    },
    Data: values,
}
err := client.Create(ctx, cm) // Just Create, no typed clients

Instead of:

_, err := client.CoreV1().CreateConfigMap(ctx, cm) // No longer works

Features:

Bug fixes:

  • NewClient now respects InsecureSkipTLSVerify (#56) @sidmutha

v0.4.0

17 May 22:43
Compare
Choose a tag to compare

Bug fixes:

  • Correctly associate context with HTTP request (#49) @pingles
  • Fix allowed characters in label selector fields (#45) @tombooth

v0.3.0

29 Mar 04:29
Compare
Choose a tag to compare

Updates

  • Add support for 1.6 API groups (#38)
  • NewClient defaults to "default" namespace (#34)

API group changes

  • Authentication graduated from "v1beta1" to "v1"
  • Authorization graduated from "v1beta1" to "v1"
  • Autoscaling "v2alpha1" was introduced.
  • Certificates graduated from "v1alpha1" to "v1beta1"
  • RBAC graduated from "v1alpha1" to "v1beta1"
  • Settings "v1alpha1" was introduced.
  • Storage graduated from "v1beta1" to "v1"

This client continues to generate bindings for alpha API groups, so if you're using a group that graduated, alpha bindings are still present in this version.

Breaking changes

Over the 1.6 release cycle Kubernetes switched the ever present v1.ObjectMeta to its own API group. A non-breaking change to adopt this would require rewrites of all 1.6 proto files, so this client will do the same breaking change as the official client and switch the import path. Users should update code to refer to the new package.

As an example, the README snippet changed from:

import (
    "context"

    "github.com/ericchiang/k8s"
    "github.com/ericchiang/k8s/api/v1"
)

func createConfigMap(client *k8s.Client, name string, values map[string]string) error {
    cm := &v1.ConfigMap{
        Metadata: &v1.ObjectMeta{Name: &name, Namespace: &client.Namespace},
        Data:     values,
    }
    _, err := client.CoreV1().CreateConfigMap(context.TODO(), cm)
    return err
}

to:

import (
    "context"

    "github.com/ericchiang/k8s"
    "github.com/ericchiang/k8s/api/v1"
    metav1 "github.com/ericchiang/k8s/apis/meta/v1"
)

func createConfigMap(client *k8s.Client, name string, values map[string]string) error {
    cm := &v1.ConfigMap{
        Metadata: &metav1.ObjectMeta{Name: &name, Namespace: &client.Namespace},
        Data:     values,
    }
    _, err := client.CoreV1().CreateConfigMap(context.TODO(), cm)
    return err
}

v0.2.0

01 Mar 18:11
Compare
Choose a tag to compare

Updates:

  • Fixes endpoint operations (#28)
  • Generated code now passes gofmt (#33)
  • List and watch support for all namespaces (#32)

Breaking changes:

List and watch operations now no longer default to the client's namespace. For example, the following invocation:

c, err := k8s.NewInClusterClient()
if err != nil {
    // handle error
}
c.CoreV1().ListPods(ctx, "") // Now invalid.

must be modified to:

c, err := k8s.NewInClusterClient()
if err != nil {
    // handle error
}
c.CoreV1().ListPods(ctx, c.Namespace)

A special value k8s.AllNamespaces has been added to signify listing or watching resources in all namespaces:

c, err := k8s.NewInClusterClient()
if err != nil {
    // handle error
}
c.CoreV1().ListPods(ctx, k8s.AllNamespaces) // List pods in all namespaces.

v0.1.0

17 Jan 06:52
Compare
Choose a tag to compare

Initial release