remove namespace from PackageRepository,Package,PackageMetadata resources

This commit is contained in:
Benjamin A. Petersen 2023-08-30 17:30:49 -04:00
parent e297f05603
commit 1ec75ba8ca
No known key found for this signature in database
GPG Key ID: EF6EF83523A4BE46
9 changed files with 3 additions and 17 deletions

View File

@ -91,11 +91,6 @@ do
echo_yellow "handling ${resource_name}..." echo_yellow "handling ${resource_name}..."
# just simple templating # just simple templating
# ytt --file "./${resource_name}}/config/"
# template, but process with kbld to update the yaml files with image digests such as
# image: index.docker.io/<repo>/<image>@sha256:<hash>
# ytt --file "./${resource_name}}/config/" | kbld --file -
echo_yellow "generating ${resource_name}/.imgpkg/images.yaml" echo_yellow "generating ${resource_name}/.imgpkg/images.yaml"
# there are bits for image substitution in some of the ytt commands # there are bits for image substitution in some of the ytt commands
kbld --file "./${resource_name}/config/" --imgpkg-lock-output "./${resource_name}/.imgpkg/images.yml" kbld --file "./${resource_name}/config/" --imgpkg-lock-output "./${resource_name}/.imgpkg/images.yml"
@ -121,7 +116,6 @@ do
--file "${resource_name}/package-template.yml" \ --file "${resource_name}/package-template.yml" \
--data-value-file openapi="$(pwd)/${resource_name}/schema-openapi.yml" \ --data-value-file openapi="$(pwd)/${resource_name}/schema-openapi.yml" \
--data-value package_version="${PINNIPED_PACKAGE_VERSION}" \ --data-value package_version="${PINNIPED_PACKAGE_VERSION}" \
--data-value namespace="${KAPP_CONTROLLER_GLOBAL_NAMESPACE}" \
--data-value package_image_repo="${package_push_repo_location}" > "${PACKAGE_REPOSITORY_DIR}/packages/${resource_package_version}/${PINNIPED_PACKAGE_VERSION}.yml" --data-value package_image_repo="${package_push_repo_location}" > "${PACKAGE_REPOSITORY_DIR}/packages/${resource_package_version}/${PINNIPED_PACKAGE_VERSION}.yml"
echo_yellow "generating ./${PACKAGE_REPOSITORY_DIR}/packages/${resource_package_version}/metadata.yml" echo_yellow "generating ./${PACKAGE_REPOSITORY_DIR}/packages/${resource_package_version}/metadata.yml"
@ -129,7 +123,6 @@ do
--file "${resource_name}/metadata.yml" \ --file "${resource_name}/metadata.yml" \
--data-value-file openapi="$(pwd)/${resource_name}/schema-openapi.yml" \ --data-value-file openapi="$(pwd)/${resource_name}/schema-openapi.yml" \
--data-value package_version="${PINNIPED_PACKAGE_VERSION}" \ --data-value package_version="${PINNIPED_PACKAGE_VERSION}" \
--data-value namespace="${KAPP_CONTROLLER_GLOBAL_NAMESPACE}" \
--data-value package_image_repo="${package_push_repo_location}" > "${PACKAGE_REPOSITORY_DIR}/packages/${resource_package_version}/metadata.yml" --data-value package_image_repo="${package_push_repo_location}" > "${PACKAGE_REPOSITORY_DIR}/packages/${resource_package_version}/metadata.yml"
done done
@ -149,7 +142,7 @@ echo_yellow "deploying PackageRepository..."
PINNIPED_PACKGE_REPOSITORY_NAME="pinniped-package-repository" PINNIPED_PACKGE_REPOSITORY_NAME="pinniped-package-repository"
PINNIPED_PACKGE_REPOSITORY_FILE="packagerepository.${PINNIPED_PACKAGE_VERSION}.yml" PINNIPED_PACKGE_REPOSITORY_FILE="packagerepository.${PINNIPED_PACKAGE_VERSION}.yml"
echo -n "" > "${PINNIPED_PACKGE_REPOSITORY_FILE}" echo -n "" > "${PINNIPED_PACKGE_REPOSITORY_FILE}"
# kapp-controller's packaging-global-namespace does not apply to PackageRepository
cat <<EOT >> "${PINNIPED_PACKGE_REPOSITORY_FILE}" cat <<EOT >> "${PINNIPED_PACKGE_REPOSITORY_FILE}"
--- ---
apiVersion: packaging.carvel.dev/v1alpha1 apiVersion: packaging.carvel.dev/v1alpha1

View File

