# unpackPhase # patchPhase # configurePhase # buildPhase # checkPhase # installPhase # fixupPhase # installCheckPhase # distPhase { lib, stdenv, fetchFromGitHub, writeShellScript, k8s, ... }: let bootstrap_script = (writeShellScript "bootstrap-script" bootstrap_script_body); bootstrap_script_body = ('' set -euo pipefail IFS=$'\n\t' DIR="$( cd "$( dirname "''${BASH_SOURCE[0]}" )" && pwd )" ${apply_manifests} echo "Bootstrap finished" ''); manifests = ( lib.concatMapStringsSep "," lib.escapeShellArg ( [ ./files/manifests/initial_clusterrole.yaml ] ++ gateway_crds ++ [ "${k8s.cilium-manifest}/cilium.yaml" "${k8s.coredns-manifest}/coredns.yaml" ./files/manifests/flux_namespace.yaml # # Generate with: helm template --dry-run=server flux-operator oci://ghcr.io/controlplaneio-fluxcd/charts/flux-operator --namespace flux-system --create-namespace # ./files/manifests/flux.yaml ./files/manifests/flux_instance.yaml ] ++ (lib.attrsets.mapAttrsToList ( secret_name: secret_value: "${secret_value}/${secret_name}.yaml" ) k8s.k8s-secrets-generic) ++ [ ./files/manifests/flux_apply_git.yaml ] ) ); apply_manifests = "kubectl --kubeconfig=${k8s.client-configs.admin}/admin.kubeconfig apply --server-side --force-conflicts -f ${manifests}"; gateway_crds_repo = fetchFromGitHub { owner = "kubernetes-sigs"; repo = "gateway-api"; rev = "v1.4.1"; sha256 = "sha256-/GHyikcC2QGDN0ndpY6/xvSEEnpSsLrNU+lFElCKBs8="; }; gateway_crds = [ "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_backendtlspolicies.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_referencegrants.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.x-k8s.io_xmeshes.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_udproutes.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_tlsroutes.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.x-k8s.io_xbackendtrafficpolicies.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.x-k8s.io_xlistenersets.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_tcproutes.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml" "${gateway_crds_repo}/config/crd/experimental/gateway.networking.k8s.io_grpcroutes.yaml" ]; in stdenv.mkDerivation (finalAttrs: { name = "bootstrap-script"; nativeBuildInputs = [ ]; buildInputs = [ ]; unpackPhase = "true"; installPhase = '' cp ${bootstrap_script} "$out" ''; })