diff --git a/deploy_carvel/build.sh b/deploy_carvel/build.sh new file mode 100755 index 00000000..635b97f8 --- /dev/null +++ b/deploy_carvel/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# TODO: since I removed the deployments there is not much in the ./imgpkg/images.yaml output +# +# build images found in these directories. +# make use of build.yaml files to specify how builds should work, +# if we need it to be done. +# kbld --file ./concierge/config --imgpkg-lock-output ./concierge/.imgpkg/images.yml + +# schema generation from values.yaml +# TODO: figure out why this isn't working. +ytt --file supervisor/config/values.yaml --data-values-schema-inspect --output openapi-v3 > supervisor/schema-openapi.yml +# ytt --file concierge/config/values.yaml --data-values-schema-inspect --output openapi-v3 > concierge/schema-openapi.yml diff --git a/deploy_carvel/delete_pinn.sh b/deploy_carvel/delete_pinn.sh new file mode 100755 index 00000000..cd32928b --- /dev/null +++ b/deploy_carvel/delete_pinn.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# not a lot to this. +kapp delete --app pinn-super && kapp delete --app pinn-conci diff --git a/deploy_carvel/deploy_concierge.sh b/deploy_carvel/deploy_concierge.sh new file mode 100755 index 00000000..12d5cf9b --- /dev/null +++ b/deploy_carvel/deploy_concierge.sh @@ -0,0 +1,41 @@ +#!/bin/bash + + +APP="pinn-conci" + +kapp deploy --app "${APP}" --diff-changes --file <(ytt \ + --file concierge/config/authentication.concierge.pinniped.dev_jwtauthenticators.yaml + --file concierge/config/authentication.concierge.pinniped.dev_webhookauthenticcators.yaml + --file concierge/config/config.concierge.pinniped.dev_credential_issuers.yaml + --file concierge/config/deployment-HACKED.yaml \ + --file concierge/config/helpers.lib.yaml \ + --file concierge/config/rbac.yaml \ + --file concierge/config/z0_crd_overlay.yaml \ + --file concierge/config/values.yaml \ + --data-value app_name=pinn-conci \ + --data-value namespace=pinn-conci \ + --data-value-yaml 'custom_labels={"foo": bar}' \ + --data-value replicas=3) + + +## template the thing +#RENDER_OUTPUT_FILE=$( +#ytt \ +# --file concierge/config/helpers.lib.yaml \ +# --file concierge/config/deployment.yaml \ +# --file concierge/config/service.yaml \ +# --file concierge/config/values.yaml \ +# --data-value app_name=pinn-super \ +# --data-value namespace=pinn-super \ +# --data-value-yaml 'custom_labels={"foo": bar}' \ +# --data-value replicas=3 +#) +# +## view it +#echo "$RENDER_OUTPUT_FILE" +# +## give it to kapp +#kapp deploy \ +# --app pinn-super \ +# --diff-changes \ +# --file <( "${RENDER_OUTPUT_FILE}" ) diff --git a/deploy_carvel/deploy_supervisor.sh b/deploy_carvel/deploy_supervisor.sh new file mode 100755 index 00000000..fd3915e5 --- /dev/null +++ b/deploy_carvel/deploy_supervisor.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# need to maintain this if used. +# but there must be a way to get ytt to read a directory of files. +#RENDERED_OUTPUT_FILES=$( +#ytt \ +# --file supervisor/config/helpers.lib.yaml \ +# --file supervisor/config/config.supervisor.pinniped.dev_federationdomains.yaml \ +# --file supervisor/config/config.supervisor.pinniped.dev_oidcclients.yaml \ +# --file supervisor/config/idp.supervisor.pinniped.dev_activedirectoryidentityproviders.yaml \ +# --file supervisor/config/idp.supervisor.pinniped.dev_ldapidentityproviders.yaml \ +# --file supervisor/config/idp.supervisor.pinniped.dev_oidcidentityproviders.yaml \ +# --file supervisor/config/z0_crd_overlay.yaml \ +# --file supervisor/config/rbac.yaml \ +# --file supervisor/config/service.yaml \ +# --file supervisor/config/deployment.yaml \ +# --file supervisor/config/values.yaml \ +# --data-value app_name=pinn-super \ +# --data-value namespace=pinn-super \ +# --data-value-yaml 'custom_labels={"foo": bar}' \ +# --data-value replicas=3 +#) +# +#echo "${RENDERED_OUTPUT_FILES}" + +APP="pinn-super" + +kapp deploy --app "${APP}" --diff-changes --file <(ytt \ + --file supervisor/config/helpers.lib.yaml \ + --file supervisor/config/config.supervisor.pinniped.dev_federationdomains.yaml \ + --file supervisor/config/config.supervisor.pinniped.dev_oidcclients.yaml \ + --file supervisor/config/idp.supervisor.pinniped.dev_activedirectoryidentityproviders.yaml \ + --file supervisor/config/idp.supervisor.pinniped.dev_ldapidentityproviders.yaml \ + --file supervisor/config/idp.supervisor.pinniped.dev_oidcidentityproviders.yaml \ + --file supervisor/config/z0_crd_overlay.yaml \ + --file supervisor/config/rbac.yaml \ + --file supervisor/config/service.yaml \ + --file supervisor/config/deployment-HACKED.yaml \ + --file supervisor/config/values.yaml \ + --data-value app_name=pinn-super \ + --data-value namespace=pinn-super \ + --data-value-yaml 'custom_labels={"foo": bar}' \ + --data-value replicas=3) + + +## template the thing +#RENDER_OUTPUT_FILE=$( +#ytt \ +# --file supervisor/config/helpers.lib.yaml \ +# --file supervisor/config/deployment.yaml \ +# --file supervisor/config/service.yaml \ +# --file supervisor/config/values.yaml \ +# --data-value app_name=pinn-super \ +# --data-value namespace=pinn-super \ +# --data-value-yaml 'custom_labels={"foo": bar}' \ +# --data-value replicas=3 +#) +# +## view it +#echo "$RENDER_OUTPUT_FILE" +# +## give it to kapp +#kapp deploy \ +# --app pinn-super \ +# --diff-changes \ +# --file <( "${RENDER_OUTPUT_FILE}" )