Skip to content

Commit

Permalink
Merge pull request #96 from cynepco3hahue/remove_operator
Browse files Browse the repository at this point in the history
Remove operator controller
  • Loading branch information
Artyom Lukianov authored Oct 28, 2019
2 parents 94ddccd + e08173c commit 3af2623
Show file tree
Hide file tree
Showing 95 changed files with 170 additions and 11,604 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ deploy:
api_key:
secure: "ctWuRUf7LvZSylWveiTIHre200iS1pR5yK8mmkKj56Ra1JlgR5m0HpAAWbBJL9DaXMmhwGyu9A1h99hXBNPetKRGniyQO2LUiXNFEhL3XZarF/fiX8aZOKBLTfylUfx8r1stHvSYg5UTADksHPO2K9/Zezf9vJIi4M2y3LiAAzI23FngNCPJSm00DsWmK21zCzNg1wwjpXjCDBP9ZXcrKFZ+Ug8jIqO9zRIPNYgE/T8SkJLcwf9w+GaDLe5j2/lpFvdmFZD5WBuWyxEOX2UCGwqMhhvrn6RYLMGPlq5nG8HJYztDMLILUllPQ/FyivZWecWG9GuIuYuutyMq7byME5F+eFYC3ky54GPB31D2CQm9GjkNwIwr1s3U/nOGBXXmuBPpeuyFqYklUhEr+47uvIbb2NgipkKsPkQSwvpLFBbO3j+4iaHy130N6ZHLHGfb6yFX+XN7Qq3vQ3wKMKd/8XnScjmWUbOcw0TnpvVfUAKzJ/27UfMt/KYvbfL8rBMvcRaGVyjKMqAc/qGj/st+jcyyOR5zstJ3Vm3uSrirCJoLLJ2LKp8LzKGv+07QRRgzvMBk1uCCD5z2ElGoVjUBXmRnDCMsIZDOjmBB2sW/xv5gfnxX3gRtuJ9h1YGjoixpn1BE7b7g9lXgeI+abC4J6kRq8LwX88B6p4yK+xQCrOE="
file:
- _out/manifests/release/machine-remediation-operator.$TRAVIS_TAG.yaml
- _out/manifests/release/machine-remediation-operator-cr.$TRAVIS_TAG.yaml
- _out/manifests/release/machine-remediation-operator-csv.$TRAVIS_TAG.yaml
- _out/manifests/release/machine-remediation.$TRAVIS_TAG.yaml
prerelease: true
overwrite: true
name: "$TRAVIS_TAG"
Expand Down
1 change: 0 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ container_bundle(
images = {
# cmd images
"$(container_prefix)/machine-remediation:$(container_tag)": "//cmd/machine-remediation:machine-remediation-image",
"$(container_prefix)/machine-remediation-operator:$(container_tag)": "//cmd/machine-remediation-operator:machine-remediation-operator-image",
},
)

Expand Down
10 changes: 2 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fmt:
./hack/dockerized "./hack/bazel/fmt.sh"

.PHONY: generate
generate: generate-clean generate-crds generate-client generate-templates generate-csv generate-manifests bazel-generate
generate: generate-clean generate-crds generate-client generate-templates generate-manifests bazel-generate

.PHONY: generate-clean
generate-clean:
Expand All @@ -77,17 +77,11 @@ generate-crds:
generate-client:
./hack/dockerized "./hack/generate/client.sh"

.PHONY: generate-csv
generate-csv:
./hack/dockerized "./hack/generate/csv.sh"

.PHONY: generate-manifests
generate-manifests: generate-templates
./hack/dockerized "CONTAINER_TAG=${CONTAINER_TAG} \
CSV_VERSION=${CSV_VERSION} \
CSV_PREVIOUS_VERSION=${CSV_PREVIOUS_VERSION} \
IMAGE_PULL_POLICY=${IMAGE_PULL_POLICY} \
OPERATOR_IMAGE=${OPERATOR_IMAGE} \
OPERATOR_IMAGE=${MR_IMAGE} \
./hack/generate/manifests.sh"

.PHONY: generate-templates
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Machine Remediation Operator
# Machine Remediation

## Remediation Flow

Expand All @@ -10,8 +10,6 @@ The machine remediation operator deploys components to monitor and remediate unh

It should deploy three controllers:

* [machine-health-check](docs/machine-health-check.md) controller
* [machine-disruption-budget](docs/machine-disruption-budget.md) controller
* [machine-remediation](docs/machine-remediation.md) controller

## How to deploy
Expand Down
40 changes: 40 additions & 0 deletions cluster-up/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
#
# This file is part of the KubeVirt project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Copyright 2019 Red Hat, Inc.
#

