Skip to content

Commit

Permalink
poc: removed scheduler
Browse files Browse the repository at this point in the history
Signed-off-by: realanna <anna.reale@dynatrace.com>
  • Loading branch information
RealAnna committed Apr 19, 2023
1 parent 2ad5d81 commit 56b884b
Show file tree
Hide file tree
Showing 18 changed files with 7 additions and 62 deletions.
5 changes: 0 additions & 5 deletions .github/actions/deploy-klt-on-cluster/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@ runs:
kubectl apply -f ~/download/artifacts/metrics-operator-manifest-test
kubectl rollout status deployment metrics-operator -n keptn-lifecycle-toolkit-system -w
sed -i 's/imagePullPolicy: Always/imagePullPolicy: Never/g' ~/download/artifacts/scheduler-manifest-test/release.yaml
kubectl apply -f ~/download/artifacts/scheduler-manifest-test
kubectl rollout status deployment scheduler -n keptn-lifecycle-toolkit-system -w
kubectl rollout status deployment lifecycle-operator -n keptn-lifecycle-toolkit-system -w
- name: Install lifecycle-toolkit with helm
if: ${{ inputs.helm-install == 'true' }}
Expand All @@ -86,7 +82,6 @@ runs:
echo "Installing KLT using helm"
helm version
helm install -n keptn-lifecycle-toolkit-system --create-namespace toolkit ~/download/artifacts/keptn-lifecycle-toolkit.tgz \
--set scheduler.scheduler.imagePullPolicy=Never \
--set lifecycleOperator.manager.imagePullPolicy=Never \
--set metricsOperator.manager.imagePullPolicy=Never \
--set lifecycleOperator.manager.env.functionRunnerImage=localhost:5000/keptn/functions-runtime:${{ inputs.functions_runtime_tag }} \
Expand Down
3 changes: 0 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ documentation:
operator:
- operator/**/*

scheduler:
- scheduler/**/*

metrics-operator:
- metrics-operator/**/*

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ jobs:
folder: "operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "certificate-operator"
folder: "klt-cert-manager/"
steps:
Expand Down Expand Up @@ -121,8 +119,6 @@ jobs:
folder: "operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "functions-runtime"
folder: "functions-runtime/"
- name: "certificate-operator"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ jobs:
config:
- name: "lifecycle-operator"
folder: "operator/"
- name: "scheduler"
folder: "scheduler/"

steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ jobs:
folder: "operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "certificate-operator"
folder: "klt-cert-manager/"
steps:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/helm-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ jobs:
folder: "operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "functions-runtime"
folder: "functions-runtime/"
- name: "certificate-operator"
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jobs:
folder: "operator/"
- name: "metrics-operator"
folder: "metrics-operator/"
- name: "scheduler"
folder: "scheduler/"
- name: "functions-runtime"
folder: "functions-runtime/"
- name: "certificate-operator"
Expand Down Expand Up @@ -141,13 +139,6 @@ jobs:
path: ./operator/bin
key: build-tools-${{ github.ref_name }}

- name: Cache build tools scheduler
id: cache-build-tools-scheduler
uses: actions/cache@v3
with:
path: ./scheduler/bin
key: build-tools-${{ github.ref_name }}

