Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Jul 25, 2024
1 parent a1d0d4a commit 2fda59e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
3 changes: 1 addition & 2 deletions cmd/buildtools/k0s.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ var updateK0sImagesCommand = &cli.Command{
return fmt.Errorf("failed to get digest from build file: %w", err)
}

imageName := FamiliarImageName(ComponentImageName(componentName, packageVersion))
newmeta.Images[imageName] = fmt.Sprintf("%s@%s", packageVersion, digest)
newmeta.Images[ComponentImageKey(componentName)] = fmt.Sprintf("%s@%s", packageVersion, digest)
}

logrus.Infof("saving k0s metadata")
Expand Down
3 changes: 1 addition & 2 deletions cmd/buildtools/openebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ func updateOpenEBSAddonImages(ctx context.Context, chartURL string, chartVersion
return fmt.Errorf("failed to get digest from build file: %w", err)
}

imageName := FamiliarImageName(ComponentImageName(componentName, packageVersion))
newmeta.Images[imageName] = fmt.Sprintf("%s@%s", packageVersion, digest)
newmeta.Images[ComponentImageKey(componentName)] = fmt.Sprintf("%s@%s", packageVersion, digest)
}

logrus.Infof("saving addon manifest")
Expand Down
12 changes: 11 additions & 1 deletion cmd/buildtools/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,17 @@ func ApkoBuildAndPublish(componentName string, packageName string, packageVersio
}

func ComponentImageName(componentName string, packageVersion string) string {
return fmt.Sprintf("%s/replicated/ec-%s:%s", os.Getenv("IMAGES_REGISTRY_SERVER"), componentName, packageVersion)
return fmt.Sprintf("%s:%s", ComponentImageRepo(componentName), packageVersion)
}

func ComponentImageRepo(componentName string) string {
return fmt.Sprintf("%s/replicated/ec-%s", os.Getenv("IMAGES_REGISTRY_SERVER"), componentName)
}

func ComponentImageKey(componentName string) string {
imageName := ComponentImageRepo(componentName)
parts := strings.SplitN(imageName, "/", 2)
return parts[1]
}

func FamiliarImageName(imageName string) string {
Expand Down
3 changes: 1 addition & 2 deletions cmd/buildtools/velero.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,7 @@ func updateVeleroAddonImages(ctx context.Context, chartURL string, chartVersion
return fmt.Errorf("failed to get digest from build file: %w", err)
}

imageName := FamiliarImageName(ComponentImageName(componentName, packageVersion))
newmeta.Images[imageName] = fmt.Sprintf("%s@%s", packageVersion, digest)
newmeta.Images[ComponentImageKey(componentName)] = fmt.Sprintf("%s@%s", packageVersion, digest)
}

logrus.Infof("saving addon manifest")
Expand Down
6 changes: 3 additions & 3 deletions pkg/addons/openebs/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ localpv-provisioner:
image:
registry: proxy.replicated.com/anonymous/
repository: replicated/ec-openebs-linux-utils
tag: ''
tag: '4.1.0@sha256:ae7c85c7d85e8b94abc1a92e3e8f4dc1fd20a62881a1d1dd722d01544a44bef8'
hostpathClass:
enabled: true
isDefaultClass: true
localpv:
image:
registry: proxy.replicated.com/anonymous/
repository: replicated/ec-openebs-provisioner-localpv
tag: ''
tag: '4.1.0-r0@sha256:072a77f3bf6edbddd3fcb2c5bfcf3428297f4c1433bd88362003f0a47cb5be3b'
lvm-localpv:
enabled: false
mayastor:
Expand All @@ -44,6 +44,6 @@ preUpgradeHook:
image:
registry: proxy.replicated.com/anonymous
repo: replicated/ec-kubectl
tag: ''
tag: '1.29.5-r0@sha256:0e6ba5cb5cd48a17a4700e9fac4a267d3ec847637890919301ac0c0fe5ac7068'
zfs-localpv:
enabled: false
8 changes: 4 additions & 4 deletions pkg/addons/velero/static/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ credentials:
deployNodeAgent: true
image:
repository: proxy.replicated.com/anonymous/replicated/ec-velero
tag: ''
tag: '1.13.2@sha256:891aecafcdb3e03b08b8494f71fbad42335a52c445cb0e164210d383558753e2'
initContainers:
- image: 'proxy.replicated.com/anonymous/replicated/ec-velero-plugin-for-aws:'
- image: 'proxy.replicated.com/anonymous/replicated/ec-velero-plugin-for-aws:1.9.2@sha256:f2b81a1c1fcbf4e1a11b87ac0484c87e8ea7dd3facd76aa038f99cc4e1b1bcd7'
imagePullPolicy: IfNotPresent
name: velero-plugin-for-aws
volumeMounts:
Expand All @@ -28,14 +28,14 @@ initContainers:
kubectl:
image:
repository: proxy.replicated.com/anonymous/replicated/ec-kubectl
tag: ''
tag: '1.29.5-r0@sha256:0e6ba5cb5cd48a17a4700e9fac4a267d3ec847637890919301ac0c0fe5ac7068'
configMaps:
fs-restore-action-config:
labels:
velero.io/plugin-config: ""
velero.io/pod-volume-restore: RestoreItemAction
data:
image: 'proxy.replicated.com/anonymous/replicated/ec-velero-restore-helper:'
image: 'proxy.replicated.com/anonymous/replicated/ec-velero-restore-helper:1.13.2@sha256:56ac4f664d79f97534d41db2e46561d3862035cd527d092d016cb7289ec4ce8f'
nodeAgent:
podVolumePath: /var/lib/k0s/kubelet/pods
snapshotsEnabled: false

0 comments on commit 2fda59e

Please sign in to comment.