Skip to content

Commit

Permalink
chore: code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
mojtaba-esk committed Dec 6, 2024
1 parent 62cf6f7 commit b5dd67c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
6 changes: 0 additions & 6 deletions pkg/instance/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ func (b *build) SetGitRepo(ctx context.Context, gitContext builder.GitContext, a
}
b.imageName = resolvedImage.ToString()

buildDir, err := b.getBuildDir()
if err != nil {
return ErrGettingBuildDir.Wrap(err)
}
b.imageName = resolvedImage.ToString()

buildDir, err := b.getBuildDir()
if err != nil {
return ErrGettingBuildDir.Wrap(err)
Expand Down
15 changes: 0 additions & 15 deletions pkg/k8s/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,21 +627,6 @@ func (c *Client) preparePodSpec(spec PodConfig, init bool) v1.PodSpec {
// ImagePullSecrets: spec.ImagePullSecrets,
}

// TODO: FIXME Remove this
if strings.HasPrefix(spec.Name, "registry-build-from-git") {
if exists, err := c.ConfigMapExists(context.Background(), "ttlsh-registry-certs"); err == nil && exists {
podSpec.Volumes = append(podSpec.Volumes, v1.Volume{
Name: "cert-volume",
VolumeSource: v1.VolumeSource{
ConfigMap: &v1.ConfigMapVolumeSource{
LocalObjectReference: v1.LocalObjectReference{Name: "ttlsh-registry-certs"},
DefaultMode: ptr.To[int32](defaultFileModeForVolume),
},
},
})
}
}

// Prepare sidecar containers and append to the pod spec
for _, sidecarConfig := range spec.SidecarConfigs {
sidecarInitContainer := c.prepareInitContainers(sidecarConfig, true)
Expand Down

0 comments on commit b5dd67c

Please sign in to comment.