- name: Cache build tools cert-manager
id: cache-build-tools-klt-cert-manager
uses: actions/cache@v3
Expand All @@ -165,8 +156,6 @@ jobs:
RELEASE_REGISTRY: ghcr.keptn.sh/keptn
CHART_APPVERSION: ${{ needs.release-please.outputs.tag_name }}
run: |
cd scheduler
make release-manifests
cd ../operator
make controller-gen release-manifests
cd ../klt-cert-manager
Expand All @@ -175,7 +164,6 @@ jobs:
make controller-gen release-manifests
cd ..
echo "---" >> operator/config/rendered/release.yaml
echo "---" >> scheduler/config/rendered/release.yaml
echo "---" >> klt-cert-manager/config/rendered/release.yaml
cat >> namespace.yaml << EOF
---
Expand All @@ -187,7 +175,6 @@ jobs:
EOF
cat namespace.yaml \
operator/config/rendered/release.yaml \
scheduler/config/rendered/release.yaml \
klt-cert-manager/config/rendered/release.yaml \
metrics-operator/config/rendered/release.yaml > manifest.yaml
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/security-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,13 @@ jobs:
sed -i 's/\- ..\/crd//' kustomization.yaml && kustomize build ./ > /tmp/metrics-operator-manifest.yaml
echo "---" >> /tmp/crds.yaml
cd ../crd && kustomize build ./ >> /tmp/crds.yaml
cd ../../../scheduler/manifests/install && kustomize build ./ > /tmp/scheduler-manifest.yaml
curl -s https://raw.githubusercontent.com/yannh/kubeconform/${{ matrix.version }}/scripts/openapi2jsonschema.py > /tmp/openapi2jsonschema.py
mkdir -p /tmp/schema && cd /tmp/schema
python3 ../openapi2jsonschema.py ../crds.yaml
cd .. && \
echo "---" >> operator-manifest.yaml && \
echo "---" >> scheduler-manifest.yaml && \
cat operator-manifest.yaml scheduler-manifest.yaml metrics-operator-manifest.yaml > manifest.yaml
cat operator-manifest.yaml metrics-operator-manifest.yaml > manifest.yaml
kubeconform \
-schema-location default \
-schema-location './schema/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' \
Expand Down Expand Up @@ -193,7 +191,6 @@ jobs:
- "functions-runtime"
- "lifecycle-operator"
- "metrics-operator"
- "scheduler"
- "certificate-operator"
steps:
- name: Download images
Expand All @@ -219,7 +216,6 @@ jobs:
artifact:
- "operator"
- "metrics-operator"
- "scheduler"
- "klt-cert-manager"

steps:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/validate-semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
deps
scopes: |
helm-chart
scheduler
operator
cert-manager
metrics-operator
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ kubeconfig
.dccache*

manifests/
/scheduler/config/rendered/release.yaml
/operator/config/rendered/release.yaml
/metrics-operator/config/rendered/release.yaml
/klt-cert-manager/config/rendered/release.yaml
Expand Down
1 change: 0 additions & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sonar.projectKey=keptn_lifecycle-toolkit
sonar.projectName=lifecycle-toolkit
sonar.cpd.exclusions=**/test_*.go,\
scheduler/test/e2e/fake/**/*.go,\
operator/apis/lifecycle/v1alpha1/**/*.go,\
operator/apis/lifecycle/v1alpha2/**/*.go,\
metrics-operator/api/v1alpha1/**/*.go,\
Expand Down
1 change: 0 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
#
* @thisthat @thschue @bacherfl
/.github/ @thisthat @thschue @bacherfl @mowies @philipp-hinteregger
/scheduler/ @thisthat @thschue @bacherfl @RealAnna
/docs @thisthat @thschue @bacherfl @StackScribe
11 changes: 1 addition & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ build-release-manifests:
$(MAKE) -C metrics-operator generate

$(MAKE) -C operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION)
$(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION)
$(MAKE) -C klt-cert-manager release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION)
$(MAKE) -C metrics-operator release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG) ARCH=$(ARCH) CHART_APPVERSION=$(CHART_APPVERSION)

Expand All @@ -106,14 +105,6 @@ build-deploy-metrics-operator:

kubectl apply -f metrics-operator/config/rendered/release.yaml

.PHONY: build-deploy-scheduler
build-deploy-scheduler:
$(MAKE) -C scheduler release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG)
$(MAKE) -C scheduler push-local RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG)
$(MAKE) -C scheduler release-manifests RELEASE_REGISTRY=$(RELEASE_REGISTRY) CHART_APPVERSION=$(TAG) ARCH=$(ARCH)
kubectl create namespace keptn-lifecycle-toolkit-system --dry-run=client -o yaml | kubectl apply -f -
kubectl apply -f scheduler/config/rendered/release.yaml

