Skip to content

Commit

Permalink
Removes attestations from manifests and converts helm chart to semver
Browse files Browse the repository at this point in the history
  • Loading branch information
reederc42 authored Dec 7, 2023
1 parent 212891d commit afedd4e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
11 changes: 4 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,12 @@ build_operator_images_for_platforms = $(foreach platform,$1,\

# manifest_files_linux writes the attestation and image manifests to dir for platform and tag
# usage: $(call manifest_files_linux,$(output_dir),$(platform),$(tag))
manifest_files_linux = $(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $(call image_tag,$3,$2) | jq '.manifests[0]' > $1/image_$(call slugify,$2) &&\
$(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $(call image_tag,$3,$2) | jq '.manifests[1]' > $1/attestation_$(call slugify,$2)
manifest_files_linux = $(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $(call image_tag,$3,$2) | jq '.manifests[0]' > $1/image_$(call slugify,$2)

# manifest_files_windows writes the attestation and image manifests to dir for platform and tag, adding windows os version
# usage: $(call manifest_files_windows,$(output_dir),$(platform),$(tag),$(windows_image_repo))
manifest_files_windows = export os_version=$$($(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $4:$(call os_version,$2) | jq -r '.manifests[0].platform."os.version"') &&\
$(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $(call image_tag,$3,$2) | jq '.manifests[0] | .platform."os.version"=env.os_version' > $1/image_$(call slugify,$2) &&\
$(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $(call image_tag,$3,$2) | jq '.manifests[1]' > $1/attestation_$(call slugify,$2)
$(DOCKER_BUILDX_BUILD_CLI) imagetools inspect --raw $(call image_tag,$3,$2) | jq '.manifests[0] | .platform."os.version"=env.os_version' > $1/image_$(call slugify,$2)

# manifest_files_for_platforms writes the attestation and image manifests for all platforms
# usage: $(call manifest_files_for_platforms,$(platforms),$(output_dir),$(tag),$(windows_image_repo))
Expand All @@ -301,7 +299,7 @@ manifest_files_for_platforms = $(foreach platform,$1,\
# create_manifest_for_platforms creates manifest from platform manifests in dir
# usage: $(call create_manifest_for_platforms,$(platforms),$(dir),$(tag))
create_manifest_for_platforms = $(DOCKER_BUILDX_BUILD_CLI) imagetools create -t $3 $(foreach platform,$1,\
-f $2/image_$(call slugify,$(platform)) -f $2/attestation_$(call slugify,$(platform)))
-f $2/image_$(call slugify,$(platform)))

# image_digests returns a json list of image digests and other info for platforms, in the form {image: "$image_tag",
# digest: "$digest", os: "$os", architecture: "$arch"}
Expand Down Expand Up @@ -365,8 +363,7 @@ operator_manifest: operator_images
# packages helm chart
chart:
@cp README.md ./helm/trident-operator/
@$(HELM_CMD) package --app-version $(TRIDENT_VERSION) --version $(TRIDENT_VERSION) ./helm/trident-operator \
$(if $(HELM_PGP_KEY),--sign --key "$(HELM_PGP_KEY)" --keyring "$(HELM_PGP_KEYRING)")
@$(HELM_CMD) package ./helm/trident-operator $(if $(HELM_PGP_KEY),--sign --key "$(HELM_PGP_KEY)" --keyring "$(HELM_PGP_KEYRING)")
@rm -f ./helm/trident-operator/README.md

# builds installer bundle. Skips binaries that have not been built.
Expand Down
2 changes: 1 addition & 1 deletion helm/trident-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: trident-operator
version: 1.0.0
version: 1.24.1 # Demote CalVer fields and prepend 1
kubeVersion: ">= 1.21.0-0"
description: "A Helm chart for deploying NetApp's Trident CSI storage provisioner using the Trident Operator."
type: application
Expand Down
1 change: 0 additions & 1 deletion helm/trident-operator/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ helm.sh/chart: {{ include "trident.chart" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Expand Down

0 comments on commit afedd4e

Please sign in to comment.