diff --git a/bin/kubernetes-extras.sh b/bin/kubernetes-extras.sh index 3c60ff7b..94b8ba27 100755 --- a/bin/kubernetes-extras.sh +++ b/bin/kubernetes-extras.sh @@ -11,6 +11,19 @@ export PULUMI_SKIP_CONFIRMATIONS=true script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +echo " " +echo "IMPORTANT NOTICE!" +echo "====================================================================================================" +echo " This script and the associated Pulumi projects are deprecated and will be removed in a future " +echo " release as they are outside of the scope of the MARA project." +echo " " +echo " The MARA team no longer tests or updates these scripts, so please review before running if you " +echo " decide that you want to use them." +echo " " +echo " For more information, please see Discussion #155 in the repository (nginx.com/mara)" +echo "====================================================================================================" +sleep 5 + # Check to see if the venv has been installed, since this is only going to be used to start pulumi/python based # projects. diff --git a/bin/testcap.sh b/bin/testcap.sh index 6eeb0ca1..d8a49a3b 100755 --- a/bin/testcap.sh +++ b/bin/testcap.sh @@ -30,6 +30,16 @@ cleanitup() { fi } +echo " " +echo "IMPORTANT NOTICE!" +echo "====================================================================================================" +echo " This script is deprecated and will be removed in a future release. " +echo " " +echo " This script may not function properly in your environment; run at your own risk. " +echo " " +echo " For more information, please see Discussion #155 in the repository (nginx.com/mara)" +echo "====================================================================================================" +sleep 5 echo " " echo "This script will perform testing on the current kubernetes installation using the currently active kubernetes" diff --git a/pulumi/python/tools/README.md b/pulumi/python/tools/README.md index 306437f6..ba27c045 100644 --- a/pulumi/python/tools/README.md +++ b/pulumi/python/tools/README.md @@ -2,6 +2,10 @@ `/pulumi/python/tools` +## Deprecation Notice +These tools are no longer supported by the MARA team and will be removed in a future release. They *should* work +correctly, but this is not guaranteed. Any use is at your own risk. + ## Purpose This directory holds common tools that *may* be required by kubernetes installations that do not meet the minimum diff --git a/pulumi/python/tools/kubevip/Pulumi.yaml b/pulumi/python/tools/kubevip/Pulumi.yaml deleted file mode 100644 index 2073760f..00000000 --- a/pulumi/python/tools/kubevip/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: kubevip -runtime: - name: python - options: - virtualenv: ../../venv -config: ../common/config -description: Deploys kube-vip diff --git a/pulumi/python/tools/kubevip/__main__.py b/pulumi/python/tools/kubevip/__main__.py deleted file mode 100644 index f73158c9..00000000 --- a/pulumi/python/tools/kubevip/__main__.py +++ /dev/null @@ -1,63 +0,0 @@ -import pulumi -import ipaddress -import os -import pulumi_kubernetes as k8s -from pulumi_kubernetes.yaml import ConfigFile -from kic_util import pulumi_config - - -def pulumi_kube_project_name(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - kube_project_path = os.path.join(script_dir, '..', '..', '..', 'python', 'infrastructure', 'kubeconfig') - return pulumi_config.get_pulumi_project_name(kube_project_path) - - -def pulumi_ingress_project_name(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - ingress_project_path = os.path.join(script_dir, '..', 'nginx', 'ingress-controller') - return pulumi_config.get_pulumi_project_name(ingress_project_path) - - -# Where are our manifests? -def k8_manifest_location(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - k8_manifest_path = os.path.join(script_dir, 'manifests', 'kube-vip-cloud-controller.yaml') - return k8_manifest_path - - -stack_name = pulumi.get_stack() -project_name = pulumi.get_project() -kube_project_name = pulumi_kube_project_name() -pulumi_user = pulumi_config.get_pulumi_user() - -kube_stack_ref_id = f"{pulumi_user}/{kube_project_name}/{stack_name}" -kube_stack_ref = pulumi.StackReference(kube_stack_ref_id) -kubeconfig = kube_stack_ref.get_output('kubeconfig').apply(lambda c: str(c)) -kube_stack_ref.get_output('cluster_name').apply( - lambda s: pulumi.log.info(f'Cluster name: {s}')) - -k8s_provider = k8s.Provider(resource_name=f'ingress-controller', kubeconfig=kubeconfig) - -config = pulumi.Config('kubevip') -thecidr = config.require('thecidr') - -thenet = ipaddress.IPv4Network(thecidr, strict=False) -therange = str(thenet[0]) + "-" + str(thenet[-1]) - -k8_manifest = k8_manifest_location() - -kubevip = ConfigFile( - "kubevip", - file=k8_manifest) - -# Create a config map -kube_system_kubevip_config_map = k8s.core.v1.ConfigMap("kube_systemKubevipConfigMap", - api_version="v1", - data={ - "cidr-global": thecidr - }, - kind="ConfigMap", - metadata=k8s.meta.v1.ObjectMetaArgs( - name="kubevip", - namespace="kube-system", - )) diff --git a/pulumi/python/tools/kubevip/manifests/kube-vip-cloud-controller.yaml b/pulumi/python/tools/kubevip/manifests/kube-vip-cloud-controller.yaml deleted file mode 100644 index ad1a90dd..00000000 --- a/pulumi/python/tools/kubevip/manifests/kube-vip-cloud-controller.yaml +++ /dev/null @@ -1,70 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: kube-vip-cloud-controller - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - annotations: - rbac.authorization.kubernetes.io/autoupdate: "true" - name: system:kube-vip-cloud-controller-role -rules: - - apiGroups: ["coordination.k8s.io"] - resources: ["leases"] - verbs: ["get", "create", "update", "list", "put"] - - apiGroups: [""] - resources: ["configmaps", "endpoints","events","services/status", "leases"] - verbs: ["*"] - - apiGroups: [""] - resources: ["nodes", "services"] - verbs: ["list","get","watch","update"] ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: system:kube-vip-cloud-controller-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: system:kube-vip-cloud-controller-role -subjects: -- kind: ServiceAccount - name: kube-vip-cloud-controller - namespace: kube-system ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: kube-vip-cloud-provider - namespace: kube-system -spec: - serviceName: kube-vip-cloud-provider - podManagementPolicy: OrderedReady - replicas: 1 - revisionHistoryLimit: 10 - selector: - matchLabels: - app: kube-vip - component: kube-vip-cloud-provider - template: - metadata: - labels: - app: kube-vip - component: kube-vip-cloud-provider - spec: - containers: - - command: - - /kube-vip-cloud-provider - - --leader-elect-resource-name=kube-vip-cloud-controller - image: kubevip/kube-vip-cloud-provider:0.1 - name: kube-vip-cloud-provider - imagePullPolicy: Always - resources: {} - dnsPolicy: ClusterFirst - restartPolicy: Always - schedulerName: default-scheduler - securityContext: {} - terminationGracePeriodSeconds: 30 - serviceAccountName: kube-vip-cloud-controller