.PHONY: build-deploy-certmanager
build-deploy-certmanager:
$(MAKE) -C klt-cert-manager release-local.$(ARCH) RELEASE_REGISTRY=$(RELEASE_REGISTRY) TAG=$(TAG)
Expand All @@ -123,7 +114,7 @@ build-deploy-certmanager:
kubectl apply -f klt-cert-manager/config/rendered/release.yaml

.PHONY: build-deploy-dev-environment
build-deploy-dev-environment: build-deploy-certmanager build-deploy-operator build-deploy-metrics-operator build-deploy-scheduler
build-deploy-dev-environment: build-deploy-certmanager build-deploy-operator build-deploy-metrics-operator


include docs/Makefile
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ When the webhook receives a request for a new pod, it will look for the workload
keptn.sh/workload: "some-workload-name"
```
The mutation consists in changing the scheduler used for the deployment with the Keptn Scheduler.
The mutation consists in gating the deployment or pod so that the kubernetes Scheduler will not yet deploy them.
Webhook then creates a
workload and app resource per annotated resource.
You can also specify a custom app definition with the annotation:
Expand Down Expand Up @@ -252,7 +252,7 @@ and for the Evaluations:
After either one of those actions has been taken, the webhook will set the scheduler of the pod and allow the pod to be
scheduled.

### Scheduler
### Scheduler ##TODO

After the Webhook mutation, the Keptn-Scheduler will handle the annotated resources.
The scheduling flow follows the
Expand Down Expand Up @@ -500,8 +500,7 @@ The [GitHub CLI](https://cli.github.com/) can be used to download the manifests
```bash
gh run list --repo keptn/lifecycle-toolkit # find the id of a run
gh run download 3152895000 --repo keptn/lifecycle-toolkit # download the artifacts
kubectl apply -f ./keptn-lifecycle-operator-manifest/release.yaml # install the operator
kubectl apply -f ./scheduler-manifest/release.yaml # install the scheduler
kubectl apply -f ./keptn-lifecycle-operator-manifest/release.yaml # install the operators
```

Instead, if you want to build and deploy the operator into your cluster directly from the code, you can type:
Expand Down
4 changes: 0 additions & 4 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ flags:
paths:
- operator/
carryforward: true
scheduler:
paths:
- scheduler/
carryforward: true
component-tests:
paths:
- operator/
Expand Down
3 changes: 1 addition & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,5 @@ restart-lifecycle-toolkit:
@echo "----------------------------------"
kubectl rollout restart deployment -n "$(TOOLKIT_NAMESPACE)" -l control-plane=lifecycle-operator
kubectl rollout status deployment -n "$(TOOLKIT_NAMESPACE)" -l control-plane=lifecycle-operator --watch
kubectl rollout restart deployment -n "$(TOOLKIT_NAMESPACE)" -l component=scheduler
kubectl rollout status deployment -n "$(TOOLKIT_NAMESPACE)" -l component=scheduler --watch


1 change: 0 additions & 1 deletion release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"helm/chart/Chart.yaml",
"Makefile",
"operator/Makefile",
"scheduler/Makefile",
"klt-cert-manager/Makefile",
"metrics-operator/Makefile",
"docs/content/en/docs/snippets/tasks/install.md",
Expand Down
1 change: 0 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
],
"ignoreDeps": [
"ghcr.keptn.sh/keptn/lifecycle-operator",
"ghcr.keptn.sh/keptn/scheduler",
"ghcr.keptn.sh/keptn/functions-runtime",
"ghcr.keptn.sh/keptn/certificate-operator",
"ghcr.keptn.sh/keptn/metrics-operator"
Expand Down

0 comments on commit 56b884b

Please sign in to comment.