@ -5,7 +5,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata kind: PackageMetadata
metadata: metadata:
name: concierge.pinniped.dev name: concierge.pinniped.dev
namespace: #@ data.values.namespace
spec: spec:
displayName: "Pinniped Concierge" displayName: "Pinniped Concierge"
longDescription: "Pinniped concierge enables consistent login across Kubernetes clusters on public cloud providers such as AKS, EKS and GKE" longDescription: "Pinniped concierge enables consistent login across Kubernetes clusters on public cloud providers such as AKS, EKS and GKE"

View File

@ -5,7 +5,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package kind: Package
metadata: metadata:
name: #@ "concierge.pinniped.dev." + data.values.package_version name: #@ "concierge.pinniped.dev." + data.values.package_version
namespace: #@ data.values.namespace
spec: spec:
refName: concierge.pinniped.dev refName: concierge.pinniped.dev
version: #@ data.values.package_version version: #@ data.values.package_version

View File

@ -7,12 +7,12 @@ images:
- resolved: - resolved:
tag: 0.25.0 tag: 0.25.0
url: benjaminapetersen/pinniped-package-repo-package-concierge:0.25.0 url: benjaminapetersen/pinniped-package-repo-package-concierge:0.25.0
image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-concierge@sha256:eb9f9d4ad2690443b7824a183c2a296a744995559285352422f94f2295c4a754 image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-concierge@sha256:bcf825330cf8946b4c9a7a0cc7a774748dd519c4fe1c22a076b64dc9f369c59c
- annotations: - annotations:
kbld.carvel.dev/id: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0 kbld.carvel.dev/id: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0
kbld.carvel.dev/origins: | kbld.carvel.dev/origins: |
- resolved: - resolved:
tag: 0.25.0 tag: 0.25.0
url: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0 url: benjaminapetersen/pinniped-package-repo-package-supervisor:0.25.0
image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-supervisor@sha256:3da81c3b0554e4e59ee1c8e63d582a753c9b9c7deb170d35209d3f1ee7df2245 image: index.docker.io/benjaminapetersen/pinniped-package-repo-package-supervisor@sha256:12577787d82b4f565be28c65c229c87dd8ac9890d0f44a690725fdb4ac7f4082
kind: ImagesLock kind: ImagesLock

View File

@ -2,7 +2,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package kind: Package
metadata: metadata:
name: concierge.pinniped.dev.0.25.0 name: concierge.pinniped.dev.0.25.0
namespace: kapp-controller-packaging-global
spec: spec:
refName: concierge.pinniped.dev refName: concierge.pinniped.dev
version: 0.25.0 version: 0.25.0

View File

@ -2,7 +2,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package kind: Package
metadata: metadata:
name: supervisor.pinniped.dev.0.25.0 name: supervisor.pinniped.dev.0.25.0
namespace: kapp-controller-packaging-global
spec: spec:
refName: supervisor.pinniped.dev refName: supervisor.pinniped.dev
version: 0.25.0 version: 0.25.0

View File

@ -2,7 +2,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata kind: PackageMetadata
metadata: metadata:
name: supervisor.pinniped.dev name: supervisor.pinniped.dev
namespace: kapp-controller-packaging-global
spec: spec:
displayName: Pinniped Supervisor displayName: Pinniped Supervisor
longDescription: Pinniped supervisor allows seamless login across one or many Kubernetes clusters including AKS, EKS and GKE longDescription: Pinniped supervisor allows seamless login across one or many Kubernetes clusters including AKS, EKS and GKE

View File

@ -5,7 +5,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: PackageMetadata kind: PackageMetadata
metadata: metadata:
name: supervisor.pinniped.dev name: supervisor.pinniped.dev
namespace: #@ data.values.namespace
spec: spec:
displayName: "Pinniped Supervisor" displayName: "Pinniped Supervisor"
longDescription: "Pinniped supervisor allows seamless login across one or many Kubernetes clusters including AKS, EKS and GKE" longDescription: "Pinniped supervisor allows seamless login across one or many Kubernetes clusters including AKS, EKS and GKE"

View File

@ -5,7 +5,6 @@ apiVersion: data.packaging.carvel.dev/v1alpha1
kind: Package kind: Package
metadata: metadata:
name: #@ "supervisor.pinniped.dev." + data.values.package_version name: #@ "supervisor.pinniped.dev." + data.values.package_version
namespace: #@ data.values.namespace
spec: spec:
refName: supervisor.pinniped.dev refName: supervisor.pinniped.dev
version: #@ data.values.package_version version: #@ data.values.package_version