├── .github ├── ISSUE_TEMPLATE │ ├── bug-report.yaml │ ├── config.yml │ └── enhancement.yaml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── ci.yml │ └── status-check.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── GOVERNANCE.md ├── LICENSE ├── MAINTAINERS.md ├── Makefile ├── README.md ├── README.zh.md ├── cmd └── inlinecheck │ └── main.go ├── config └── crd │ └── bases │ ├── autoscaling.katalyst.kubewharf.io_intelligenthorizontalpodautoscalers.yaml │ ├── autoscaling.katalyst.kubewharf.io_katalystverticalpodautoscalers.yaml │ ├── autoscaling.katalyst.kubewharf.io_verticalpodautoscalerrecommendations.yaml │ ├── autoscaling.katalyst.kubewharf.io_virtualworkloads.yaml │ ├── config.katalyst.kubewharf.io_adminqosconfigurations.yaml │ ├── config.katalyst.kubewharf.io_authconfigurations.yaml │ ├── config.katalyst.kubewharf.io_customnodeconfigs.yaml │ ├── config.katalyst.kubewharf.io_katalystcustomconfigs.yaml │ ├── config.katalyst.kubewharf.io_strategygroupconfigurations.yaml │ ├── config.katalyst.kubewharf.io_strategygroups.yaml │ ├── config.katalyst.kubewharf.io_transparentmemoryoffloadingconfigurations.yaml │ ├── node.katalyst.kubewharf.io_customnoderesources.yaml │ ├── node.katalyst.kubewharf.io_nodeprofiledescriptors.yaml │ ├── overcommit.katalyst.kubewharf.io_nodeovercommitconfigs.yaml │ ├── recommendation.katalyst.kubewharf.io_resourcerecommends.yaml │ ├── tide.katalyst.kubewharf.io_tidenodepools.yaml │ └── workload.katalyst.kubewharf.io_serviceprofiledescriptors.yaml ├── docs ├── developer-guide.md ├── imgs │ └── .gitkeep ├── manually-setup.md ├── resource-and-system-requirements.md └── roadmap.md ├── go.mod ├── go.sum ├── hack ├── boilerplate.go.txt ├── generate-groups.sh ├── generate-internal-groups.sh ├── tools │ ├── go.mod │ ├── go.sum │ └── tools.go └── update-codegen.sh ├── init.go └── pkg ├── apis ├── autoscaling │ ├── v1alpha1 │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ └── zz_generated.deepcopy.go │ └── v1alpha2 │ │ ├── doc.go │ │ ├── ihpa.go │ │ ├── register.go │ │ ├── vpa.go │ │ └── zz_generated.deepcopy.go ├── config │ └── v1alpha1 │ │ ├── adminqos.go │ │ ├── auth.go │ │ ├── doc.go │ │ ├── generic.go │ │ ├── register.go │ │ ├── resource_portrait.go │ │ ├── strategygroup.go │ │ ├── strategygroupconfig.go │ │ ├── tmo.go │ │ ├── types.go │ │ └── zz_generated.deepcopy.go ├── node │ └── v1alpha1 │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ └── zz_generated.deepcopy.go ├── overcommit │ └── v1alpha1 │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ └── zz_generated.deepcopy.go ├── recommendation │ └── v1alpha1 │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ └── zz_generated.deepcopy.go ├── scheduling │ └── config │ │ ├── doc.go │ │ ├── register.go │ │ ├── scheme │ │ └── scheme.go │ │ ├── types.go │ │ ├── v1beta3 │ │ ├── defaults.go │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ ├── zz_generated.conversion.go │ │ ├── zz_generated.deepcopy.go │ │ └── zz_generated.defaults.go │ │ ├── validation │ │ └── validation_pluginargs.go │ │ └── zz_generated.deepcopy.go ├── tide │ └── v1alpha1 │ │ ├── doc.go │ │ ├── register.go │ │ ├── types.go │ │ └── zz_generated.deepcopy.go └── workload │ └── v1alpha1 │ ├── doc.go │ ├── register.go │ ├── types.go │ └── zz_generated.deepcopy.go ├── client ├── clientset │ └── versioned │ │ ├── clientset.go │ │ ├── doc.go │ │ ├── fake │ │ ├── clientset_generated.go │ │ ├── doc.go │ │ └── register.go │ │ ├── scheme │ │ ├── doc.go │ │ └── register.go │ │ └── typed │ │ ├── autoscaling │ │ ├── v1alpha1 │ │ │ ├── autoscaling_client.go │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ │ ├── doc.go │ │ │ │ ├── fake_autoscaling_client.go │ │ │ │ ├── fake_katalystverticalpodautoscaler.go │ │ │ │ └── fake_verticalpodautoscalerrecommendation.go │ │ │ ├── generated_expansion.go │ │ │ ├── katalystverticalpodautoscaler.go │ │ │ └── verticalpodautoscalerrecommendation.go │ │ └── v1alpha2 │ │ │ ├── autoscaling_client.go │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_autoscaling_client.go │ │ │ ├── fake_intelligenthorizontalpodautoscaler.go │ │ │ ├── fake_katalystverticalpodautoscaler.go │ │ │ └── fake_virtualworkload.go │ │ │ ├── generated_expansion.go │ │ │ ├── intelligenthorizontalpodautoscaler.go │ │ │ ├── katalystverticalpodautoscaler.go │ │ │ └── virtualworkload.go │ │ ├── config │ │ └── v1alpha1 │ │ │ ├── config_client.go │ │ │ ├── customnodeconfig.go │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_config_client.go │ │ │ ├── fake_customnodeconfig.go │ │ │ ├── fake_katalystcustomconfig.go │ │ │ ├── fake_strategygroup.go │ │ │ └── fake_strategygroupconfiguration.go │ │ │ ├── generated_expansion.go │ │ │ ├── katalystcustomconfig.go │ │ │ ├── strategygroup.go │ │ │ └── strategygroupconfiguration.go │ │ ├── node │ │ └── v1alpha1 │ │ │ ├── customnoderesource.go │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_customnoderesource.go │ │ │ ├── fake_node_client.go │ │ │ └── fake_nodeprofiledescriptor.go │ │ │ ├── generated_expansion.go │ │ │ ├── node_client.go │ │ │ └── nodeprofiledescriptor.go │ │ ├── overcommit │ │ └── v1alpha1 │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_nodeovercommitconfig.go │ │ │ └── fake_overcommit_client.go │ │ │ ├── generated_expansion.go │ │ │ ├── nodeovercommitconfig.go │ │ │ └── overcommit_client.go │ │ ├── recommendation │ │ └── v1alpha1 │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_recommendation_client.go │ │ │ └── fake_resourcerecommend.go │ │ │ ├── generated_expansion.go │ │ │ ├── recommendation_client.go │ │ │ └── resourcerecommend.go │ │ ├── tide │ │ └── v1alpha1 │ │ │ ├── doc.go │ │ │ ├── fake │ │ │ ├── doc.go │ │ │ ├── fake_tide_client.go │ │ │ └── fake_tidenodepool.go │ │ │ ├── generated_expansion.go │ │ │ ├── tide_client.go │ │ │ └── tidenodepool.go │ │ └── workload │ │ └── v1alpha1 │ │ ├── doc.go │ │ ├── fake │ │ ├── doc.go │ │ ├── fake_serviceprofiledescriptor.go │ │ └── fake_workload_client.go │ │ ├── generated_expansion.go │ │ ├── serviceprofiledescriptor.go │ │ └── workload_client.go ├── informers │ └── externalversions │ │ ├── autoscaling │ │ ├── interface.go │ │ ├── v1alpha1 │ │ │ ├── interface.go │ │ │ ├── katalystverticalpodautoscaler.go │ │ │ └── verticalpodautoscalerrecommendation.go │ │ └── v1alpha2 │ │ │ ├── intelligenthorizontalpodautoscaler.go │ │ │ ├── interface.go │ │ │ ├── katalystverticalpodautoscaler.go │ │ │ └── virtualworkload.go │ │ ├── config │ │ ├── interface.go │ │ └── v1alpha1 │ │ │ ├── customnodeconfig.go │ │ │ ├── interface.go │ │ │ ├── katalystcustomconfig.go │ │ │ ├── strategygroup.go │ │ │ └── strategygroupconfiguration.go │ │ ├── factory.go │ │ ├── generic.go │ │ ├── internalinterfaces │ │ └── factory_interfaces.go │ │ ├── node │ │ ├── interface.go │ │ └── v1alpha1 │ │ │ ├── customnoderesource.go │ │ │ ├── interface.go │ │ │ └── nodeprofiledescriptor.go │ │ ├── overcommit │ │ ├── interface.go │ │ └── v1alpha1 │ │ │ ├── interface.go │ │ │ └── nodeovercommitconfig.go │ │ ├── recommendation │ │ ├── interface.go │ │ └── v1alpha1 │ │ │ ├── interface.go │ │ │ └── resourcerecommend.go │ │ ├── tide │ │ ├── interface.go │ │ └── v1alpha1 │ │ │ ├── interface.go │ │ │ └── tidenodepool.go │ │ └── workload │ │ ├── interface.go │ │ └── v1alpha1 │ │ ├── interface.go │ │ └── serviceprofiledescriptor.go └── listers │ ├── autoscaling │ ├── v1alpha1 │ │ ├── expansion_generated.go │ │ ├── katalystverticalpodautoscaler.go │ │ └── verticalpodautoscalerrecommendation.go │ └── v1alpha2 │ │ ├── expansion_generated.go │ │ ├── intelligenthorizontalpodautoscaler.go │ │ ├── katalystverticalpodautoscaler.go │ │ └── virtualworkload.go │ ├── config │ └── v1alpha1 │ │ ├── customnodeconfig.go │ │ ├── expansion_generated.go │ │ ├── katalystcustomconfig.go │ │ ├── strategygroup.go │ │ └── strategygroupconfiguration.go │ ├── node │ └── v1alpha1 │ │ ├── customnoderesource.go │ │ ├── expansion_generated.go │ │ └── nodeprofiledescriptor.go │ ├── overcommit │ └── v1alpha1 │ │ ├── expansion_generated.go │ │ └── nodeovercommitconfig.go │ ├── recommendation │ └── v1alpha1 │ │ ├── expansion_generated.go │ │ └── resourcerecommend.go │ ├── tide │ └── v1alpha1 │ │ ├── expansion_generated.go │ │ └── tidenodepool.go │ └── workload │ └── v1alpha1 │ ├── expansion_generated.go │ └── serviceprofiledescriptor.go ├── consts ├── cgroup.go ├── overcommit.go ├── pod.go ├── qos.go ├── qrm.go ├── resource.go ├── spd.go └── vpa.go ├── metric ├── consts.go ├── external │ └── external.go ├── node │ └── node.go └── pod │ └── pod.go ├── plugins ├── registration │ └── pluginregistration.go └── skeleton │ ├── eviction.go │ ├── generic.go │ ├── qrm.go │ └── reporter.go ├── protocol ├── evictionplugin │ └── v1alpha1 │ │ ├── api.pb.go │ │ ├── api.proto │ │ └── constants.go └── reporterplugin │ └── v1alpha1 │ ├── api.pb.go │ ├── api.proto │ └── constants.go └── utils └── topology_policy.go /.github/ISSUE_TEMPLATE/bug-report.yaml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Report a bug encountered 3 | body: 4 | - type: textarea 5 | id: problem 6 | attributes: 7 | label: What happened? 8 | description: | 9 | Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. 10 | If this matter is security related, please disclose it privately via https://security.bytedance.com 11 | validations: 12 | required: true 13 | 14 | - type: textarea 15 | id: expected 16 | attributes: 17 | label: What did you expect to happen? 18 | validations: 19 | required: true 20 | 21 | - type: textarea 22 | id: repro 23 | attributes: 24 | label: How can we reproduce it (as minimally and precisely as possible)? 25 | validations: 26 | required: true 27 | 28 | - type: textarea 29 | id: version 30 | attributes: 31 | label: Software version 32 | value: | 33 |
34 | 35 | ```console 36 | $ version 37 | # paste output here 38 | ``` 39 |
40 | validations: 41 | required: false 42 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/enhancement.yaml: -------------------------------------------------------------------------------- 1 | name: Feature Tracking Issue 2 | description: Provide supporting details for a feature in development 3 | body: 4 | - type: textarea 5 | id: feature 6 | attributes: 7 | label: What would you like to be added? 8 | validations: 9 | required: true 10 | 11 | - type: textarea 12 | id: rationale 13 | attributes: 14 | label: Why is this needed? 15 | validations: 16 | required: true 17 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### What type of PR is this? 2 | 5 | 6 | #### What this PR does / why we need it: 7 | 8 | #### Which issue(s) this PR fixes: 9 | 10 | #### Special notes for your reviewer: 11 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | branches: [ main ] 8 | types: [ opened, reopened, synchronize ] 9 | 10 | jobs: 11 | lint: 12 | name: Lint 13 | runs-on: ubuntu-24.04 14 | steps: 15 | - uses: actions/checkout@v3 16 | - uses: actions/setup-go@v3 17 | with: 18 | go-version-file: go.mod 19 | cache: false 20 | - name: Check Go modules 21 | run: | 22 | go mod tidy && git add go.* && 23 | git diff --cached --exit-code || (echo 'Please run "go mod tidy" to sync Go modules' && exit 1); 24 | - name: Verify gofmt 25 | run: | 26 | make fmt && git add pkg && 27 | git diff --cached --exit-code || (echo 'Please run "make fmt" to verify gofmt' && exit 1); 28 | - name: Check inline fields 29 | run: | 30 | go run cmd/inlinecheck/main.go 31 | -------------------------------------------------------------------------------- /.github/workflows/status-check.yml: -------------------------------------------------------------------------------- 1 | name: Status Check 2 | 3 | on: 4 | pull_request: 5 | branches: [ main ] 6 | types: [ opened, reopened, synchronize, labeled, unlabeled] 7 | 8 | jobs: 9 | status-check: 10 | name: Status Check 11 | runs-on: ubuntu-24.04 12 | steps: 13 | - name: Check if the PR is hold 14 | if: contains(github.event.pull_request.labels.*.name, 'workflow/merge-hold') 15 | run: echo 'This pull request is hold' && exit 1 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled binaries and deployment files 2 | /bin/ 3 | hack/tools/bin 4 | 5 | # Binaries for programs and plugins 6 | *.exe 7 | *.dll 8 | *.so 9 | *.dylib 10 | 11 | # Test binary, build with `go test -c` 12 | *.test 13 | 14 | # Output of the go coverage tool, specifically when used with LiteIDE 15 | *.out 16 | 17 | # OSX leaves these everywhere on SMB shares 18 | ._* 19 | 20 | # OSX trash 21 | .DS_Store 22 | 23 | # Eclipse files 24 | .classpath 25 | .project 26 | .settings/** 27 | 28 | # Files generated by JetBrains IDEs, e.g. IntelliJ IDEA 29 | .idea/ 30 | *.iml 31 | 32 | # Vscode files 33 | .vscode 34 | 35 | # Emacs save files 36 | *~ 37 | \#*\# 38 | .\#* 39 | 40 | # Vim-related files 41 | [._]*.s[a-w][a-z] 42 | [._]s[a-w][a-z] 43 | *.un~ 44 | Session.vim 45 | .netrwhist 46 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # ByteDance Contributor Code of Conduct 2 | 3 | Our Pledge 4 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 5 | 6 | Our Standards 7 | Example of behavior that contributes to creating a positive environment include: 8 | - Using welcoming and inclusive language 9 | - Being respectful of differing viewpoints and experiences 10 | - Gracefully accepting constructive criticism 11 | - Focusing on what is best for the community 12 | - Showing empathy towards other community members 13 | 14 | Examples of unacceptable behavior by participants include: 15 | - The use of serialized language or imagery and unwelcome sexual attention or advances 16 | - Trolling, insulting/derogatory comments, and personal or political attacks 17 | - Public or private harassment 18 | - Publishing others’ private information, such as a physical or electronic address, without explicit permission 19 | - Other conduct which could reasonably be considered inappropriate in a professional setting 20 | 21 | Our Responsibilities 22 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 23 | 24 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 25 | 26 | Scope 27 | This Code of Conduct applies within all project spaces, and it also applies when an individual is representing the project or its community in public spaces. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 28 | 29 | Enforcement 30 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at kubewharf.conduct@bytedance.com. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 31 | 32 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership. 33 | 34 | Attribution 35 | This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 36 | 37 | For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq -------------------------------------------------------------------------------- /GOVERNANCE.md: -------------------------------------------------------------------------------- 1 | # Katalyst 2 | 3 | The governance model adopted in Katalyst is influenced by many CNCF projects. 4 | 5 | ## Principles 6 | 7 | - **Open**: Katalyst is open source community. See (TODO: add Contributor License Agreement). 8 | - **Welcoming and respectful**: See [Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md). 9 | - **Transparent and accessible**: Work and collaboration should be done in public. 10 | - **Merit**: Ideas and contributions are accepted according to their technical merit 11 | and alignment with project objectives, scope and design principles. 12 | 13 | ## Code of Conduct 14 | 15 | The Katalyst [Code of Conduct](CODE_OF_CONDUCT.md) is aligned with the CNCF Code of Conduct. 16 | 17 | ## Community MemberShip 18 | 19 | See community membership (TODO: add community membership). 20 | 21 | ## Decision-making process 22 | 23 | Decisions are made based on consensus between maintainers. 24 | Proposals and ideas can either be submitted for agreement via a GitHub issue or PR, 25 | or by sending an email to (TODO: register an email for the org). 26 | 27 | In general, we prefer that technical issues and maintainer membership are amicably worked out between the persons involved. 28 | If a dispute cannot be decided independently, get a third-party maintainer (e.g. a mutual contact with some background 29 | on the issue, but not involved in the conflict) to intercede and the final decision will be made. 30 | Decision-making process should be transparent to adhere to the principles of Katalyst project. 31 | 32 | ## Credits 33 | 34 | Some contents in this documents have been borrowed from [OpenYurt](https://github.com/openyurtio/openyurt/blob/master/GOVERNANCE.md), 35 | [BFE](https://github.com/bfenetworks/bfe/blob/develop/GOVERNANCE.md), [CoreDNS](https://github.com/coredns/coredns/blob/master/GOVERNANCE.md) 36 | and [Kubernetes governance](https://github.com/kubernetes/community/blob/master/governance.md) projects. -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | # The Katalyst-API Maintainers 2 | 3 | This file lists the maintainers of the Katalyst API project. 4 | The responsibilities of maintainers are listed in the [GOVERNANCE.md](GOVERNANCE.md) file. 5 | 6 | ## Project Maintainers 7 | | Name | GitHub ID | Affiliation | 8 | |-------------------------------------------------------------|-----------------------------------------------------|-------------| 9 | | [Wei Shao](mailto:shaowei.wayne@bytedance.com) | [waynepeking348](https://github.com/waynepeking348) | ByteDance | 10 | | [Jianyu Sun](mailto:sunjianyu@bytedance.com) | [csfldf](https://github.com/csfldf) | ByteDance | 11 | | [Bo Wang](mailto:wangbo.cloudnative@bytedance.com) | [Aiden-cn](https://github.com/Aiden-cn) | ByteDance | 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Katalyst Authors. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | GOPROXY := $(shell go env GOPROXY) 16 | ifeq ($(GOPROXY),) 17 | GOPROXY := https://proxy.golang.org 18 | endif 19 | export GOPROXY 20 | 21 | # Directories 22 | TOOLS_DIR := hack/tools 23 | BIN_DIR := bin 24 | TOOLS_BIN_DIR := $(TOOLS_DIR)/$(BIN_DIR) 25 | 26 | # Binaries 27 | CONTROLLER_GEN := $(abspath $(TOOLS_BIN_DIR)/controller-gen) 28 | 29 | # Protocols 30 | Protocol_PATH = pkg/protocol 31 | 32 | all: generate 33 | crd: generate-manifests generate-go 34 | pb: generate-pb 35 | 36 | ## -------------------------------------- 37 | ## Binaries 38 | ## -------------------------------------- 39 | 40 | $(CONTROLLER_GEN): $(TOOLS_DIR)/go.mod ## Build controller-gen from tools folder. 41 | cd $(TOOLS_DIR); \ 42 | go build -tags=tools -o $(BIN_DIR)/controller-gen \ 43 | sigs.k8s.io/controller-tools/cmd/controller-gen 44 | 45 | ## -------------------------------------- 46 | ## Generate / Manifests 47 | ## -------------------------------------- 48 | 49 | .PHONY: generate 50 | generate: $(CONTROLLER_GEN) 51 | $(MAKE) generate-manifests 52 | $(MAKE) generate-go 53 | $(MAKE) generate-pb 54 | 55 | .PHONY: generate-go ## Generate go client codes 56 | generate-go: hack/update-codegen.sh 57 | ./hack/update-codegen.sh 58 | 59 | .PHONY: generate-manifests ## Generate CRD manifests 60 | generate-manifests: $(CONTROLLER_GEN) 61 | $(CONTROLLER_GEN) \ 62 | paths=./pkg/apis/... \ 63 | crd:crdVersions=v1,allowDangerousTypes=true \ 64 | output:crd:dir=./config/crd/bases 65 | 66 | ## -------------------------------------- 67 | ## Generate / Protocols 68 | ## -------------------------------------- 69 | 70 | .PHONY: generate-pb 71 | generate-pb: generate-reporter-plugin generate-eviction-plugin 72 | 73 | .PHONY: generate-reporter-plugin ## Generate Protocol for reporter manager 74 | generate-reporter-plugin: 75 | (protoc -I=$(Protocol_PATH)/reporterplugin/ -I=$(GOPATH)/src/ --gogo_out=plugins=grpc:$(Protocol_PATH)/reporterplugin/ $(Protocol_PATH)/reporterplugin/v1alpha1/api.proto) 76 | cat ./hack/boilerplate.go.txt "$(Protocol_PATH)/reporterplugin/v1alpha1/api.pb.go" > tmpfile && mv tmpfile "$(Protocol_PATH)/reporterplugin/v1alpha1/api.pb.go" 77 | 78 | .PHONY: generate-eviction-plugin ## Generate Protocol for eviction manager 79 | generate-eviction-plugin: 80 | (protoc -I=$(Protocol_PATH)/evictionplugin/ -I=$(GOPATH)/src/ --gogo_out=plugins=grpc:$(Protocol_PATH)/evictionplugin/ $(Protocol_PATH)/evictionplugin/v1alpha1/api.proto) 81 | cat ./hack/boilerplate.go.txt "$(Protocol_PATH)/evictionplugin/v1alpha1/api.pb.go" > tmpfile && mv tmpfile "$(Protocol_PATH)/evictionplugin/v1alpha1/api.pb.go" 82 | 83 | 84 | ## -------------------------------------- 85 | ## Cleanup / Verification 86 | ## -------------------------------------- 87 | 88 | .PHONY: clean 89 | clean: ## Remove all generated files 90 | $(MAKE) clean-bin 91 | 92 | .PHONY: clean-bin 93 | clean-bin: ## Remove all generated binaries 94 | rm -rf bin 95 | rm -rf hack/tools/bin 96 | 97 | .PHONY: fmt 98 | fmt: ## Run go fmt against code. 99 | go fmt ./... 100 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 |

