Skip to content

Commit

Permalink
Remove outdated image digests
Browse files Browse the repository at this point in the history
These haven't been updated since the v1.10 times and they aren't used
anymore in the new Helm-based installation mode. Remove the image
digests and all code infrastructure around generating them.

Signed-off-by: Tobias Klauser <[email protected]>
  • Loading branch information
tklauser authored and michi-covalent committed Dec 5, 2023
1 parent cff939f commit 9888ff9
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 366 deletions.
8 changes: 4 additions & 4 deletions clustermesh/clustermesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ etcdctl user grant-role remote remote;
etcdctl auth enable;
exit`}

func (k *K8sClusterMesh) apiserverImage(imagePathMode utils.ImagePathMode) string {
return utils.BuildImagePath(k.params.ApiserverImage, k.params.ApiserverVersion, defaults.ClusterMeshApiserverImage, k.imageVersion, imagePathMode)
func (k *K8sClusterMesh) apiserverImage() string {
return utils.BuildImagePath(k.params.ApiserverImage, k.params.ApiserverVersion, defaults.ClusterMeshApiserverImage, k.imageVersion)
}

func (k *K8sClusterMesh) etcdImage() string {
Expand Down Expand Up @@ -281,7 +281,7 @@ func (k *K8sClusterMesh) generateDeployment(clustermeshApiserverArgs []string) *
"--kvstore-opt",
"etcd.config=/var/lib/cilium/etcd-config.yaml",
),
Image: k.apiserverImage(utils.ImagePathIncludeDigest),
Image: k.apiserverImage(),
ImagePullPolicy: corev1.PullIfNotPresent,
Env: []corev1.EnvVar{
{
Expand Down Expand Up @@ -624,7 +624,7 @@ func (k *K8sClusterMesh) Enable(ctx context.Context) error {
return err
}

k.Log("✨ Deploying clustermesh-apiserver from %s...", k.apiserverImage(utils.ImagePathExcludeDigest))
k.Log("✨ Deploying clustermesh-apiserver from %s...", k.apiserverImage())
if _, err := k.client.CreateServiceAccount(ctx, k.params.Namespace, k8s.NewServiceAccount(defaults.ClusterMeshServiceAccountName), metav1.CreateOptions{}); err != nil {
return err
}
Expand Down
120 changes: 0 additions & 120 deletions cmd/internal/add-image-digests/main.go

This file was deleted.

11 changes: 0 additions & 11 deletions defaults/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions defaults/imagedigests.go

This file was deleted.

135 changes: 0 additions & 135 deletions defaults/imagedigests.json

This file was deleted.

11 changes: 4 additions & 7 deletions hubble/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,18 @@ func TestK8sHubbleRelayImage(t *testing.T) {
ciliumVersion string
relayImage string
relayVersion string
imagePathMode utils.ImagePathMode
want string
}{
{
ciliumVersion: "-cluster-mesh:v1.11.0-beta.1",
relayImage: "",
relayVersion: "",
imagePathMode: utils.ImagePathExcludeDigest,
want: "quay.io/cilium/hubble-relay-cluster-mesh:v1.11.0-beta.1",
},
{
ciliumVersion: "v1.11.1",
relayImage: "",
relayVersion: "-cluster-mesh:v1.11.0-beta.1",
imagePathMode: utils.ImagePathExcludeDigest,
want: "quay.io/cilium/hubble-relay-cluster-mesh:v1.11.0-beta.1",
},
}
Expand All @@ -42,13 +39,13 @@ func TestK8sHubbleRelayImage(t *testing.T) {
RelayVersion: tt.relayVersion,
},
}
if got := k.relayImage(tt.imagePathMode, tt.ciliumVersion); got != tt.want {
t.Errorf("k.relayImage(%d) == %q, want %q", tt.imagePathMode, got, tt.want)
if got := k.relayImage(tt.ciliumVersion); got != tt.want {
t.Errorf("k.relayImage(%s) == %q, want %q", tt.ciliumVersion, got, tt.want)
}
})
}
}

func (k *K8sHubble) relayImage(imagePathMode utils.ImagePathMode, ciliumVersion string) string {
return utils.BuildImagePath(k.params.RelayImage, k.params.RelayVersion, defaults.RelayImage, ciliumVersion, imagePathMode)
func (k *K8sHubble) relayImage(ciliumVersion string) string {
return utils.BuildImagePath(k.params.RelayImage, k.params.RelayVersion, defaults.RelayImage, ciliumVersion)
}
Loading

0 comments on commit 9888ff9

Please sign in to comment.