Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated image digests #2152

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading