Fix: default image_repo for supervisor,concierge, packages installed in
global kapp-controller-packaging-global
This commit is contained in:
parent
3097a263cd
commit
e873f11284
@ -77,6 +77,7 @@ mkdir -p "./${PACKAGE_REPOSITORY_DIR}/packages/supervisor.pinniped.dev"
|
|||||||
|
|
||||||
PACKAGE_INSTALL_DIR="temp_actual_deploy_resources"
|
PACKAGE_INSTALL_DIR="temp_actual_deploy_resources"
|
||||||
rm -rf "./${PACKAGE_INSTALL_DIR}"
|
rm -rf "./${PACKAGE_INSTALL_DIR}"
|
||||||
|
mkdir "./${PACKAGE_INSTALL_DIR}"
|
||||||
|
|
||||||
## TODO:
|
## TODO:
|
||||||
## "${resource_name}/deployment.yml" vs "${resource_name}/deployment-HACKED.yml"
|
## "${resource_name}/deployment.yml" vs "${resource_name}/deployment-HACKED.yml"
|
||||||
@ -188,18 +189,19 @@ PINNIPED_PACKAGE_RBAC_FILE="./${PACKAGE_INSTALL_DIR}/${PINNIPED_PACKAGE_RBAC_PRE
|
|||||||
|
|
||||||
echo -n "" > "${PINNIPED_PACKAGE_RBAC_FILE}"
|
echo -n "" > "${PINNIPED_PACKAGE_RBAC_FILE}"
|
||||||
cat <<EOF >> "${PINNIPED_PACKAGE_RBAC_FILE}"
|
cat <<EOF >> "${PINNIPED_PACKAGE_RBAC_FILE}"
|
||||||
---
|
# ---
|
||||||
apiVersion: v1
|
# apiVersion: v1
|
||||||
kind: Namespace
|
# kind: Namespace
|
||||||
metadata:
|
# metadata:
|
||||||
name: "${NAMESPACE}"
|
# name: "${NAMESPACE}" <--- "supervisor-ns" will cause other package install errors.
|
||||||
---
|
---
|
||||||
# ServiceAccount details from the file linked above
|
# ServiceAccount details from the file linked above
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: "${PINNIPED_PACKAGE_RBAC_PREFIX}-sa-superadmin-dangerous"
|
name: "${PINNIPED_PACKAGE_RBAC_PREFIX}-sa-superadmin-dangerous"
|
||||||
namespace: "${NAMESPACE}"
|
# namespace: "${NAMESPACE}"
|
||||||
|
namespace: default # --> sticking to default for everything for now.
|
||||||
---
|
---
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
apiVersion: rbac.authorization.k8s.io/v1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
@ -217,7 +219,8 @@ metadata:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: "${PINNIPED_PACKAGE_RBAC_PREFIX}-sa-superadmin-dangerous"
|
name: "${PINNIPED_PACKAGE_RBAC_PREFIX}-sa-superadmin-dangerous"
|
||||||
namespace: "${NAMESPACE}"
|
# namespace: "${NAMESPACE}"
|
||||||
|
namespace: default # --> sticking to default for everything for now.
|
||||||
roleRef:
|
roleRef:
|
||||||
apiGroup: rbac.authorization.k8s.io
|
apiGroup: rbac.authorization.k8s.io
|
||||||
kind: ClusterRole
|
kind: ClusterRole
|
||||||
@ -228,7 +231,7 @@ EOF
|
|||||||
kapp deploy --app "${PINNIPED_PACKAGE_RBAC_PREFIX}" --file "${PINNIPED_PACKAGE_RBAC_FILE}" -y
|
kapp deploy --app "${PINNIPED_PACKAGE_RBAC_PREFIX}" --file "${PINNIPED_PACKAGE_RBAC_FILE}" -y
|
||||||
done
|
done
|
||||||
|
|
||||||
#FOOBAR="pinniped-package-rbac"
|
|
||||||
#PINNIPED_PACKAGE_RBAC_FILE="./${PACKAGE_INSTALL_DIR}/${PINNIPED_PACKAGE_RBAC_PREFIX}-rbac.yml"
|
#PINNIPED_PACKAGE_RBAC_FILE="./${PACKAGE_INSTALL_DIR}/${PINNIPED_PACKAGE_RBAC_PREFIX}-rbac.yml"
|
||||||
## TODO: obviously a mega-role that can do everything is not good.
|
## TODO: obviously a mega-role that can do everything is not good.
|
||||||
#echo -n "" > "${PINNIPED_PACKAGE_RBAC_FILE}"
|
#echo -n "" > "${PINNIPED_PACKAGE_RBAC_FILE}"
|
||||||
@ -250,7 +253,8 @@ kind: PackageInstall
|
|||||||
metadata:
|
metadata:
|
||||||
# name, does not have to be versioned, versionSelection.constraints below will handle
|
# name, does not have to be versioned, versionSelection.constraints below will handle
|
||||||
name: "${resource_name}-package-install"
|
name: "${resource_name}-package-install"
|
||||||
namespace: "${NAMESPACE}" # TODO: ---????? is this namespace ok?
|
# namespace: "${NAMESPACE}"
|
||||||
|
namespace: default # --> sticking to default for everything for now.
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: "${PINNIPED_PACKAGE_RBAC_PREFIX}-sa-superadmin-dangerous"
|
serviceAccountName: "${PINNIPED_PACKAGE_RBAC_PREFIX}-sa-superadmin-dangerous"
|
||||||
packageRef:
|
packageRef:
|
||||||
|
8
deploy_carvel/delete.sh
Executable file
8
deploy_carvel/delete.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# unfortunately all by hand.
|
||||||
|
|
||||||
|
kubectl delete ns supervisor-ns
|
||||||
|
kubectl delete ns concierge-ns
|
||||||
|
kubectl delete packageinstall concierge-package-install
|
||||||
|
kubectl delete packageinstall supervisor-package-install
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# not a lot to this.
|
|
||||||
kapp delete --app pinn-super && kapp delete --app pinn-conci
|
|
@ -2,7 +2,7 @@ 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: concierge-ns
|
namespace: kapp-controller-packaging-global
|
||||||
spec:
|
spec:
|
||||||
refName: concierge.pinniped.dev
|
refName: concierge.pinniped.dev
|
||||||
version: 0.25.0
|
version: 0.25.0
|
||||||
|
@ -2,7 +2,7 @@ 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: supervisor-ns
|
namespace: kapp-controller-packaging-global
|
||||||
spec:
|
spec:
|
||||||
refName: supervisor.pinniped.dev
|
refName: supervisor.pinniped.dev
|
||||||
version: 0.25.0
|
version: 0.25.0
|
||||||
@ -39,9 +39,8 @@ spec:
|
|||||||
default: 2
|
default: 2
|
||||||
image_repo:
|
image_repo:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
|
||||||
description: Specify either an image_digest or an image_tag. If both are given, only image_digest will be used.
|
description: Specify either an image_digest or an image_tag. If both are given, only image_digest will be used.
|
||||||
default: null
|
default: projects.registry.vmware.com/pinniped/pinniped-server
|
||||||
image_digest:
|
image_digest:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
@ -49,9 +48,8 @@ spec:
|
|||||||
default: null
|
default: null
|
||||||
image_tag:
|
image_tag:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
|
||||||
description: Specify either an image_digest or an image_tag. If both are given, only image_digest will be used.
|
description: Specify either an image_digest or an image_tag. If both are given, only image_digest will be used.
|
||||||
default: null
|
default: latest
|
||||||
package_image_repo:
|
package_image_repo:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
Loading…
Reference in New Issue
Block a user