Skip to content

Commit

Permalink
Include visibility-api.yaml as a part of main.yaml.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbobrovskyi committed Sep 19, 2024
1 parent baba452 commit 603f8a4
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 63 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ artifacts: kustomize yq helm ## Generate release artifacts.
$(KUSTOMIZE) build config/dev -o artifacts/manifests-dev.yaml
$(KUSTOMIZE) build config/alpha-enabled -o artifacts/manifests-alpha-enabled.yaml
$(KUSTOMIZE) build config/prometheus -o artifacts/prometheus.yaml
$(KUSTOMIZE) build config/visibility -o artifacts/visibility-api.yaml
@$(call clean-manifests)
# Update the image tag and policy
$(YQ) e '.controllerManager.manager.image.repository = "$(IMAGE_REPO)" | .controllerManager.manager.image.tag = "$(GIT_TAG)" | .controllerManager.manager.image.pullPolicy = "IfNotPresent"' -i charts/kueue/values.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "kueue.isFeatureGateEnabled" (dict "List" .Values.controllerManager.featureGates "Feature" "VisibilityOnDemand") }}
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
Expand All @@ -14,4 +13,3 @@ spec:
namespace: '{{ .Release.Namespace }}'
version: v1alpha1
versionPriority: 100
{{- end }}
2 changes: 0 additions & 2 deletions charts/kueue/templates/visibility/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "kueue.isFeatureGateEnabled" (dict "List" .Values.controllerManager.featureGates "Feature" "VisibilityOnDemand") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
Expand All @@ -14,4 +13,3 @@ subjects:
- kind: ServiceAccount
name: kueue-controller-manager
namespace: '{{ .Release.Namespace }}'
{{- end }}
2 changes: 0 additions & 2 deletions charts/kueue/templates/visibility/service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{{- if include "kueue.isFeatureGateEnabled" (dict "List" .Values.controllerManager.featureGates "Feature" "VisibilityOnDemand") }}
apiVersion: v1
kind: Service
metadata:
Expand All @@ -14,4 +13,3 @@ spec:
targetPort: 8082
selector:
{{- include "kueue.selectorLabels" . | nindent 4 }}
{{- end }}
1 change: 0 additions & 1 deletion config/alpha-enabled/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Use default settings as a base.
resources:
- ../default
- ../visibility

patches:
# Modify feature gates to enable AllAlpha=true
Expand Down
2 changes: 1 addition & 1 deletion config/components/visibility/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resources:
- apiservice.yaml
- apiservice_v1alpha1.yaml
- role_binding.yaml
- service.yaml
5 changes: 5 additions & 0 deletions config/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ resources:
- ../components/rbac
- ../components/manager
- ../components/internalcert
- ../components/visibility
# [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix including the one in
# ../components/crd/kustomization.yaml
- ../components/webhook
Expand All @@ -30,6 +31,10 @@ resources:
# [PROMETHEUS] To enable prometheus monitor, uncomment all sections with 'PROMETHEUS'.
#- ../components/prometheus

transformers:
# Sets the namespace for the role binding as kube-system instead of default kueue-system
- role_binding_visibility_transformer.yaml

patches:
# Protect the /metrics endpoint by putting it behind auth.
# If you want your controller-manager to expose the /metrics
Expand Down
21 changes: 0 additions & 21 deletions config/visibility/kustomization.yaml

This file was deleted.

10 changes: 2 additions & 8 deletions hack/update-helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,7 @@ for output_file in "${DEST_VISIBILITY_DIR}"/*.yaml; do
selector:
{{- include "kueue.selectorLabels" . | nindent 4 }}
EOT
fi
$SED -i '/^metadata:.*/a\ labels:\n {{- include "kueue.labels" . | nindent 4 }}' "$output_file"

{
echo '{{- if include "kueue.isFeatureGateEnabled" (dict "List" .Values.controllerManager.featureGates "Feature" "VisibilityOnDemand") }}'
cat "$output_file"
echo "{{- end }}"
} > "${output_file}.tmp"
fi
$SED -i '/^metadata:.*/a\ labels:\n {{- include "kueue.labels" . | nindent 4 }}' "$output_file"
mv "${output_file}.tmp" "${output_file}"
done
15 changes: 0 additions & 15 deletions site/content/en/docs/installation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ description: >
- [Before you begin](#before-you-begin)
- [Install a released version](#install-a-released-version)
- [Add metrics scraping for prometheus-operator](#add-metrics-scraping-for-prometheus-operator)
- [Add visibility API to monitor pending workloads](#add-visibility-api-to-monitor-pending-workloads)
- [Uninstall](#uninstall)
- [Install a custom-configured released version](#install-a-custom-configured-released-version)
- [Install the latest development version](#install-the-latest-development-version)
Expand Down Expand Up @@ -75,20 +74,6 @@ We can follow `https://prometheus-operator.dev/docs/prologue/quick-start/` to in
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/{{< param "version" >}}/prometheus.yaml
```

### Add visibility API to monitor pending workloads

{{< feature-state state="alpha" for_version="v0.6" >}}


To add the visibility API that enables monitoring pending workloads, change [the feature gates configuration](/docs/installation/#change-the-feature-gates-configuration) and set `VisibilityOnDemand=true`, and run the following command

```shell
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/{{< param "version" >}}/visibility-api.yaml
```

See [the visibility API](/docs/tasks/manage/monitor_pending_workloads/pending_workloads_on_demand) for more details.


### Uninstall

To uninstall a released version of Kueue from your cluster, run the following command:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Pending Workloads on-demand"
date: 2023-12-05
date: 2024-09-19
weight: 3
description: >
Monitor pending Workloads with the on-demand visibility API
Expand All @@ -26,14 +26,6 @@ Make sure the following conditions are met:

VisibilityOnDemand is an `Alpha` feature disabled by default. To use the visibility API change [the feature gates configuration](/docs/installation/#change-the-feature-gates-configuration) and set `VisibilityOnDemand=true`.

### Install the visibility API

To install the visibility API, run the following command

```shell
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/{{< param "version" >}}/visibility-api.yaml
```

## Monitor pending workloads on demand

{{< feature-state state="alpha" for_version="v0.6" >}}
Expand Down
1 change: 0 additions & 1 deletion test/e2e/config/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: Kustomization

resources:
- ../../../config/dev
- ../../../config/visibility

replicas:
- name: kueue-controller-manager
Expand Down

0 comments on commit 603f8a4

Please sign in to comment.