Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support default order of kubernetes resource #485

Merged

Conversation

elliotxx
Copy link
Contributor

@elliotxx elliotxx commented Aug 22, 2023

What type of PR is this?

/kind feature

What this PR does / why we need it:

Support default order of kubernetes resource.

var defaultOrderedKinds = []string{
	"Namespace",
	"ResourceQuota",
	"StorageClass",
	"CustomResourceDefinition",
	"ServiceAccount",
	"PodSecurityPolicy",
	"Role",
	"ClusterRole",
	"RoleBinding",
	"ClusterRoleBinding",
	"ConfigMap",
	"Secret",
	"Endpoints",
	"Service",
	"LimitRange",
	"PriorityClass",
	"PersistentVolume",
	"PersistentVolumeClaim",
	"Deployment",
	"StatefulSet",
	"CronJob",
	"PodDisruptionBudget",
	"MutatingWebhookConfiguration",
	"ValidatingWebhookConfiguration",
}

@elliotxx elliotxx changed the title feat: support default order of kubernetes resource [WIP] feat: support default order of kubernetes resource Aug 22, 2023
@elliotxx elliotxx self-assigned this Aug 22, 2023
@elliotxx elliotxx added the kind/feature Categorizes issue or PR as related to a new feature label Aug 22, 2023
@elliotxx elliotxx added this to the 0.9.0 milestone Aug 22, 2023
@elliotxx elliotxx linked an issue Aug 22, 2023 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Aug 22, 2023

Pull Request Test Coverage Report for Build 5946963029

  • 50 of 55 (90.91%) changed or added relevant lines in 2 files are covered.
  • 14 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.02%) to 73.769%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/generator/appconfiguration/generator/ordered_resources_generator.go 48 53 90.57%
Files with Coverage Reduction New Missed Lines %
pkg/engine/operation/parser/parser.go 3 78.21%
pkg/engine/operation/parser/spec_parser.go 4 56.1%
pkg/cmd/destroy/options.go 7 84.08%
Totals Coverage Status
Change from base Build 5936745806: -0.02%
Covered Lines: 5647
Relevant Lines: 7655

💛 - Coveralls

@elliotxx elliotxx force-pushed the support-default-order-of-k8s-resources branch from 35244db to 845f28c Compare August 22, 2023 12:39
@elliotxx elliotxx changed the title [WIP] feat: support default order of kubernetes resource feat: support default order of kubernetes resource Aug 23, 2023
Copy link
Contributor

@adohe adohe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@adohe adohe merged commit 67c9df3 into KusionStack:main Aug 23, 2023
7 of 8 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toolchain: Add logic that generates resource dependency in kusion spec
3 participants