This repository was archived by the owner on Nov 19, 2020. It is now read-only.
v0.3.0
Updates
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
}