From 6d43d7ba19e849192301fcb498eafe22dd24e2df Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Fri, 21 Aug 2020 17:00:42 -0700 Subject: [PATCH] Update the schema of CredentialIssuerConfig - Move the current info from spec to status - Add schema for new stuff that we will use in a future commit to status - Regenerate the generated code --- deploy/crd.yaml | 61 +++-- internal/controller/issuerconfig/publisher.go | 35 +-- .../controller/issuerconfig/publisher_test.go | 13 +- .../api/apis/crdpinniped/v1alpha1/types.go | 19 +- .../v1alpha1/zz_generated.deepcopy.go | 55 ++++- .../generated/openapi/zz_generated.openapi.go | 226 ++++++++++++------ ...overyinfo.go => credentialissuerconfig.go} | 17 ++ ...info.go => fake_credentialissuerconfig.go} | 12 + ...overyinfo.go => credentialissuerconfig.go} | 0 ...overyinfo.go => credentialissuerconfig.go} | 0 ...test.go => credentialissuerconfig_test.go} | 19 +- 11 files changed, 333 insertions(+), 124 deletions(-) rename kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/{pinnipeddiscoveryinfo.go => credentialissuerconfig.go} (88%) rename kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/{fake_pinnipeddiscoveryinfo.go => fake_credentialissuerconfig.go} (89%) rename kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/{pinnipeddiscoveryinfo.go => credentialissuerconfig.go} (100%) rename kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/{pinnipeddiscoveryinfo.go => credentialissuerconfig.go} (100%) rename test/integration/{pinnipeddiscoveryinfo_test.go => credentialissuerconfig_test.go} (72%) diff --git a/deploy/crd.yaml b/deploy/crd.yaml index ce85d904..6239a56d 100644 --- a/deploy/crd.yaml +++ b/deploy/crd.yaml @@ -7,9 +7,16 @@ #! metadata: #! name: credential-issuer-config #! namespace: integration -#! spec: -#! server: https://foo -#! certificateAuthorityData: bar +#! status: +#! strategies: +#! - type: KubeClusterSigningCertificate +#! lastUpdateTime: 2020-08-21T20:08:18Z +#! status: Error +#! reason: CouldNotFetchKey +#! message: "There was an error getting the signing cert" +#! kubeConfigInfo: +#! server: https://foo +#! certificateAuthorityData: bar --- apiVersion: apiextensions.k8s.io/v1 @@ -20,26 +27,52 @@ spec: group: crd.pinniped.dev versions: #! Any changes to these schemas should also be reflected in the types.go file(s) - #! in https://github.com/suzerain-io/pinniped-api/tree/main/pkg/apis/pinniped - name: v1alpha1 served: true storage: true schema: openAPIV3Schema: type: object - required: [spec] properties: - spec: + status: type: object - required: [server, certificateAuthorityData] properties: - server: - type: string - minLength: 1 - pattern: '^https://|^http://' - certificateAuthorityData: - type: string - minLength: 1 + strategies: + type: array + items: + type: object + required: [ type, status,reason, message, lastUpdateTime ] + properties: + type: #! this property is called "type" + type: string + minLength: 1 + pattern: '^KubeClusterSigningCertificate$' + status: + type: string + minLength: 1 + pattern: '^Success$|^Error$' + reason: + type: string + minLength: 1 + pattern: '^CouldNotFetchKey$|^FetchedKey$' + message: + type: string + minLength: 1 + lastUpdateTime: + type: string + format: date-time + minLength: 1 + kubeConfigInfo: + type: object + required: [ server, certificateAuthorityData ] + properties: + server: + type: string + minLength: 1 + pattern: '^https://|^http://' + certificateAuthorityData: + type: string + minLength: 1 scope: Namespaced names: plural: credentialissuerconfigs diff --git a/internal/controller/issuerconfig/publisher.go b/internal/controller/issuerconfig/publisher.go index bac6d843..a7c2fef8 100644 --- a/internal/controller/issuerconfig/publisher.go +++ b/internal/controller/issuerconfig/publisher.go @@ -115,9 +115,12 @@ func (c *publisherController) Sync(ctx controller.Context) error { Name: configName, Namespace: c.namespace, }, - Spec: crdpinnipedv1alpha1.CredentialIssuerConfigSpec{ - Server: server, - CertificateAuthorityData: certificateAuthorityData, + Status: crdpinnipedv1alpha1.CredentialIssuerConfigStatus{ + Strategies: []crdpinnipedv1alpha1.CredentialIssuerConfigStrategy{}, + KubeConfigInfo: &crdpinnipedv1alpha1.CredentialIssuerConfigKubeConfigInfo{ + Server: server, + CertificateAuthorityData: certificateAuthorityData, + }, }, } if err := c.createOrUpdateCredentialIssuerConfig(ctx.Context, &credentialIssuerConfig); err != nil { @@ -129,34 +132,34 @@ func (c *publisherController) Sync(ctx controller.Context) error { func (c *publisherController) createOrUpdateCredentialIssuerConfig( ctx context.Context, - credentialIssuerConfig *crdpinnipedv1alpha1.CredentialIssuerConfig, + newCredentialIssuerConfig *crdpinnipedv1alpha1.CredentialIssuerConfig, ) error { existingCredentialIssuerConfig, err := c.credentialIssuerConfigInformer. Lister(). CredentialIssuerConfigs(c.namespace). - Get(credentialIssuerConfig.Name) + Get(newCredentialIssuerConfig.Name) notFound := k8serrors.IsNotFound(err) if err != nil && !notFound { return fmt.Errorf("could not get credentialissuerconfig: %w", err) } - credentialIssuerConfigs := c.pinnipedClient. - CrdV1alpha1(). - CredentialIssuerConfigs(c.namespace) + credentialIssuerConfigsClient := c.pinnipedClient.CrdV1alpha1().CredentialIssuerConfigs(c.namespace) if notFound { - if _, err := credentialIssuerConfigs.Create( + if _, err := credentialIssuerConfigsClient.Create( ctx, - credentialIssuerConfig, + newCredentialIssuerConfig, metav1.CreateOptions{}, ); err != nil { return fmt.Errorf("could not create credentialissuerconfig: %w", err) } - } else if !equal(existingCredentialIssuerConfig, credentialIssuerConfig) { + } else if !equal(existingCredentialIssuerConfig, newCredentialIssuerConfig) { // Update just the fields we care about. - existingCredentialIssuerConfig.Spec.Server = credentialIssuerConfig.Spec.Server - existingCredentialIssuerConfig.Spec.CertificateAuthorityData = credentialIssuerConfig.Spec.CertificateAuthorityData + newServer := newCredentialIssuerConfig.Status.KubeConfigInfo.Server + newCA := newCredentialIssuerConfig.Status.KubeConfigInfo.CertificateAuthorityData + existingCredentialIssuerConfig.Status.KubeConfigInfo.Server = newServer + existingCredentialIssuerConfig.Status.KubeConfigInfo.CertificateAuthorityData = newCA - if _, err := credentialIssuerConfigs.Update( + if _, err := credentialIssuerConfigsClient.Update( ctx, existingCredentialIssuerConfig, metav1.UpdateOptions{}, @@ -169,6 +172,6 @@ func (c *publisherController) createOrUpdateCredentialIssuerConfig( } func equal(a, b *crdpinnipedv1alpha1.CredentialIssuerConfig) bool { - return a.Spec.Server == b.Spec.Server && - a.Spec.CertificateAuthorityData == b.Spec.CertificateAuthorityData + return a.Status.KubeConfigInfo.Server == b.Status.KubeConfigInfo.Server && + a.Status.KubeConfigInfo.CertificateAuthorityData == b.Status.KubeConfigInfo.CertificateAuthorityData } diff --git a/internal/controller/issuerconfig/publisher_test.go b/internal/controller/issuerconfig/publisher_test.go index 4aefe2f6..81ca5ebf 100644 --- a/internal/controller/issuerconfig/publisher_test.go +++ b/internal/controller/issuerconfig/publisher_test.go @@ -190,9 +190,12 @@ func TestSync(t *testing.T) { Name: "pinniped-config", Namespace: expectedNamespace, }, - Spec: crdpinnipedv1alpha1.CredentialIssuerConfigSpec{ - Server: expectedServerURL, - CertificateAuthorityData: expectedCAData, + Status: crdpinnipedv1alpha1.CredentialIssuerConfigStatus{ + Strategies: []crdpinnipedv1alpha1.CredentialIssuerConfigStrategy{}, + KubeConfigInfo: &crdpinnipedv1alpha1.CredentialIssuerConfigKubeConfigInfo{ + Server: expectedServerURL, + CertificateAuthorityData: expectedCAData, + }, }, } return expectedCredentialIssuerConfigGVR, expectedCredentialIssuerConfig @@ -324,7 +327,7 @@ func TestSync(t *testing.T) { kubeServerURL, caData, ) - expectedCredentialIssuerConfig.Spec.Server = "https://some-server-override" + expectedCredentialIssuerConfig.Status.KubeConfigInfo.Server = "https://some-server-override" r.Equal( []coretesting.Action{ @@ -368,7 +371,7 @@ func TestSync(t *testing.T) { kubeServerURL, caData, ) - expectedCredentialIssuerConfig.Spec.Server = "https://some-other-server" + expectedCredentialIssuerConfig.Status.KubeConfigInfo.Server = "https://some-other-server" r.NoError(pinnipedInformerClient.Tracker().Add(expectedCredentialIssuerConfig)) r.NoError(pinnipedAPIClient.Tracker().Add(expectedCredentialIssuerConfig)) }) diff --git a/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go index eeefe7c7..cc45b17a 100644 --- a/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go +++ b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/types.go @@ -7,7 +7,14 @@ package v1alpha1 import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -type CredentialIssuerConfigSpec struct { +type CredentialIssuerConfigStatus struct { + Strategies []CredentialIssuerConfigStrategy `json:"strategies"` + + // +optional + KubeConfigInfo *CredentialIssuerConfigKubeConfigInfo `json:"kubeConfigInfo,omitempty"` +} + +type CredentialIssuerConfigKubeConfigInfo struct { // The K8s API server URL. Required. Server string `json:"server,omitempty"` @@ -15,6 +22,14 @@ type CredentialIssuerConfigSpec struct { CertificateAuthorityData string `json:"certificateAuthorityData,omitempty"` } +type CredentialIssuerConfigStrategy struct { + Type string `json:"type,omitempty"` + Status string `json:"status,omitempty"` + Reason string `json:"reason,omitempty"` + Message string `json:"message,omitempty"` + LastUpdateTime metav1.Time `json:"lastUpdateTime"` +} + // +genclient // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object @@ -22,7 +37,7 @@ type CredentialIssuerConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec CredentialIssuerConfigSpec `json:"spec"` + Status CredentialIssuerConfigStatus `json:"status"` } // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object diff --git a/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go index 00966486..a57cd72e 100644 --- a/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go +++ b/kubernetes/1.19/api/apis/crdpinniped/v1alpha1/zz_generated.deepcopy.go @@ -18,7 +18,7 @@ func (in *CredentialIssuerConfig) DeepCopyInto(out *CredentialIssuerConfig) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Status.DeepCopyInto(&out.Status) return } @@ -40,6 +40,22 @@ func (in *CredentialIssuerConfig) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CredentialIssuerConfigKubeConfigInfo) DeepCopyInto(out *CredentialIssuerConfigKubeConfigInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialIssuerConfigKubeConfigInfo. +func (in *CredentialIssuerConfigKubeConfigInfo) DeepCopy() *CredentialIssuerConfigKubeConfigInfo { + if in == nil { + return nil + } + out := new(CredentialIssuerConfigKubeConfigInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CredentialIssuerConfigList) DeepCopyInto(out *CredentialIssuerConfigList) { *out = *in @@ -74,17 +90,46 @@ func (in *CredentialIssuerConfigList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CredentialIssuerConfigSpec) DeepCopyInto(out *CredentialIssuerConfigSpec) { +func (in *CredentialIssuerConfigStatus) DeepCopyInto(out *CredentialIssuerConfigStatus) { *out = *in + if in.Strategies != nil { + in, out := &in.Strategies, &out.Strategies + *out = make([]CredentialIssuerConfigStrategy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.KubeConfigInfo != nil { + in, out := &in.KubeConfigInfo, &out.KubeConfigInfo + *out = new(CredentialIssuerConfigKubeConfigInfo) + **out = **in + } return } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialIssuerConfigSpec. -func (in *CredentialIssuerConfigSpec) DeepCopy() *CredentialIssuerConfigSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialIssuerConfigStatus. +func (in *CredentialIssuerConfigStatus) DeepCopy() *CredentialIssuerConfigStatus { if in == nil { return nil } - out := new(CredentialIssuerConfigSpec) + out := new(CredentialIssuerConfigStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CredentialIssuerConfigStrategy) DeepCopyInto(out *CredentialIssuerConfigStrategy) { + *out = *in + in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CredentialIssuerConfigStrategy. +func (in *CredentialIssuerConfigStrategy) DeepCopy() *CredentialIssuerConfigStrategy { + if in == nil { + return nil + } + out := new(CredentialIssuerConfigStrategy) in.DeepCopyInto(out) return out } diff --git a/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go b/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go index 7ca6dfea..caea9dab 100644 --- a/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go +++ b/kubernetes/1.19/api/generated/openapi/zz_generated.openapi.go @@ -19,67 +19,69 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfig": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfig(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigList": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigList(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigSpec": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigSpec(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequest": schema_api_apis_pinniped_v1alpha1_CredentialRequest(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestCredential": schema_api_apis_pinniped_v1alpha1_CredentialRequestCredential(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestList": schema_api_apis_pinniped_v1alpha1_CredentialRequestList(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestSpec": schema_api_apis_pinniped_v1alpha1_CredentialRequestSpec(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestStatus": schema_api_apis_pinniped_v1alpha1_CredentialRequestStatus(ref), - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestTokenCredential": schema_api_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": schema_pkg_apis_meta_v1_ExportOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), - "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), - "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), - "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), - "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), - "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfig": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfig(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigKubeConfigInfo": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigKubeConfigInfo(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigList": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigList(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigStatus": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigStatus(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigStrategy": schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigStrategy(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequest": schema_api_apis_pinniped_v1alpha1_CredentialRequest(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestCredential": schema_api_apis_pinniped_v1alpha1_CredentialRequestCredential(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestList": schema_api_apis_pinniped_v1alpha1_CredentialRequestList(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestSpec": schema_api_apis_pinniped_v1alpha1_CredentialRequestSpec(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestStatus": schema_api_apis_pinniped_v1alpha1_CredentialRequestStatus(ref), + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/pinniped/v1alpha1.CredentialRequestTokenCredential": schema_api_apis_pinniped_v1alpha1_CredentialRequestTokenCredential(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup": schema_pkg_apis_meta_v1_APIGroup(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIGroupList": schema_pkg_apis_meta_v1_APIGroupList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResource": schema_pkg_apis_meta_v1_APIResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIResourceList": schema_pkg_apis_meta_v1_APIResourceList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.APIVersions": schema_pkg_apis_meta_v1_APIVersions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Condition": schema_pkg_apis_meta_v1_Condition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.CreateOptions": schema_pkg_apis_meta_v1_CreateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.DeleteOptions": schema_pkg_apis_meta_v1_DeleteOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Duration": schema_pkg_apis_meta_v1_Duration(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ExportOptions": schema_pkg_apis_meta_v1_ExportOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.FieldsV1": schema_pkg_apis_meta_v1_FieldsV1(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GetOptions": schema_pkg_apis_meta_v1_GetOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupKind": schema_pkg_apis_meta_v1_GroupKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupResource": schema_pkg_apis_meta_v1_GroupResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersion": schema_pkg_apis_meta_v1_GroupVersion(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery": schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind": schema_pkg_apis_meta_v1_GroupVersionKind(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionResource": schema_pkg_apis_meta_v1_GroupVersionResource(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.InternalEvent": schema_pkg_apis_meta_v1_InternalEvent(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelector": schema_pkg_apis_meta_v1_LabelSelector(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement": schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.List": schema_pkg_apis_meta_v1_List(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta": schema_pkg_apis_meta_v1_ListMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ListOptions": schema_pkg_apis_meta_v1_ListOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry": schema_pkg_apis_meta_v1_ManagedFieldsEntry(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.MicroTime": schema_pkg_apis_meta_v1_MicroTime(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta": schema_pkg_apis_meta_v1_ObjectMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference": schema_pkg_apis_meta_v1_OwnerReference(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata": schema_pkg_apis_meta_v1_PartialObjectMetadata(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadataList": schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Patch": schema_pkg_apis_meta_v1_Patch(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.PatchOptions": schema_pkg_apis_meta_v1_PatchOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Preconditions": schema_pkg_apis_meta_v1_Preconditions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.RootPaths": schema_pkg_apis_meta_v1_RootPaths(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR": schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Status": schema_pkg_apis_meta_v1_Status(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause": schema_pkg_apis_meta_v1_StatusCause(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.StatusDetails": schema_pkg_apis_meta_v1_StatusDetails(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Table": schema_pkg_apis_meta_v1_Table(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition": schema_pkg_apis_meta_v1_TableColumnDefinition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableOptions": schema_pkg_apis_meta_v1_TableOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRow": schema_pkg_apis_meta_v1_TableRow(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition": schema_pkg_apis_meta_v1_TableRowCondition(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Time": schema_pkg_apis_meta_v1_Time(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.Timestamp": schema_pkg_apis_meta_v1_Timestamp(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.TypeMeta": schema_pkg_apis_meta_v1_TypeMeta(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.UpdateOptions": schema_pkg_apis_meta_v1_UpdateOptions(ref), + "k8s.io/apimachinery/pkg/apis/meta/v1.WatchEvent": schema_pkg_apis_meta_v1_WatchEvent(ref), + "k8s.io/apimachinery/pkg/runtime.RawExtension": schema_k8sio_apimachinery_pkg_runtime_RawExtension(ref), + "k8s.io/apimachinery/pkg/runtime.TypeMeta": schema_k8sio_apimachinery_pkg_runtime_TypeMeta(ref), + "k8s.io/apimachinery/pkg/runtime.Unknown": schema_k8sio_apimachinery_pkg_runtime_Unknown(ref), + "k8s.io/apimachinery/pkg/version.Info": schema_k8sio_apimachinery_pkg_version_Info(ref), } } @@ -108,17 +110,43 @@ func schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfig(ref common.Refe Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, - "spec": { + "status": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigSpec"), + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigStatus"), }, }, }, - Required: []string{"spec"}, + Required: []string{"status"}, }, }, Dependencies: []string{ - "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigSpec", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"}, + } +} + +func schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigKubeConfigInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "server": { + SchemaProps: spec.SchemaProps{ + Description: "The K8s API server URL. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + "certificateAuthorityData": { + SchemaProps: spec.SchemaProps{ + Description: "The K8s API server CA bundle. Required.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, } } @@ -168,29 +196,79 @@ func schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigList(ref common. } } -func schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigSpec(ref common.ReferenceCallback) common.OpenAPIDefinition { +func schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ SchemaProps: spec.SchemaProps{ Type: []string{"object"}, Properties: map[string]spec.Schema{ - "server": { + "strategies": { SchemaProps: spec.SchemaProps{ - Description: "The K8s API server URL. Required.", - Type: []string{"string"}, - Format: "", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigStrategy"), + }, + }, + }, }, }, - "certificateAuthorityData": { + "kubeConfigInfo": { SchemaProps: spec.SchemaProps{ - Description: "The K8s API server CA bundle. Required.", - Type: []string{"string"}, - Format: "", + Ref: ref("github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigKubeConfigInfo"), }, }, }, + Required: []string{"strategies"}, }, }, + Dependencies: []string{ + "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigKubeConfigInfo", "github.com/suzerain-io/pinniped/kubernetes/1.19/api/apis/crdpinniped/v1alpha1.CredentialIssuerConfigStrategy"}, + } +} + +func schema_api_apis_crdpinniped_v1alpha1_CredentialIssuerConfigStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "type": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "status": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "reason": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "message": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "lastUpdateTime": { + SchemaProps: spec.SchemaProps{ + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), + }, + }, + }, + Required: []string{"lastUpdateTime"}, + }, + }, + Dependencies: []string{ + "k8s.io/apimachinery/pkg/apis/meta/v1.Time"}, } } diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/credentialissuerconfig.go similarity index 88% rename from kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/credentialissuerconfig.go index 7afde8ec..fa285269 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/credentialissuerconfig.go @@ -29,6 +29,7 @@ type CredentialIssuerConfigsGetter interface { type CredentialIssuerConfigInterface interface { Create(ctx context.Context, credentialIssuerConfig *v1alpha1.CredentialIssuerConfig, opts v1.CreateOptions) (*v1alpha1.CredentialIssuerConfig, error) Update(ctx context.Context, credentialIssuerConfig *v1alpha1.CredentialIssuerConfig, opts v1.UpdateOptions) (*v1alpha1.CredentialIssuerConfig, error) + UpdateStatus(ctx context.Context, credentialIssuerConfig *v1alpha1.CredentialIssuerConfig, opts v1.UpdateOptions) (*v1alpha1.CredentialIssuerConfig, error) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.CredentialIssuerConfig, error) @@ -124,6 +125,22 @@ func (c *credentialIssuerConfigs) Update(ctx context.Context, credentialIssuerCo return } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *credentialIssuerConfigs) UpdateStatus(ctx context.Context, credentialIssuerConfig *v1alpha1.CredentialIssuerConfig, opts v1.UpdateOptions) (result *v1alpha1.CredentialIssuerConfig, err error) { + result = &v1alpha1.CredentialIssuerConfig{} + err = c.client.Put(). + Namespace(c.ns). + Resource("credentialissuerconfigs"). + Name(credentialIssuerConfig.Name). + SubResource("status"). + VersionedParams(&opts, scheme.ParameterCodec). + Body(credentialIssuerConfig). + Do(ctx). + Into(result) + return +} + // Delete takes name of the credentialIssuerConfig and deletes it. Returns an error if one occurs. func (c *credentialIssuerConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { return c.client.Delete(). diff --git a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_credentialissuerconfig.go similarity index 89% rename from kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_pinnipeddiscoveryinfo.go rename to kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_credentialissuerconfig.go index e47d4030..0aeb9959 100644 --- a/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_pinnipeddiscoveryinfo.go +++ b/kubernetes/1.19/client-go/clientset/versioned/typed/crdpinniped/v1alpha1/fake/fake_credentialissuerconfig.go @@ -91,6 +91,18 @@ func (c *FakeCredentialIssuerConfigs) Update(ctx context.Context, credentialIssu return obj.(*v1alpha1.CredentialIssuerConfig), err } +// UpdateStatus was generated because the type contains a Status member. +// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). +func (c *FakeCredentialIssuerConfigs) UpdateStatus(ctx context.Context, credentialIssuerConfig *v1alpha1.CredentialIssuerConfig, opts v1.UpdateOptions) (*v1alpha1.CredentialIssuerConfig, error) { + obj, err := c.Fake. + Invokes(testing.NewUpdateSubresourceAction(credentialissuerconfigsResource, "status", c.ns, credentialIssuerConfig), &v1alpha1.CredentialIssuerConfig{}) + + if obj == nil { + return nil, err + } + return obj.(*v1alpha1.CredentialIssuerConfig), err +} + // Delete takes name of the credentialIssuerConfig and deletes it. Returns an error if one occurs. func (c *FakeCredentialIssuerConfigs) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { _, err := c.Fake. diff --git a/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/credentialissuerconfig.go similarity index 100% rename from kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go rename to kubernetes/1.19/client-go/informers/externalversions/crdpinniped/v1alpha1/credentialissuerconfig.go diff --git a/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go b/kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/credentialissuerconfig.go similarity index 100% rename from kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/pinnipeddiscoveryinfo.go rename to kubernetes/1.19/client-go/listers/crdpinniped/v1alpha1/credentialissuerconfig.go diff --git a/test/integration/pinnipeddiscoveryinfo_test.go b/test/integration/credentialissuerconfig_test.go similarity index 72% rename from test/integration/pinnipeddiscoveryinfo_test.go rename to test/integration/credentialissuerconfig_test.go index e8a61b58..1b21da76 100644 --- a/test/integration/pinnipeddiscoveryinfo_test.go +++ b/test/integration/credentialissuerconfig_test.go @@ -29,14 +29,14 @@ func TestSuccessfulCredentialIssuerConfig(t *testing.T) { defer cancel() config := library.NewClientConfig(t) - expectedLDCSpec := expectedLDCSpec(config) + expectedLDCStatus := expectedLDCStatus(config) configList, err := client. CrdV1alpha1(). CredentialIssuerConfigs(namespaceName). List(ctx, metav1.ListOptions{}) require.NoError(t, err) require.Len(t, configList.Items, 1) - require.Equal(t, expectedLDCSpec, &configList.Items[0].Spec) + require.Equal(t, expectedLDCStatus, &configList.Items[0].Status) } func TestReconcilingCredentialIssuerConfig(t *testing.T) { @@ -55,7 +55,7 @@ func TestReconcilingCredentialIssuerConfig(t *testing.T) { require.NoError(t, err) config := library.NewClientConfig(t) - expectedLDCSpec := expectedLDCSpec(config) + expectedLDCStatus := expectedLDCStatus(config) var actualLDC *crdpinnipedv1alpha1.CredentialIssuerConfig for i := 0; i < 10; i++ { @@ -69,12 +69,15 @@ func TestReconcilingCredentialIssuerConfig(t *testing.T) { time.Sleep(time.Millisecond * 750) } require.NoError(t, err) - require.Equal(t, expectedLDCSpec, &actualLDC.Spec) + require.Equal(t, expectedLDCStatus, &actualLDC.Status) } -func expectedLDCSpec(config *rest.Config) *crdpinnipedv1alpha1.CredentialIssuerConfigSpec { - return &crdpinnipedv1alpha1.CredentialIssuerConfigSpec{ - Server: config.Host, - CertificateAuthorityData: base64.StdEncoding.EncodeToString(config.TLSClientConfig.CAData), +func expectedLDCStatus(config *rest.Config) *crdpinnipedv1alpha1.CredentialIssuerConfigStatus { + return &crdpinnipedv1alpha1.CredentialIssuerConfigStatus{ + Strategies: []crdpinnipedv1alpha1.CredentialIssuerConfigStrategy{}, + KubeConfigInfo: &crdpinnipedv1alpha1.CredentialIssuerConfigKubeConfigInfo{ + Server: config.Host, + CertificateAuthorityData: base64.StdEncoding.EncodeToString(config.TLSClientConfig.CAData), + }, } }