diff --git a/cmd/shipperctl/configurator/cluster.go b/cmd/shipperctl/configurator/cluster.go index 11e8c48fd..89e785401 100644 --- a/cmd/shipperctl/configurator/cluster.go +++ b/cmd/shipperctl/configurator/cluster.go @@ -1,9 +1,7 @@ package configurator import ( - "encoding/hex" "fmt" - "hash/crc32" "time" certificatesv1beta1 "k8s.io/api/certificates/v1beta1" @@ -184,17 +182,10 @@ func (c *Cluster) FetchCluster(clusterName string) (*shipper.Cluster, error) { } func (c *Cluster) CopySecret(cluster *shipper.Cluster, newNamespace string, secret *corev1.Secret) error { - hash := crc32.NewIEEE() - hash.Write(secret.Data["ca.crt"]) - hash.Write(secret.Data["token"]) - newSecret := &corev1.Secret{ ObjectMeta: metav1.ObjectMeta{ Name: cluster.Name, Namespace: newNamespace, - Annotations: map[string]string{ - shipper.SecretChecksumAnnotation: hex.EncodeToString(hash.Sum(nil)), - }, OwnerReferences: []metav1.OwnerReference{ metav1.OwnerReference{ APIVersion: "shipper.booking.com/v1", @@ -254,17 +245,17 @@ func NewClusterConfiguratorFromKubeConfig(kubeConfigFile, context string) (*Clus } func NewClusterConfigurator(restConfig *rest.Config) (*Cluster, error) { - clientset, err := client.NewKubeClient(AgentName, restConfig) + clientset, err := client.NewKubeClient(restConfig, AgentName, nil) if err != nil { return nil, err } - shipperClient, err := client.NewShipperClient(AgentName, restConfig) + shipperClient, err := client.NewShipperClient(restConfig, AgentName, nil) if err != nil { return nil, err } - apiExtensionClient, err := client.NewApiExtensionClient(AgentName, restConfig) + apiExtensionClient, err := client.NewApiExtensionClient(restConfig, AgentName, nil) if err != nil { return nil, err }