Katalyst-api

3 |

4 | 5 | English | [简体中文](./README.zh.md) 6 | 7 | ## Overview 8 | 9 | katalyst aims to provide a universal solution to help improve resource utilization and optimize the overall costs in the cloud. The main feature includes: 10 | - QoS-Based Resource Model: provide pre-defined QoS Model along with multiple enhancements to match up with QoS requirements for different kinds of workload; 11 | - Elastic Resource Management: provide both horizontal & vertical scaling implementations, along with an extensible mechanism for out-of-tree algorithms; 12 | - Topology-Awared Scheduling and Allocating: expend ability of native scheduler and kubelet to support topology-awared resource scheduling, making it easy to support heterogeneous devices; 13 | - Fine-Grained Resource Isolation: provide real-time and fine-grained resource oversold, allocation and isolation strategies for each QoS with auto-tuned workload profiling 14 | 15 | Katalyst contains three main projects: 16 | - [Katalyst-API](https://github.com/kubewharf/katalyst-api.git): Katalyst core API, including CRD, Protocol, QoS Model and so on; 17 | - [Katalyst-Core](https://github.com/kubewharf/katalyst-core.git): Katalyst core implementations; 18 | - [Charts](https://github.com/kubewharf/charts.git): Helm charts for all projects in Kubewharf; 19 | 20 | For more detailed information, please refer to [Katalyst-Core](https://github.com/kubewharf/katalyst-core.git) 21 | 22 | ## Community 23 | 24 | ### Contributing 25 | 26 | If you are willing to be a contributor for the Katalyst project, please refer to our [CONTRIBUTING](CONTRIBUTING.md) document for details. 27 | 28 | ### Contact 29 | 30 | If you have any questions or want to contribute, you are welcome to communicate most things via GitHub issues or pull requests. 31 | Or Contact [Maintainers](./MAINTAINERS.md) 32 | 33 | ## License 34 | 35 | Katalyst is under the Apache 2.0 license. See the [LICENSE](LICENSE) file for details. 36 | Certain implementations in Katalyst rely on the existing code from Kubernetes and the credits go to the original Kubernetes authors. 37 | -------------------------------------------------------------------------------- /README.zh.md: -------------------------------------------------------------------------------- 1 | [English](./README.md) | 简体中文 2 | 3 | ## 简介 4 | 5 | katalyst 致力于解决云原生场景下的资源不合理利用问题,为资源管理和成本优化提供解决方案: 6 | - QoS-Based 资源模型抽象:提供与业务场景匹配的资源 QoS 模型选择; 7 | - 资源弹性管理:提供灵活可扩展的 HPA/VPA 资源弹性策略; 8 | - 微拓扑及异构设备的调度、摆放:资源整体微拓扑感知调度、摆放,以及动态调整能力; 9 | - 精细化资源分配、隔离:根据业务服务画像提供资源的精细化分配、出让和隔离 10 | 11 | Katalyst 分为三个主要 Project: 12 | - [Katalyst-API](https://github.com/kubewharf/katalyst-api.git) :Katalyst 相关核心 API,包括 CRD、Protocol、QoS 定义等; 13 | - [Katalyst-Core](https://github.com/kubewharf/katalyst-core.git) :Katalyst 主体管控逻辑; 14 | - [Charts](https://github.com/kubewharf/charts.git) :Kubewharf 相关 Projects 的部署 helm charts; 15 | 16 | 17 | 更详细的介绍请参考 [Katalyst-Core](https://github.com/kubewharf/katalyst-core.git) 18 | 19 | ## 社区 20 | 21 | ### 贡献 22 | 23 | 若您期望成为 Katalyst 的贡献者,请参考 [CONTRIBUTING](CONTRIBUTING.md) 文档。 24 | 25 | ### 联系方式 26 | 27 | 如果您有任何疑问,欢迎提交 GitHub issues 或者 pull requests,或者联系我们的 [Maintainers](./MAINTAINERS.md)。 28 | 29 | ## 协议 30 | 31 | Katalyst 采用 Apache 2.0 协议,协议详情请参考 [LICENSE](LICENSE),另外 Katalyst 中的某些实现依赖于 Kubernetes 代码,此部分版权归属于 Kubernetes Authors。 32 | -------------------------------------------------------------------------------- /cmd/inlinecheck/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "reflect" 7 | "strings" 8 | 9 | autoscalingv1a1 "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha1" 10 | autoscalingv1a2 "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha2" 11 | configv1a1 "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 12 | nodev1a1 "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 13 | overcommitv1a1 "github.com/kubewharf/katalyst-api/pkg/apis/overcommit/v1alpha1" 14 | recommendationv1a1 "github.com/kubewharf/katalyst-api/pkg/apis/recommendation/v1alpha1" 15 | schedcfgv1b3 "github.com/kubewharf/katalyst-api/pkg/apis/scheduling/config/v1beta3" 16 | tidev1a1 "github.com/kubewharf/katalyst-api/pkg/apis/tide/v1alpha1" 17 | workloadv1a1 "github.com/kubewharf/katalyst-api/pkg/apis/workload/v1alpha1" 18 | 19 | "k8s.io/apimachinery/pkg/runtime" 20 | ) 21 | 22 | func main() { 23 | scheme := runtime.NewScheme() 24 | configv1a1.AddToScheme(scheme) 25 | autoscalingv1a1.AddToScheme(scheme) 26 | autoscalingv1a2.AddToScheme(scheme) 27 | nodev1a1.AddToScheme(scheme) 28 | overcommitv1a1.AddToScheme(scheme) 29 | recommendationv1a1.AddToScheme(scheme) 30 | schedcfgv1b3.AddToScheme(scheme) 31 | tidev1a1.AddToScheme(scheme) 32 | workloadv1a1.AddToScheme(scheme) 33 | 34 | seenTypes := make(map[reflect.Type]struct{}) 35 | var errs []error 36 | for _, typ := range scheme.AllKnownTypes() { 37 | fmt.Printf("Checking %s.%s\n", typ.PkgPath(), typ.Name()) 38 | checkType(typ, typ.Name(), seenTypes, &errs) 39 | } 40 | 41 | for _, err := range errs { 42 | fmt.Println(err) 43 | } 44 | 45 | if len(errs) > 0 { 46 | os.Exit(1) 47 | } 48 | } 49 | 50 | func parseTag(tag string) (name string) { 51 | if idx := strings.Index(tag, ","); idx != -1 { 52 | return tag[:idx] 53 | } else { 54 | return tag 55 | } 56 | } 57 | 58 | // typ must be a struct type 59 | func checkType(typ reflect.Type, path string, seenTypes map[reflect.Type]struct{}, errs *[]error) { 60 | if _, ok := seenTypes[typ]; ok { 61 | return 62 | } 63 | 64 | for i := 0; i < typ.NumField(); i++ { 65 | field := typ.Field(i) 66 | if !field.IsExported() { 67 | continue 68 | } 69 | fieldTyp := field.Type 70 | origFieldTyp := fieldTyp 71 | 72 | if fieldTyp.Kind() == reflect.Ptr || 73 | fieldTyp.Kind() == reflect.Slice || 74 | fieldTyp.Kind() == reflect.Array || 75 | fieldTyp.Kind() == reflect.Map { 76 | fieldTyp = fieldTyp.Elem() 77 | } 78 | if fieldTyp.Kind() != reflect.Struct { 79 | continue 80 | } 81 | 82 | var newPath string 83 | switch origFieldTyp.Kind() { 84 | case reflect.Struct, reflect.Ptr: 85 | newPath = fmt.Sprintf("%s.%s", path, field.Name) 86 | case reflect.Array, reflect.Slice: 87 | newPath = fmt.Sprintf("%s.%s[0]", path, field.Name) 88 | case reflect.Map: 89 | newPath = fmt.Sprintf("%s.%s[*]", path, field.Name) 90 | default: 91 | continue 92 | } 93 | 94 | tag := field.Tag.Get("json") 95 | name := parseTag(tag) 96 | if name == "" && !field.Anonymous { 97 | *errs = append( 98 | *errs, 99 | fmt.Errorf("field %s has no json tag and is not embedded, will cause unpredictable deserialization", newPath), 100 | ) 101 | } 102 | checkType(fieldTyp, newPath, seenTypes, errs) 103 | } 104 | 105 | seenTypes[typ] = struct{}{} 106 | } 107 | -------------------------------------------------------------------------------- /config/crd/bases/autoscaling.katalyst.kubewharf.io_virtualworkloads.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | controller-gen.kubebuilder.io/version: v0.15.0 7 | name: virtualworkloads.autoscaling.katalyst.kubewharf.io 8 | spec: 9 | group: autoscaling.katalyst.kubewharf.io 10 | names: 11 | kind: VirtualWorkload 12 | listKind: VirtualWorkloadList 13 | plural: virtualworkloads 14 | singular: virtualworkload 15 | scope: Namespaced 16 | versions: 17 | - name: v1alpha2 18 | schema: 19 | openAPIV3Schema: 20 | description: |- 21 | VirtualWorkload is the Schema for the virtualworkloads API 22 | VirtualWorkload is used to support IHPA's Preview mode, that is, by providing 23 | a virtual workload reference so that scaling will not affect the real workload. 24 | properties: 25 | apiVersion: 26 | description: |- 27 | APIVersion defines the versioned schema of this representation of an object. 28 | Servers should convert recognized schemas to the latest internal value, and 29 | may reject unrecognized values. 30 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 31 | type: string 32 | kind: 33 | description: |- 34 | Kind is a string value representing the REST resource this object represents. 35 | Servers may infer this from the endpoint the client submits requests to. 36 | Cannot be updated. 37 | In CamelCase. 38 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 39 | type: string 40 | metadata: 41 | type: object 42 | spec: 43 | description: VirtualWorkloadSpec defines the desired state of VirtualWorkload 44 | properties: 45 | replicas: 46 | format: int32 47 | type: integer 48 | required: 49 | - replicas 50 | type: object 51 | status: 52 | description: VirtualWorkloadStatus defines the observed state of VirtualWorkload 53 | properties: 54 | replicas: 55 | format: int32 56 | type: integer 57 | selector: 58 | type: string 59 | required: 60 | - replicas 61 | - selector 62 | type: object 63 | type: object 64 | served: true 65 | storage: true 66 | subresources: 67 | scale: 68 | labelSelectorPath: .status.selector 69 | specReplicasPath: .spec.replicas 70 | statusReplicasPath: .status.replicas 71 | status: {} 72 | -------------------------------------------------------------------------------- /config/crd/bases/overcommit.katalyst.kubewharf.io_nodeovercommitconfigs.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: apiextensions.k8s.io/v1 3 | kind: CustomResourceDefinition 4 | metadata: 5 | annotations: 6 | controller-gen.kubebuilder.io/version: v0.15.0 7 | name: nodeovercommitconfigs.overcommit.katalyst.kubewharf.io 8 | spec: 9 | group: overcommit.katalyst.kubewharf.io 10 | names: 11 | kind: NodeOvercommitConfig 12 | listKind: NodeOvercommitConfigList 13 | plural: nodeovercommitconfigs 14 | shortNames: 15 | - noc 16 | singular: nodeovercommitconfig 17 | scope: Cluster 18 | versions: 19 | - additionalPrinterColumns: 20 | - jsonPath: .spec.resourceOvercommitRatio 21 | name: OVERCOMMITRATIO 22 | type: string 23 | - jsonPath: .spec.nodeOvercommitSelectorVal 24 | name: SELECTOR 25 | type: string 26 | name: v1alpha1 27 | schema: 28 | openAPIV3Schema: 29 | description: NodeOvercommitConfig is the Schema for the nodeovercommitconfigs 30 | API 31 | properties: 32 | apiVersion: 33 | description: |- 34 | APIVersion defines the versioned schema of this representation of an object. 35 | Servers should convert recognized schemas to the latest internal value, and 36 | may reject unrecognized values. 37 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources 38 | type: string 39 | kind: 40 | description: |- 41 | Kind is a string value representing the REST resource this object represents. 42 | Servers may infer this from the endpoint the client submits requests to. 43 | Cannot be updated. 44 | In CamelCase. 45 | More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 46 | type: string 47 | metadata: 48 | type: object 49 | spec: 50 | description: NodeOvercommitConfigSpec is a description of a NodeOvercommitConfig 51 | properties: 52 | nodeOvercommitSelectorVal: 53 | description: |- 54 | NodeOvercommitSelectorVal is the value of node label selector with key consts.NodeOvercommitSelectorKey, 55 | it decides whether to update Nodes if the Node matches the selector 'consts.NodeOvercommitSelectorKey=NodeOvercommitSelectorVal' 56 | type: string 57 | resourceOvercommitRatio: 58 | additionalProperties: 59 | type: string 60 | description: |- 61 | ResourceOvercommitRatio describes the resource overcommit ratio that needs to inject into Node.Annotations 62 | cpu,memory are supported. 63 | type: object 64 | type: object 65 | status: 66 | properties: 67 | matchedNodeList: 68 | description: NodeList which the nodeOvercommitConfig rules matched 69 | items: 70 | type: string 71 | type: array 72 | type: object 73 | type: object 74 | served: true 75 | storage: true 76 | subresources: 77 | status: {} 78 | -------------------------------------------------------------------------------- /docs/developer-guide.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubewharf/katalyst-api/8231bbe27765147e214ddb7710e2e9d3f2f93486/docs/developer-guide.md -------------------------------------------------------------------------------- /docs/imgs/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubewharf/katalyst-api/8231bbe27765147e214ddb7710e2e9d3f2f93486/docs/imgs/.gitkeep -------------------------------------------------------------------------------- /docs/manually-setup.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubewharf/katalyst-api/8231bbe27765147e214ddb7710e2e9d3f2f93486/docs/manually-setup.md -------------------------------------------------------------------------------- /docs/resource-and-system-requirements.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubewharf/katalyst-api/8231bbe27765147e214ddb7710e2e9d3f2f93486/docs/resource-and-system-requirements.md -------------------------------------------------------------------------------- /docs/roadmap.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kubewharf/katalyst-api/8231bbe27765147e214ddb7710e2e9d3f2f93486/docs/roadmap.md -------------------------------------------------------------------------------- /hack/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | -------------------------------------------------------------------------------- /hack/tools/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/kubewharf/katalyst-api 2 | 3 | go 1.22.0 4 | 5 | toolchain go1.22.3 6 | 7 | require sigs.k8s.io/controller-tools v0.15.0 8 | 9 | require ( 10 | github.com/fatih/color v1.16.0 // indirect 11 | github.com/go-logr/logr v1.4.1 // indirect 12 | github.com/gobuffalo/flect v1.0.2 // indirect 13 | github.com/gogo/protobuf v1.3.2 // indirect 14 | github.com/google/gofuzz v1.2.0 // indirect 15 | github.com/inconshreveable/mousetrap v1.1.0 // indirect 16 | github.com/json-iterator/go v1.1.12 // indirect 17 | github.com/mattn/go-colorable v0.1.13 // indirect 18 | github.com/mattn/go-isatty v0.0.20 // indirect 19 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 20 | github.com/modern-go/reflect2 v1.0.2 // indirect 21 | github.com/spf13/cobra v1.8.0 // indirect 22 | github.com/spf13/pflag v1.0.5 // indirect 23 | golang.org/x/mod v0.17.0 // indirect 24 | golang.org/x/net v0.24.0 // indirect 25 | golang.org/x/sync v0.7.0 // indirect 26 | golang.org/x/sys v0.19.0 // indirect 27 | golang.org/x/text v0.14.0 // indirect 28 | golang.org/x/tools v0.20.0 // indirect 29 | gopkg.in/inf.v0 v0.9.1 // indirect 30 | gopkg.in/yaml.v2 v2.4.0 // indirect 31 | gopkg.in/yaml.v3 v3.0.1 // indirect 32 | k8s.io/api v0.30.0 // indirect 33 | k8s.io/apiextensions-apiserver v0.30.0 // indirect 34 | k8s.io/apimachinery v0.30.0 // indirect 35 | k8s.io/klog/v2 v2.120.1 // indirect 36 | k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect 37 | sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect 38 | sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect 39 | sigs.k8s.io/yaml v1.4.0 // indirect 40 | ) 41 | -------------------------------------------------------------------------------- /hack/tools/tools.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | //go:build tools 16 | // +build tools 17 | 18 | // This package imports things required by build scripts, to force `go mod` to see them as dependencies 19 | package tools 20 | 21 | import ( 22 | _ "sigs.k8s.io/controller-tools/cmd/controller-gen" 23 | ) 24 | -------------------------------------------------------------------------------- /hack/update-codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Copyright 2022 The Katalyst Authors. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o errexit 18 | set -o nounset 19 | set -o pipefail 20 | 21 | SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. 22 | 23 | # generate the code with: 24 | # --output-base because this script should also be able to run inside the vendor dir of 25 | # k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir 26 | # instead of the $GOPATH directly. For normal projects this can be dropped. 27 | ./hack/generate-groups.sh all \ 28 | github.com/kubewharf/katalyst-api/pkg/client github.com/kubewharf/katalyst-api/pkg/apis \ 29 | "node:v1alpha1 recommendation:v1alpha1 autoscaling:v1alpha1,v1alpha2 config:v1alpha1 workload:v1alpha1 overcommit:v1alpha1 tide:v1alpha1" \ 30 | --output-base "$(dirname "${BASH_SOURCE[0]}")/../../../../" \ 31 | --go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt 32 | 33 | ./hack/generate-internal-groups.sh \ 34 | "deepcopy,defaulter,conversion" \ 35 | github.com/kubewharf/katalyst-api/pkg/apis/scheduling/generated \ 36 | github.com/kubewharf/katalyst-api/pkg/apis/scheduling \ 37 | github.com/kubewharf/katalyst-api/pkg/apis/scheduling \ 38 | "config:v1beta3" \ 39 | --go-header-file "${SCRIPT_ROOT}"/hack/boilerplate.go.txt 40 | -------------------------------------------------------------------------------- /init.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | /* 5 | Copyright 2022 The Katalyst Authors. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | */ 19 | 20 | // This package imports things required by build scripts, to force `go mod` to see them as dependencies 21 | package katalyst_api 22 | 23 | import _ "k8s.io/code-generator" 24 | -------------------------------------------------------------------------------- /pkg/apis/autoscaling/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=autoscaling.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst Autoscaling API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/autoscaling/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "autoscaling.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 32 | 33 | // ResourceName const is used to construct standard gvr 34 | const ( 35 | ResourceNameKatalystVPA = "katalystverticalpodautoscalers" 36 | ResourceNameVPARecommendation = "verticalpodautoscalerrecommendations" 37 | ) 38 | 39 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 40 | func Resource(resource string) schema.GroupResource { 41 | return SchemeGroupVersion.WithResource(resource).GroupResource() 42 | } 43 | 44 | var ( 45 | // SchemeBuilder collects schemas to build. 46 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 47 | // AddToScheme is used by generated client to add this scheme to the generated client. 48 | AddToScheme = SchemeBuilder.AddToScheme 49 | ) 50 | 51 | // Adds the list of known types to the given scheme. 52 | func addKnownTypes(scheme *runtime.Scheme) error { 53 | scheme.AddKnownTypes(SchemeGroupVersion, 54 | &KatalystVerticalPodAutoscaler{}, 55 | &VerticalPodAutoscalerRecommendation{}, 56 | &KatalystVerticalPodAutoscalerList{}, 57 | &VerticalPodAutoscalerRecommendationList{}, 58 | ) 59 | 60 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 61 | return nil 62 | } 63 | -------------------------------------------------------------------------------- /pkg/apis/autoscaling/v1alpha2/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=autoscaling.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha2 provides alpha API for Katalyst Autoscaling API objects. 22 | package v1alpha2 // import "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha2" 23 | -------------------------------------------------------------------------------- /pkg/apis/autoscaling/v1alpha2/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha2 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "autoscaling.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} 32 | 33 | // ResourceName const is used to construct standard gvr 34 | const ( 35 | ResourceNameKatalystVPA = "katalystverticalpodautoscalers" 36 | ResourceNameIHPA = "intelligenthorizontalpodautoscalers" 37 | ResourceNameVirtualWorkload = "virtualworkloads" 38 | ) 39 | 40 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 41 | func Resource(resource string) schema.GroupResource { 42 | return SchemeGroupVersion.WithResource(resource).GroupResource() 43 | } 44 | 45 | var ( 46 | // SchemeBuilder collects schemas to build. 47 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 48 | // AddToScheme is used by generated client to add this scheme to the generated client. 49 | AddToScheme = SchemeBuilder.AddToScheme 50 | ) 51 | 52 | // Adds the list of known types to the given scheme. 53 | func addKnownTypes(scheme *runtime.Scheme) error { 54 | scheme.AddKnownTypes(SchemeGroupVersion, 55 | &KatalystVerticalPodAutoscaler{}, 56 | &KatalystVerticalPodAutoscalerList{}, 57 | &IntelligentHorizontalPodAutoscaler{}, 58 | &IntelligentHorizontalPodAutoscalerList{}, 59 | &VirtualWorkload{}, 60 | &VirtualWorkloadList{}, 61 | ) 62 | 63 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 64 | return nil 65 | } 66 | -------------------------------------------------------------------------------- /pkg/apis/config/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=config.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst config API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/config/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | 24 | workloadapi "github.com/kubewharf/katalyst-api/pkg/apis/workload/v1alpha1" 25 | ) 26 | 27 | func init() { 28 | // We only register manually written functions here. The registration of the 29 | // generated functions takes place in the generated files. The separation 30 | // makes the code compile even when the generated files are missing. 31 | workloadapi.SchemeBuilder.Register(addSPDKnownTypes) 32 | } 33 | 34 | const ( 35 | // GroupName is the group name used in this package 36 | GroupName string = "config.katalyst.kubewharf.io" 37 | ) 38 | 39 | // SchemeGroupVersion is group version used to register these objects 40 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 41 | 42 | // ResourceName const is used to construct standard gvr 43 | const ( 44 | ResourceNameKatalystCustomConfigs = "katalystcustomconfigs" 45 | ResourceNameCustomNodeConfigs = "customnodeconfigs" 46 | ResourceNameAdminQoSConfigurations = "adminqosconfigurations" 47 | ResourceNameAuthConfigurations = "authconfigurations" 48 | ResourceNameTMOConfigurations = "transparentmemoryoffloadingconfigurations" 49 | ResourceNameStrategyGroupConfigurations = "strategygroupconfigurations" 50 | ResourceNameStrategyGroups = "strategygroups" 51 | ) 52 | 53 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 54 | func Resource(resource string) schema.GroupResource { 55 | return SchemeGroupVersion.WithResource(resource).GroupResource() 56 | } 57 | 58 | var ( 59 | // SchemeBuilder collects schemas to build. 60 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 61 | // AddToScheme is used by generated client to add this scheme to the generated client. 62 | AddToScheme = SchemeBuilder.AddToScheme 63 | ) 64 | 65 | func addSPDKnownTypes(scheme *runtime.Scheme) error { 66 | scheme.AddKnownTypes(workloadapi.SchemeGroupVersion, 67 | &TransparentMemoryOffloadingIndicators{}, 68 | &ResourcePortraitIndicators{}) 69 | return nil 70 | } 71 | 72 | // Adds the list of known types to the given scheme. 73 | func addKnownTypes(scheme *runtime.Scheme) error { 74 | scheme.AddKnownTypes(SchemeGroupVersion, 75 | &KatalystCustomConfig{}, 76 | &KatalystCustomConfigList{}, 77 | &CustomNodeConfig{}, 78 | &CustomNodeConfigList{}, 79 | 80 | // agent custom config crd 81 | &AdminQoSConfiguration{}, 82 | &AdminQoSConfigurationList{}, 83 | &AuthConfiguration{}, 84 | &AuthConfigurationList{}, 85 | &TransparentMemoryOffloadingConfiguration{}, 86 | &TransparentMemoryOffloadingConfigurationList{}, 87 | &StrategyGroupConfiguration{}, 88 | &StrategyGroupConfigurationList{}, 89 | &StrategyGroup{}, 90 | &StrategyGroupList{}, 91 | // global resource portrait configuration 92 | &GlobalResourcePortraitConfiguration{}, 93 | ) 94 | 95 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 96 | return nil 97 | } 98 | -------------------------------------------------------------------------------- /pkg/apis/config/v1alpha1/strategygroup.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | ) 22 | 23 | // +genclient 24 | // +genclient:nonNamespaced 25 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 26 | // +kubebuilder:object:root=true 27 | // +kubebuilder:resource:path=strategygroups,shortName=sg,scope=Cluster 28 | // +kubebuilder:subresource:status 29 | // +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=.metadata.creationTimestamp 30 | // +kubebuilder:printcolumn:name="PAUSED",type=boolean,JSONPath=".spec.paused" 31 | // +kubebuilder:printcolumn:name="SELECTOR",type=string,JSONPath=".spec.nodeLabelSelector" 32 | // +kubebuilder:printcolumn:name="PRIORITY",type=string,JSONPath=".spec.priority" 33 | // +kubebuilder:printcolumn:name="NODES",type=string,JSONPath=".spec.ephemeralSelector.nodeNames" 34 | // +kubebuilder:printcolumn:name="DURATION",type=string,JSONPath=".spec.ephemeralSelector.lastDuration" 35 | // +kubebuilder:printcolumn:name="TARGET",type=integer,JSONPath=".status.targetNodes" 36 | // +kubebuilder:printcolumn:name="CANARY",type=integer,JSONPath=".status.canaryNodes" 37 | // +kubebuilder:printcolumn:name="UPDATED-TARGET",type=integer,JSONPath=".status.updatedTargetNodes" 38 | // +kubebuilder:printcolumn:name="HASH",type=string,JSONPath=".status.currentHash" 39 | // +kubebuilder:printcolumn:name="VALID",type=string,JSONPath=".status.conditions[?(@.type==\"Valid\")].status" 40 | // +kubebuilder:printcolumn:name="REASON",type=string,JSONPath=".status.conditions[?(@.type==\"Valid\")].reason" 41 | // +kubebuilder:printcolumn:name="MESSAGE",type=string,JSONPath=".status.conditions[?(@.type==\"Valid\")].message" 42 | 43 | // StrategyGroup indicates enabled strategies for a group of nodes. 44 | type StrategyGroup struct { 45 | metav1.TypeMeta `json:",inline"` 46 | metav1.ObjectMeta `json:"metadata,omitempty"` 47 | 48 | Spec GenericConfigSpec `json:"spec,omitempty"` 49 | Status StrategyGroupStatus `json:"status,omitempty"` 50 | } 51 | 52 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 53 | // +kubebuilder:object:root=true 54 | 55 | // StrategyGroupList contains a list of StrategyGroup 56 | type StrategyGroupList struct { 57 | metav1.TypeMeta `json:",inline"` 58 | metav1.ListMeta `json:"metadata,omitempty"` 59 | Items []StrategyGroup `json:"items"` 60 | } 61 | 62 | type StrategyGroupStatus struct { 63 | GenericConfigStatus `json:",inline"` 64 | 65 | // EnabledStrategies are strategies enabled in this group 66 | EnabledStrategies []Strategy `json:"enabledStrategies"` 67 | } 68 | 69 | type Strategy struct { 70 | // Name is the name of the strategy 71 | Name *string `json:"name"` 72 | 73 | // Parameters are the parameters of the strategy 74 | // +optional 75 | Parameters map[string]string `json:"parameters,omitempty"` 76 | } 77 | -------------------------------------------------------------------------------- /pkg/apis/node/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=node.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst Node API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/node/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "node.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 32 | 33 | // ResourceNameKatalystCNR is used to construct standard gvr 34 | const ( 35 | ResourceNameKatalystCNR = "customnoderesources" 36 | ResourceNameKatalystNPD = "nodeprofiledescriptors" 37 | ) 38 | 39 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 40 | func Resource(resource string) schema.GroupResource { 41 | return SchemeGroupVersion.WithResource(resource).GroupResource() 42 | } 43 | 44 | var ( 45 | // SchemeBuilder collects schemas to build. 46 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 47 | // AddToScheme is used by generated client to add this scheme to the generated client. 48 | AddToScheme = SchemeBuilder.AddToScheme 49 | ) 50 | 51 | // Adds the list of known types to the given scheme. 52 | func addKnownTypes(scheme *runtime.Scheme) error { 53 | scheme.AddKnownTypes(SchemeGroupVersion, 54 | &CustomNodeResource{}, 55 | &CustomNodeResourceList{}, 56 | &NodeProfileDescriptor{}, 57 | &NodeProfileDescriptorList{}, 58 | ) 59 | 60 | v1.AddToGroupVersion(scheme, SchemeGroupVersion) 61 | return nil 62 | } 63 | -------------------------------------------------------------------------------- /pkg/apis/overcommit/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=overcommit.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst Overcommit API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/overcommit/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/overcommit/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "overcommit.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 32 | 33 | const ( 34 | ResourceNameNodeOvercommitConfigs = "nodeovercommitconfigs" 35 | ) 36 | 37 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 38 | func Resource(resource string) schema.GroupResource { 39 | return SchemeGroupVersion.WithResource(resource).GroupResource() 40 | } 41 | 42 | var ( 43 | // SchemeBuilder collects schemas to build. 44 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 45 | // AddToScheme is used by generated client to add this scheme to the generated client. 46 | AddToScheme = SchemeBuilder.AddToScheme 47 | ) 48 | 49 | // Adds the list of known types to the given scheme. 50 | func addKnownTypes(scheme *runtime.Scheme) error { 51 | scheme.AddKnownTypes(SchemeGroupVersion, 52 | &NodeOvercommitConfig{}, 53 | &NodeOvercommitConfigList{}, 54 | ) 55 | 56 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 57 | return nil 58 | } 59 | -------------------------------------------------------------------------------- /pkg/apis/overcommit/v1alpha1/types.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | v1 "k8s.io/api/core/v1" 21 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 22 | ) 23 | 24 | // NodeOvercommitConfigSpec is a description of a NodeOvercommitConfig 25 | type NodeOvercommitConfigSpec struct { 26 | // NodeOvercommitSelectorVal is the value of node label selector with key consts.NodeOvercommitSelectorKey, 27 | // it decides whether to update Nodes if the Node matches the selector 'consts.NodeOvercommitSelectorKey=NodeOvercommitSelectorVal' 28 | // +optional 29 | NodeOvercommitSelectorVal string `json:"nodeOvercommitSelectorVal,omitempty"` 30 | 31 | // ResourceOvercommitRatio describes the resource overcommit ratio that needs to inject into Node.Annotations 32 | // cpu,memory are supported. 33 | // +optional 34 | ResourceOvercommitRatio map[v1.ResourceName]string `json:"resourceOvercommitRatio,omitempty"` 35 | } 36 | 37 | type NodeOvercommitConfigStatus struct { 38 | // NodeList which the nodeOvercommitConfig rules matched 39 | MatchedNodeList []string `json:"matchedNodeList,omitempty"` 40 | } 41 | 42 | // +genclient 43 | // +genclient:nonNamespaced 44 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 45 | // +kubebuilder:object:root=true 46 | // +kubebuilder:subresource:status 47 | // +kubebuilder:resource:scope=Cluster,shortName=noc 48 | // +kubebuilder:printcolumn:name="OVERCOMMITRATIO",type=string,JSONPath=".spec.resourceOvercommitRatio" 49 | // +kubebuilder:printcolumn:name="SELECTOR",type=string,JSONPath=".spec.nodeOvercommitSelectorVal" 50 | 51 | // NodeOvercommitConfig is the Schema for the nodeovercommitconfigs API 52 | type NodeOvercommitConfig struct { 53 | metav1.TypeMeta `json:",inline"` 54 | metav1.ObjectMeta `json:"metadata,omitempty"` 55 | 56 | Spec NodeOvercommitConfigSpec `json:"spec,omitempty"` 57 | Status NodeOvercommitConfigStatus `json:"status,omitempty"` 58 | } 59 | 60 | // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object 61 | //+kubebuilder:object:root=true 62 | 63 | // NodeOvercommitConfigList contains a list of NodeOvercommitConfig 64 | type NodeOvercommitConfigList struct { 65 | metav1.TypeMeta `json:",inline"` 66 | metav1.ListMeta `json:"metadata,omitempty"` 67 | Items []NodeOvercommitConfig `json:"items"` 68 | } 69 | -------------------------------------------------------------------------------- /pkg/apis/recommendation/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=recommendation.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst Recommendation API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/recommendation/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/recommendation/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "recommendation.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 32 | 33 | // ResourceNameResourceRecommend const is used to construct standard gvr 34 | const ( 35 | ResourceNameResourceRecommend = "resourcerecommends" 36 | ) 37 | 38 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 39 | func Resource(resource string) schema.GroupResource { 40 | return SchemeGroupVersion.WithResource(resource).GroupResource() 41 | } 42 | 43 | var ( 44 | // SchemeBuilder collects schemas to build. 45 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 46 | // AddToScheme is used by generated client to add this scheme to the generated client. 47 | AddToScheme = SchemeBuilder.AddToScheme 48 | ) 49 | 50 | // Adds the list of known types to the given scheme. 51 | func addKnownTypes(scheme *runtime.Scheme) error { 52 | scheme.AddKnownTypes(SchemeGroupVersion, 53 | &ResourceRecommend{}, 54 | &ResourceRecommendList{}, 55 | ) 56 | 57 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 58 | return nil 59 | } 60 | -------------------------------------------------------------------------------- /pkg/apis/scheduling/config/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +k8s:deepcopy-gen=package 16 | // +groupName=kubescheduler.config.k8s.io 17 | 18 | package config 19 | -------------------------------------------------------------------------------- /pkg/apis/scheduling/config/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package config 16 | 17 | import ( 18 | "k8s.io/apimachinery/pkg/runtime" 19 | "k8s.io/apimachinery/pkg/runtime/schema" 20 | schedscheme "k8s.io/kubernetes/pkg/scheduler/apis/config" 21 | ) 22 | 23 | // SchemeGroupVersion is group version used to register these objects 24 | var SchemeGroupVersion = schema.GroupVersion{Group: schedscheme.GroupName, Version: runtime.APIVersionInternal} 25 | 26 | var ( 27 | localSchemeBuilder = &schedscheme.SchemeBuilder 28 | // AddToScheme is a global function that registers this API group & version to a scheme 29 | AddToScheme = localSchemeBuilder.AddToScheme 30 | ) 31 | 32 | // addKnownTypes registers known types to the given scheme 33 | func addKnownTypes(scheme *runtime.Scheme) error { 34 | scheme.AddKnownTypes(SchemeGroupVersion, 35 | &QoSAwareNodeResourcesFitArgs{}, 36 | &QoSAwareNodeResourcesBalancedAllocationArgs{}, 37 | &NodeResourceTopologyArgs{}, 38 | ) 39 | return nil 40 | } 41 | 42 | func init() { 43 | // We only register manually written functions here. The registration of the 44 | // generated functions takes place in the generated files. The separation 45 | // makes the code compile even when the generated files are missing. 46 | localSchemeBuilder.Register(addKnownTypes) 47 | } 48 | -------------------------------------------------------------------------------- /pkg/apis/scheduling/config/scheme/scheme.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package scheme 16 | 17 | import ( 18 | "k8s.io/apimachinery/pkg/runtime" 19 | "k8s.io/apimachinery/pkg/runtime/serializer" 20 | utilruntime "k8s.io/apimachinery/pkg/util/runtime" 21 | kubeschedulerscheme "k8s.io/kubernetes/pkg/scheduler/apis/config/scheme" 22 | 23 | "github.com/kubewharf/katalyst-api/pkg/apis/scheduling/config" 24 | configv1beta3 "github.com/kubewharf/katalyst-api/pkg/apis/scheduling/config/v1beta3" 25 | ) 26 | 27 | var ( 28 | // Scheme is the in-tree Scheme. 29 | Scheme = kubeschedulerscheme.Scheme 30 | 31 | // Codecs provides access to encoding and decoding for the scheme. 32 | Codecs = serializer.NewCodecFactory(Scheme, serializer.EnableStrict) 33 | ) 34 | 35 | func init() { 36 | AddToScheme(Scheme) 37 | } 38 | 39 | // AddToScheme builds the kubescheduler scheme using all known versions of the kubescheduler api. 40 | func AddToScheme(scheme *runtime.Scheme) { 41 | utilruntime.Must(config.AddToScheme(scheme)) 42 | utilruntime.Must(configv1beta3.AddToScheme(scheme)) 43 | } 44 | -------------------------------------------------------------------------------- /pkg/apis/scheduling/config/v1beta3/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // +k8s:deepcopy-gen=package 16 | // +k8s:conversion-gen=github.com/kubewharf/katalyst-api/pkg/apis/scheduling/config 17 | // +k8s:defaulter-gen=TypeMeta 18 | // +groupName=kubescheduler.config.k8s.io 19 | 20 | package v1beta3 21 | -------------------------------------------------------------------------------- /pkg/apis/scheduling/config/v1beta3/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package v1beta3 16 | 17 | import ( 18 | "k8s.io/apimachinery/pkg/runtime" 19 | "k8s.io/apimachinery/pkg/runtime/schema" 20 | schedschemev1beta3 "k8s.io/kube-scheduler/config/v1beta3" 21 | ) 22 | 23 | // SchemeGroupVersion is group version used to register these objects 24 | var SchemeGroupVersion = schema.GroupVersion{Group: schedschemev1beta3.GroupName, Version: "v1beta3"} 25 | 26 | var ( 27 | localSchemeBuilder = &schedschemev1beta3.SchemeBuilder 28 | // AddToScheme is a global function that registers this API group & version to a scheme 29 | AddToScheme = localSchemeBuilder.AddToScheme 30 | ) 31 | 32 | // addKnownTypes registers known types to the given scheme 33 | func addKnownTypes(scheme *runtime.Scheme) error { 34 | scheme.AddKnownTypes(SchemeGroupVersion, 35 | &QoSAwareNodeResourcesFitArgs{}, 36 | &QoSAwareNodeResourcesBalancedAllocationArgs{}, 37 | &NodeResourceTopologyArgs{}, 38 | ) 39 | return nil 40 | } 41 | 42 | func init() { 43 | // We only register manually written functions here. The registration of the 44 | // generated functions takes place in the generated files. The separation 45 | // makes the code compile even when the generated files are missing. 46 | localSchemeBuilder.Register(addKnownTypes) 47 | localSchemeBuilder.Register(RegisterDefaults) 48 | localSchemeBuilder.Register(RegisterConversions) 49 | } 50 | -------------------------------------------------------------------------------- /pkg/apis/scheduling/config/v1beta3/zz_generated.defaults.go: -------------------------------------------------------------------------------- 1 | //go:build !ignore_autogenerated 2 | // +build !ignore_autogenerated 3 | 4 | /* 5 | Copyright 2022 The Katalyst Authors. 6 | 7 | Licensed under the Apache License, Version 2.0 (the "License"); 8 | you may not use this file except in compliance with the License. 9 | You may obtain a copy of the License at 10 | 11 | http://www.apache.org/licenses/LICENSE-2.0 12 | 13 | Unless required by applicable law or agreed to in writing, software 14 | distributed under the License is distributed on an "AS IS" BASIS, 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | See the License for the specific language governing permissions and 17 | limitations under the License. 18 | */ 19 | 20 | // Code generated by defaulter-gen. DO NOT EDIT. 21 | 22 | package v1beta3 23 | 24 | import ( 25 | runtime "k8s.io/apimachinery/pkg/runtime" 26 | ) 27 | 28 | // RegisterDefaults adds defaulters functions to the given scheme. 29 | // Public to allow building arbitrary schemes. 30 | // All generated defaulters are covering - they call all nested defaulters. 31 | func RegisterDefaults(scheme *runtime.Scheme) error { 32 | scheme.AddTypeDefaultingFunc(&NodeResourceTopologyArgs{}, func(obj interface{}) { SetObjectDefaults_NodeResourceTopologyArgs(obj.(*NodeResourceTopologyArgs)) }) 33 | scheme.AddTypeDefaultingFunc(&QoSAwareNodeResourcesBalancedAllocationArgs{}, func(obj interface{}) { 34 | SetObjectDefaults_QoSAwareNodeResourcesBalancedAllocationArgs(obj.(*QoSAwareNodeResourcesBalancedAllocationArgs)) 35 | }) 36 | scheme.AddTypeDefaultingFunc(&QoSAwareNodeResourcesFitArgs{}, func(obj interface{}) { 37 | SetObjectDefaults_QoSAwareNodeResourcesFitArgs(obj.(*QoSAwareNodeResourcesFitArgs)) 38 | }) 39 | return nil 40 | } 41 | 42 | func SetObjectDefaults_NodeResourceTopologyArgs(in *NodeResourceTopologyArgs) { 43 | SetDefaults_NodeResourceTopologyArgs(in) 44 | } 45 | 46 | func SetObjectDefaults_QoSAwareNodeResourcesBalancedAllocationArgs(in *QoSAwareNodeResourcesBalancedAllocationArgs) { 47 | SetDefaults_QoSAwareNodeResourcesBalancedAllocationArgs(in) 48 | } 49 | 50 | func SetObjectDefaults_QoSAwareNodeResourcesFitArgs(in *QoSAwareNodeResourcesFitArgs) { 51 | SetDefaults_QoSAwareNodeResourcesFitArgs(in) 52 | } 53 | -------------------------------------------------------------------------------- /pkg/apis/tide/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=tide.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst Autoscaling API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/tide/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/tide/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "tide.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 32 | 33 | // ResourceName const is used to construct standard gvr 34 | const ( 35 | ResourceNameTideNodePool = "tidenodepools" 36 | ) 37 | 38 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 39 | func Resource(resource string) schema.GroupResource { 40 | return SchemeGroupVersion.WithResource(resource).GroupResource() 41 | } 42 | 43 | var ( 44 | // SchemeBuilder collects schemas to build. 45 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 46 | // AddToScheme is used by generated client to add this scheme to the generated client. 47 | AddToScheme = SchemeBuilder.AddToScheme 48 | ) 49 | 50 | // Adds the list of known types to the given scheme. 51 | func addKnownTypes(scheme *runtime.Scheme) error { 52 | scheme.AddKnownTypes(SchemeGroupVersion, 53 | &TideNodePool{}, 54 | &TideNodePoolList{}, 55 | ) 56 | 57 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 58 | return nil 59 | } 60 | -------------------------------------------------------------------------------- /pkg/apis/workload/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // +k8s:deepcopy-gen=package 18 | // +groupName=workload.katalyst.kubewharf.io 19 | // +k8s:openapi-gen=true 20 | 21 | // Package v1alpha1 provides alpha API for Katalyst Workload API objects. 22 | package v1alpha1 // import "github.com/kubewharf/katalyst-api/pkg/apis/workload/v1alpha1" 23 | -------------------------------------------------------------------------------- /pkg/apis/workload/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | import ( 20 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 21 | "k8s.io/apimachinery/pkg/runtime" 22 | "k8s.io/apimachinery/pkg/runtime/schema" 23 | ) 24 | 25 | const ( 26 | // GroupName is the group name used in this package 27 | GroupName string = "workload.katalyst.kubewharf.io" 28 | ) 29 | 30 | // SchemeGroupVersion is group version used to register these objects 31 | var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} 32 | 33 | // ResourceNameServiceProfileDescriptors const is used to construct standard gvr 34 | const ( 35 | ResourceNameServiceProfileDescriptors = "serviceprofiledescriptors" 36 | ) 37 | 38 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 39 | func Resource(resource string) schema.GroupResource { 40 | return SchemeGroupVersion.WithResource(resource).GroupResource() 41 | } 42 | 43 | var ( 44 | // SchemeBuilder collects schemas to build. 45 | SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) 46 | // AddToScheme is used by generated client to add this scheme to the generated client. 47 | AddToScheme = SchemeBuilder.AddToScheme 48 | ) 49 | 50 | // Adds the list of known types to the given scheme. 51 | func addKnownTypes(scheme *runtime.Scheme) error { 52 | scheme.AddKnownTypes(SchemeGroupVersion, 53 | &ServiceProfileDescriptor{}, 54 | &ServiceProfileDescriptorList{}, 55 | 56 | &TestExtendedIndicators{}, 57 | ) 58 | 59 | metav1.AddToGroupVersion(scheme, SchemeGroupVersion) 60 | return nil 61 | } 62 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated clientset. 20 | package versioned 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated fake clientset. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/fake/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | autoscalingv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha1" 23 | autoscalingv1alpha2 "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha2" 24 | configv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 25 | nodev1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 26 | overcommitv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/overcommit/v1alpha1" 27 | recommendationv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/recommendation/v1alpha1" 28 | tidev1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/tide/v1alpha1" 29 | workloadv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/workload/v1alpha1" 30 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 31 | runtime "k8s.io/apimachinery/pkg/runtime" 32 | schema "k8s.io/apimachinery/pkg/runtime/schema" 33 | serializer "k8s.io/apimachinery/pkg/runtime/serializer" 34 | utilruntime "k8s.io/apimachinery/pkg/util/runtime" 35 | ) 36 | 37 | var scheme = runtime.NewScheme() 38 | var codecs = serializer.NewCodecFactory(scheme) 39 | 40 | var localSchemeBuilder = runtime.SchemeBuilder{ 41 | autoscalingv1alpha1.AddToScheme, 42 | autoscalingv1alpha2.AddToScheme, 43 | configv1alpha1.AddToScheme, 44 | nodev1alpha1.AddToScheme, 45 | overcommitv1alpha1.AddToScheme, 46 | recommendationv1alpha1.AddToScheme, 47 | tidev1alpha1.AddToScheme, 48 | workloadv1alpha1.AddToScheme, 49 | } 50 | 51 | // AddToScheme adds all types of this clientset into the given scheme. This allows composition 52 | // of clientsets, like in: 53 | // 54 | // import ( 55 | // "k8s.io/client-go/kubernetes" 56 | // clientsetscheme "k8s.io/client-go/kubernetes/scheme" 57 | // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" 58 | // ) 59 | // 60 | // kclientset, _ := kubernetes.NewForConfig(c) 61 | // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) 62 | // 63 | // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types 64 | // correctly. 65 | var AddToScheme = localSchemeBuilder.AddToScheme 66 | 67 | func init() { 68 | v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"}) 69 | utilruntime.Must(AddToScheme(scheme)) 70 | } 71 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/scheme/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package contains the scheme of the automatically generated clientset. 20 | package scheme 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/scheme/register.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package scheme 20 | 21 | import ( 22 | autoscalingv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha1" 23 | autoscalingv1alpha2 "github.com/kubewharf/katalyst-api/pkg/apis/autoscaling/v1alpha2" 24 | configv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 25 | nodev1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 26 | overcommitv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/overcommit/v1alpha1" 27 | recommendationv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/recommendation/v1alpha1" 28 | tidev1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/tide/v1alpha1" 29 | workloadv1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/workload/v1alpha1" 30 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 31 | runtime "k8s.io/apimachinery/pkg/runtime" 32 | schema "k8s.io/apimachinery/pkg/runtime/schema" 33 | serializer "k8s.io/apimachinery/pkg/runtime/serializer" 34 | utilruntime "k8s.io/apimachinery/pkg/util/runtime" 35 | ) 36 | 37 | var Scheme = runtime.NewScheme() 38 | var Codecs = serializer.NewCodecFactory(Scheme) 39 | var ParameterCodec = runtime.NewParameterCodec(Scheme) 40 | var localSchemeBuilder = runtime.SchemeBuilder{ 41 | autoscalingv1alpha1.AddToScheme, 42 | autoscalingv1alpha2.AddToScheme, 43 | configv1alpha1.AddToScheme, 44 | nodev1alpha1.AddToScheme, 45 | overcommitv1alpha1.AddToScheme, 46 | recommendationv1alpha1.AddToScheme, 47 | tidev1alpha1.AddToScheme, 48 | workloadv1alpha1.AddToScheme, 49 | } 50 | 51 | // AddToScheme adds all types of this clientset into the given scheme. This allows composition 52 | // of clientsets, like in: 53 | // 54 | // import ( 55 | // "k8s.io/client-go/kubernetes" 56 | // clientsetscheme "k8s.io/client-go/kubernetes/scheme" 57 | // aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" 58 | // ) 59 | // 60 | // kclientset, _ := kubernetes.NewForConfig(c) 61 | // _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) 62 | // 63 | // After this, RawExtensions in Kubernetes types will serialize kube-aggregator types 64 | // correctly. 65 | var AddToScheme = localSchemeBuilder.AddToScheme 66 | 67 | func init() { 68 | v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) 69 | utilruntime.Must(AddToScheme(Scheme)) 70 | } 71 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/fake/fake_autoscaling_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/autoscaling/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeAutoscalingV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeAutoscalingV1alpha1) KatalystVerticalPodAutoscalers(namespace string) v1alpha1.KatalystVerticalPodAutoscalerInterface { 32 | return &FakeKatalystVerticalPodAutoscalers{c, namespace} 33 | } 34 | 35 | func (c *FakeAutoscalingV1alpha1) VerticalPodAutoscalerRecommendations(namespace string) v1alpha1.VerticalPodAutoscalerRecommendationInterface { 36 | return &FakeVerticalPodAutoscalerRecommendations{c, namespace} 37 | } 38 | 39 | // RESTClient returns a RESTClient that is used to communicate 40 | // with API server by this client implementation. 41 | func (c *FakeAutoscalingV1alpha1) RESTClient() rest.Interface { 42 | var ret *rest.RESTClient 43 | return ret 44 | } 45 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type KatalystVerticalPodAutoscalerExpansion interface{} 22 | 23 | type VerticalPodAutoscalerRecommendationExpansion interface{} 24 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha2/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha2 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha2/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha2/fake/fake_autoscaling_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha2 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/autoscaling/v1alpha2" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeAutoscalingV1alpha2 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeAutoscalingV1alpha2) IntelligentHorizontalPodAutoscalers(namespace string) v1alpha2.IntelligentHorizontalPodAutoscalerInterface { 32 | return &FakeIntelligentHorizontalPodAutoscalers{c, namespace} 33 | } 34 | 35 | func (c *FakeAutoscalingV1alpha2) KatalystVerticalPodAutoscalers(namespace string) v1alpha2.KatalystVerticalPodAutoscalerInterface { 36 | return &FakeKatalystVerticalPodAutoscalers{c, namespace} 37 | } 38 | 39 | func (c *FakeAutoscalingV1alpha2) VirtualWorkloads(namespace string) v1alpha2.VirtualWorkloadInterface { 40 | return &FakeVirtualWorkloads{c, namespace} 41 | } 42 | 43 | // RESTClient returns a RESTClient that is used to communicate 44 | // with API server by this client implementation. 45 | func (c *FakeAutoscalingV1alpha2) RESTClient() rest.Interface { 46 | var ret *rest.RESTClient 47 | return ret 48 | } 49 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/autoscaling/v1alpha2/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha2 20 | 21 | type IntelligentHorizontalPodAutoscalerExpansion interface{} 22 | 23 | type KatalystVerticalPodAutoscalerExpansion interface{} 24 | 25 | type VirtualWorkloadExpansion interface{} 26 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/config/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/config/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/config/v1alpha1/fake/fake_config_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/config/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeConfigV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeConfigV1alpha1) CustomNodeConfigs() v1alpha1.CustomNodeConfigInterface { 32 | return &FakeCustomNodeConfigs{c} 33 | } 34 | 35 | func (c *FakeConfigV1alpha1) KatalystCustomConfigs(namespace string) v1alpha1.KatalystCustomConfigInterface { 36 | return &FakeKatalystCustomConfigs{c, namespace} 37 | } 38 | 39 | func (c *FakeConfigV1alpha1) StrategyGroups() v1alpha1.StrategyGroupInterface { 40 | return &FakeStrategyGroups{c} 41 | } 42 | 43 | func (c *FakeConfigV1alpha1) StrategyGroupConfigurations() v1alpha1.StrategyGroupConfigurationInterface { 44 | return &FakeStrategyGroupConfigurations{c} 45 | } 46 | 47 | // RESTClient returns a RESTClient that is used to communicate 48 | // with API server by this client implementation. 49 | func (c *FakeConfigV1alpha1) RESTClient() rest.Interface { 50 | var ret *rest.RESTClient 51 | return ret 52 | } 53 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/config/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type CustomNodeConfigExpansion interface{} 22 | 23 | type KatalystCustomConfigExpansion interface{} 24 | 25 | type StrategyGroupExpansion interface{} 26 | 27 | type StrategyGroupConfigurationExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/node/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/node/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/node/v1alpha1/fake/fake_node_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/node/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeNodeV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeNodeV1alpha1) CustomNodeResources() v1alpha1.CustomNodeResourceInterface { 32 | return &FakeCustomNodeResources{c} 33 | } 34 | 35 | func (c *FakeNodeV1alpha1) NodeProfileDescriptors() v1alpha1.NodeProfileDescriptorInterface { 36 | return &FakeNodeProfileDescriptors{c} 37 | } 38 | 39 | // RESTClient returns a RESTClient that is used to communicate 40 | // with API server by this client implementation. 41 | func (c *FakeNodeV1alpha1) RESTClient() rest.Interface { 42 | var ret *rest.RESTClient 43 | return ret 44 | } 45 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/node/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type CustomNodeResourceExpansion interface{} 22 | 23 | type NodeProfileDescriptorExpansion interface{} 24 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/overcommit/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/overcommit/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/overcommit/v1alpha1/fake/fake_overcommit_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/overcommit/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeOvercommitV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeOvercommitV1alpha1) NodeOvercommitConfigs() v1alpha1.NodeOvercommitConfigInterface { 32 | return &FakeNodeOvercommitConfigs{c} 33 | } 34 | 35 | // RESTClient returns a RESTClient that is used to communicate 36 | // with API server by this client implementation. 37 | func (c *FakeOvercommitV1alpha1) RESTClient() rest.Interface { 38 | var ret *rest.RESTClient 39 | return ret 40 | } 41 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/overcommit/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type NodeOvercommitConfigExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/recommendation/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/recommendation/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/recommendation/v1alpha1/fake/fake_recommendation_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/recommendation/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeRecommendationV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeRecommendationV1alpha1) ResourceRecommends(namespace string) v1alpha1.ResourceRecommendInterface { 32 | return &FakeResourceRecommends{c, namespace} 33 | } 34 | 35 | // RESTClient returns a RESTClient that is used to communicate 36 | // with API server by this client implementation. 37 | func (c *FakeRecommendationV1alpha1) RESTClient() rest.Interface { 38 | var ret *rest.RESTClient 39 | return ret 40 | } 41 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/recommendation/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type ResourceRecommendExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/tide/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/tide/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/tide/v1alpha1/fake/fake_tide_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/tide/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeTideV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeTideV1alpha1) TideNodePools() v1alpha1.TideNodePoolInterface { 32 | return &FakeTideNodePools{c} 33 | } 34 | 35 | // RESTClient returns a RESTClient that is used to communicate 36 | // with API server by this client implementation. 37 | func (c *FakeTideV1alpha1) RESTClient() rest.Interface { 38 | var ret *rest.RESTClient 39 | return ret 40 | } 41 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/tide/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type TideNodePoolExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/workload/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // This package has the automatically generated typed clients. 20 | package v1alpha1 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/workload/v1alpha1/fake/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | // Package fake has the automatically generated clients. 20 | package fake 21 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/workload/v1alpha1/fake/fake_workload_client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package fake 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned/typed/workload/v1alpha1" 23 | rest "k8s.io/client-go/rest" 24 | testing "k8s.io/client-go/testing" 25 | ) 26 | 27 | type FakeWorkloadV1alpha1 struct { 28 | *testing.Fake 29 | } 30 | 31 | func (c *FakeWorkloadV1alpha1) ServiceProfileDescriptors(namespace string) v1alpha1.ServiceProfileDescriptorInterface { 32 | return &FakeServiceProfileDescriptors{c, namespace} 33 | } 34 | 35 | // RESTClient returns a RESTClient that is used to communicate 36 | // with API server by this client implementation. 37 | func (c *FakeWorkloadV1alpha1) RESTClient() rest.Interface { 38 | var ret *rest.RESTClient 39 | return ret 40 | } 41 | -------------------------------------------------------------------------------- /pkg/client/clientset/versioned/typed/workload/v1alpha1/generated_expansion.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by client-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | type ServiceProfileDescriptorExpansion interface{} 22 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/autoscaling/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package autoscaling 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/autoscaling/v1alpha1" 23 | v1alpha2 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/autoscaling/v1alpha2" 24 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 25 | ) 26 | 27 | // Interface provides access to each of this group's versions. 28 | type Interface interface { 29 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 30 | V1alpha1() v1alpha1.Interface 31 | // V1alpha2 provides access to shared informers for resources in V1alpha2. 32 | V1alpha2() v1alpha2.Interface 33 | } 34 | 35 | type group struct { 36 | factory internalinterfaces.SharedInformerFactory 37 | namespace string 38 | tweakListOptions internalinterfaces.TweakListOptionsFunc 39 | } 40 | 41 | // New returns a new Interface. 42 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 43 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 44 | } 45 | 46 | // V1alpha1 returns a new v1alpha1.Interface. 47 | func (g *group) V1alpha1() v1alpha1.Interface { 48 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 49 | } 50 | 51 | // V1alpha2 returns a new v1alpha2.Interface. 52 | func (g *group) V1alpha2() v1alpha2.Interface { 53 | return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) 54 | } 55 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/autoscaling/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // KatalystVerticalPodAutoscalers returns a KatalystVerticalPodAutoscalerInformer. 28 | KatalystVerticalPodAutoscalers() KatalystVerticalPodAutoscalerInformer 29 | // VerticalPodAutoscalerRecommendations returns a VerticalPodAutoscalerRecommendationInformer. 30 | VerticalPodAutoscalerRecommendations() VerticalPodAutoscalerRecommendationInformer 31 | } 32 | 33 | type version struct { 34 | factory internalinterfaces.SharedInformerFactory 35 | namespace string 36 | tweakListOptions internalinterfaces.TweakListOptionsFunc 37 | } 38 | 39 | // New returns a new Interface. 40 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 41 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 42 | } 43 | 44 | // KatalystVerticalPodAutoscalers returns a KatalystVerticalPodAutoscalerInformer. 45 | func (v *version) KatalystVerticalPodAutoscalers() KatalystVerticalPodAutoscalerInformer { 46 | return &katalystVerticalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 47 | } 48 | 49 | // VerticalPodAutoscalerRecommendations returns a VerticalPodAutoscalerRecommendationInformer. 50 | func (v *version) VerticalPodAutoscalerRecommendations() VerticalPodAutoscalerRecommendationInformer { 51 | return &verticalPodAutoscalerRecommendationInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 52 | } 53 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/autoscaling/v1alpha2/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha2 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // IntelligentHorizontalPodAutoscalers returns a IntelligentHorizontalPodAutoscalerInformer. 28 | IntelligentHorizontalPodAutoscalers() IntelligentHorizontalPodAutoscalerInformer 29 | // KatalystVerticalPodAutoscalers returns a KatalystVerticalPodAutoscalerInformer. 30 | KatalystVerticalPodAutoscalers() KatalystVerticalPodAutoscalerInformer 31 | // VirtualWorkloads returns a VirtualWorkloadInformer. 32 | VirtualWorkloads() VirtualWorkloadInformer 33 | } 34 | 35 | type version struct { 36 | factory internalinterfaces.SharedInformerFactory 37 | namespace string 38 | tweakListOptions internalinterfaces.TweakListOptionsFunc 39 | } 40 | 41 | // New returns a new Interface. 42 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 43 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 44 | } 45 | 46 | // IntelligentHorizontalPodAutoscalers returns a IntelligentHorizontalPodAutoscalerInformer. 47 | func (v *version) IntelligentHorizontalPodAutoscalers() IntelligentHorizontalPodAutoscalerInformer { 48 | return &intelligentHorizontalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 49 | } 50 | 51 | // KatalystVerticalPodAutoscalers returns a KatalystVerticalPodAutoscalerInformer. 52 | func (v *version) KatalystVerticalPodAutoscalers() KatalystVerticalPodAutoscalerInformer { 53 | return &katalystVerticalPodAutoscalerInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 54 | } 55 | 56 | // VirtualWorkloads returns a VirtualWorkloadInformer. 57 | func (v *version) VirtualWorkloads() VirtualWorkloadInformer { 58 | return &virtualWorkloadInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 59 | } 60 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/config/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package config 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/config/v1alpha1" 23 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 24 | ) 25 | 26 | // Interface provides access to each of this group's versions. 27 | type Interface interface { 28 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 29 | V1alpha1() v1alpha1.Interface 30 | } 31 | 32 | type group struct { 33 | factory internalinterfaces.SharedInformerFactory 34 | namespace string 35 | tweakListOptions internalinterfaces.TweakListOptionsFunc 36 | } 37 | 38 | // New returns a new Interface. 39 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 40 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 41 | } 42 | 43 | // V1alpha1 returns a new v1alpha1.Interface. 44 | func (g *group) V1alpha1() v1alpha1.Interface { 45 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/config/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // CustomNodeConfigs returns a CustomNodeConfigInformer. 28 | CustomNodeConfigs() CustomNodeConfigInformer 29 | // KatalystCustomConfigs returns a KatalystCustomConfigInformer. 30 | KatalystCustomConfigs() KatalystCustomConfigInformer 31 | // StrategyGroups returns a StrategyGroupInformer. 32 | StrategyGroups() StrategyGroupInformer 33 | // StrategyGroupConfigurations returns a StrategyGroupConfigurationInformer. 34 | StrategyGroupConfigurations() StrategyGroupConfigurationInformer 35 | } 36 | 37 | type version struct { 38 | factory internalinterfaces.SharedInformerFactory 39 | namespace string 40 | tweakListOptions internalinterfaces.TweakListOptionsFunc 41 | } 42 | 43 | // New returns a new Interface. 44 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 45 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 46 | } 47 | 48 | // CustomNodeConfigs returns a CustomNodeConfigInformer. 49 | func (v *version) CustomNodeConfigs() CustomNodeConfigInformer { 50 | return &customNodeConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 51 | } 52 | 53 | // KatalystCustomConfigs returns a KatalystCustomConfigInformer. 54 | func (v *version) KatalystCustomConfigs() KatalystCustomConfigInformer { 55 | return &katalystCustomConfigInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 56 | } 57 | 58 | // StrategyGroups returns a StrategyGroupInformer. 59 | func (v *version) StrategyGroups() StrategyGroupInformer { 60 | return &strategyGroupInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 61 | } 62 | 63 | // StrategyGroupConfigurations returns a StrategyGroupConfigurationInformer. 64 | func (v *version) StrategyGroupConfigurations() StrategyGroupConfigurationInformer { 65 | return &strategyGroupConfigurationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 66 | } 67 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package internalinterfaces 20 | 21 | import ( 22 | time "time" 23 | 24 | versioned "github.com/kubewharf/katalyst-api/pkg/client/clientset/versioned" 25 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 26 | runtime "k8s.io/apimachinery/pkg/runtime" 27 | cache "k8s.io/client-go/tools/cache" 28 | ) 29 | 30 | // NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. 31 | type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer 32 | 33 | // SharedInformerFactory a small interface to allow for adding an informer without an import cycle 34 | type SharedInformerFactory interface { 35 | Start(stopCh <-chan struct{}) 36 | InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer 37 | } 38 | 39 | // TweakListOptionsFunc is a function that transforms a v1.ListOptions. 40 | type TweakListOptionsFunc func(*v1.ListOptions) 41 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/node/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package node 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/node/v1alpha1" 24 | ) 25 | 26 | // Interface provides access to each of this group's versions. 27 | type Interface interface { 28 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 29 | V1alpha1() v1alpha1.Interface 30 | } 31 | 32 | type group struct { 33 | factory internalinterfaces.SharedInformerFactory 34 | namespace string 35 | tweakListOptions internalinterfaces.TweakListOptionsFunc 36 | } 37 | 38 | // New returns a new Interface. 39 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 40 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 41 | } 42 | 43 | // V1alpha1 returns a new v1alpha1.Interface. 44 | func (g *group) V1alpha1() v1alpha1.Interface { 45 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/node/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // CustomNodeResources returns a CustomNodeResourceInformer. 28 | CustomNodeResources() CustomNodeResourceInformer 29 | // NodeProfileDescriptors returns a NodeProfileDescriptorInformer. 30 | NodeProfileDescriptors() NodeProfileDescriptorInformer 31 | } 32 | 33 | type version struct { 34 | factory internalinterfaces.SharedInformerFactory 35 | namespace string 36 | tweakListOptions internalinterfaces.TweakListOptionsFunc 37 | } 38 | 39 | // New returns a new Interface. 40 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 41 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 42 | } 43 | 44 | // CustomNodeResources returns a CustomNodeResourceInformer. 45 | func (v *version) CustomNodeResources() CustomNodeResourceInformer { 46 | return &customNodeResourceInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 47 | } 48 | 49 | // NodeProfileDescriptors returns a NodeProfileDescriptorInformer. 50 | func (v *version) NodeProfileDescriptors() NodeProfileDescriptorInformer { 51 | return &nodeProfileDescriptorInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 52 | } 53 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/overcommit/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package overcommit 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/overcommit/v1alpha1" 24 | ) 25 | 26 | // Interface provides access to each of this group's versions. 27 | type Interface interface { 28 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 29 | V1alpha1() v1alpha1.Interface 30 | } 31 | 32 | type group struct { 33 | factory internalinterfaces.SharedInformerFactory 34 | namespace string 35 | tweakListOptions internalinterfaces.TweakListOptionsFunc 36 | } 37 | 38 | // New returns a new Interface. 39 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 40 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 41 | } 42 | 43 | // V1alpha1 returns a new v1alpha1.Interface. 44 | func (g *group) V1alpha1() v1alpha1.Interface { 45 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/overcommit/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // NodeOvercommitConfigs returns a NodeOvercommitConfigInformer. 28 | NodeOvercommitConfigs() NodeOvercommitConfigInformer 29 | } 30 | 31 | type version struct { 32 | factory internalinterfaces.SharedInformerFactory 33 | namespace string 34 | tweakListOptions internalinterfaces.TweakListOptionsFunc 35 | } 36 | 37 | // New returns a new Interface. 38 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 39 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 40 | } 41 | 42 | // NodeOvercommitConfigs returns a NodeOvercommitConfigInformer. 43 | func (v *version) NodeOvercommitConfigs() NodeOvercommitConfigInformer { 44 | return &nodeOvercommitConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 45 | } 46 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/recommendation/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package recommendation 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/recommendation/v1alpha1" 24 | ) 25 | 26 | // Interface provides access to each of this group's versions. 27 | type Interface interface { 28 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 29 | V1alpha1() v1alpha1.Interface 30 | } 31 | 32 | type group struct { 33 | factory internalinterfaces.SharedInformerFactory 34 | namespace string 35 | tweakListOptions internalinterfaces.TweakListOptionsFunc 36 | } 37 | 38 | // New returns a new Interface. 39 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 40 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 41 | } 42 | 43 | // V1alpha1 returns a new v1alpha1.Interface. 44 | func (g *group) V1alpha1() v1alpha1.Interface { 45 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/recommendation/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // ResourceRecommends returns a ResourceRecommendInformer. 28 | ResourceRecommends() ResourceRecommendInformer 29 | } 30 | 31 | type version struct { 32 | factory internalinterfaces.SharedInformerFactory 33 | namespace string 34 | tweakListOptions internalinterfaces.TweakListOptionsFunc 35 | } 36 | 37 | // New returns a new Interface. 38 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 39 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 40 | } 41 | 42 | // ResourceRecommends returns a ResourceRecommendInformer. 43 | func (v *version) ResourceRecommends() ResourceRecommendInformer { 44 | return &resourceRecommendInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 45 | } 46 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/tide/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package tide 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/tide/v1alpha1" 24 | ) 25 | 26 | // Interface provides access to each of this group's versions. 27 | type Interface interface { 28 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 29 | V1alpha1() v1alpha1.Interface 30 | } 31 | 32 | type group struct { 33 | factory internalinterfaces.SharedInformerFactory 34 | namespace string 35 | tweakListOptions internalinterfaces.TweakListOptionsFunc 36 | } 37 | 38 | // New returns a new Interface. 39 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 40 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 41 | } 42 | 43 | // V1alpha1 returns a new v1alpha1.Interface. 44 | func (g *group) V1alpha1() v1alpha1.Interface { 45 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/tide/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // TideNodePools returns a TideNodePoolInformer. 28 | TideNodePools() TideNodePoolInformer 29 | } 30 | 31 | type version struct { 32 | factory internalinterfaces.SharedInformerFactory 33 | namespace string 34 | tweakListOptions internalinterfaces.TweakListOptionsFunc 35 | } 36 | 37 | // New returns a new Interface. 38 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 39 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 40 | } 41 | 42 | // TideNodePools returns a TideNodePoolInformer. 43 | func (v *version) TideNodePools() TideNodePoolInformer { 44 | return &tideNodePoolInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} 45 | } 46 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/workload/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package workload 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/workload/v1alpha1" 24 | ) 25 | 26 | // Interface provides access to each of this group's versions. 27 | type Interface interface { 28 | // V1alpha1 provides access to shared informers for resources in V1alpha1. 29 | V1alpha1() v1alpha1.Interface 30 | } 31 | 32 | type group struct { 33 | factory internalinterfaces.SharedInformerFactory 34 | namespace string 35 | tweakListOptions internalinterfaces.TweakListOptionsFunc 36 | } 37 | 38 | // New returns a new Interface. 39 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 40 | return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 41 | } 42 | 43 | // V1alpha1 returns a new v1alpha1.Interface. 44 | func (g *group) V1alpha1() v1alpha1.Interface { 45 | return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) 46 | } 47 | -------------------------------------------------------------------------------- /pkg/client/informers/externalversions/workload/v1alpha1/interface.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by informer-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | internalinterfaces "github.com/kubewharf/katalyst-api/pkg/client/informers/externalversions/internalinterfaces" 23 | ) 24 | 25 | // Interface provides access to all the informers in this group version. 26 | type Interface interface { 27 | // ServiceProfileDescriptors returns a ServiceProfileDescriptorInformer. 28 | ServiceProfileDescriptors() ServiceProfileDescriptorInformer 29 | } 30 | 31 | type version struct { 32 | factory internalinterfaces.SharedInformerFactory 33 | namespace string 34 | tweakListOptions internalinterfaces.TweakListOptionsFunc 35 | } 36 | 37 | // New returns a new Interface. 38 | func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { 39 | return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} 40 | } 41 | 42 | // ServiceProfileDescriptors returns a ServiceProfileDescriptorInformer. 43 | func (v *version) ServiceProfileDescriptors() ServiceProfileDescriptorInformer { 44 | return &serviceProfileDescriptorInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} 45 | } 46 | -------------------------------------------------------------------------------- /pkg/client/listers/autoscaling/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // KatalystVerticalPodAutoscalerListerExpansion allows custom methods to be added to 22 | // KatalystVerticalPodAutoscalerLister. 23 | type KatalystVerticalPodAutoscalerListerExpansion interface{} 24 | 25 | // KatalystVerticalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to 26 | // KatalystVerticalPodAutoscalerNamespaceLister. 27 | type KatalystVerticalPodAutoscalerNamespaceListerExpansion interface{} 28 | 29 | // VerticalPodAutoscalerRecommendationListerExpansion allows custom methods to be added to 30 | // VerticalPodAutoscalerRecommendationLister. 31 | type VerticalPodAutoscalerRecommendationListerExpansion interface{} 32 | 33 | // VerticalPodAutoscalerRecommendationNamespaceListerExpansion allows custom methods to be added to 34 | // VerticalPodAutoscalerRecommendationNamespaceLister. 35 | type VerticalPodAutoscalerRecommendationNamespaceListerExpansion interface{} 36 | -------------------------------------------------------------------------------- /pkg/client/listers/autoscaling/v1alpha2/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha2 20 | 21 | // IntelligentHorizontalPodAutoscalerListerExpansion allows custom methods to be added to 22 | // IntelligentHorizontalPodAutoscalerLister. 23 | type IntelligentHorizontalPodAutoscalerListerExpansion interface{} 24 | 25 | // IntelligentHorizontalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to 26 | // IntelligentHorizontalPodAutoscalerNamespaceLister. 27 | type IntelligentHorizontalPodAutoscalerNamespaceListerExpansion interface{} 28 | 29 | // KatalystVerticalPodAutoscalerListerExpansion allows custom methods to be added to 30 | // KatalystVerticalPodAutoscalerLister. 31 | type KatalystVerticalPodAutoscalerListerExpansion interface{} 32 | 33 | // KatalystVerticalPodAutoscalerNamespaceListerExpansion allows custom methods to be added to 34 | // KatalystVerticalPodAutoscalerNamespaceLister. 35 | type KatalystVerticalPodAutoscalerNamespaceListerExpansion interface{} 36 | 37 | // VirtualWorkloadListerExpansion allows custom methods to be added to 38 | // VirtualWorkloadLister. 39 | type VirtualWorkloadListerExpansion interface{} 40 | 41 | // VirtualWorkloadNamespaceListerExpansion allows custom methods to be added to 42 | // VirtualWorkloadNamespaceLister. 43 | type VirtualWorkloadNamespaceListerExpansion interface{} 44 | -------------------------------------------------------------------------------- /pkg/client/listers/config/v1alpha1/customnodeconfig.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // CustomNodeConfigLister helps list CustomNodeConfigs. 29 | // All objects returned here must be treated as read-only. 30 | type CustomNodeConfigLister interface { 31 | // List lists all CustomNodeConfigs in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.CustomNodeConfig, err error) 34 | // Get retrieves the CustomNodeConfig from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.CustomNodeConfig, error) 37 | CustomNodeConfigListerExpansion 38 | } 39 | 40 | // customNodeConfigLister implements the CustomNodeConfigLister interface. 41 | type customNodeConfigLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewCustomNodeConfigLister returns a new CustomNodeConfigLister. 46 | func NewCustomNodeConfigLister(indexer cache.Indexer) CustomNodeConfigLister { 47 | return &customNodeConfigLister{indexer: indexer} 48 | } 49 | 50 | // List lists all CustomNodeConfigs in the indexer. 51 | func (s *customNodeConfigLister) List(selector labels.Selector) (ret []*v1alpha1.CustomNodeConfig, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.CustomNodeConfig)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the CustomNodeConfig from the index for a given name. 59 | func (s *customNodeConfigLister) Get(name string) (*v1alpha1.CustomNodeConfig, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("customnodeconfig"), name) 66 | } 67 | return obj.(*v1alpha1.CustomNodeConfig), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/config/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // CustomNodeConfigListerExpansion allows custom methods to be added to 22 | // CustomNodeConfigLister. 23 | type CustomNodeConfigListerExpansion interface{} 24 | 25 | // KatalystCustomConfigListerExpansion allows custom methods to be added to 26 | // KatalystCustomConfigLister. 27 | type KatalystCustomConfigListerExpansion interface{} 28 | 29 | // KatalystCustomConfigNamespaceListerExpansion allows custom methods to be added to 30 | // KatalystCustomConfigNamespaceLister. 31 | type KatalystCustomConfigNamespaceListerExpansion interface{} 32 | 33 | // StrategyGroupListerExpansion allows custom methods to be added to 34 | // StrategyGroupLister. 35 | type StrategyGroupListerExpansion interface{} 36 | 37 | // StrategyGroupConfigurationListerExpansion allows custom methods to be added to 38 | // StrategyGroupConfigurationLister. 39 | type StrategyGroupConfigurationListerExpansion interface{} 40 | -------------------------------------------------------------------------------- /pkg/client/listers/config/v1alpha1/strategygroup.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // StrategyGroupLister helps list StrategyGroups. 29 | // All objects returned here must be treated as read-only. 30 | type StrategyGroupLister interface { 31 | // List lists all StrategyGroups in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.StrategyGroup, err error) 34 | // Get retrieves the StrategyGroup from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.StrategyGroup, error) 37 | StrategyGroupListerExpansion 38 | } 39 | 40 | // strategyGroupLister implements the StrategyGroupLister interface. 41 | type strategyGroupLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewStrategyGroupLister returns a new StrategyGroupLister. 46 | func NewStrategyGroupLister(indexer cache.Indexer) StrategyGroupLister { 47 | return &strategyGroupLister{indexer: indexer} 48 | } 49 | 50 | // List lists all StrategyGroups in the indexer. 51 | func (s *strategyGroupLister) List(selector labels.Selector) (ret []*v1alpha1.StrategyGroup, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.StrategyGroup)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the StrategyGroup from the index for a given name. 59 | func (s *strategyGroupLister) Get(name string) (*v1alpha1.StrategyGroup, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("strategygroup"), name) 66 | } 67 | return obj.(*v1alpha1.StrategyGroup), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/config/v1alpha1/strategygroupconfiguration.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/config/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // StrategyGroupConfigurationLister helps list StrategyGroupConfigurations. 29 | // All objects returned here must be treated as read-only. 30 | type StrategyGroupConfigurationLister interface { 31 | // List lists all StrategyGroupConfigurations in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.StrategyGroupConfiguration, err error) 34 | // Get retrieves the StrategyGroupConfiguration from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.StrategyGroupConfiguration, error) 37 | StrategyGroupConfigurationListerExpansion 38 | } 39 | 40 | // strategyGroupConfigurationLister implements the StrategyGroupConfigurationLister interface. 41 | type strategyGroupConfigurationLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewStrategyGroupConfigurationLister returns a new StrategyGroupConfigurationLister. 46 | func NewStrategyGroupConfigurationLister(indexer cache.Indexer) StrategyGroupConfigurationLister { 47 | return &strategyGroupConfigurationLister{indexer: indexer} 48 | } 49 | 50 | // List lists all StrategyGroupConfigurations in the indexer. 51 | func (s *strategyGroupConfigurationLister) List(selector labels.Selector) (ret []*v1alpha1.StrategyGroupConfiguration, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.StrategyGroupConfiguration)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the StrategyGroupConfiguration from the index for a given name. 59 | func (s *strategyGroupConfigurationLister) Get(name string) (*v1alpha1.StrategyGroupConfiguration, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("strategygroupconfiguration"), name) 66 | } 67 | return obj.(*v1alpha1.StrategyGroupConfiguration), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/node/v1alpha1/customnoderesource.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // CustomNodeResourceLister helps list CustomNodeResources. 29 | // All objects returned here must be treated as read-only. 30 | type CustomNodeResourceLister interface { 31 | // List lists all CustomNodeResources in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.CustomNodeResource, err error) 34 | // Get retrieves the CustomNodeResource from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.CustomNodeResource, error) 37 | CustomNodeResourceListerExpansion 38 | } 39 | 40 | // customNodeResourceLister implements the CustomNodeResourceLister interface. 41 | type customNodeResourceLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewCustomNodeResourceLister returns a new CustomNodeResourceLister. 46 | func NewCustomNodeResourceLister(indexer cache.Indexer) CustomNodeResourceLister { 47 | return &customNodeResourceLister{indexer: indexer} 48 | } 49 | 50 | // List lists all CustomNodeResources in the indexer. 51 | func (s *customNodeResourceLister) List(selector labels.Selector) (ret []*v1alpha1.CustomNodeResource, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.CustomNodeResource)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the CustomNodeResource from the index for a given name. 59 | func (s *customNodeResourceLister) Get(name string) (*v1alpha1.CustomNodeResource, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("customnoderesource"), name) 66 | } 67 | return obj.(*v1alpha1.CustomNodeResource), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/node/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // CustomNodeResourceListerExpansion allows custom methods to be added to 22 | // CustomNodeResourceLister. 23 | type CustomNodeResourceListerExpansion interface{} 24 | 25 | // NodeProfileDescriptorListerExpansion allows custom methods to be added to 26 | // NodeProfileDescriptorLister. 27 | type NodeProfileDescriptorListerExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/client/listers/node/v1alpha1/nodeprofiledescriptor.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // NodeProfileDescriptorLister helps list NodeProfileDescriptors. 29 | // All objects returned here must be treated as read-only. 30 | type NodeProfileDescriptorLister interface { 31 | // List lists all NodeProfileDescriptors in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.NodeProfileDescriptor, err error) 34 | // Get retrieves the NodeProfileDescriptor from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.NodeProfileDescriptor, error) 37 | NodeProfileDescriptorListerExpansion 38 | } 39 | 40 | // nodeProfileDescriptorLister implements the NodeProfileDescriptorLister interface. 41 | type nodeProfileDescriptorLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewNodeProfileDescriptorLister returns a new NodeProfileDescriptorLister. 46 | func NewNodeProfileDescriptorLister(indexer cache.Indexer) NodeProfileDescriptorLister { 47 | return &nodeProfileDescriptorLister{indexer: indexer} 48 | } 49 | 50 | // List lists all NodeProfileDescriptors in the indexer. 51 | func (s *nodeProfileDescriptorLister) List(selector labels.Selector) (ret []*v1alpha1.NodeProfileDescriptor, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.NodeProfileDescriptor)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the NodeProfileDescriptor from the index for a given name. 59 | func (s *nodeProfileDescriptorLister) Get(name string) (*v1alpha1.NodeProfileDescriptor, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("nodeprofiledescriptor"), name) 66 | } 67 | return obj.(*v1alpha1.NodeProfileDescriptor), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/overcommit/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // NodeOvercommitConfigListerExpansion allows custom methods to be added to 22 | // NodeOvercommitConfigLister. 23 | type NodeOvercommitConfigListerExpansion interface{} 24 | -------------------------------------------------------------------------------- /pkg/client/listers/overcommit/v1alpha1/nodeovercommitconfig.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/overcommit/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // NodeOvercommitConfigLister helps list NodeOvercommitConfigs. 29 | // All objects returned here must be treated as read-only. 30 | type NodeOvercommitConfigLister interface { 31 | // List lists all NodeOvercommitConfigs in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.NodeOvercommitConfig, err error) 34 | // Get retrieves the NodeOvercommitConfig from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.NodeOvercommitConfig, error) 37 | NodeOvercommitConfigListerExpansion 38 | } 39 | 40 | // nodeOvercommitConfigLister implements the NodeOvercommitConfigLister interface. 41 | type nodeOvercommitConfigLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewNodeOvercommitConfigLister returns a new NodeOvercommitConfigLister. 46 | func NewNodeOvercommitConfigLister(indexer cache.Indexer) NodeOvercommitConfigLister { 47 | return &nodeOvercommitConfigLister{indexer: indexer} 48 | } 49 | 50 | // List lists all NodeOvercommitConfigs in the indexer. 51 | func (s *nodeOvercommitConfigLister) List(selector labels.Selector) (ret []*v1alpha1.NodeOvercommitConfig, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.NodeOvercommitConfig)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the NodeOvercommitConfig from the index for a given name. 59 | func (s *nodeOvercommitConfigLister) Get(name string) (*v1alpha1.NodeOvercommitConfig, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("nodeovercommitconfig"), name) 66 | } 67 | return obj.(*v1alpha1.NodeOvercommitConfig), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/recommendation/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // ResourceRecommendListerExpansion allows custom methods to be added to 22 | // ResourceRecommendLister. 23 | type ResourceRecommendListerExpansion interface{} 24 | 25 | // ResourceRecommendNamespaceListerExpansion allows custom methods to be added to 26 | // ResourceRecommendNamespaceLister. 27 | type ResourceRecommendNamespaceListerExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/client/listers/tide/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // TideNodePoolListerExpansion allows custom methods to be added to 22 | // TideNodePoolLister. 23 | type TideNodePoolListerExpansion interface{} 24 | -------------------------------------------------------------------------------- /pkg/client/listers/tide/v1alpha1/tidenodepool.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | import ( 22 | v1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/tide/v1alpha1" 23 | "k8s.io/apimachinery/pkg/api/errors" 24 | "k8s.io/apimachinery/pkg/labels" 25 | "k8s.io/client-go/tools/cache" 26 | ) 27 | 28 | // TideNodePoolLister helps list TideNodePools. 29 | // All objects returned here must be treated as read-only. 30 | type TideNodePoolLister interface { 31 | // List lists all TideNodePools in the indexer. 32 | // Objects returned here must be treated as read-only. 33 | List(selector labels.Selector) (ret []*v1alpha1.TideNodePool, err error) 34 | // Get retrieves the TideNodePool from the index for a given name. 35 | // Objects returned here must be treated as read-only. 36 | Get(name string) (*v1alpha1.TideNodePool, error) 37 | TideNodePoolListerExpansion 38 | } 39 | 40 | // tideNodePoolLister implements the TideNodePoolLister interface. 41 | type tideNodePoolLister struct { 42 | indexer cache.Indexer 43 | } 44 | 45 | // NewTideNodePoolLister returns a new TideNodePoolLister. 46 | func NewTideNodePoolLister(indexer cache.Indexer) TideNodePoolLister { 47 | return &tideNodePoolLister{indexer: indexer} 48 | } 49 | 50 | // List lists all TideNodePools in the indexer. 51 | func (s *tideNodePoolLister) List(selector labels.Selector) (ret []*v1alpha1.TideNodePool, err error) { 52 | err = cache.ListAll(s.indexer, selector, func(m interface{}) { 53 | ret = append(ret, m.(*v1alpha1.TideNodePool)) 54 | }) 55 | return ret, err 56 | } 57 | 58 | // Get retrieves the TideNodePool from the index for a given name. 59 | func (s *tideNodePoolLister) Get(name string) (*v1alpha1.TideNodePool, error) { 60 | obj, exists, err := s.indexer.GetByKey(name) 61 | if err != nil { 62 | return nil, err 63 | } 64 | if !exists { 65 | return nil, errors.NewNotFound(v1alpha1.Resource("tidenodepool"), name) 66 | } 67 | return obj.(*v1alpha1.TideNodePool), nil 68 | } 69 | -------------------------------------------------------------------------------- /pkg/client/listers/workload/v1alpha1/expansion_generated.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Code generated by lister-gen. DO NOT EDIT. 18 | 19 | package v1alpha1 20 | 21 | // ServiceProfileDescriptorListerExpansion allows custom methods to be added to 22 | // ServiceProfileDescriptorLister. 23 | type ServiceProfileDescriptorListerExpansion interface{} 24 | 25 | // ServiceProfileDescriptorNamespaceListerExpansion allows custom methods to be added to 26 | // ServiceProfileDescriptorNamespaceLister. 27 | type ServiceProfileDescriptorNamespaceListerExpansion interface{} 28 | -------------------------------------------------------------------------------- /pkg/consts/cgroup.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package consts 18 | 19 | // const variables indicate cgroup versions 20 | const ( 21 | CgroupV1 = "v1" 22 | CgroupV2 = "v2" 23 | ) 24 | -------------------------------------------------------------------------------- /pkg/consts/overcommit.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package consts 18 | 19 | // const variables for node annotations about overcommit ratio 20 | const ( 21 | NodeAnnotationCPUOvercommitRatioKey = "katalyst.kubewharf.io/cpu_overcommit_ratio" 22 | NodeAnnotationMemoryOvercommitRatioKey = "katalyst.kubewharf.io/memory_overcommit_ratio" 23 | NodeAnnotationRealtimeCPUOvercommitRatioKey = "katalyst.kubewharf.io/realtime_cpu_overcommit_ratio" 24 | NodeAnnotationRealtimeMemoryOvercommitRatioKey = "katalyst.kubewharf.io/realtime_memory_overcommit_ratio" 25 | 26 | NodeAnnotationOriginalCapacityCPUKey = "katalyst.kubewharf.io/original_capacity_cpu" 27 | NodeAnnotationOriginalCapacityMemoryKey = "katalyst.kubewharf.io/original_capacity_memory" 28 | NodeAnnotationOriginalAllocatableCPUKey = "katalyst.kubewharf.io/original_allocatable_cpu" 29 | NodeAnnotationOriginalAllocatableMemoryKey = "katalyst.kubewharf.io/original_allocatable_memory" 30 | 31 | NodeAnnotationOvercommitCapacityCPUKey = "katalyst.kubewharf.io/overcommit_capacity_cpu" 32 | NodeAnnotationOvercommitAllocatableCPUKey = "katalyst.kubewharf.io/overcommit_allocatable_cpu" 33 | NodeAnnotationOvercommitCapacityMemoryKey = "katalyst.kubewharf.io/overcommit_capacity_memory" 34 | NodeAnnotationOvercommitAllocatableMemoryKey = "katalyst.kubewharf.io/overcommit_allocatable_memory" 35 | ) 36 | 37 | // const variables for matching up with node labels about overcommit 38 | const ( 39 | NodeOvercommitSelectorKey = "katalyst.kubewharf.io/overcommit_node_pool" 40 | 41 | DefaultNodeCPUOvercommitRatio = "1" 42 | DefaultNodeMemoryOvercommitRatio = "1" 43 | ) 44 | 45 | type KCNRAnnotationCPUManagerPolicy string 46 | type KCNRAnnotationMemoryManagerPolicy string 47 | 48 | const ( 49 | // KCNRAnnotationGuaranteedCPUs sum of pod guaranteed cpus in node 50 | KCNRAnnotationGuaranteedCPUs = "katalyst.kubewharf.io/guaranteed_cpus" 51 | 52 | KCNRAnnotationCPUManager = "katalyst.kubewharf.io/overcommit_cpu_manager" 53 | KCNRAnnotationMemoryManager = "katalyst.kubewharf.io/overcommit_memory_manager" 54 | 55 | CPUManagerOff KCNRAnnotationCPUManagerPolicy = "none" 56 | CPUManagerPolicyNone KCNRAnnotationCPUManagerPolicy = "none" 57 | 58 | MemoryManagerOff KCNRAnnotationMemoryManagerPolicy = "None" 59 | MemoryManagerPolicyNone KCNRAnnotationMemoryManagerPolicy = "None" 60 | ) 61 | -------------------------------------------------------------------------------- /pkg/consts/pod.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package consts 18 | 19 | // const variables for pod annotations about vpa in-place resource update. 20 | const ( 21 | PodAnnotationInplaceUpdateResourcesKey = "pod.kubernetes.io/resizeResources" 22 | 23 | PodAnnotationInplaceUpdateResizePolicyKey = "pod.kubernetes.io/resizePolicy" 24 | PodAnnotationInplaceUpdateResizePolicyRestart = "Restart" 25 | 26 | PodAnnotationInplaceUpdateResizingKey = "pod.kubernetes.io/inplace-update-resizing" 27 | PodAnnotationAggregatedRequestsKey = "pod.kubernetes.io/pod-aggregated-requests" 28 | ) 29 | 30 | // PodAnnotationNetClassKey is a const variable for pod annotation about net class. 31 | const ( 32 | PodAnnotationNetClassKey = "katalyst.kubewharf.io/net_class_id" 33 | ) 34 | 35 | // PodAnnotationNUMABindResultKey is a const variable for pod annotation about numa bind result. 36 | const ( 37 | PodAnnotationNUMABindResultKey = "katalyst.kubewharf.io/numa_bind_result" 38 | ) 39 | 40 | // PodAnnotationNICSelectionResultKey is a const variable for pod annotation about a nic selection result. 41 | const ( 42 | PodAnnotationNICSelectionResultKey = "katalyst.kubewharf.io/nic_selection_result" 43 | ) 44 | 45 | const ( 46 | // PodAnnotationResourcePoolKey is a const variable for pod annotation about resource pool name 47 | PodAnnotationResourcePoolKey = "katalyst.kubewharf.io/resource_pool" 48 | ) 49 | -------------------------------------------------------------------------------- /pkg/consts/qrm.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package consts 18 | 19 | // QRMPhase is the phase of each rpc call in qrm plugin 20 | type QRMPhase int 21 | 22 | const ( 23 | QRMPhaseGetTopologyHints QRMPhase = iota 24 | QRMPhaseRemovePod 25 | QRMPhaseGetResourcesAllocation 26 | QRMPhaseGetTopologyAwareResources 27 | QRMPhaseGetTopologyAwareAllocatableResources 28 | QRMPhaseGetResourcePluginOptions 29 | QRMPhaseAllocate 30 | QRMPhasePreStartContainer 31 | ) 32 | -------------------------------------------------------------------------------- /pkg/consts/resource.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The Katalyst Authors. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package consts 16 | 17 | import v1 "k8s.io/api/core/v1" 18 | 19 | // const variables for resource names of reclaimed resource 20 | const ( 21 | ReclaimedResourceMilliCPU v1.ResourceName = "resource.katalyst.kubewharf.io/reclaimed_millicpu" 22 | ReclaimedResourceMemory v1.ResourceName = "resource.katalyst.kubewharf.io/reclaimed_memory" 23 | ) 24 | 25 | // const variables for resource names of guaranteed resource 26 | const ( 27 | ResourceNetBandwidth v1.ResourceName = "resource.katalyst.kubewharf.io/net_bandwidth" 28 | ResourceMemoryBandwidth v1.ResourceName = "resource.katalyst.kubewharf.io/memory_bandwidth" 29 | ) 30 | 31 | // const variables for resource attributes of resources 32 | const ( 33 | // ResourceAnnotationKeyResourceIdentifier nominated the key to override the default name 34 | // field in pod-resource-server (for qrm-related protocols); if the name field can't be 35 | // guaranteed to be unique in some cases, we can relay on this annotation to get unique keys 36 | // (to replace with the default name) 37 | ResourceAnnotationKeyResourceIdentifier = "katalyst.kubewharf.io/resource_identifier" 38 | 39 | // ResourceAnnotationKeyResourceIdentifier nominated the key indicating net namespace name of the NIC 40 | ResourceAnnotationKeyNICNetNSName = "katalyst.kubewharf.io/netns_name" 41 | ) 42 | -------------------------------------------------------------------------------- /pkg/consts/spd.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package consts 18 | 19 | const ( 20 | // PodAnnotationSPDNameKey is used to maintain corresponding spdName in pod 21 | // annotation to make metaServer to target its spd more conveniently. 22 | PodAnnotationSPDNameKey = "spd.katalyst.kubewharf.io/name" 23 | ) 24 | 25 | // const variables for workload annotations about spd. 26 | const ( 27 | // WorkloadAnnotationSPDEnableKey provides a mechanism for white list when enabling spd, 28 | // if it's set as false, we should not maintain spd CR or calculate service profiling automatically. 29 | WorkloadAnnotationSPDEnableKey = "spd.katalyst.kubewharf.io/enable" 30 | WorkloadAnnotationSPDEnabled = "true" 31 | ) 32 | 33 | // const variables for spd. 34 | const ( 35 | // SPDAnnotationBaselineSentinelKey and SPDAnnotationExtendedBaselineSentinelKey is 36 | // updated by the SPD controller. It represents the sentinel pod among all pods managed 37 | // by this SPD. Agents or controllers can use this key to determine if a pod falls within 38 | // the baseline by comparing it with the pod's createTime and podName. 39 | SPDAnnotationBaselineSentinelKey = "spd.katalyst.kubewharf.io/baselineSentinel" 40 | SPDAnnotationExtendedBaselineSentinelKey = "spd.katalyst.kubewharf.io/extendedBaselineSentinel" 41 | 42 | SPDBaselinePercentMax = 100 43 | SPDBaselinePercentMin = 0 44 | ) 45 | 46 | // metric names for aggregate metric 47 | const ( 48 | // SPDAggMetricNameMemoryBandwidth is per core memory bandwidth 49 | SPDAggMetricNameMemoryBandwidth = "memory_bandwidth" 50 | ) 51 | -------------------------------------------------------------------------------- /pkg/consts/vpa.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package consts 18 | 19 | // const variables for workload annotations about vpa. 20 | const ( 21 | // WorkloadAnnotationVPAEnabledKey disables for workload means that 22 | // we won't apply the recommended resources for pod belonging to this workload; 23 | // However, we may still do this calculation logic and update to status if vpa 24 | // CR is created for this workload 25 | WorkloadAnnotationVPAEnabledKey = "vpa.katalyst.kubewharf.io/enable" 26 | WorkloadAnnotationVPAEnabled = "true" 27 | 28 | WorkloadAnnotationVPANameKey = "vpa.katalyst.kubewharf.io/name" 29 | 30 | // WorkloadAnnotationVPASelectorKey is pod label selector for non-native workload 31 | WorkloadAnnotationVPASelectorKey = "vpa.katalyst.kubewharf.io/selector" 32 | ) 33 | 34 | // const variables for workload annotations about vpaRec. 35 | const ( 36 | VPAAnnotationVPARecNameKey = "vpa.katalyst.kubewharf.io/recName" 37 | 38 | VPAAnnotationWorkloadRetentionPolicyKey = "vpa.katalyst.kubewharf.io/retentionPolicy" 39 | VPAAnnotationWorkloadRetentionPolicyRetain = "retain" 40 | VPAAnnotationWorkloadRetentionPolicyDelete = "delete" 41 | ) 42 | -------------------------------------------------------------------------------- /pkg/metric/consts.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package metric 18 | 19 | // aggregated functions that'd supported by katalyst now, 20 | // and client should add those as suffix in metric-name when referring to kcmas. 21 | // for instance, `pod_cpu_load_1min_agg_max` means to return 22 | // a single metric item to represent the max value of all collected items, 23 | // and we will put the corresponding time-window in response. 24 | const ( 25 | AggregateFunctionAvg = "_agg_avg" 26 | AggregateFunctionMax = "_agg_max" 27 | AggregateFunctionMin = "_agg_min" 28 | AggregateFunctionP99 = "_agg_p99" 29 | AggregateFunctionP95 = "_agg_p95" 30 | AggregateFunctionP90 = "_agg_p90" 31 | AggregateFunctionLatest = "_agg_latest" 32 | ) 33 | 34 | // MetricSelectorKeyGroupBy is the key of groupBy in metric selector. It's value should be a set of the real metric 35 | // selector keys which will be used to group the metrics. MetricSelectorKeyGroupBy should only be used in aggregated 36 | // metrics. 37 | // For example, if we want to get the max cpu load of each container,we can query the `pod_cpu_load_1min_agg_max` with 38 | // following metric selector: `groupBy=container`. 39 | const MetricSelectorKeyGroupBy = "groupBy" 40 | 41 | // MetricNameSPDAggMetrics represents the metric name provided to the API Server when exposing 42 | // the metrics in SPD in the form of Extermal Metric. 43 | const MetricNameSPDAggMetrics = "spd_agg_metrics" 44 | 45 | // MetricSelectorKeySPD represents a series of External Metric labels, used by the SPD Metric Store to 46 | // filter and return specific workload metric data. 47 | const ( 48 | MetricSelectorKeySPDName = "metric.katalyst.kubewharf.io/spd-name" 49 | MetricSelectorKeySPDResourceName = "metric.katalyst.kubewharf.io/spd-resource-name" 50 | MetricSelectorKeySPDScopeName = "metric.katalyst.kubewharf.io/spd-scope-name" 51 | MetricSelectorKeySPDContainerName = "metric.katalyst.kubewharf.io/spd-container-name" 52 | ) 53 | -------------------------------------------------------------------------------- /pkg/metric/external/external.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package external defines the customized metric names related-to none-k8s objects, 18 | // those metrics are stored (and also can be referred) by custom metrics 19 | // api-server provided by katalyst. 20 | package external 21 | -------------------------------------------------------------------------------- /pkg/metric/node/node.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package node defines the customized metric names related-to k8s-node objects, 18 | // those metrics are stored (and also can be referred) by custom metrics 19 | // api-server provided by katalyst. 20 | package node 21 | 22 | const ( 23 | CustomMetricNodeCPUTotal = "node_cpu_total" 24 | CustomMetricNodeCPUUsage = "node_cpu_usage" 25 | CustomMetricNodeCPUUsageRatio = "node_cpu_usage_ratio" 26 | CustomMetricNodeCPULoad1Min = "node_cpu_load_system_1min" 27 | ) 28 | 29 | // real-time memory related metric 30 | const ( 31 | CustomMetricNodeMemoryFree = "node_system_memory_free" 32 | CustomMetricNodeMemoryAvailable = "node_system_memory_available" 33 | ) 34 | 35 | // real-time advisor-related metric 36 | const ( 37 | CustomMetricNodeAdvisorPoolLoad1Min = "node_advisor_pool_load_1min" 38 | CustomMetricNodeAdvisorKnobStatus = "node_advisor_knob_status" 39 | ) 40 | 41 | // real-time numa level memory bandwidth related metric 42 | const ( 43 | CustomMetricNUMAMemoryBandwidthTotal = "numa_mbm_total" 44 | CustomMetricNUMAMemoryBandwidthLocal = "numa_mbm_local" 45 | CustomMetricNUMAMemoryBandwidthVictim = "numa_mbm_victim" 46 | ) 47 | -------------------------------------------------------------------------------- /pkg/metric/pod/pod.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package pod defines the customized metric names related-to k8s-pod objects, 18 | // those metrics are stored (and also can be referred) by custom metrics 19 | // api-server provided by katalyst. 20 | package pod 21 | 22 | // real-time cpu related metric 23 | const ( 24 | CustomMetricPodCPULoad1Min = "pod_cpu_load_1min" 25 | CustomMetricPodCPUUsage = "pod_cpu_usage" 26 | CustomMetricPodCPUUsageRatio = "pod_cpu_usage_ratio" 27 | CustomMetricPodCPUCPI = "pod_cpu_cpi" 28 | ) 29 | 30 | const ( 31 | CustomMetricPodMemoryRSS = "pod_memory_rss" 32 | CustomMetricPodMemoryUsage = "pod_memory_usage" 33 | ) 34 | 35 | const ( 36 | CustomMetricPodGPUUsage = "pod_gpu_usage" 37 | ) 38 | 39 | // real-time memory bandwidth related metric 40 | const ( 41 | CustomMetricPodTotalMemoryBandwidth = "pod_mbm_total" 42 | CustomMetricPodLocalMemoryBandwidth = "pod_mbm_local" 43 | CustomMetricPodVictimMemoryBandwidth = "pod_mbm_victim" 44 | ) 45 | -------------------------------------------------------------------------------- /pkg/plugins/registration/pluginregistration.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package registration 18 | 19 | import ( 20 | "context" 21 | 22 | "k8s.io/klog/v2" 23 | 24 | watcherapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1" 25 | plugincache "k8s.io/kubernetes/pkg/kubelet/pluginmanager/cache" 26 | ) 27 | 28 | const ( 29 | EvictionPlugin = "EvictionPlugin" 30 | ReporterPlugin = "ReporterPlugin" 31 | QoSResourcePlugin = "QoSResourcePlugin" 32 | 33 | BaseVersion = "v1alpha1" 34 | ) 35 | 36 | type AgentPluginHandler interface { 37 | GetHandlerType() string 38 | plugincache.PluginHandler 39 | } 40 | 41 | type RegistrationHandler struct { 42 | pluginType string 43 | pluginName string 44 | supportedVersions []string 45 | } 46 | 47 | func NewRegistrationHandler(pluginType, pluginName string, supportedVersions []string) watcherapi.RegistrationServer { 48 | return &RegistrationHandler{ 49 | pluginType: pluginType, 50 | pluginName: pluginName, 51 | supportedVersions: supportedVersions, 52 | } 53 | } 54 | 55 | // GetInfo is the RPC which return pluginInfo 56 | func (handler *RegistrationHandler) GetInfo(ctx context.Context, req *watcherapi.InfoRequest) (*watcherapi.PluginInfo, error) { 57 | klog.Infof("%s plugin of type %s GetInfo called", handler.pluginName, handler.pluginType) 58 | return &watcherapi.PluginInfo{ 59 | Type: handler.pluginType, 60 | Name: handler.pluginName, 61 | SupportedVersions: handler.supportedVersions}, nil 62 | } 63 | 64 | // NotifyRegistrationStatus receives the registration notification from watcher 65 | func (handler *RegistrationHandler) NotifyRegistrationStatus(ctx context.Context, status *watcherapi.RegistrationStatus) (*watcherapi.RegistrationStatusResponse, error) { 66 | // TODO: consider strategy when register failed 67 | if !status.PluginRegistered { 68 | klog.Errorf("%s of type %s Registration failed: %v", 69 | handler.pluginName, handler.pluginType, status.Error) 70 | } 71 | return &watcherapi.RegistrationStatusResponse{}, nil 72 | } 73 | -------------------------------------------------------------------------------- /pkg/plugins/skeleton/eviction.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package skeleton 18 | 19 | import ( 20 | "github.com/kubewharf/katalyst-api/pkg/protocol/evictionplugin/v1alpha1" 21 | pluginapi "github.com/kubewharf/katalyst-api/pkg/protocol/evictionplugin/v1alpha1" 22 | ) 23 | 24 | const ( 25 | fakeEvictionPluginName = "fake-eviction-plugin" 26 | ) 27 | 28 | // EvictionPlugin defines the interface that eviction plugins defined out of katalyst should follow. 29 | type EvictionPlugin interface { 30 | GenericPlugin 31 | pluginapi.EvictionPluginServer 32 | } 33 | 34 | // DummyEvictionPlugin defines dummy eviction plugin 35 | type DummyEvictionPlugin struct { 36 | v1alpha1.UnimplementedEvictionPluginServer 37 | } 38 | 39 | // Name of the dummy eviction plugin 40 | func (DummyEvictionPlugin) Name() string { return fakeEvictionPluginName } 41 | 42 | // Start the dummy eviction plugin 43 | func (DummyEvictionPlugin) Start() error { return nil } 44 | 45 | // Stop the dummy eviction plugin 46 | func (DummyEvictionPlugin) Stop() error { return nil } 47 | 48 | // ResourceName returns name of the dummy eviction plugin 49 | func (DummyEvictionPlugin) ResourceName() string { return "" } 50 | 51 | var _ EvictionPlugin = &DummyEvictionPlugin{ 52 | v1alpha1.UnimplementedEvictionPluginServer{}, 53 | } 54 | -------------------------------------------------------------------------------- /pkg/plugins/skeleton/qrm.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package skeleton 18 | 19 | import ( 20 | pluginapi "k8s.io/kubelet/pkg/apis/resourceplugin/v1alpha1" 21 | ) 22 | 23 | const ( 24 | fakeQRMPluginName = "fake-qrm-plugin" 25 | ) 26 | 27 | // QRMPlugin defines the interface that QoS-Resource plugins defined out of katalyst should follow. 28 | type QRMPlugin interface { 29 | GenericPlugin 30 | pluginapi.ResourcePluginServer 31 | 32 | ResourceName() string 33 | } 34 | 35 | // DummyQRMPlugin defines dummy QoS-Resource plugin 36 | type DummyQRMPlugin struct { 37 | pluginapi.UnimplementedResourcePluginServer 38 | } 39 | 40 | // Name of the dummy QoS-Resource plugin 41 | func (DummyQRMPlugin) Name() string { return fakeQRMPluginName } 42 | 43 | // Start the dummy QoS-Resource plugin 44 | func (DummyQRMPlugin) Start() error { return nil } 45 | 46 | // Stop the dummy QoS-Resource plugin 47 | func (DummyQRMPlugin) Stop() error { return nil } 48 | 49 | // ResourceName returns name of the dummy QoS-Resource plugin 50 | func (DummyQRMPlugin) ResourceName() string { return "test_resource" } 51 | 52 | var _ QRMPlugin = &DummyQRMPlugin{ 53 | pluginapi.UnimplementedResourcePluginServer{}, 54 | } 55 | -------------------------------------------------------------------------------- /pkg/protocol/evictionplugin/v1alpha1/api.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | syntax = 'proto3'; 18 | 19 | package evictionplugin.v1alpha1; 20 | 21 | import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 22 | import "k8s.io/api/core/v1/generated.proto"; 23 | 24 | option (gogoproto.goproto_stringer_all) = false; 25 | option (gogoproto.stringer_all) = true; 26 | option (gogoproto.goproto_getters_all) = true; 27 | option (gogoproto.marshaler_all) = true; 28 | option (gogoproto.sizer_all) = true; 29 | option (gogoproto.unmarshaler_all) = true; 30 | option (gogoproto.goproto_unrecognized_all) = false; 31 | 32 | option go_package = "./v1alpha1"; 33 | 34 | enum ThresholdMetType { 35 | NOT_MET = 0; 36 | SOFT_MET = 1; 37 | HARD_MET = 2; 38 | } 39 | 40 | enum ThresholdOperator { 41 | LESS_THAN = 0; 42 | GREATER_THAN = 1; 43 | } 44 | 45 | enum ConditionType { 46 | NODE_CONDITION = 0; 47 | CNR_CONDITION = 1; 48 | } 49 | 50 | message Empty { 51 | } 52 | 53 | message Condition { 54 | ConditionType condition_type = 1; 55 | repeated string effects = 2; 56 | string condition_name = 3; 57 | bool met_condition = 4; 58 | } 59 | 60 | message ThresholdMetResponse { 61 | double threshold_value = 1; 62 | double observed_value = 2; 63 | ThresholdOperator threshold_operator = 3; 64 | ThresholdMetType met_type = 4; 65 | string eviction_scope = 5; 66 | int64 grace_period_seconds = 6; 67 | Condition condition = 7; 68 | } 69 | 70 | message GetTopEvictionPodsRequest { 71 | repeated k8s.io.api.core.v1.Pod active_pods = 1; 72 | uint64 topN = 2; 73 | string eviction_scope = 3; 74 | } 75 | 76 | message GetTopEvictionPodsResponse { 77 | repeated k8s.io.api.core.v1.Pod target_pods = 1; 78 | DeletionOptions deletion_options = 2; 79 | } 80 | 81 | message EvictPod { 82 | k8s.io.api.core.v1.Pod pod = 1; 83 | string reason = 2; 84 | DeletionOptions deletion_options = 3; 85 | bool force_evict = 4; 86 | string eviction_plugin_name = 5; 87 | } 88 | 89 | message GetEvictPodsRequest { 90 | repeated k8s.io.api.core.v1.Pod active_pods = 1; 91 | } 92 | 93 | message GetEvictPodsResponse { 94 | repeated EvictPod evict_pods = 1; 95 | Condition condition = 2; 96 | } 97 | 98 | message GetTokenResponse { 99 | string token = 1; 100 | } 101 | 102 | message DeletionOptions { 103 | int64 grace_period_seconds = 1; 104 | } 105 | 106 | service EvictionPlugin { 107 | rpc GetToken(Empty) returns (GetTokenResponse) {} 108 | rpc ThresholdMet(Empty) returns (ThresholdMetResponse) {} 109 | rpc GetTopEvictionPods(GetTopEvictionPodsRequest) returns (GetTopEvictionPodsResponse) {} 110 | rpc GetEvictPods(GetEvictPodsRequest) returns (GetEvictPodsResponse) {} 111 | } 112 | -------------------------------------------------------------------------------- /pkg/protocol/evictionplugin/v1alpha1/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | const ( 20 | Version = "v1alpha1" 21 | ) 22 | 23 | var SupportedVersions = [...]string{Version} 24 | -------------------------------------------------------------------------------- /pkg/protocol/reporterplugin/v1alpha1/api.proto: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | syntax = 'proto3'; 18 | 19 | package reporterplugin.v1alpha1; 20 | 21 | import "github.com/gogo/protobuf/gogoproto/gogo.proto"; 22 | import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; 23 | 24 | option (gogoproto.goproto_stringer_all) = false; 25 | option (gogoproto.stringer_all) = true; 26 | option (gogoproto.goproto_getters_all) = true; 27 | option (gogoproto.marshaler_all) = true; 28 | option (gogoproto.sizer_all) = true; 29 | option (gogoproto.unmarshaler_all) = true; 30 | option (gogoproto.goproto_unrecognized_all) = false; 31 | 32 | option go_package = "./v1alpha1"; 33 | 34 | message Empty { 35 | } 36 | 37 | enum FieldType { 38 | Spec = 0; 39 | Status = 1; 40 | Metadata = 2; 41 | } 42 | 43 | message ReportContent { 44 | k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind groupVersionKind = 1; 45 | repeated ReportField field = 2; 46 | } 47 | 48 | message ReportField { 49 | FieldType fieldType = 1; 50 | string fieldName = 2; 51 | bytes value = 3; 52 | } 53 | 54 | message GetReportContentResponse { 55 | repeated ReportContent content = 1; 56 | } 57 | 58 | service ReporterPlugin { 59 | rpc GetReportContent(Empty) returns (GetReportContentResponse) {} 60 | 61 | rpc ListAndWatchReportContent(Empty) returns (stream GetReportContentResponse) {} 62 | } 63 | -------------------------------------------------------------------------------- /pkg/protocol/reporterplugin/v1alpha1/constants.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package v1alpha1 18 | 19 | const ( 20 | Version = "v1alpha1" 21 | ) 22 | 23 | var SupportedVersions = [...]string{Version} 24 | -------------------------------------------------------------------------------- /pkg/utils/topology_policy.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2022 The Katalyst Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package utils 18 | 19 | import ( 20 | "k8s.io/kubelet/config/v1beta1" 21 | "k8s.io/kubernetes/pkg/kubelet/apis/config" 22 | 23 | nodev1alpha1 "github.com/kubewharf/katalyst-api/pkg/apis/node/v1alpha1" 24 | ) 25 | 26 | // GenerateTopologyPolicy generates TopologyPolicy which presents both Topology manager policy and scope. 27 | func GenerateTopologyPolicy(policy string, scope string) nodev1alpha1.TopologyPolicy { 28 | switch scope { 29 | case config.PodTopologyManagerScope: 30 | return generateTopologyPolicyPodScope(policy) 31 | case config.ContainerTopologyManagerScope: 32 | return generateTopologyPolicyContainerScope(policy) 33 | default: 34 | return nodev1alpha1.TopologyPolicyNone 35 | } 36 | } 37 | 38 | func generateTopologyPolicyPodScope(policy string) nodev1alpha1.TopologyPolicy { 39 | switch policy { 40 | case config.SingleNumaNodeTopologyManagerPolicy: 41 | return nodev1alpha1.TopologyPolicySingleNUMANodePodLevel 42 | case config.RestrictedTopologyManagerPolicy: 43 | return nodev1alpha1.TopologyPolicyRestrictedPodLevel 44 | case config.BestEffortTopologyManagerPolicy: 45 | return nodev1alpha1.TopologyPolicyBestEffortPodLevel 46 | case config.NoneTopologyManagerPolicy: 47 | return nodev1alpha1.TopologyPolicyNone 48 | case v1beta1.NumericTopologyManagerPolicy: 49 | return nodev1alpha1.TopologyPolicyNumericPodLevel 50 | default: 51 | return nodev1alpha1.TopologyPolicyNone 52 | } 53 | } 54 | 55 | func generateTopologyPolicyContainerScope(policy string) nodev1alpha1.TopologyPolicy { 56 | switch policy { 57 | case config.SingleNumaNodeTopologyManagerPolicy: 58 | return nodev1alpha1.TopologyPolicySingleNUMANodeContainerLevel 59 | case config.RestrictedTopologyManagerPolicy: 60 | return nodev1alpha1.TopologyPolicyRestrictedContainerLevel 61 | case config.BestEffortTopologyManagerPolicy: 62 | return nodev1alpha1.TopologyPolicyBestEffortContainerLevel 63 | case config.NoneTopologyManagerPolicy: 64 | return nodev1alpha1.TopologyPolicyNone 65 | case v1beta1.NumericTopologyManagerPolicy: 66 | return nodev1alpha1.TopologyPolicyNumericContainerLevel 67 | default: 68 | return nodev1alpha1.TopologyPolicyNone 69 | } 70 | } 71 | --------------------------------------------------------------------------------