set -e
if [ ! -c /dev/kvm ]; then
echo "[ERR ] missing /dev/kvm"
else
echo "[ OK ] found /dev/kvm"
fi

KVM_ARCH=""
KVM_NESTED="unknown"
if [ -f "/sys/module/kvm_intel/parameters/nested" ]; then
KVM_NESTED=$( cat /sys/module/kvm_intel/parameters/nested )
KVM_ARCH="intel"
elif [ -f "/sys/module/kvm_amd/parameters/nested" ]; then
KVM_NESTED=$( cat /sys/module/kvm_amd/parameters/nested )
KVM_ARCH="amd"
fi
if [ "$KVM_NESTED" != "Y" ]; then
echo "[ERR ] $KVM_ARCH nested virtualization not enabled"
else
echo "[ OK ] $KVM_ARCH nested virtualization enabled"
fi
9 changes: 6 additions & 3 deletions cluster-up/cluster/ephemeral-provider-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

set -e

_cli_container="kubevirtci/gocli@sha256:a7880757e2d2755c6a784c1b64c64b096769ed3ccfac9d8e535df481731c2144"
_cli_with_tty="docker run --privileged --net=host --rm -t -v /var/run/docker.sock:/var/run/docker.sock ${_cli_container}"
_cli="docker run --privileged --net=host --rm ${USE_TTY} -v /var/run/docker.sock:/var/run/docker.sock ${_cli_container}"
if [ "${KUBEVIRTCI_RUNTIME}" = "podman" ]; then
_cli="pack8s"
else
_cli_container="kubevirtci/gocli@sha256:f6145018927094a6b62ac89fdb26f5901cb8030d9120f620b2490c9c9c25655a"
_cli="docker run --privileged --net=host --rm ${USE_TTY} -v /var/run/docker.sock:/var/run/docker.sock ${_cli_container}"
fi

function _main_ip() {
echo 127.0.0.1
Expand Down
21 changes: 16 additions & 5 deletions cluster-up/cluster/okd-4.1/provider.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,32 @@

set -e

image="okd-4.1@sha256:03b08bf66bf33c3ae1a1f63f1184761535513395e7b9c4cd496e22fc1eb2206b"
image="okd-4.1@sha256:2b7b5e09b9bdf2ca40b8e153a111702584e2a3e802643e3e7df1f2d97eca0ce8"

source ${KUBEVIRTCI_PATH}/cluster/ephemeral-provider-common.sh

function _port() {
${_cli} ports --prefix $provider_prefix --container-name cluster "$@"
}

function _install_from_cluster() {
local src_cid="$1"
local src_file="$2"
local dst_perms="$3"
local dst_file="${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/$4"

touch $dst_file
chmod $dst_perms $dst_file
docker exec $src_cid cat $src_file > $dst_file
}

function up() {
workers=$(($KUBEVIRT_NUM_NODES-1))
if [[ ( $workers < 1 ) ]]; then
workers=1
fi
echo "Number of workers: $workers"
params="--random-ports --background --prefix $provider_prefix --master-cpu 6 --workers-cpu 6 --registry-volume $(_registry_volume) --workers $workers kubevirtci/${image}"
params="--random-ports --background --prefix $provider_prefix --master-cpu 6 --workers-cpu 6 --workers-memory 8192 --secondary-nics ${KUBEVIRT_NUM_SECONDARY_NICS} --registry-volume $(_registry_volume) --workers $workers kubevirtci/${image}"
if [[ ! -z "${RHEL_NFS_DIR}" ]]; then
params=" --nfs-data $RHEL_NFS_DIR ${params}"
fi
Expand All @@ -29,9 +40,9 @@ function up() {

# Copy k8s config and kubectl
cluster_container_id=$(docker ps -f "name=$provider_prefix-cluster" --format "{{.ID}}")
docker cp $cluster_container_id:/bin/oc ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubectl
chmod u+x ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubectl
docker cp $cluster_container_id:/root/install/auth/kubeconfig ${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubeconfig

_install_from_cluster $cluster_container_id /bin/oc 0755 .kubectl
_install_from_cluster $cluster_container_id /root/install/auth/kubeconfig 0644 .kubeconfig

# Set server and disable tls check
export KUBECONFIG=${KUBEVIRTCI_CONFIG_PATH}/$KUBEVIRT_PROVIDER/.kubeconfig
Expand Down
71 changes: 0 additions & 71 deletions cmd/machine-remediation-operator/BUILD.bazel

This file was deleted.

90 changes: 0 additions & 90 deletions cmd/machine-remediation-operator/main.go

This file was deleted.

39 changes: 0 additions & 39 deletions docs/disable-fencing.txt

This file was deleted.

Loading

0 comments on commit 3af2623

Please sign in to comment.