Update Operator References
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
package cluster
|
package cluster
|
||||||
|
|
||||||
import (
|
import (
|
||||||
operator "github.com/minio/minio-operator/pkg/client/clientset/versioned"
|
operator "github.com/minio/operator/pkg/client/clientset/versioned"
|
||||||
"k8s.io/client-go/kubernetes"
|
"k8s.io/client-go/kubernetes"
|
||||||
"k8s.io/client-go/rest"
|
"k8s.io/client-go/rest"
|
||||||
certutil "k8s.io/client-go/util/cert"
|
certutil "k8s.io/client-go/util/cert"
|
||||||
|
|||||||
1
go.mod
1
go.mod
@@ -21,7 +21,6 @@ require (
|
|||||||
github.com/minio/minio v0.0.0-20200723003940-b9be841fd222
|
github.com/minio/minio v0.0.0-20200723003940-b9be841fd222
|
||||||
github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec
|
github.com/minio/minio-go/v6 v6.0.58-0.20200612001654-a57fec8037ec
|
||||||
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678
|
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678
|
||||||
github.com/minio/minio-operator v0.0.0-20200723204759-26762d65da84
|
|
||||||
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect
|
||||||
github.com/satori/go.uuid v1.2.0
|
github.com/satori/go.uuid v1.2.0
|
||||||
github.com/stretchr/testify v1.6.1
|
github.com/stretchr/testify v1.6.1
|
||||||
|
|||||||
2
go.sum
2
go.sum
@@ -524,8 +524,6 @@ github.com/minio/minio-go/v7 v7.0.0-20200714085548-47e386e2cde8/go.mod h1:QTstSR
|
|||||||
github.com/minio/minio-go/v7 v7.0.1/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
github.com/minio/minio-go/v7 v7.0.1/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
||||||
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678 h1:vV6dhx+KI1YfQTqlYYUa2dh8MUhecITo1XXhFDTl6fU=
|
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678 h1:vV6dhx+KI1YfQTqlYYUa2dh8MUhecITo1XXhFDTl6fU=
|
||||||
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
github.com/minio/minio-go/v7 v7.0.2-0.20200718235721-f0e2f3ae3678/go.mod h1:dJ80Mv2HeGkYLH1sqS/ksz07ON6csH3S6JUMSQ2zAns=
|
||||||
github.com/minio/minio-operator v0.0.0-20200723204759-26762d65da84 h1:chr56VwbyGM6rqbKtVJiQ+pgrxh1rbus9HEmAx5Tcys=
|
|
||||||
github.com/minio/minio-operator v0.0.0-20200723204759-26762d65da84/go.mod h1:auKSx2m2jfN8DqHwDZWZm4eW6bHYXW1haUBIerVvA6w=
|
|
||||||
github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61 h1:pUSI/WKPdd77gcuoJkSzhJ4wdS8OMDOsOu99MtpXEQA=
|
github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61 h1:pUSI/WKPdd77gcuoJkSzhJ4wdS8OMDOsOu99MtpXEQA=
|
||||||
github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61/go.mod h1:4trzEJ7N1nBTd5Tt7OCZT5SEin+WiAXpdJ/WgPkESA8=
|
github.com/minio/parquet-go v0.0.0-20200414234858-838cfa8aae61/go.mod h1:4trzEJ7N1nBTd5Tt7OCZT5SEin+WiAXpdJ/WgPkESA8=
|
||||||
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU=
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ spec:
|
|||||||
name: minio-operator
|
name: minio-operator
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: minio/k8s-operator:3.0.0
|
- image: minio/operator:v3.0.1
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
name: minio-operator
|
name: minio-operator
|
||||||
serviceAccountName: minio-operator
|
serviceAccountName: minio-operator
|
||||||
|
|||||||
@@ -276,7 +276,7 @@ spec:
|
|||||||
name: minio-operator
|
name: minio-operator
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: minio/k8s-operator:3.0.0
|
- image: minio/operator:v3.0.1
|
||||||
imagePullPolicy: IfNotPresent
|
imagePullPolicy: IfNotPresent
|
||||||
name: minio-operator
|
name: minio-operator
|
||||||
serviceAccountName: minio-operator
|
serviceAccountName: minio-operator
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import (
|
|||||||
|
|
||||||
"github.com/minio/mcs/cluster"
|
"github.com/minio/mcs/cluster"
|
||||||
"github.com/minio/minio-go/v6/pkg/credentials"
|
"github.com/minio/minio-go/v6/pkg/credentials"
|
||||||
operatorClientset "github.com/minio/minio-operator/pkg/client/clientset/versioned"
|
operatorClientset "github.com/minio/operator/pkg/client/clientset/versioned"
|
||||||
)
|
)
|
||||||
|
|
||||||
// operatorCredentialsProvider is an struct to hold the JWT (service account token)
|
// operatorCredentialsProvider is an struct to hold the JWT (service account token)
|
||||||
@@ -54,7 +54,7 @@ type OperatorClient interface {
|
|||||||
// Interface implementation
|
// Interface implementation
|
||||||
//
|
//
|
||||||
// Define the structure of a operator client and define the functions that are actually used
|
// Define the structure of a operator client and define the functions that are actually used
|
||||||
// from the minio-operator.
|
// from the minio operator.
|
||||||
type operatorClient struct {
|
type operatorClient struct {
|
||||||
client *operatorClientset.Clientset
|
client *operatorClientset.Clientset
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/minio/mcs/cluster"
|
"github.com/minio/mcs/cluster"
|
||||||
operatorClientset "github.com/minio/minio-operator/pkg/client/clientset/versioned"
|
operatorClientset "github.com/minio/operator/pkg/client/clientset/versioned"
|
||||||
)
|
)
|
||||||
|
|
||||||
type operatorClientTest struct {
|
type operatorClientTest struct {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import (
|
|||||||
"github.com/minio/mcs/models"
|
"github.com/minio/mcs/models"
|
||||||
"github.com/minio/mcs/restapi/operations"
|
"github.com/minio/mcs/restapi/operations"
|
||||||
"github.com/minio/mcs/restapi/operations/admin_api"
|
"github.com/minio/mcs/restapi/operations/admin_api"
|
||||||
operator "github.com/minio/minio-operator/pkg/apis/minio.min.io/v1"
|
operator "github.com/minio/operator/pkg/apis/minio.min.io/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ package restapi
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
v1 "github.com/minio/minio-operator/pkg/apis/minio.min.io/v1"
|
v1 "github.com/minio/operator/pkg/apis/minio.min.io/v1"
|
||||||
operatorClientset "github.com/minio/minio-operator/pkg/client/clientset/versioned"
|
operatorClientset "github.com/minio/operator/pkg/client/clientset/versioned"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
types "k8s.io/apimachinery/pkg/types"
|
types "k8s.io/apimachinery/pkg/types"
|
||||||
)
|
)
|
||||||
@@ -38,27 +38,27 @@ type OperatorClient interface {
|
|||||||
// Interface implementation
|
// Interface implementation
|
||||||
//
|
//
|
||||||
// Define the structure of a operator client and define the functions that are actually used
|
// Define the structure of a operator client and define the functions that are actually used
|
||||||
// from the minio-operator.
|
// from the minio operator.
|
||||||
type operatorClient struct {
|
type operatorClient struct {
|
||||||
client *operatorClientset.Clientset
|
client *operatorClientset.Clientset
|
||||||
}
|
}
|
||||||
|
|
||||||
// TenantDelete implements the minio instance delete action from minio-operator
|
// TenantDelete implements the minio instance delete action from minio operator
|
||||||
func (c *operatorClient) TenantDelete(ctx context.Context, namespace string, instanceName string, options metav1.DeleteOptions) error {
|
func (c *operatorClient) TenantDelete(ctx context.Context, namespace string, instanceName string, options metav1.DeleteOptions) error {
|
||||||
return c.client.MinioV1().Tenants(namespace).Delete(ctx, instanceName, options)
|
return c.client.MinioV1().Tenants(namespace).Delete(ctx, instanceName, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TenantGet implements the minio instance get action from minio-operator
|
// TenantGet implements the minio instance get action from minio operator
|
||||||
func (c *operatorClient) TenantGet(ctx context.Context, namespace string, instanceName string, options metav1.GetOptions) (*v1.Tenant, error) {
|
func (c *operatorClient) TenantGet(ctx context.Context, namespace string, instanceName string, options metav1.GetOptions) (*v1.Tenant, error) {
|
||||||
return c.client.MinioV1().Tenants(namespace).Get(ctx, instanceName, options)
|
return c.client.MinioV1().Tenants(namespace).Get(ctx, instanceName, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TenantPatch implements the minio instance patch action from minio-operator
|
// TenantPatch implements the minio instance patch action from minio operator
|
||||||
func (c *operatorClient) TenantPatch(ctx context.Context, namespace string, instanceName string, pt types.PatchType, data []byte, options metav1.PatchOptions) (*v1.Tenant, error) {
|
func (c *operatorClient) TenantPatch(ctx context.Context, namespace string, instanceName string, pt types.PatchType, data []byte, options metav1.PatchOptions) (*v1.Tenant, error) {
|
||||||
return c.client.MinioV1().Tenants(namespace).Patch(ctx, instanceName, pt, data, options)
|
return c.client.MinioV1().Tenants(namespace).Patch(ctx, instanceName, pt, data, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TenantList implements the minio instance list action from minio-operator
|
// TenantList implements the minio instance list action from minio operator
|
||||||
func (c *operatorClient) TenantList(ctx context.Context, namespace string, opts metav1.ListOptions) (*v1.TenantList, error) {
|
func (c *operatorClient) TenantList(ctx context.Context, namespace string, opts metav1.ListOptions) (*v1.TenantList, error) {
|
||||||
return c.client.MinioV1().Tenants(namespace).List(ctx, opts)
|
return c.client.MinioV1().Tenants(namespace).List(ctx, opts)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user