Compare commits

...

2298 Commits

Author SHA1 Message Date
Ayush Kumar
1396884a44 Feat: Implement array builder and enhance CUE generation for X-Definitions (#7039)
* feat: implement array builder and enhance CUE generation with conditional outputs

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>

* feat: enhance CUE generation for struct fields and add support for array element types

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>

* feat: refactor CUE generation logic for struct fields and streamline resource output handling

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
2026-02-12 14:27:56 +00:00
Anoop Gopalakrishnan
29a26d5650 Feat: Defkit implementation (#7037)
* Docs(KEP): Go SDK for X-Definition Authoring (defkit)

  Introduces KEP proposal for defkit, a Go SDK that enables platform
  engineers to author X-Definitions using native Go code instead of CUE.

  Key proposed features:
  - Fluent builder API for Component, Trait, Policy, and WorkflowStep definitions
  - Transparent Go-to-CUE compilation
  - IDE support with autocomplete and type checking
  - Schema-agnostic resource construction
  - Collection operations (map, filter, dedupe)
  - Composable health and status expressions
  - Addon integration with godef/ folder support
  - Module dependencies for definition sharing via go get

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(KEP): Examples and minor api changes given in the document

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(KEP): align defkit examples

- Fix golang version in CI
- Fix variable declaration in example for testing
- Add Is() comparison method to status check

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add security considerations section

- Add goal #7 for secure code execution model
- Add Security Considerations section covering:
  - Code execution model (compile-time only, not runtime)
  - Security benefits over CUE (static analysis, dependency scanning)
  - Threat model with mitigations

Addresses PR feedback about code execution safety.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add module versioning and definition placement sections

- Add Module Versioning section explaining git-based version derivation
- Add Definition Placement section covering:
  - Motivation for placement constraints in multi-cluster environments
  - Fluent API for placement (RunOn, NotRunOn, label conditions)
  - Logical combinators (And, Or, Not)
  - Module-level placement defaults
  - Placement evaluation logic
  - CLI experience for managing cluster labels
- Add Module Hooks section for lifecycle callbacks
- Minor fixes and clarifications throughout

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add module hooks and update addon integration sections

- Add Module Hooks section covering:
  - Use cases (CRD installation, setup scripts, post-install samples)
  - Hook configuration in module.yaml (pre-apply, post-apply)
  - Hook types (path for manifests, script for shell scripts)
  - waitFor field with condition names and CUE expressions
  - CLI usage (--skip-hooks, --dry-run)

- Update Addon Integration section with implementation details:
  - godef/ folder structure with module.yaml
  - CLI flags (--godef, --components, --traits, --policies, --workflowsteps)
  - Conflict detection and --override-definitions flag
  - Development workflow

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): address PR review comments and clarify placement labels

- Fix misleading "Sandboxed Compilation" claim (cubic-ai feedback) -
  renamed to "Isolated Compilation" and clarified that security relies
  on trust model, not technical sandboxing
- Fix inconsistent apiVersion in module hooks example (defkit.oam.dev/v1
  → core.oam.dev/v1beta1)
- Clarify that placement uses vela-cluster-identity ConfigMap directly,
  not the vela cluster labels command (which is planned for future)
- Add --stats flag to apply-module CLI documentation

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): fix API documentation

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add core fluent API types for Go-based definitions

Introduce the defkit package providing a fluent Go API for defining
KubeVela X-Definitions (components, traits, policies, workflow steps).

Core types added:
- types.go: Value, Condition, Param interfaces
- base.go: Base definition types and interfaces
- param.go: Parameter builders (String, Int, Bool, Array, Map, Struct, Enum)
- expr.go: Expression builders for conditions and comparisons
- resource.go: Resource operations (Set, SetIf, Spread)
- context.go: KubeVela context references (appName, namespace, etc.)
- test_context.go: Test utilities for definition validation

This enables writing type-safe Go definitions that compile to CUE.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add collection operations and helper builders

Add fluent API for array/collection transformations:
- CollectionOp with Filter, Map, Pick, Wrap, Dedupe operations
- From() and Each() entry points for collection pipelines
- FieldRef, FieldEquals, FieldMap for field-level operations
- MultiSource for complex multi-array comprehensions
- Add helper builders for template variables
- Add value transformation utilities

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add CUE code generator

Implement CUEGenerator that transforms Go definitions into CUE code
Added helper methods and writers for conversion

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add status and health policy builders

Add fluent builders for customStatus and healthPolicy CUE generation

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add definition type builders

Add fluent builders for all four KubeVela X-Definition types:
- ComponentDefinition
- TraitDefinition
- PolicyDefinition
- WorkflowStepDefinition

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(goloader): add Go module loader for definitions

- Definition interface and registry for runtime discovery
- Discover and parse Go-based definition files
- Compile Go definitions to CUE at runtime
- Module environment for batch processing
- Parallel generation for better performance

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(cli): add vela def commands for Go-based definitions

- init-module: scaffold a new Go definition module
- apply-module: compile and apply definitions to cluster
- list-module: show definitions in a module
- validate-module: validate definitions without applying
- Also support the cue commands for xdefintions for go code

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add testing utilities and matchers

- CUE comparison matchers for Ginkgo/Gomega tests
- Test helpers for definition validation

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add patch container helpers for container mod operations

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(cli): update the go module to 1.23.8 for defkit init-module command

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Refactor: Add grouped help output for vela def command

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add definition placement for cluster-aware deployments

Enable definitions to specify which clusters they should run on based on
cluster identity labels stored in a well-known ConfigMap.

Also derives module version from git tags and improves init-module to
create directories from --name flag.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add RunOn/NotRunOn fluent API for placement constraints

Add placement methods to all definition builders allowing definitions
to specify cluster eligibility using the placement package's fluent API.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(defkit): add commented placement example to module.yaml template

Show users the placement syntax in generated module.yaml without
setting actual values.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add module-level placement support

Add placement constraints at the module level in module.yaml that
apply to all definitions unless overridden at definition level.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add CLI placement enforcement in apply-module

Add placement constraint checking to `vela def apply-module` command.
Definitions are skipped if cluster labels don't match module placement.

- Add --ignore-placement flag to bypass placement checks
- Display placement status during apply with clear skip reasons
- Track placement-skipped count in summary output
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(defkit): show all flags in subcommand help output

Fix custom help function to properly display flags for def subcommands
like init-module and apply-module instead of only showing parent flags.
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(defkit): apply name prefix to definitions in apply-module

The --prefix flag was not being applied to definition names. The prefix
was set in module loader metadata but not used when creating Kubernetes
objects from parsed CUE.
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore(defkit): align module command help with standard vela pattern

Remove argument placeholders from command Use field to align with
other vela commands (addon, cluster, workflow). Arguments are shown
in examples and individual --help output instead of the listing.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(goloader): use json.Unmarshal for go mod download output

The downloadGoModule function parses JSON output from 'go mod download -json'
but was incorrectly using yaml.Unmarshal with json struct tags. The yaml.v3
library ignores json tags, resulting in empty field values.

This would cause remote Go module loading (e.g., github.com/foo/bar@v1.0.0)
to fail with "go mod download did not return a directory" because result.Dir
would be empty.

Fix: Use json.Unmarshal instead since the data is JSON from the Go toolchain.
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(goloader): use semver for MinVelaVersion comparison

String comparison of version numbers is incorrect for cases like
"v1.10.0" > "v1.9.0" which returns false due to lexicographic ordering.

Use the Masterminds/semver library (already a dependency) for proper
semantic version comparison in ValidateModule().

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(placement): validate operator in module placement conditions

Add validation to catch invalid placement operators at module load time
instead of silently failing at runtime evaluation.

- Add Operator.IsValid() method to check for valid operators
- Add ValidOperators() helper function
- Add validatePlacementConditions() in ValidateModule()
- Provides clear error message with valid operator list

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(cli): validate conflict strategy in apply-module

Invalid --conflict values like "invalid" were silently accepted and
would fall through the switch statement, behaving like "overwrite".

Add ConflictStrategy.IsValid() method and validation at flag parsing
to provide clear error message for invalid values.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(placement): support definition-level placement constraints

Previously only module-level placement was enforced. Now individual
definitions can specify their own placement constraints that override
module defaults.

Changes:
- Add Placement field to DefinitionInfo and DefinitionPlacement types
- Add GetPlacement/HasPlacement to Definition interface
- Update registry ToJSON to include placement in output
- Update goloader to capture definition placement from registry
- Update CLI apply-module to use GetEffectivePlacement() for combining
  module-level and definition-level placement
- Add comprehensive tests for definition placement

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore(defkit): remove dead PatchTemplate code

PatchTemplate, PatchOp, SetPatchOp, and SetIfPatchOp were defined but
never used anywhere in the codebase. The PatchResource type already
provides the same functionality and is the one actually being used
through Template.Patch().

Removed:
- PatchTemplate struct and its methods (ToCue, SetIf, Set)
- PatchOp interface
- SetPatchOp struct and its ToCue method
- SetIfPatchOp struct and its ToCue method
- NewPatchTemplate constructor

This cleanup reduces maintenance burden without affecting any
functionality.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(cli): pass actual VelaVersion to validate-module command

The help text for `vela def validate-module` promised to check
minVelaVersion requirements but ValidateModule() was called with
an empty string, causing the check to be silently skipped.

Now passes velaversion.VelaVersion so modules specifying a minimum
KubeVela version will be properly validated against the current CLI
version.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): implement WithDetails() and FromTyped() APIs

WithDetails():
- Adds WithDetails(message, details...) method to StatusBuilder
- Allows adding structured key-value details alongside status messages
- Uses existing StatusDetail and statusWithDetailsExpr infrastructure
- Example: s.WithDetails(s.Format("Ready: %v", ...), s.Detail("endpoint", ...))

FromTyped():
- Converts typed Kubernetes objects (runtime.Object) to Resource
- Provides compile-time type safety for building resources
- Requires TypeMeta to be set on the object
- Includes MustFromTyped() variant that panics on error
- Example: defkit.FromTyped(&appsv1.Deployment{...})

Both APIs were documented in the KEP but not implemented.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Style(defkit): apply gofmt formatting

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(defkit): fix remote module download with @latest version

When downloading a Go module without an explicit version, always append
@latest to ensure go mod download fetches from the remote repository
instead of skipping the download.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(defkit): support running def commands from any directory

Previously, module commands like `vela def list-module` only worked
when run from within the kubevela repository. Now they work from any
directory by honoring replace directives in the source module's go.mod.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): generate doc.go files in init-module

Create doc.go files with package documentation in each definition
directory (components, traits, policies, workflowsteps). This ensures
go mod tidy works correctly by making each directory a valid Go package,
and provides helpful examples for users creating new definitions.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(defkit): deduplicate definitions from overlapping directory scans

The module loader scans both conventional directories (components/,
traits/, etc.) and the root directory. Since DiscoverDefinitions uses
recursive filepath.Walk, files in subdirectories were found twice.
Added file tracking to skip already-processed files.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(defkit): validate placement constraints and fix GOWORK interference

Add validation for conflicting placement constraints at registration time.
Definitions with logically impossible placement (e.g., same condition in
both RunOn and NotRunOn) now fail fast with a clear error message.

Also fix placement loading when parent directories contain go.work files
by setting GOWORK=off when running the registry generator.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add parameter schema constraints and runtime condition methods

Extend the parameter fluent API with comprehensive validation and
conditional logic support:

- Schema constraints for input validation (Min/Max, Pattern, MinLen/MaxLen, MinItems/MaxItems)
- Runtime conditions for template logic (In, Contains, Matches, StartsWith/EndsWith, Len*, IsEmpty/IsNotEmpty, HasKey, IsFalse)

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(defkit): add waitFor support with CUE expressions for module hooks

Add the ability to specify custom readiness conditions for module hooks
using the new `waitFor` field. This allows users to define precise
conditions for when resources should be considered ready.

The waitFor field supports two formats:
- Simple condition name (e.g., "Ready", "Established") - checks
  status.conditions for the named condition with status "True"
- CUE expression (e.g., "status.replicas == status.readyReplicas") -
  evaluated against the full resource for flexible readiness checks

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Feat(addon): add godef support for Go-based definitions in addons

Add support for a godef/ folder in addons that allows writing definitions
in Go instead of CUE. When an addon is enabled, Go definitions are
automatically compiled to CUE and deployed alongside traditional CUE
definitions.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: lint issues and make reviewable

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: lint and build failure

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: lint and ci errors

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: golangci-lint errors for defkit package

- Use standard library errors (errors.Is/As) instead of pkg/errors
- Fix ineffassign issues by scoping variables correctly
- Add nolint comments for intentional nilerr, makezero patterns
- Combine chained appends in addon init.go
- Add gosec nolint for CLI file operations and permissions
- Increase gocyclo threshold to 35, nolint complex CLI commands

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: kubectl installation with retry and fallback version in github actions

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(ci): hardcode kubectl version to avoid flaky CDN endpoint

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: improve test coverage for codecov

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: add more tests for codecov and CI to pass

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: ci failure on style

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: OperatorNotEquals to fail closed with empty values

Change NotEquals operator to return false when Values slice is empty,
matching the fail-closed behavior of Equals operator. This prevents
silent widening of placement eligibility when a malformed constraint
is created.

Following Kubernetes label selector semantics where In/NotIn operators
require non-empty values, we apply a fail-closed approach for safety
in placement decisions.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: OpenArrayParam field shadowing and remove redundant GetName()

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: path traversal vulnerability in Go definition scaffolding

 Validate Go definition names before using them in file paths to prevent
 creation of files outside the addon directory. Unsanitized names could
 contain path traversal segments (e.g., "../../../etc/passwd") allowing
 arbitrary file writes.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: unescaped string interpolation in health_expr CUE generation

  Use %q format verb in formatValue() to properly escape quotes and
  special characters when generating CUE strings. Update fieldContainsExpr
  to use formatValue() instead of raw string interpolation.

  This prevents invalid CUE when substring values contain quotes or
  backslashes.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: Guard against typed nil in Gomega matchers to prevent panic

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: Guard against malformed bracket path in parseBracketAccess

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: incomplete AppRevision test to actually verify resolution

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix: apply fail-closed behavior to NotIn with empty values

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Doc: Added note about RawCUE and some alignment style

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2026-02-10 15:00:44 +00:00
Vishal Kumar
ff5f3a8fbb Feat: eager status for post dispatch (#7030)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 2m56s
* Fix: 7032 Adds component type to structured log output (#7033)

Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: add pending status for traits during post dispatch processing

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: enhance health status evaluation for workloads and traits

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: update application health status evaluation and add workload health indicator

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: remove required healthy field from application revisions and applications, update status structure

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Support multiple traits of same type and improve PostDispatch handling

                                                                                               * fix: support multiple traits of the same type and improve PostDispatch handling

                                                                                               - Refactored trait status tracking in  to use a composite key (Type + Index), enabling support for multiple traits of the same type on a single component.
                                                                                               - Updated health evaluation logic in  and  to ignore traits marked as  when determining overall health.
                                                                                               - Enhanced  to refresh component status after dispatching traits, ensuring the application status reflects the latest state.
                                                                                               - Adjusted logic to correctly mark PostDispatch traits as  when the workload is not yet healthy.

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Support multiple traits of same type and improve PostDispatch handling

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* refactor: minor reviewable changes

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* test: verifying kubebbuilder annotation

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: optimize trait status handling by removing unnecessary order tracking

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: remove unnecessary trait dispatch stage checks to streamline status processing

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* refactor: removes redundant changes

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: ensure health status is collected for PostDispatch traits during workflow execution

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: ensure health status is collected for PostDispatch traits during workflow execution

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

# Conflicts:
#	pkg/controller/core.oam.dev/v1beta1/application/apply.go
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: add health status checks for PostDispatch traits in application tests

Co-authored-by: vaibhav0096 <vaibhav.agrawal0096@gmail.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: make workloadHealthy field optional in application revisions and applications

Signed-off-by: vishal210893 <vishal210893@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: vaagrawal_gwre <vaagrawal@Guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2026-02-04 09:41:38 +00:00
Brian Kane
995a09d3c7 Fix: 7032 Adds component type to structured log output (#7033)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 11m56s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-27 09:30:58 +00:00
Brian Kane
7c06ee2060 Fix: Prevent app validation errors when traits are used alongside workflow data passing (#7031)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 51m50s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-23 18:03:09 +00:00
Brian Kane
37fb2a6f49 Feat: 7024 Enable custom errors in components similar to traits (#7028)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 12m42s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-21 10:37:07 +00:00
Brian Kane
555e4416f4 Fix: 7018 Ensure Component removals are correctly persisted and reflected in status (#7027)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-21 09:26:17 +00:00
Amit Singh
5ead6db8d7 Chore: bumps up pkg and workflow dependency versions (#7026)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 1m29s
* chore: bumps up workflow and pkg versions and updates import statements

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* chore: minor linter fixes

Signed-off-by: Amit Singh <singhamitch@outlook.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
2026-01-20 15:32:03 +00:00
Brian Kane
2a75dbdc35 Add a minimal, interface based provider registry to break complex import cycle (#7021)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 1m45s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-19 11:22:28 +00:00
Brian Kane
568b1c578b Feat: 7019 Support re-running workflows and ensure passed data is updated during dispatch (#7025)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-19 11:18:10 +00:00
GoGstickGo
8c85dcdbbc Fix: Support cuex package imports in vela show/def show commands (#7017)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 2m0s
- Added GetCUExParameterValue()
 function that uses cuex.DefaultCompiler instead
    of standard CUE compiler

 - Added GetParametersWithCuex() function with cuex support
- Updated GetBaseResourceKinds() to use cuex compiler
- Updated all callers to use cuex-aware functions

 Fixes #7012

Signed-off-by: GoGstickGo <janilution@gmail.com>
2026-01-16 09:56:10 +00:00
Amit Singh
0b85d55e68 Feat: post dispatch output context (#7008)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 1m46s
* exploring context data passing

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* adds output status fetch logic

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: standardize  import in dispatcher.

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* feat: Allow  traits to access workload output status in CUE context

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* feat: Implement PostDispatch traits that apply after component health is confirmed.

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* feat: Refactor  trait handling and status propagation in application dispatch.

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: run make reviewable

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* feat: Implement and document PostDispatch traits, applying them after component health is confirmed and guarded by a feature flag, along with new example applications.

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* feat: Add comments

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Fix: Restore the status field in ctx.

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Fix: Error for evaluating the status of the trait

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* refactor: removes minor unnecessary changes

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* refactor: minor linter changes

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* test: Add comprehensive tests for PostDispatch traits and their status handling

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Fix: Increase multi-cluster test time

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Chore: Add focus and print the application status

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Chore: print deployment status in the multicluster test

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Chore: add labels for the deployment

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* debugging test failure by updating multi cluster ctx

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* undoes multi cluster ctx change

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Feat: enable MultiStageComponentApply feature by default

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Feat: implement post-dispatch traits application in workflow states

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Chore: remove unnecessary blank lines in application_controller.go

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Feat: enhance output readiness handling in health checks

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Feat: add logic to determine need for post-dispatch outputs in workload processing

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Feat: enhance output extraction and dependency checking for post-dispatch traits

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix code to exclude validation of post dispatch trait in webhook

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix code to exclude validation of post dispatch trait in webhook

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* commit for running the test again

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* commit for running the test again

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* commit for running the test again

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* triggering checks

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* chore: adds explanation comments

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* chore: adds errors to context

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* chore: minor improvements

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* fix: update output handling for pending PostDispatch traits

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: improve output handling for PostDispatch traits in deploy process

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: streamline output handling in PostDispatch process

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* chore: commit to re run the pipeline

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* chore: commit to re run the pipeline

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* chore: commit to re run the pipeline

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: enhance output status handling in PostDispatch context for multi-stage support

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* chore: commit to re run the pipeline

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: increase timeout for PostDispatch trait verification in tests

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: enhance output status handling in PostDispatch context for multi-stage support

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* chore: commit to re run the pipeline

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Chitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
2026-01-14 10:28:13 +00:00
Brian Kane
432ffd3ddd Feat: Improve Cue Error Reporting (#6984)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 11m49s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2026-01-07 14:37:06 +00:00
Ricardo Noriega
3cc668289e Fix typos in documentation (#7015)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 2m58s
Signed-off-by: Ricardo Noriega De Soto <rnoriega@redhat.com>
2026-01-06 11:29:14 +00:00
Anoop Gopalakrishnan
e2935da549 Docs(KEP): Go SDK for X-Definition Authoring (defkit) (#7009)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 16m11s
* Docs(KEP): Go SDK for X-Definition Authoring (defkit)

  Introduces KEP proposal for defkit, a Go SDK that enables platform
  engineers to author X-Definitions using native Go code instead of CUE.

  Key proposed features:
  - Fluent builder API for Component, Trait, Policy, and WorkflowStep definitions
  - Transparent Go-to-CUE compilation
  - IDE support with autocomplete and type checking
  - Schema-agnostic resource construction
  - Collection operations (map, filter, dedupe)
  - Composable health and status expressions
  - Addon integration with godef/ folder support
  - Module dependencies for definition sharing via go get

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(KEP): Examples and minor api changes given in the document

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(KEP): align defkit examples

- Fix golang version in CI
- Fix variable declaration in example for testing
- Add Is() comparison method to status check

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add security considerations section

- Add goal #7 for secure code execution model
- Add Security Considerations section covering:
  - Code execution model (compile-time only, not runtime)
  - Security benefits over CUE (static analysis, dependency scanning)
  - Threat model with mitigations

Addresses PR feedback about code execution safety.

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add module versioning and definition placement sections

- Add Module Versioning section explaining git-based version derivation
- Add Definition Placement section covering:
  - Motivation for placement constraints in multi-cluster environments
  - Fluent API for placement (RunOn, NotRunOn, label conditions)
  - Logical combinators (And, Or, Not)
  - Module-level placement defaults
  - Placement evaluation logic
  - CLI experience for managing cluster labels
- Add Module Hooks section for lifecycle callbacks
- Minor fixes and clarifications throughout

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add module hooks and update addon integration sections

- Add Module Hooks section covering:
  - Use cases (CRD installation, setup scripts, post-install samples)
  - Hook configuration in module.yaml (pre-apply, post-apply)
  - Hook types (path for manifests, script for shell scripts)
  - waitFor field with condition names and CUE expressions
  - CLI usage (--skip-hooks, --dry-run)

- Update Addon Integration section with implementation details:
  - godef/ folder structure with module.yaml
  - CLI flags (--godef, --components, --traits, --policies, --workflowsteps)
  - Conflict detection and --override-definitions flag
  - Development workflow

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): address PR review comments and clarify placement labels

- Fix misleading "Sandboxed Compilation" claim (cubic-ai feedback) -
  renamed to "Isolated Compilation" and clarified that security relies
  on trust model, not technical sandboxing
- Fix inconsistent apiVersion in module hooks example (defkit.oam.dev/v1
  → core.oam.dev/v1beta1)
- Clarify that placement uses vela-cluster-identity ConfigMap directly,
  not the vela cluster labels command (which is planned for future)
- Add --stats flag to apply-module CLI documentation

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): fix API documentation

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Docs(KEP): add forward-reference for RawCUE() escape hatch

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-12-30 16:11:46 -08:00
Bryan Leong
358e46e628 Style: clean up dry-run (#7007)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 13m45s
- Remove trailing whitespace on dryrun outputs
- Fixed the relevant plugin-test outputs
- Refactor to avoid partial lines that codecov flags out

Signed-off-by: Bryan Leong <leong.bryan@gmail.com>
2025-12-16 11:18:14 +00:00
Brian Kane
bf2340bb35 Feat(KEP): Declarative Addon Support (#6996)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 17m36s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-11-28 16:43:06 +00:00
rahulkhinchi-wq
a459bba20e fix: dangerous-exec-command-87 (#6999)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 17m1s
Co-authored-by: root <root@ai-guardian-remediation-54f45fdc58-g5zpm>
2025-11-26 06:52:34 -08:00
Ayush Kumar
552764d48f Fix: Enhance shared resource handling to avoid last-applied-configuration pollution (#6998)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 19m3s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-11-26 11:08:22 +00:00
Brian Kane
9b558e38cd Feat(KEP): #6973 - Native Helm Rendering (#6974)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 16m47s
* KEP #6973 - Native Helm Rendering

Signed-off-by: Brian Kane <briankane1@gmail.com>

* KEP: #6973 - Native Helm Rendering - Minor format and spelling corrections

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-11-25 11:36:27 +00:00
Brian Kane
9889a0cb31 Feat(KEP): Nested Definition Rendering (Compositions) (#6993)
* Feat(KEP): Nested Definition Rendering (Compositions)

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Feat(KEP) #6990 - Nested Definition Rendering (Compositions) - Minor Updates

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-11-25 11:35:08 +00:00
Chaitanyareddy0702
90ed704cff Refactor: update workflow-related types to use v1alpha1 API (#6975)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 17m1s
* refactor: update workflow-related types to use v1alpha1 API

- Changed the workflow mode in ApplicationBuilder from v1beta1 to v1alpha1.
- Updated WorkflowStep and WorkflowSubStep constructors to use the new v1alpha1 types.
- Modified the TypedApplication interface to reflect the new workflow mode.
- Adjusted WorkflowStepBase and WorkflowSubStepBase to utilize v1alpha1 inputs and outputs.
- Commented out unused WorkflowSubStep registration for future consideration.

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: update Inputs and Outputs types to use v1alpha1 API in GoDefModifier

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: remove commented-out code for AddInput and AddOutput in genBaseSetterFunc

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: update ApplicationBuilder to use apis package for components, steps, and policies

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: remove unused WorkflowSubStep related code and update WorkflowStep reference to use v1alpha1 API

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* feat: add support for WorkflowSubStep registration and handling in GoDefModifier

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: update import path for WorkflowStepBase in GoDefModifier

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: update import path for WorkflowStep in DefinitionKindToStatement

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: update WorkflowSubStep references to use WorkflowStepBase from v1alpha1 API

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: simplify subSteps generation in GoDefModifier by directly appending WorkflowStepBase

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: nest properties under WorkflowStepBase in GoDefModifier for WorkflowStep definitions

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: remove toolchain version from go.mod

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Run: make reviewable

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: enhance application auto-update test to wait for application revisions

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2025-11-18 08:47:44 +00:00
Ayush Kumar
0a599ad177 Refactor: Pre-Validation Hooks to be More Extensible and Testable (#6978)
* refactor: pre-start hook implementation

- Introduced a new `hook.go` file defining the `PreStartHook` interface for pre-start validation hooks.
- Removed the old `pre_start_hook.go` file which contained the `SystemCRDValidationHook` implementation.
- Updated the server initialization code to use the new hook structure, specifically integrating the `crdvalidation` package for pre-start validation.
- Enhanced logging for pre-start hook execution to improve clarity on hook names and execution results.

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: move color writer implementation to logging package and update usage in server setup

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: rename Hook to CRDValidation for clarity and consistency

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: reorder import statements for consistency

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: replace hardcoded namespace with variable in cleanup function

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: rename CRDValidation type to Hook for consistency

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: enhance CRD validation hook with custom client support and improved error handling

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: extend timeout for CRD validation hook and improve error handling for slow API servers

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: remove redundant comments from PreStartHook definition

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-11-17 18:14:40 -08:00
Chaitanyareddy0702
d064d3dbd2 Feat: Add configurable timeout for admission webhooks (#6977)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 23s
* Feat: Add configurable timeout for admission webhooks

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: Update admission webhook timeout configuration to use admissionWebhookTimeout variable

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: Add admission webhook timeout parameter to README

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* removed period in readme to run pipelines

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2025-11-13 11:43:35 +08:00
Ayush Kumar
89ff116f8e Fix: E2E Application Test (live-diff application version) (#6976)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 27s
* refactor: Simplify application auto-update test by removing unnecessary reconciliation waits

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* feat: Add e2e application tests with k3d and webhook validation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* fix: Remove unnecessary blank line in application auto-update test

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Add k3d cleanup step after running application tests

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
2025-11-11 14:24:30 +00:00
Ayush Kumar
0485704cd7 Fix: Prevent namespace admins from accessing vela-system definitions without explicit permissions (#6972)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 34s
* fix: add admission rules for applications and improve permission checks

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* test: enhance application auto-update tests with reconciliation checks

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* fix: enhance application auto-update test to verify application revision creation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-11-10 08:14:41 +00:00
Amit Singh
2a31930c4b Chore: imports workflow crd from pkg repo (#6954)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 38s
* chore: adds logic to pull workflow crd from pkg repo

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: introduce GetIteratorLabel utility function and refactor label retrieval in CUE processing

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>

* feat: refactor FromCUE method to use GetIteratorLabel utility for improved label retrieval

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: remove unused imports and optimize list concatenation in template files

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>

* refactor: standardize import formatting across multiple YAML and Go files

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

* refactor: import statements in multiple YAML templates for consistency

- Removed unnecessary parentheses around import statements in various CUE templates.
- Ensured a consistent import style across all templates in the vela-core chart.

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

* feat: add disk space cleanup steps before and after cross-build in Go workflow

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

* refactor: update check-diff target to depend on build for improved consistency

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

* refactor: update reviewable target to include build for improved consistency in check-diff

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
2025-11-06 18:56:04 -08:00
Brian Kane
8e3749f970 Fix: Fix issue with imports/packages in status validations (#6963)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-11-06 15:23:08 -08:00
Anirudh Edpuganti
089f657b0c fix: update YAML import path to use go.yaml.in/yaml/v3 and adjust dependencies in go.mod and go.sum (#6944)
Signed-off-by: ANIRUDH-333 <aniedpuganti@gmail.com>
2025-11-06 10:37:19 +00:00
Ayush Kumar
ea409c7437 Refactor: controller setup and improve server tests (#6958)
* Feat: Add integration test setup and cleanup scripts, enhance server testing capabilities

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor: Rename variables for clarity and consistency in core command handling

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: Remove redundant server test targets and enhance logging in core command execution

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor server tests and enhance E2E testing setup

- Updated server_test.go to improve test organization and clarity, including the addition of BeforeSuite and AfterSuite for environment setup and teardown.
- Enhanced the waitWebhookSecretVolume tests to cover various scenarios including empty directories and files.
- Added new tests for syncConfigurations and logging setup functions to ensure proper configuration handling.
- Introduced a new E2E test for the main function in main_e2e_test.go to validate the core functionality of the application.
- Improved the e2e.mk file to set up a k3d cluster for running main_e2e_test with embedded test binaries and added cleanup steps.
- Removed the setup-integration-tests.sh script as its functionality is now integrated into the Makefile.

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor:  improve multicluster test timeouts

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-11-05 10:23:24 +00:00
Vishal Kumar
5b24e8b410 Chore: Graceful skip and robust processing for missing definition directories in install script (#6964)
* Feat(script): Update installation definition script for improved error handling and namespace management

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* added line to rerun the github action

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* minor change to rerun the github action

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix(script): Enhance installation script to restore original files on failure

Signed-off-by: vishal210893 <vishal210893@gmail.com>

---------

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>
2025-11-05 09:12:56 +00:00
AshvinBambhaniya2003
305a90f428 Feat(addon): Store addon registry tokens in Secrets (#6935)
* feat(addon): Store addon registry tokens in Secrets

Previously, addon registry tokens were stored in plaintext within the 'vela-addon-registry' ConfigMap. This is not a secure practice for sensitive data.

This commit refactors the addon registry functionality to store tokens in Kubernetes Secrets. The ConfigMap now only contains a reference to the secret name, while the token itself is stored securely.

This change includes:
- Creating/updating secrets when a registry is added/updated.
- Loading tokens from secrets when a registry is listed/retrieved.
- Deleting secrets when a registry is deleted.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(addon): Add tests for registry token secret storage

This commit introduces a comprehensive test suite for the addon registry feature.

It includes:
- Isolated unit tests for each CRUD operation (Add, Update, List, Get, Delete) to ensure each function works correctly in isolation.
- A stateful integration test to validate the complete lifecycle of an addon registry from creation to deletion.

The tests verify that tokens are handled correctly via Kubernetes Secrets, confirming the implementation of the secure token storage feature.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(addon): improve addon registry robustness and fix bugs

This commit introduces several improvements to the addon registry to make it more robust and fixes several bugs.

- When updating a secret, the existing secret is now fetched and updated to avoid potential conflicts.
- Deleting a non-existent registry now returns no error, making the operation idempotent.
- Getting a non-existent registry now returns a structured not-found error.
- Loading a token from a non-existent secret is now handled gracefully.
- When setting a token directly on a git-based addon source, the token secret reference is now cleared.
- The token secret reference is now correctly copied in `SafeCopy`.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* Refactor(addon): Fix secret deletion and improve registry logic

This commit refactors the addon registry data store to fix a critical bug where deleting an addon registry would not delete its associated token secret.

The root cause was that the `GetRegistry` function, which was used by `DeleteRegistry`, would load the token from the secret and then clear the `TokenSecretRef` field on the in-memory object. This meant that when `DeleteRegistry` tried to find the secret to delete, the reference was already gone.

This has been fixed by:
1. Introducing a central `getRegistries` helper function to read the raw registry data from the ConfigMap.
2. Refactoring all data store methods (`List`, `Get`, `Add`, `Update`, `Delete`) to use this central helper, removing duplicate code.
3. Ensuring `DeleteRegistry` uses the raw, unmodified registry data so that the `TokenSecretRef` is always available for deletion.

Additionally, comprehensive unit tests for the new helper functions (`getRegistries`, `loadTokenFromSecret`, `createOrUpdateTokenSecret`) have been added to verify the fix and improve overall code quality and stability.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(addon): improve addon registry token security and logging

This commit enhances the security and observability of addon registry token handling.

- Adds a warning message to users when an insecure inline token is detected in an addon registry configuration, prompting them to migrate to a more secure secret-based storage.
- Implements info-level logging to create an audit trail for token migrations, providing administrators with visibility into security-related events.
- Refactors the token migration logic into a new `migrateInlineTokenToSecret` function, improving code clarity and maintainability.
- Introduces unit tests for the `TokenSource` interface methods and the `GetTokenSource` function to ensure correctness and prevent regressions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* Chore: remove comments to triger ci

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-31 13:52:30 +00:00
AshvinBambhaniya2003
d1f077ee0d Fix(addon): show correct owner in definition conflict error (#6903)
* fix(addon): show correct owner in definition conflict error

When enabling an addon, if a definition conflicted with one from another existing addon, the error message would misleadingly cite the addon being installed as the owner, rather than the actual owner of the definition. This made it difficult for users to diagnose the conflict.

This commit corrects the error message generation in `checkConflictDefs` to use the name of the actual owner application. A comprehensive unit test for this function has also been added to verify the corrected behavior and prevent regressions.

Fixes #6898

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(addon): show correct owner name in conflict message

When a definition conflict occurs, the error message attempts to show the addon that owns the existing definition.

However, if the owner is not a KubeVela addon application (i.e., its name doesn't have the 'addon-' prefix), the `AppName2Addon` function returns an empty string. This resulted in a confusing conflict message with a blank owner name, like "already exist in  \n".

This patch fixes the issue by checking if the result of `AppName2Addon` is empty. If it is, it falls back to using the full application name of the owner,
ensuring the conflict message is always clear and actionable.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* chore(addon): update comment for addon name

- Add this comment to trigger ci

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(addon): improve conflict message for addon definitions

adjust comment placement and logic to ensure correct addon name display in conflict messages

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-31 13:52:00 +00:00
AshvinBambhaniya2003
260fc1a294 Feat: Enhance unit test coverage for references/appfile package (#6913)
* feat(appfile): Enhance unit test coverage and migrate to standard Go testing

This commit significantly enhances the unit test coverage for the `references/appfile` package by introducing a comprehensive suite of new test cases and migrating existing tests to the standard Go `testing` framework with `testify/assert`.

Key additions and improvements include:
- **New Test Cases for `references/appfile/api/appfile.go`**: Added tests for `NewAppFile`, `JSONToYaml`, and `LoadFromBytes` to ensure correct application file initialization, parsing, and loading.
- **New Test Cases for `references/appfile/api/service.go`**: Introduced tests for `GetUserConfigName`, `GetApplicationConfig`, and `ToStringSlice` to validate service configuration extraction and type conversions.
- **Expanded Test Coverage for `references/appfile/app.go`**: Added new tests for `NewApplication`, `Validate`, `GetComponents`, `GetServiceConfig`, `GetApplicationSettings`, `GetWorkload`, and `GetTraits`, ensuring the robustness of application-level operations.
- **Dedicated Test Files for `modify.go` and `run.go`**: Created `modify_test.go` and `run_test.go` to provide specific unit tests for `SetWorkload`, `CreateOrUpdateApplication`, `CreateOrUpdateObjects`, and `Run` functions.
- **Test Framework Migration**: Refactored `addon_suit_test.go` to `main_test.go` and `addon_test.go` to use standard Go `testing` and `testify/assert`, improving consistency and maintainability.

These changes collectively improve the robustness, reliability, and maintainability of the `appfile` package by providing a more comprehensive and standardized testing approach.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* chore(references/appfile): improve test suite robustness and style

This commit introduces two improvements to the test suite in the `references/appfile` package.

First, the `TestMain` function in `main_test.go` is refactored to ensure the `envtest` control-plane is always stopped, even if test setup fails. This is achieved by creating a single exit path that handles cleanup, preventing resource leaks.

Second, a minor linting issue (S1005) in `modify_test.go` is fixed by removing an unnecessary assignment to the blank identifier.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* Chore: remove comment to trigger ci

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-31 13:51:09 +00:00
AshvinBambhaniya2003
24f6718619 Feat(testing): Enhance Unit Test Coverage for Core Utility Packages (#6929)
* test(cli): enhance unit test coverage for theme and color config

This commit introduces a comprehensive suite of unit tests for the theme and color configuration functions in `references/cli/top/config`.

Key changes include:
- Refactored existing tests in `color_test.go` to use table-driven sub-tests for improved clarity and maintainability.
- Added new test functions to validate color parsing, hex color detection, and default theme creation.
- Implemented tests for theme file lifecycle management, including creation and loading logic.

These additions significantly increase the test coverage and ensure the robustness and correctness of the CLI's theme and color functionality.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(cli): refactor and enhance tests for top view models and utils

This commit improves the unit test suite for the CLI's top view functionality by refactoring existing tests and adding new ones to increase coverage.

Key changes include:
- In `application_test.go`, `TestApplicationList_ToTableBody` is refactored to be a table-driven test, and new tests are added for `serviceNum`, `workflowMode`, and `workflowStepNum` helpers.
- In `time_test.go`, `TestTimeFormat` is refactored into a table-driven test for better structure and readability.

These changes align the tests with best practices and improve the overall robustness of the CLI top view's data presentation logic.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(cuegen): enhance unit test coverage for CUE generation packages

This commit introduces a comprehensive suite of unit tests and refactors existing tests for the CUE generation packages located in `references/cuegen`.

Key changes include:
- Refactored existing tests in `generator_test.go` and `provider_test.go` to use table-driven sub-tests, improving clarity, maintainability, and coverage of error conditions.
- Added new test functions to `convert_test.go` to validate helper functions for comment generation, type support, and enum field handling.
- Added new tests in `provider_test.go` to cover provider extraction, declaration modification, and panic recovery logic.

These changes significantly increase the test coverage for the `cuegen` libraries, ensuring the correctness and robustness of the CUE code generation functionality.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(docgen): add comprehensive unit tests for doc generation

This commit introduces a comprehensive suite of unit tests for the documentation generation package located in `references/docgen`.

Key changes include:
- Added new test files (`console_test.go`, `convert_test.go`, `openapi_test.go`) to cover the core functions for parsing and generating documentation for CUE, Terraform, and OpenAPI schemas.
- Refactored and enhanced `i18n_test.go` to use sub-tests, resolve race conditions, and improve coverage for fallback logic and error handling.
- Ensured all new and existing tests follow best practices, using table-driven tests for clarity and maintainability.

This effort significantly increases the test coverage for the `docgen` package, improving the reliability and robustness of the documentation generation features.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test: improve test reliability and conventions

This commit introduces several improvements to the test suite to enhance reliability and adhere to best practices.

- **Fix flaky test in `docgen/openapi_test.go`**:
  The test for `GenerateConsoleDocument` was flaky because it performed an exact string match on table output generated from a map. Since map iteration order is not guaranteed, this could cause spurious failures. The test is now order-insensitive, comparing sorted sets of lines instead.

- **Improve assertions in `docgen/console_test.go`**:
  - Removes an unnecessary `test.EquateErrors()` option, which is not needed for simple string comparisons.
  - Corrects the `cmp.Diff` argument order to the standard `(want, got)` convention for clearer failure messages.
  - Fixes a typo in an error message.

- **Standardize assertions in `cli/top/config/color_test.go`**:
  Swaps `assert.Equal` arguments to the standard `(expected, actual)` convention.

- **Clean up `cuegen/generators/provider/provider_test.go`**:
  Removes a redundant error check.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-31 13:50:30 +00:00
AshvinBambhaniya2003
44ac92d1ba Feat(test): Enhance unit test coverage for webhook, workflow, VELAQL, and monitor packages (#6895)
* feat(monitor): Add unit tests for application metrics watcher

This commit introduces a new test file with comprehensive unit tests for the application metrics watcher functionality in pkg/monitor/watcher.

Key additions include:
  - Test cases for the application metrics watcher's inc() method covering add, delete, and update operations
  - Test cases for report() method that verifies dirty flags are cleared
  - Test cases for helper functions getPhase() and getApp()

These additions improve the overall test coverage and ensure the correctness of the application metrics monitoring functionality.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(velaql): Add comprehensive unit tests for ParseVelaQLFromPath

This commit introduces new unit tests for the ParseVelaQLFromPath function in pkg/velaql, along with test data files to improve test coverage and ensure correctness.

Key additions include:
  - `pkg/velaql/parse_test.go`: Adds TestParseVelaQLFromPath function with comprehensive test cases covering:
    * Valid CUE files with and without export fields
    * Nonexistent and empty file paths
    * Invalid CUE content
    * Files with invalid export types
  - Test data files in pkg/velaql/testdata/:
    * simple-valid.cue: Valid CUE file with export field
    * simple-no-export.cue: Valid CUE file without export field
    * empty.cue: Empty CUE file
    * invalid-cue-content.cue: CUE file with invalid syntax
    * invalid-export.cue: CUE file with invalid export type

These additions improve the overall test coverage and ensure the robustness of the VELAQL parsing functionality.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(webhook): Add unit tests for ValidateDefinitionRevision function

This commit introduces new unit tests for the ValidateDefinitionRevision function in pkg/webhook/utils to improve test coverage and ensure correctness of definition revision validation.

Key additions include:
  - `pkg/webhook/utils/utils_test.go`: Adds TestValidateDefinitionRevision function with comprehensive test cases covering:
    * Success scenarios with matching definition revisions
    * Success scenarios when definition revision does not exist
    * Failure scenarios with revision hash mismatches
    * Failure scenarios with spec mismatches
    * Failure scenarios with invalid definition revision names

These additions improve the overall test coverage and ensure the robustness of the webhook utility functions for validating definition revisions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(workflow): Add unit tests for OAM apply and query utilities

This commit introduces new unit tests for workflow provider functions in pkg/workflow/providers to improve test coverage and ensure correctness.

Key additions include:
  - `pkg/workflow/providers/oam/apply_test.go`: Adds TestRenderComponent function with comprehensive test cases for component rendering
  - `pkg/workflow/providers/query/utils_test.go`: Adds:
    * TestBuildResourceArray function with comprehensive test cases covering simple, nested, and complex resource tree scenarios
    * TestBuildResourceItem function with test cases for resources with and without annotations

These additions improve the overall test coverage and ensure the robustness of the workflow provider functions for OAM applications.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(velaql): Improve error handling in ParseVelaQLFromPath test

This commit addresses an issue in the TestParseVelaQLFromPath function where file read errors were being silently ignored. The changes include:

- Removing the unused expectedView field from test cases
- Replacing conditional error checking with require.NoError to ensure file read operations are properly validated
- Ensuring that test failures are properly reported when file reading fails

This fix improves the reliability of the test suite by making sure that any file I/O errors are properly caught and reported rather than silently ignored.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat: Apply cross-cutting test improvements

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat: Enhance test coverage with file-specific suggestions

This commit applies file-specific suggestions to enhance the test suite's
coverage and robustness.

Key changes include:

- **`pkg/monitor/watcher/application_test.go`**:
  - Added a test case for a multi-step workflow with mixed phases to
    validate `stepPhaseCounter` aggregation.
  - Added a test for idempotence by calling `inc` twice.
  - Added test cases for an empty workflow and an unknown application phase.
  - Strengthened the `report` test to assert that counters are not cleared.

- **`pkg/velaql/parse_test.go`**:
  - Added a test case for `ParseVelaQLFromPath` to handle files with
    leading/trailing whitespace.
  - Added a test case to ensure consistent error messages for relative paths.

- **`pkg/webhook/utils/utils_test.go`**:
  - Added a test case to `TestValidateCueTemplate` for a malformed CUE
    template.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-31 13:49:15 +00:00
Chaitanyareddy0702
d627ecea2a Chore: Upgrade cuelang version to v0.14.1 (#6877)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 24s
* chore: updates culenag version and syntax across all files

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* debuggin: reverts tf provider changes

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor: Simplify provider configuration by removing 'providerBasic' and directly defining access keys and region for providers

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor: Consolidate provider configuration by introducing 'providerBasic' for access keys and region

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: reorganize import statements in deepcopy files for consistency

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: reorder import statements for consistency across deepcopy files

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor: Safely handle pattern parameter selectors to avoid panics in GetParameters and getStatusMap

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: add comment to clarify test context in definition_revision_test.go

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: remove redundant comment from test context initialization in definition_revision_test.go

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor: Introduce GetSelectorLabel function to safely extract labels from CUE selectors

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: add newline at end of file in utils.go

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: increase timeout for multi-cluster e2e

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-10-23 10:56:37 +01:00
Ayush Kumar
d8a17740dc Refactor: controller flags registration and cobra options (#6949)
* feat: Introduce comprehensive configuration management for KubeVela

- Added multiple configuration files under `cmd/core/app/config` to encapsulate various aspects of KubeVela's functionality, including:
  - Feature gates
  - Logging (KLog)
  - Kubernetes API client settings
  - Multi-cluster management
  - OAM-specific configurations
  - Observability settings (metrics and logging)
  - Performance optimizations
  - Profiling settings
  - Reconciliation settings
  - Resource management
  - Server-level configurations
  - Sharding configurations
  - Webhook settings
  - Workflow engine configurations

- Refactored `CoreOptions` to utilize the new configuration modules, ensuring a clean delegation pattern for flag registration.
- Updated tests to validate the new configuration structure and ensure backward compatibility with legacy fields.

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Sync config module values to legacy fields and add debug logging for webhook configuration

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: Remove debug logging for webhook configuration in server command

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: Add missing newlines at the end of multiple configuration files

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: Clean up legacy field synchronization and improve configuration handling in CoreOptions

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Introduce ControllerConfig for improved controller configuration management

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Implement sync methods for configuration values across various modules

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: Update ControllerConfig to embed Args struct and simplify flag registration

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: Remove ConfigureKLog method and apply klog settings directly in server run function

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: Remove unnecessary line in ControllerConfig and update test assertions for CUE options

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Enhance CUE configuration flags with detailed descriptions and add comprehensive tests for core options

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Add backward compatibility notes to sync methods and enhance CLI override tests for configuration values

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* refactor: Standardize flag formatting in TestCoreOptions_AllConfigModulesHaveFlags

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-10-23 10:54:45 +01:00
jguionnet
05b0ec89a5 Refactor: Update documentation generation to retain .md extensions and fixed Components header (#6957)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 25s
- Modified the documentation generation logic to keep .md file extensions, enhancing IDE support and compatibility with Docusaurus.
- Updated various documentation headers to include the correct .md references in auto-generated messages, ensuring consistency across multiple components (component, policy, trait, workflow).

Signed-off-by: jguionnet jguionnet@guidewire.com

Signed-off-by: jguionnet jguionnet@guidewire.com
Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>
2025-10-22 18:17:46 -07:00
Ayush Kumar
f196d66b5e Fix: Prevent index out-of-bounds in definitions (#6948)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 24s
* Fix: Update ingress messages to handle host retrieval more robustly across multiple templates

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Fix: Enhance output handling in k8s-objects template to check for empty objects

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Fix: Ensure policy selection from envBindingPolicies only occurs if the list is not empty

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2025-10-17 14:34:43 +01:00
AshvinBambhaniya2003
21d9d24b07 Feat(addon): Enhance unit test coverage for pkg/addon (#6901)
* feat(addon): add comprehensive unit tests for addon readers

This commit enhances the test coverage and code quality for the addon reader implementations in the pkg/addon package.

- Refactors all existing addon reader tests (gitee, github, gitlab, local) to use consistent, modern testing patterns like sub-tests.
- Replaces the old memory_reader_test.go with a completely refactored implementation.
- Adds new unit tests for previously untested functions, including various getters, client constructors, and RelativePath helpers.
- Improves http-based tests (gitlab, github, gitee) to use robust mock handlers that correctly simulate API behavior, including pagination and error states.

These changes improve the overall quality and reliability of the addon system and uncovered two minor bugs during the process.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(addon): add more unit tests for addon helpers

This commit continues to improve the test coverage for the pkg/addon package by adding unit tests for several helper and factory functions.

- Adds a test for WrapErrRateLimit to ensure GitHub API rate limit errors are handled correctly.
- Adds a test for ClassifyItemByPattern to verify addon file classification logic.
- Adds a test for the NewAsyncReader factory function to ensure correct reader instantiation.
- Adds tests for various utility functions in utils.go, including IsRegistryFuncs, InstallOptions, ProduceDefConflictError, and GenerateChartMetadata.

These tests increase the reliability of the addon installation and handling logic.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(addon): add unit tests for versioned addon registry

This commit improves test coverage for the versioned addon registry logic in the pkg/addon package.

- Adds a unit test for resolveAddonListFromIndex to verify the logic for parsing Helm index files.
- Introduces a new table-driven test for the internal loadAddon function, covering success and multiple failure scenarios (e.g., version not found, download failure, corrupt data).
- Adds a new test helper, setupAddonTestServer, to create isolated mock HTTP servers for testing addon loading, improving test reliability and clarity.

These tests ensure the core logic for discovering and fetching versioned addons is robust and functions as expected.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* chore(addon): remove unused gitlab testdata path constant

- remove unused gitlab testdata path constant name `gitlabTestdataPath`

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* refactor(addon): improve unit tests based on review feedback

This commit addresses several code review comments to improve the quality, correctness, and robustness of the unit tests in the pkg/addon package.
- Refactors map key assertions in the memory reader test to use the correct "comma ok" idiom instead of assert.NotNil.
- Updates the GitHub reader test to use a compliant addon mock that includes the required template.cue file.
- Modifies the chart metadata test in utils_test.go to use t.TempDir() for better test isolation and automatic cleanup.
- Switches from assert.NotNil to require.NotNil in the versioned registry test to prevent panics on nil pointers.
These changes make the test suite more robust, reliable, and easier to maintain.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-17 10:47:43 +01:00
AshvinBambhaniya2003
3f5b698dac Feat(appfile): Add comprehensive unit tests for appfile and component package (#6908)
* feat(appfile): Add comprehensive unit tests for appfile package

This commit significantly enhances the test coverage for the `pkg/appfile` package by adding a comprehensive suite of new unit tests. These tests improve the reliability of core application parsing, generation, and validation logic.

Key additions include:
- **Parsing:** New tests for policy parsing, legacy application revision handling, and dynamic component loading.
- **Manifest Generation:** Added coverage for `GenerateComponentManifests` and `GeneratePolicyManifests` to ensure correctness of generated resources.
- **OAM Contracts:** New tests for `SetOAMContract` and `setWorkloadRefToTrait` to verify OAM label and reference injection.
- **Template & Context:** Added tests for loading templates from revisions (`LoadTemplateFromRevision`) and preparing the process context (`PrepareProcessContext`).
- **Validation:** Enhanced validation tests for component parameters and uniqueness of output names.

As part of this effort, the existing tests were also migrated from Ginkgo to the standard `testing` package with `testify/assert` to maintain consistency across the codebase.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* refactor(pkg/component): Migrate ref-objects tests to standard Go testing and add new test cases

This commit refactors the unit tests for `pkg/component/ref-objects` from a Ginkgo-based suite to the standard Go `testing` package. Additionally, new unit test cases have been added to further enhance test coverage and ensure the robustness of the `ref-objects` functionality.

Key changes include:
- Deletion of `pkg/component/ref_objects_suite_test.go`.
- Introduction of `pkg/component/main_test.go` to manage test environment setup and teardown using `TestMain`.
- Creation of `pkg/component/ref_objects_test.go` containing all the ref-objects related unit tests, now using standard Go testing functions, along with newly added test cases for improved coverage.

This migration improves consistency with other unit tests in the codebase and leverages the native Go testing framework.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* chore(pkg/component): Reorder imports in ref_objects_test.go

This commit reorders the import statements in `pkg/component/ref_objects_test.go` to adhere to standard Go formatting and import grouping conventions. This change improves code readability and consistency.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-17 10:45:45 +01:00
AshvinBambhaniya2003
4b1d1601c8 fix(addon): correct path calculation in gitlab reader (#6902)
The GetPath method for GitLabItem produced an incorrect path when an addon's base path in the repository was empty. This was caused by an off-by-one error in the string slicing logic that always assumed a base path separator existed, incorrectly truncating the first character of the file path.

This commit corrects the logic by adding a check for an empty base path, ensuring the full path is returned in that case.

Fixes #6899

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-17 10:43:08 +01:00
Brian Kane
ebf73d03c2 Chore: Add codeowners (#6946)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 20s
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-10-16 08:33:49 -07:00
AshvinBambhaniya2003
1d7b186664 Feat: Enhance unit test coverage for references/common package (#6918)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 26s
* feat(common): Enhance unit test coverage for common utilities

This commit significantly enhances the unit test coverage for the `references/common` package, covering a wide range of utilities related to application management, metrics, registry operations, traits, and workloads. Existing tests have also been refactored to improve readability and maintainability.

Key additions and improvements include:
- **Application Utilities**: New tests for `ExportFromAppFile`, `ApplyApp`, `IsAppfile`, `Info`, `SonLeafResource`, `LoadAppFile`, and `ApplyApplication` in `application_test.go`.
- **Metrics Utilities**: Expanded tests for `ToPercentage`, `GetPodStorage`, and `GetPodOfManagedResource` in `metrics_test.go`, with existing tests refactored to use `testify/assert` and table-driven formats.
- **Registry Operations**: New tests for `InstallComponentDefinition` and `InstallTraitDefinition` in `registry_test.go`.
- **Trait Definitions**: New `trait_test.go` file with tests for `ListRawWorkloadDefinitions`.
- **Workload Initialization**: New `workload_test.go` file with tests for `InitApplication` and `BaseComplete`.

These changes collectively improve the robustness, reliability, and maintainability of the `references/common` package by providing a more comprehensive and standardized testing approach.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(common): Improve test assertions and error handling

This commit improves the quality and reliability of unit tests in the `references/common` package by addressing several inconsistencies and potential issues.

Key changes include:

- Asserts the error returned by `v1beta1.AddToScheme` across multiple test files (`application_test.go`, `registry_test.go`, `workload_test.go`) to prevent masking scheme registration failures.
- Replaces `strings.Contains` with the more idiomatic `assert.Contains` in `application_test.go`.
- Adds an assertion to check the error returned by `tmpFile.Close()` in `application_test.go`.
- Uses `assert.EqualError` instead of `assert.Equal` for comparing error messages in `registry_test.go` for more precise error checking.
- Removes an unused `strings` import from `application_test.go`.

These changes lead to more robust, readable, and consistent tests.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(common): Fix flaky test in TestExportFromAppFile

The `TestExportFromAppFile` test was passing locally but failing in CI with a "no matches for kind" error.

This was caused by passing an uninitialized `common.Args` object to the `ExportFromAppFile` function. The function was using the client from this object, which was not the correctly configured fake client.

This commit fixes the issue by explicitly setting the fake client on the `common.Args` object before it is used, making the test hermetic and reliable.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-14 11:33:21 -07:00
James Dobson
d46ad7e06e Chore: Remove unused parameter 'addonName' from 'vela-cli' workflow step. (#6930)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 20s
Signed-off-by: James Dobson <jdobson@guidewire.com>
2025-10-09 13:34:26 -07:00
Ayush Kumar
743fcc6efc Chore: update homebrew bump action (#6939)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 23s
* Fix: update Homebrew formula action to latest version

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Fix: update Homebrew formula action reference to correct version

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* fix: remove redundant Homebrew bump action

- Fixes: https://github.com/kubevela/kubevela/actions/runs/18149681613/job/51659048948
- The kubevela formula in homebrew/core is already configured for automatic updates via BrewTestBot.
- BrewTestBot runs every ~3 hours after a new release to automatically open version bump PRs.
- The manual bump step (dawidd6/action-homebrew-bump-formula) was redundant and caused workflow failures:
  'Error: Whoops, the kubevela formula has its version update pull requests automatically opened by BrewTestBot every ~3 hours!'
- Removed the manual bump action to prevent conflicts and rely solely on BrewTestBot for formula updates https://github.com/Homebrew/homebrew-core/blob/master/Formula/k/kubevela.rb.

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
2025-10-06 11:59:00 -07:00
AshvinBambhaniya2003
10b45d3a8f Fix(references/appfile): Fix namespace check and Terraform output parsing (#6915)
* fix(references/appfile): correct namespace existence check in addon

The `generateSecretFromTerraformOutput` function was using an incorrect logic to check for namespace existence. It was trying to create the namespace and if it succeeded, it would return an error.

This commit corrects the logic to use `k8sClient.Get` and checks for a `NotFound` error to accurately determine if the namespace exists.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(references/appfile): make terraform output parsing robust

The previous implementation for parsing `terraform output` was fragile and could lead to data corruption or errors. It would incorrectly remove all spaces from values and would fail to parse values that contained an equals sign.

This commit refactors the parsing logic to be more robust:
- It no longer removes spaces from output values, preserving them correctly.
- It correctly parses `key=value` pairs by splitting only on the first equals sign in a line.
- It properly handles quoted string values from Terraform.

The corresponding tests in `addon_test.go` have been updated to align with the refactored function signature and verify the new, robust behavior.

Fixes #6916

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-10-06 11:57:37 -07:00
Vishal Kumar
7f81d6f2d6 Feat: add KinD setup step to sync-sdk workflow (#6937)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 34s
Signed-off-by: vishal210893 <vishal210893@gmail.com>
2025-10-02 15:01:20 -07:00
Anoop Gopalakrishnan
17b7edca9e Fix: goreleaser flag for release
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 25s
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-09-30 19:41:27 -07:00
Anoop Gopalakrishnan
773149aa53 Fix: clean up runner for disk space during release (#6936)
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-09-30 18:24:08 -07:00
Vishal Kumar
a8b652e59d Feat(logging): Add colorized logging support for local development with dev-logs option to enable during development (#6931)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 49s
* Feat(logging): Add colorized logging support with DevLogs option

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: return error on directory walk failure in lookupFilesInRoot

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Add logger setup for local development with DevLogs option

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Enable/Disable DevLogs option in kubevela-controller configuration

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Make DevLogs configurable in kubevela-controller and values.yaml

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Add devLogs option for formatted logging support in README and values.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Update logger setup for DevLogs and handle errors in file lookup

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Enhance caching by capturing Go cache directories for improved build performance

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Feat(logging): Enhance caching by capturing Go cache directories for improved build performance

Signed-off-by: vishal210893 <vishal210893@gmail.com>

---------

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2025-09-30 09:32:16 -07:00
Ayush Kumar
36f217e258 Feat: webhook reject unknown cr outputs (#6932)
* feat: implement output resource existence validation in component, trait, and policy definitions

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add validation tests for ComponentDefinition and TraitDefinition outputs

- Implement tests for ComponentDefinition with non-existent CRDs in outputs, ensuring they are rejected.
- Add tests for valid outputs in ComponentDefinition, confirming acceptance.
- Include tests for mixed valid and non-K8s outputs in ComponentDefinition, verifying they pass validation.
- Test handling of empty outputs in ComponentDefinition, ensuring they are accepted.
- Introduce tests for invalid apiVersion formats in ComponentDefinition, confirming rejection.
- Add tests for TraitDefinition with mixed valid and invalid outputs, ensuring proper rejection.
- Create YAML manifests for valid and invalid ComponentDefinitions and TraitDefinitions to support e2e tests.
- Ensure comprehensive coverage of edge cases in output validation logic.

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

fix: handle errors in resource validation for component, trait, and policy definitions

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

fix: improve error handling in Go module tidy and resource validation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add webhook debugging setup and validation tests for ComponentDefinition and TraitDefinition

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add VS Code launch configuration for debugging webhook validation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

refactor: streamline error handling in Go module tidy and remove obsolete test manifests

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add mock context support for CUE template compilation

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: enhance validation for WorkflowStepDefinition resources and improve output resource checks

Signed-off-by: viskumar <viskumar@guidewire.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: implement resource validation for CUE templates and add unit tests

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: enhance logging and validation for component, policy, and trait definitions

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: improve error handling and logging in validation handlers for component, policy, trait, and workflow step definitions

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

Remove testUnknownResource folder from repository

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: implement structured logging for validation handlers and remove deprecated request_logger

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: enhance structured logging and error handling in admission validation handlers

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: improve logging messages in validating handlers for better clarity

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: refactor logging field definitions for consistency and improve error handling in resource validation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

chore: add license header to invalid_resource_check.go and invalid_resource_check_test.go

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: enhance validation tests for WorkflowStepDefinition and improve error messages

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add e2e-test-local target for k3d cluster setup and webhook validation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add webhook configuration for workflow step definitions with validation rules

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: update e2e-test-local configuration and improve Ingress API version compatibility

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add installation of FluxCD CRDs in pre-hook to prevent webhook validation errors

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add ValidateResourcesExist feature gate and enhance resource validation in webhook handlers

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: enhance resource validation in e2e tests and improve addon definition checks

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: enhance addon definition detection by using owner references for validation

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: add ValidateResourcesExist feature gate and implement webhook validation for resource existence

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: update Ingress API version to v1 and adjust service references in tests

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

chore: remove webhook test commands and related YAML files from makefiles and tests

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

chore: remove architecture section from webhook debugging guide

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

feat: update webhook setup script with k3d host gateway IP note and improve cluster creation logic

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Fix: Correct path in Ingress resource definition in template tests

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Chore: add empty line to re-trigger failing workflow

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: remove space to re-trigger workflow

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Amit Singh <amisingh@guidewire.com>
2025-09-30 09:30:53 -07:00
Vishal Kumar
c298c0eb06 Fix: webhook TLS caBundle breakage during failed Helm upgrades (#6919)
Some checks failed
Webhook Upgrade Validation / webhook-upgrade-check (push) Failing after 33s
* Fix: Add post-rollback hook to admission-related resources for better upgrade handling

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Add webhook upgrade validation workflow for handling failed Helm upgrades

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Update webhook upgrade validation template for improved resource handling

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Refactor webhook upgrade validation script for improved readability and resource handling

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* webhook-upgrade-validation.yml

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Update KubeVela CLI installation method in webhook upgrade validation workflow

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Update KubeVela CLI installation method in webhook upgrade validation workflow

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Add verification step for active webhook validation in upgrade workflow

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Update test command in webhook upgrade validation workflow to use Ginkgo

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Update cluster deletion command in webhook upgrade validation workflow

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: Refactor environment setup in webhook upgrade validation workflow

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: Update KinD setup in webhook upgrade validation workflow

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

---------

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2025-09-29 08:08:07 -07:00
Chaitanyareddy0702
8aabc9f789 Fix: Enhance workflow context generation (#6925)
* Feat: Enhance workflow context generation to include application labels and annotations

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Add application labels and annotations to workflow context generation

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: add comments

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
2025-09-29 08:06:51 -07:00
Chaitanyareddy0702
af1ce628d1 Chore: Add workflow addon testing (#6911)
* Chore: Add workflow addon testing

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat(tests): Update addon tests to use correct command and deployment name

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* Feat(tests): Enhance addon tests with debugging information for deployment not found

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* Feat(tests): Add debugging output for listing WorkflowRuns in addon tests

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* Feat(tests): Improve debugging output for WorkflowRuns in addon tests

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* Feat(tests): Update addon test command path for enabling Workflow

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* Refactor: Clean up unused imports and commented-out code in addon tests

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat(tests): Add debugging steps for addon registry in e2e tests

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Feat: Update vela-workflow version to v0.6.2 in mock server and tests

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Refactor: Remove debug commands from e2e tests and clean up addon test assertions

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Fix: run make reviewable

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* Fix: Update assertions in addon tests to check for successful WorkflowRun phase

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

---------

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
2025-09-24 09:25:38 -07:00
Ayush Kumar
707ae396ce Chore: refactors workflows to use re-usable actions and adds upgrade test (#6878)
* Feat(utils): Enhance unit test coverage and quality for pkg/utils (#6884)

* feat(env): Add comprehensive unit tests for environment management

This commit introduces a comprehensive suite of unit tests for the environment management functions in `pkg/utils/env`.

Key changes include:
- Refactoring the test setup to use `TestMain` for better test environment control.
- Adding new test cases for `CreateEnv`, `GetEnvByName`, `ListEnvs`, `SetCurrentEnv`, `SetEnvLabels`, and `DeleteEnv`.

These tests improve the overall test coverage and ensure the correctness and reliability of environment-related operations.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(errors): Add unit tests for error handling utilities

This commit introduces new unit tests for the error handling utilities located in `pkg/utils/errors/`.

Specifically, new test files have been added for:
- `crd_test.go`: Tests for CRD-related error checks.
- `list_test.go`: Tests for error list aggregation.
- `reason_test.go`: Tests for specific error reasons like label conflicts and CUE path not found.
- `resourcetracker_test.go`: Tests for resource tracker errors.

These additions improve the test coverage and ensure the robustness of KubeVela's error handling mechanisms.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* refactor(schema): Refactor ui_schema_test.go to use testify/assert and add new test cases

This commit refactors `pkg/utils/schema/ui_schema_test.go` to improve its readability and maintainability.

Key changes include:
- Migrating from Ginkgo/Gomega to testify/assert for assertions.
- Restructuring `TestGetDefaultUIType` into a table-driven test.
- Adding new comprehensive test cases for `Condition_Validate` function.

These changes enhance the test suite for UI schema utilities, making it more robust and easier to extend.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* refactor(system): Refactor system_test.go and add comprehensive unit tests

This commit refactors `pkg/utils/system/system_test.go` to improve its structure, readability, and test coverage.

Key changes include:
- Converting existing tests to a table-driven format using `testify/assert`.
- Adding new comprehensive test cases for:
    - `CreateIfNotExist`
    - `GetVelaHomeDir`
    - `GetDirectoryFunctions` (e.g., `GetCapCenterDir`, `GetCapabilityDir`)
    - `InitFunctions` (e.g., `InitCapabilityDir`, `InitCapCenterDir`, `InitDirs`)
    - `BindEnvironmentVariables`

These changes enhance the test suite for system utilities, ensuring their correctness and robustness.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(types): Add unit tests for QL types

This commit introduces new unit tests for the types defined in `pkg/utils/types`, specifically focusing on types related to KubeVela Query Language (QL).

New test cases cover:
- `ServiceEndpoint.String()`: Verifies the string representation of service endpoints, including various protocols, ports, and paths.
- `AppliedResource.GroupVersionKind()`: Ensures correct extraction of GroupVersionKind from applied resources.
- `ResourceTreeNode.GroupVersionKind()`: Verifies correct extraction of GroupVersionKind from resource tree nodes.

These tests improve the coverage and reliability of core data structures used in KubeVela.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(util): Add and refactor unit tests for utility functions

This commit introduces new unit tests and refactors existing ones within the `pkg/utils/util` package.

Key changes include:
- **`pkg/utils/util/cmd_test.go`**: Adds comprehensive tests for `IOStreams` and its print functions, as well as `NewDefaultIOStreams` and `NewTestIOStreams`.
- **`pkg/utils/util/factory_test.go`**: Refactors the `GenerateLeaderElectionID` test to a table-driven format and adds new tests for `computeDiscoverCacheDir` and `RestConfigGetter` methods, ensuring the correctness of Kubernetes client configuration and discovery.

These additions and refactorings enhance the test coverage and reliability of core utility functions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(utils): Add and refactor unit tests for json, jwt, parse, and strings utilities

This commit introduces new unit tests and refactors existing ones across several utility packages within `pkg/utils/`.

Key changes include:
- **`pkg/utils/json`**: Adds tests for `StrictUnmarshal` to ensure proper JSON unmarshaling.
- **`pkg/utils/jwt`**: Adds tests for JWT token subject extraction and certificate subject retrieval.
- **`pkg/utils/parse`**: Expands test coverage for URL parsing functions (`Parse`, `ParseGitlab`).
- **`pkg/utils/strings`**: Refactors existing tests to a table-driven format and adds tests for box drawing string generation.

These additions and refactorings significantly improve the test coverage and reliability of KubeVela's utility functions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(tests): Address test and error handling issues

This commit addresses several issues identified in unit tests and error handling utilities, improving test reliability and code safety.

Key fixes and improvements include:
- **`pkg/utils/errors`**:
    - Added nil check to `IsCuePathNotFound` to prevent panics.
    - Corrected `fmt.Errorf` usage to `errors.New` in `reason_test.go` (SA1006 fix).
    - Used `assert.EqualError` for clearer error message comparisons in `resourcetracker_test.go`.
- **`pkg/utils/jwt_test.go`**: Marked `generateTestCert` as a test helper using `t.Helper()` for better error reporting.
- **`pkg/utils/system_test.go`**:
    - Removed unused `verifyCleanup` field.
    - Modified `TestGetVelaHomeDir` to use a temporary home directory, preventing destructive operations on the user's system.
- **`pkg/utils/util/cmd_test.go`**: Swapped `assert.Equal` arguments to follow `expected, actual` convention.

These changes enhance the robustness and correctness of the test suite and related utility functions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* chore(tests): Apply gofmt and import ordering to test files

This commit applies standard Go formatting (`gofmt`) and corrects import ordering in several test files.

Affected files:
- `pkg/utils/schema/ui_schema_test.go`: Added missing newline at EOF.
- `pkg/utils/system/system_test.go`: Corrected import ordering.
- `pkg/utils/util/factory_test.go`: Corrected import ordering.

These changes ensure consistency with project coding standards.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: upgrades ga versions

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

# Conflicts:
#	.github/workflows/unit-test.yml
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: upgrades ga versions in go workflow

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: updates fluxcd negative test case criteria

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: update action versions in workflow files

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: add upgrade e2e and unit test workflows for KubeVela

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore: simplify upgrade test workflows by removing redundant steps and enhancing installation process

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Feat: automate KubeVela installation by fetching the latest release version

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: remove fix/upgrade-test branch from workflow triggers

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: add new actions for system info and unit testing diagnostics

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: implement Kubevela K8s upgrade e2e and unit test actions with diagnostics

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: create Kubevela test environment setup action with system dependencies and Ginkgo framework

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: implement Kubevela K8s upgrade multicluster e2e test action with coverage reporting and diagnostics

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: update workflow triggers to include and exclude fix/upgrade-test branch

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Feat: Support Native Cue in HealthPolicy and CustomStatus (#6859)

* Feat: Support Native Cue in HealthPolicy and CustomStatus

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Feat: Support Native Cue in HealthPolicy and CustomStatus - Fix PR Comments & Bugs

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Feat: Consolidate Health & Status and Pass Status Context Data (#6860)

Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* <type>: <description> <jira number>

[optional body]

[optional footer]

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: remove author information from Kubevela test environment setup action

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: add fix/upgrade-test branch to workflow triggers and streamline unit test steps

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: add KinD setup step for unit tests and remove fix/upgrade-test branch from e2e triggers

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: add GitHub actions for deploying current branch and installing latest KubeVela release

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: rename test YAML files for consistency

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: update GitHub actions to use specific checkout version and streamline deployment steps

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: enhance GitHub actions for Kubevela tests with Codecov integration and cleanup

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: improve e2e profile cleanup logic in test workflows

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: add GitHub Action for setting up Kind cluster for E2E testing

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore: Optimised Github workflow

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: update action.yaml to enhance KinD cluster setup with configurable version and optional naming

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore: Add sudo command

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore: Revert check windows

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore: Add sudo to action

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore:  Change branch trigger filters

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* Chore: Revert changes from rebase

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* refactor: optimizes github actions

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: update action.yaml to install kubectl and helm using direct downloads

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: update Kubernetes version in e2e multicluster test workflow

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: updates upgrade test triggers

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: updates upgrade test triggers

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* feat: enhance action.yaml to support architecture detection and improve Helm installation

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: AshvinBambhaniya2003 <156189340+AshvinBambhaniya2003@users.noreply.github.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
Co-authored-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Reetika Malhotra <rmalhotra@guidewire.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Chaitanyareddy0702 <78363486+Chaitanyareddy0702@users.noreply.github.com>
2025-09-23 10:06:41 -07:00
Brian Kane
c0e906629e Fix: Unbundle the X-Definition Validation from Authentication Features (#6904)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-09-17 04:33:20 +08:00
Vaibhav Agrawal
90e601a51e Fix: inconsistent dry-run behavior with non-existent namespaces in CLI vs app.yaml (#6896) 2025-09-17 03:10:10 +08:00
AshvinBambhaniya2003
2139c813ad Feat(multicluster): Enhance Unit Test Coverage for Multicluster Packages (#6892)
* feat(multicluster): Enhance unit test coverage for multicluster utilities

This commit introduces a comprehensive suite of unit tests for the multicluster management functions in pkg/multicluster.

Key changes include:
  - `cluster_management_test.go`: Improves the structure of TestDetachCluster and TestRenameCluster by organizing test cases into a collection, which enhances clarity and
    simplifies adding new scenarios.
  - `utils_test.go` and `virtual_cluster_test.go`: Adds new test cases to validate additional utility and virtual cluster helper functions, increasing overall test
    coverage.

These additions improve the overall test coverage and ensure the correctness and reliability of multicluster operations.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(multicluster): Add unit tests for multicluster workflow provider

This commit introduces new unit tests for the multicluster workflow provider located in pkg/workflow/providers/multicluster.

Key additions include:
  - Comprehensive tests for the Deploy workflow step, covering parameter validation, error handling, and successful deployment scenarios.
  - New tests for GetPlacementsFromTopologyPolicies to ensure correct placement resolution from topology policies, including error cases and default behaviors.

These additions improve the test coverage and ensure the robustness of the multicluster workflow provider.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(multicluster): Correct duplicate import in utils_test.go

This commit resolves a linting error (ST1019) in pkg/multicluster/utils_test.go caused by the k8s.io/api/core/v1 package being imported twice with different aliases (v1
and corev1).

The redundant import alias v1 has been removed, and the corresponding type reference for []v1.Secret has been updated to []corev1.Secret to maintain consistency.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(multicluster): fix cross-test side effects

The TestListExistingClusterSecrets function mutates the global
variable ClusterGatewaySecretNamespace without restoring its original
value. This can lead to unpredictable behavior in other tests that
rely on this variable.

This commit fixes the issue by saving the value of
ClusterGatewaySecretNamespace before the test runs and restoring it
afterward using a defer statement.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* test(multicluster): remove redundant test case in TestContext

The `TestContextWithClusterName` sub-test in `TestContext` is redundant, as its functionality is already covered by the more comprehensive `TestClusterNameInContext` sub-test.

This commit removes the unnecessary test to improve the clarity and maintainability of the test suite without sacrificing coverage.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-09-15 08:37:55 -07:00
AshvinBambhaniya2003
d6ad578070 Feat(tests): Add unit test coverage for core packages (#6889)
* test(resourcekeeper): add unit tests for resource management

This commit introduces new unit tests to improve the test coverage of the `resourcekeeper` package.

- A new test file `containsresources_test.go` is added, which includes a comprehensive table-driven test for the `ContainsResources` function.
- A new table-driven test, `TestUpdateSharedManagedResourceOwner`, is added to `gc_test.go` to verify the logic for updating ownership of shared resources.

These tests follow Go best practices and enhance the robustness of the resourcekeeper functionality.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(resourcetracker): add unit tests for tree display logic

This commit enhances the test coverage for the resource tree display logic in the `pkg/resourcetracker` package.

- Refactors `TestResourceTreePrintOption_getWidthForDetails` to cover more cases and improve test clarity.
- Adds a comprehensive test for `TestPrintResourceTree` to verify the output of the resource tree printing.
- Introduces a new test for the `tableRoundTripper` to ensure the HTTP `Accept` header is correctly mutated.
- Adds tests for helper functions like `TestLoadResourceRows`, `TestSortRows`, and `TestFillResourceRows` to ensure each part of the tree building logic is working as expected.
These changes improve the overall quality and reliability of the resource tracker's tree view functionality.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(envbinding): add unit tests for placement logic

This commit enhances the test coverage for the `envbinding` policy package.

- Adds a new test for `WritePlacementDecisions` to verify the logic of writing placement decisions to the application status. This includes scenarios for adding new policies, updating existing ones, and handling malformed data.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(schema): add unit tests for schema parsing and conversion

This commit enhances the test coverage for the `pkg/schema` package by adding unit tests for CUE parsing and OpenAPI schema conversion.

- Adds a new test for `ParsePropertiesToSchema` to verify that CUE parameter definitions are correctly parsed into OpenAPI schemas.
- Introduces a new test for `ConvertOpenAPISchema2SwaggerObject` to ensure the conversion from a raw OpenAPI v3 schema to a Swagger object is handled correctly, including error cases.
These tests improve the reliability of the schema generation and conversion logic, which is critical for capability definitions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-09-11 07:29:07 +08:00
AshvinBambhaniya2003
2758afb1b2 Feat(utils): Enhance unit test coverage and quality for pkg/utils (#6884)
* feat(env): Add comprehensive unit tests for environment management

This commit introduces a comprehensive suite of unit tests for the environment management functions in `pkg/utils/env`.

Key changes include:
- Refactoring the test setup to use `TestMain` for better test environment control.
- Adding new test cases for `CreateEnv`, `GetEnvByName`, `ListEnvs`, `SetCurrentEnv`, `SetEnvLabels`, and `DeleteEnv`.

These tests improve the overall test coverage and ensure the correctness and reliability of environment-related operations.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(errors): Add unit tests for error handling utilities

This commit introduces new unit tests for the error handling utilities located in `pkg/utils/errors/`.

Specifically, new test files have been added for:
- `crd_test.go`: Tests for CRD-related error checks.
- `list_test.go`: Tests for error list aggregation.
- `reason_test.go`: Tests for specific error reasons like label conflicts and CUE path not found.
- `resourcetracker_test.go`: Tests for resource tracker errors.

These additions improve the test coverage and ensure the robustness of KubeVela's error handling mechanisms.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* refactor(schema): Refactor ui_schema_test.go to use testify/assert and add new test cases

This commit refactors `pkg/utils/schema/ui_schema_test.go` to improve its readability and maintainability.

Key changes include:
- Migrating from Ginkgo/Gomega to testify/assert for assertions.
- Restructuring `TestGetDefaultUIType` into a table-driven test.
- Adding new comprehensive test cases for `Condition_Validate` function.

These changes enhance the test suite for UI schema utilities, making it more robust and easier to extend.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* refactor(system): Refactor system_test.go and add comprehensive unit tests

This commit refactors `pkg/utils/system/system_test.go` to improve its structure, readability, and test coverage.

Key changes include:
- Converting existing tests to a table-driven format using `testify/assert`.
- Adding new comprehensive test cases for:
    - `CreateIfNotExist`
    - `GetVelaHomeDir`
    - `GetDirectoryFunctions` (e.g., `GetCapCenterDir`, `GetCapabilityDir`)
    - `InitFunctions` (e.g., `InitCapabilityDir`, `InitCapCenterDir`, `InitDirs`)
    - `BindEnvironmentVariables`

These changes enhance the test suite for system utilities, ensuring their correctness and robustness.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(types): Add unit tests for QL types

This commit introduces new unit tests for the types defined in `pkg/utils/types`, specifically focusing on types related to KubeVela Query Language (QL).

New test cases cover:
- `ServiceEndpoint.String()`: Verifies the string representation of service endpoints, including various protocols, ports, and paths.
- `AppliedResource.GroupVersionKind()`: Ensures correct extraction of GroupVersionKind from applied resources.
- `ResourceTreeNode.GroupVersionKind()`: Verifies correct extraction of GroupVersionKind from resource tree nodes.

These tests improve the coverage and reliability of core data structures used in KubeVela.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(util): Add and refactor unit tests for utility functions

This commit introduces new unit tests and refactors existing ones within the `pkg/utils/util` package.

Key changes include:
- **`pkg/utils/util/cmd_test.go`**: Adds comprehensive tests for `IOStreams` and its print functions, as well as `NewDefaultIOStreams` and `NewTestIOStreams`.
- **`pkg/utils/util/factory_test.go`**: Refactors the `GenerateLeaderElectionID` test to a table-driven format and adds new tests for `computeDiscoverCacheDir` and `RestConfigGetter` methods, ensuring the correctness of Kubernetes client configuration and discovery.

These additions and refactorings enhance the test coverage and reliability of core utility functions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(utils): Add and refactor unit tests for json, jwt, parse, and strings utilities

This commit introduces new unit tests and refactors existing ones across several utility packages within `pkg/utils/`.

Key changes include:
- **`pkg/utils/json`**: Adds tests for `StrictUnmarshal` to ensure proper JSON unmarshaling.
- **`pkg/utils/jwt`**: Adds tests for JWT token subject extraction and certificate subject retrieval.
- **`pkg/utils/parse`**: Expands test coverage for URL parsing functions (`Parse`, `ParseGitlab`).
- **`pkg/utils/strings`**: Refactors existing tests to a table-driven format and adds tests for box drawing string generation.

These additions and refactorings significantly improve the test coverage and reliability of KubeVela's utility functions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(tests): Address test and error handling issues

This commit addresses several issues identified in unit tests and error handling utilities, improving test reliability and code safety.

Key fixes and improvements include:
- **`pkg/utils/errors`**:
    - Added nil check to `IsCuePathNotFound` to prevent panics.
    - Corrected `fmt.Errorf` usage to `errors.New` in `reason_test.go` (SA1006 fix).
    - Used `assert.EqualError` for clearer error message comparisons in `resourcetracker_test.go`.
- **`pkg/utils/jwt_test.go`**: Marked `generateTestCert` as a test helper using `t.Helper()` for better error reporting.
- **`pkg/utils/system_test.go`**:
    - Removed unused `verifyCleanup` field.
    - Modified `TestGetVelaHomeDir` to use a temporary home directory, preventing destructive operations on the user's system.
- **`pkg/utils/util/cmd_test.go`**: Swapped `assert.Equal` arguments to follow `expected, actual` convention.

These changes enhance the robustness and correctness of the test suite and related utility functions.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* chore(tests): Apply gofmt and import ordering to test files

This commit applies standard Go formatting (`gofmt`) and corrects import ordering in several test files.

Affected files:
- `pkg/utils/schema/ui_schema_test.go`: Added missing newline at EOF.
- `pkg/utils/system/system_test.go`: Corrected import ordering.
- `pkg/utils/util/factory_test.go`: Corrected import ordering.

These changes ensure consistency with project coding standards.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-09-09 05:35:59 +08:00
Brian Kane
70e6c9a49f fix: apply status results to correct component (#6886)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-09-08 01:49:48 -07:00
Amit Singh
2d46bb300f Chore: removes references to kubevelafix (#6882)
* chore: removes references to kubevelafix

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: upgrades oamdev/stern reference

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: upgrades oamdev/tf-config-inspect reference

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Co-authored-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
2025-09-04 06:27:00 +08:00
Rashid Alam
6fbeb6887f Fix(cli): return non-zero exit code on vela def render error (#6818)
* fix  exit code on render error

Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>

* minor changes

Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>

* fix error catch logic

Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>

---------

Signed-off-by: 7h3-3mp7y-m4n <emailtorash@gmail.com>
2025-09-03 06:00:58 +08:00
S Code Man
e533898192 Fix: Address Wrong Storage trait for hostPath volumes #6811 (#6812)
* fix: Address Wrong `Storage` trait for hostPath volumes #6811

Signed-off-by: S Code Man <30977678+scodeman@users.noreply.github.com>

* fix: use tab instead of space

Signed-off-by: S Code Man <30977678+scodeman@users.noreply.github.com>

* chore: run make reviewable

Signed-off-by: S Code Man <30977678+scodeman@users.noreply.github.com>

---------

Signed-off-by: S Code Man <30977678+scodeman@users.noreply.github.com>
2025-09-03 05:59:44 +08:00
AshvinBambhaniya2003
72d5c2f0a5 Feat(tests): Add unit test coverage for core packages (#6880)
* feat(config): add unit test for config pkg

- add unit test cases for writer.go file
- add unit test cases for factory.go file

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(auth): add unit tests for auth package

This commit introduces a comprehensive suite of unit tests for the `pkg/auth` package, significantly improving test coverage and ensuring the correctness of the authentication and authorization logic.

The following key areas are now covered:
- **Identity:** Tests for identity creation, validation, matching, and subject generation.
- **Kubeconfig:** Tests for kubeconfig generation options, certificate creation, and identity reading from kubeconfig.
- **Privileges:** Tests for privilege description implementations, listing privileges, and pretty-printing.

By adding these tests, we increase the robustness of the auth package and make future refactoring safer.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(oam): add unit tests for auxiliary functions

This commit adds comprehensive unit tests for the auxiliary functions in the pkg/oam package. The new tests cover the following functions:

- GetPublishVersion / SetPublishVersion
- GetDeployVersion
- GetLastAppliedTime
- GetControllerRequirement / SetControllerRequirement
- GetCluster / SetCluster / SetClusterIfEmpty

These tests address the lack of coverage for these functions and ensure their behavior is correct, including edge cases like handling missing annotations or removing annotations when set to an empty string.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* feat(cue): add unit tests for cue packages

This commit enhances the test coverage of the `pkg/cue` directory by adding unit tests for the `definition`, `script`, and `task` packages.

The new tests cover the following areas:
- `pkg/cue/definition`:
  - `TestWorkloadGetTemplateContext`: Verifies the template context retrieval for workloads.
  - `TestTraitGetTemplateContext`: Ensures correct template context retrieval for traits.
  - `TestGetCommonLabels`: Checks the conversion of context labels to OAM labels.
  - `TestGetBaseContextLabels`: Validates the creation of base context labels.
- `pkg/cue/script`:
  - Adds tests for `ParseToValue`, `ParseToValueWithCueX`, `ParseToTemplateValue`, and `ParseToTemplateValueWithCueX` to ensure CUE scripts are parsed correctly.
- `pkg/cue/task`:
  - Refactors the existing test for `Process` to use a table-driven approach, improving readability and covering more cases.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

* fix(tests): address PR comments and improve test reliability

This commit addresses several comments from a pull request review, improving the reliability and correctness of tests in various packages.

The following changes are included:

- **`pkg/config/writer`**:
  - Renamed `writter_test.go` to `writer_test.go` to fix a typo.

- **`pkg/cue/task`**:
  - Replaced the use of an external invalid URL with a local unreachable endpoint (`http://127.0.0.1:3000`) in `process_test.go` to prevent network flakiness.
  - Switched to using `assert.ErrorContains` for safer error message assertions, avoiding potential panics.
  - Corrected an assertion to compare a byte slice with a string by converting the byte slice to a string first.

- **`pkg/oam`**:
  - Updated `auxliary_test.go` to use `time.Time.Equal` for time comparisons, making the test robust against timezone differences.

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>

---------

Signed-off-by: Ashvin Bambhaniya <ashvin.bambhaniya@improwised.com>
2025-09-03 05:58:58 +08:00
Brian Kane
e8428e704c Feature: Validate Definition Permissions on App Creation (#6876)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-09-03 05:53:56 +08:00
Brian Kane
56bc3b02e9 Feat: Consolidate Health & Status and Pass Status Context Data (#6860)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-08-24 02:30:06 +08:00
Chaitanyareddy0702
af1fb9a0fd Feat: Allow gating with components dependsOn field (#6854)
* Fix: Add workflow dynamically when user doesn't define workflow steps but adds dependsOn in the component

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Reetika Malhotra <rmalhotra@guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* fix: modify ApplyComponentWorkflowStepGenerator Generate function

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Reetika Malhotra <rmalhotra@guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Feat: Add test cases for the component level dependsOn feature

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Reetika Malhotra <rmalhotra@guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* <type>: <description> <jira number>

[optional body]

[optional footer]

Signed-off-by: Reetika Malhotra <rmalhotra@guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Refactor component dependency tests and improve failure handling

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Update environment context handling in application tests and adjust repository name check in setup script

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Chore: Remove .sh file

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Update component dependency test cases and adjust timeout for application status check

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Clean up environment setup in component dependency tests

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Update component dependency images to use latest version and adjust test cases

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: uncomment tests

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: update failing database image to empty string to simulate pull failure

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Reetika Malhotra <rmalhotra@guidewire.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Co-authored-by: Reetika Malhotra <rmalhotra@guidewire.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
2025-08-22 09:00:21 -07:00
Amit Singh
8b7950cf61 Chore: upgrades kind version (#6853)
* chore: upgrades ga versions

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* chore: upgrades ga versions in definition lint

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* chore: upgrades ga versions in go workflow

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* chore: upgrades ga versions in sdk test workflow

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* chore: upgrades ga versions in e2e test workflow

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* test: updates fluxcd negative test case criteria

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* test: debugging e2e test failures

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* chore: update action versions in workflow files

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* Fix: Use hash instead of version in github actions

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

* chore: fix newline at end of file in README.md

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

* test: increase timeout for application update checks in multicluster standalone tests

Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Ayush <ayushshyamkumar888@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
Co-authored-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Co-authored-by: Ayush <ayushshyamkumar888@gmail.com>
2025-08-22 08:55:37 -07:00
Brian Kane
a5de74ec1e Feat: Support Native Cue in HealthPolicy and CustomStatus (#6859)
* Feat: Support Native Cue in HealthPolicy and CustomStatus

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Feat: Support Native Cue in HealthPolicy and CustomStatus - Fix PR Comments & Bugs

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-08-22 12:24:21 +08:00
Brian Kane
3aa94842fb Fix: prevent make reviewable typecheck noise via wrapper (#6858)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-08-21 06:08:12 +08:00
Brian Kane
1a934e1618 Feat: Application Status Metrics & Structured Logs (#6857)
Feat: Application Status Metrics & Structured Logs

Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-08-21 06:07:13 +08:00
Brian Kane
721c75e44a Fix: Fixes the request workflowstep (#6804)
* Fix: Fixes the request workflowstep

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: Fixes the request workflowstep

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-08-13 15:21:50 -07:00
Vishal Kumar
d598d0a6fd Chore: (deps): Update github.com/docker/docker from v25.0.6 to v28.3.… (#6849)
* Chore: (deps): Update github.com/docker/docker from v25.0.6 to v28.3.2 (CVE-2024-41110)

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Chore: (deps): Update github.com/docker/docker from v25.0.6 to v28.3.3 (CVE-2024-41110)

Signed-off-by: vishal210893 <vishal210893@gmail.com>

---------

Signed-off-by: vishal210893 <vishal210893@gmail.com>
2025-08-13 06:05:38 +08:00
dependabot[bot]
4a9ecd9ce7 Chore: (deps): Bump github/codeql-action from 3.28.16 to 3.29.5 (#6846)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.16 to 3.29.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](28deaeda66...51f77329af)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-06 11:51:42 -07:00
Brian Kane
a27261bd14 Feature: Enhanced Status Reporting (#6828)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-08-06 09:55:30 -07:00
Aberham Oscar
0b6092cf2b Fix: omit component revision in additionalLabel to add to k8s object when component revision is not set and DisableAllComponentRevision setted true #6643 (#6647)
* Fix: omit component revision in additionalLabel to add to k8s object when component revision is not set and DisableAllComponentRevision setted true

Signed-off-by: 那金洋(29362878) <najinyang001@ke.com>

* Fix: omit component revision in additionalLabel to add to k8s object when component revision is not set and DisableAllComponentRevision setted true test cases

Signed-off-by: 那金洋(29362878) <najinyang001@ke.com>

---------

Signed-off-by: 那金洋(29362878) <najinyang001@ke.com>
2025-08-05 10:13:02 -07:00
dependabot[bot]
aebccf90d0 Chore: (deps): Bump zeebe-io/backport-action from 2.1.1 to 3.2.1 (#6820)
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 2.1.1 to 3.2.1.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](08bafb375e...0193454f0c)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-version: 3.2.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 15:48:44 -07:00
dependabot[bot]
3f5b5e6593 Chore: (deps): Bump sigstore/cosign-installer from 3.5.0 to 3.9.2 (#6834)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 3.5.0 to 3.9.2.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](59acb6260d...d58896d6a1)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 3.9.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-31 07:48:24 -07:00
Vishal Kumar
b5a9925042 Chore: upgrade Kubernetes dependencies to v0.31.10 & enhance CLI, workflows, tests, and documentation (#6837)
* Create testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Update testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Delete testwr

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Chore: (deps): Bump goreleaser/goreleaser-action from 5.0.0 to 6.3.0 (#6775)

Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 6.3.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](7ec5c2b0c6...9c156ee8a1)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: Replace the openssf badge with UI link (#6783)

[optional body]

[optional footer]

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: moves dockerhub user name to secret section in the reusable workflow (#6778)

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: update helm repo path in tests (#6797)

* chore: fixes the breaking tests with older helm chart address

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* tests: update the registery url

Signed-off-by: semmet95 <singhamitch@outlook.com>

* updates the default url

Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: reverts the changes

Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: sets github repo directory as the default definition registry

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: reverts the default definition registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* test: overwrites custom definition registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: moves resource modification inside patch block (#6791)

* fix: moves resource modification inside patch block

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: adds changes from make-reviewable

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging error

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: updates the helm outdated path to new one

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* tests: fixes the failing helm test case

Signed-off-by: semmet95 <singhamitch@outlook.com>

* removes debugging printing statements

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush <ayushshyam.official.888@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: switches to new oapi type field type (#6794)

* chore: switches to new oapi type field type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates gen_sdk to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates gen_sdk_test to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates schema to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: updates chart urls

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: changes from make reviewable

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: fixes linting errors

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: fixes schema type nil check

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: replaces literals with constants

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: switches to the new addon registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: extra line removal

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: replaces deprecated urls

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: removes extra quotes form marshaljson

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: updates chart url in mock resource

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: vela cli namespace behaviour (#6805)

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: vela up command to behave similarly with kubectl (#6809)

* Fix: vela up command to behave similarly with kubectl

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Chore: Update the unit test cases and add a new test cases

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: check component status after initial deployment (#6824)

* fix: check component status after initial deployment

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: applications should correctly reflect component health throughout the apps lifecycle

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: check component status after initial deployment

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Mikhail Elenskii <elenskii-mikhail@outlook.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* chore: upgrade k8s version to v0.31.10 and corresponding fixes

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* fix: remove defer from feature gate testing in multiple test files

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* fix: remove defer from feature gate testing in multiple test files

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* fix: use RunPortForwardContext for improved context handling in port forwarding

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Chore: Fix check-diff

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Chore: Update ENVTEST_K8S_VERSION variable

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* fix: update feature gate testing to use GinkgoT for improved context handling

Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: update Kubernetes version in e2e tests to v1.31

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: increase timeout for application revision retrieval in multicluster tests

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* chore: update kubevela workflow to master

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Fix: increase timeout in multicluster tests

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* fix: upgrade dependencies and improve context handling in port forwarding

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: remove space to trigger pipeline

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: add space to trigger pipeline

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: updated go sum

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: updated go.mod for running github action

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* chore: updated go.mod for running github action

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* Fix: increase timeout and enhanced multicluster tests

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* adding a comment to re run the pipeline

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* Adding back decription removed during check-diff

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* ran make reviewable

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* replaced generate-groups.sh with kube_codegen.sh

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* API Call changes for kube_codegen

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* fixed incorrect Api package path format and output dir handling

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* resolved incompatible dependencies issue

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

* chore: update clientgen.sh to use kubevela clientgen_work_temp

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* chore: update clientgen.sh to use kubevela clientgen_work_temp

Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>

* test: increase timeout for application deployment and rollback verification

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>

---------

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Co-authored-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Anoop Gopalakrishnan <2038273+anoop2811@users.noreply.github.com>
Co-authored-by: Ayush Kumar <65535504+roguepikachu@users.noreply.github.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush <ayushshyam.official.888@gmail.com>
Co-authored-by: Chaitanyareddy0702 <78363486+Chaitanyareddy0702@users.noreply.github.com>
Co-authored-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Co-authored-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Mikhail Elenskii <elenskii-mikhail@outlook.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
2025-07-31 07:46:56 -07:00
Brian Kane
c79f03fe92 Fix: corrects validating webhook behaviour with cuex compilers (#6799)
Signed-off-by: Brian Kane <briankane1@gmail.com>
2025-07-17 15:18:36 -07:00
Brian Kane
fedcca1c7b Fix: check component status after initial deployment (#6824)
* fix: check component status after initial deployment

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: applications should correctly reflect component health throughout the apps lifecycle

Signed-off-by: Brian Kane <briankane1@gmail.com>

* Fix: check component status after initial deployment

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Mikhail Elenskii <elenskii-mikhail@outlook.com>
2025-07-04 23:01:44 +05:30
Chaitanyareddy0702
b601d28afd Fix: vela up command to behave similarly with kubectl (#6809)
* Fix: vela up command to behave similarly with kubectl

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Chore: Update the unit test cases and add a new test cases

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <co@guidewire.com>
2025-06-23 21:25:45 -07:00
Chaitanyareddy0702
7d72fa904c Fix: vela cli namespace behaviour (#6805) 2025-06-17 10:25:59 +08:00
Amit Singh
4d6fa58c0f Chore: switches to new oapi type field type (#6794)
* chore: switches to new oapi type field type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates gen_sdk to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates gen_sdk_test to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: updates schema to use the new schema type

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: updates chart urls

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: changes from make reviewable

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: fixes linting errors

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: fixes schema type nil check

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: replaces literals with constants

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: switches to the new addon registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: extra line removal

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: replaces deprecated urls

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: removes extra quotes form marshaljson

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: updates chart url in mock resource

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
2025-06-15 20:44:58 -07:00
Amit Singh
26123cf671 Fix: moves resource modification inside patch block (#6791)
* fix: moves resource modification inside patch block

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: adds changes from make-reviewable

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* debugging error

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: updates the helm outdated path to new one

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* tests: fixes the failing helm test case

Signed-off-by: semmet95 <singhamitch@outlook.com>

* removes debugging printing statements

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

---------

Signed-off-by: Ayush Shyam Kumar <ayushshyam.official.888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Ayush <ayushshyam.official.888@gmail.com>
2025-06-15 09:40:35 -07:00
Ayush Kumar
ad9cda63c9 Chore: update helm repo path in tests (#6797)
* chore: fixes the breaking tests with older helm chart address

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* tests: update the registery url

Signed-off-by: semmet95 <singhamitch@outlook.com>

* updates the default url

Signed-off-by: semmet95 <singhamitch@outlook.com>

* test: reverts the changes

Signed-off-by: semmet95 <singhamitch@outlook.com>

* fix: sets github repo directory as the default definition registry

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>

* chore: reverts the default definition registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* test: overwrites custom definition registry url

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* debugging test failure

Signed-off-by: Amit Singh <singhamitch@outlook.com>

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: semmet95 <singhamitch@outlook.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2025-06-13 07:13:25 -07:00
Ayush Kumar
011e1f1445 chore: moves dockerhub user name to secret section in the reusable workflow (#6778)
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
2025-05-28 09:18:53 +05:30
Anoop Gopalakrishnan
974d3e88bf Chore: Replace the openssf badge with UI link (#6783)
[optional body]

[optional footer]

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-05-22 06:45:37 +08:00
dependabot[bot]
ef9b6f3cc1 Chore: (deps): Bump goreleaser/goreleaser-action from 5.0.0 to 6.3.0 (#6775)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 5.0.0 to 6.3.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](7ec5c2b0c6...9c156ee8a1)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-version: 6.3.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-06 10:24:31 +05:30
dependabot[bot]
144e96df31 Chore: (deps): Bump github.com/go-git/go-git/v5 from 5.13.1 to 5.16.0 (#6764)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.13.1 to 5.16.0.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.13.1...v5.16.0)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-version: 5.16.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 12:55:40 +05:30
dependabot[bot]
5ee9c8b38c Chore: (deps): Bump github/codeql-action from 2.1.37 to 3.28.16 (#6770)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.37 to 3.28.16.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2.1.37...28deaeda66b76a05916b6923827895f2b14ab387)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.28.16
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-03 12:55:00 +05:30
Vishal Kumar
d3ce7ad118 Feat(validation): fail-fast CUE validation for required parameters (incl. dynamic sources) (#6774)
* Chore: Added fail fast validation logic of component having multiple steps including workflow, component etc.

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* testing updated param filter logic

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* Added validation logic for struct type parameter

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* fixed code when struct type parameter is provided in component

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* refactor: minor code improvements

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* fixed go lint issue

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Chore: Add test cases for fail fast logic

Signed-off-by: Vishal Kumar <vishal210893@gmail.com>

* updated expect logic

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Added e2e test cases for required param validation

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Added feature gate in e2e test cases for required param validation

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Added feature gate make e2e_test file and removed for ginkgo test file

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Fixed code to quoted string

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Added logic and test case for policy type override

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

* Added license header

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
2025-05-03 12:54:05 +05:30
shivin
a1145f21fe Fix: update apps with topology policy during cluster join (#6768)
* functionality to get all application with a topology in cluster

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* refactor code and unit tests

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* refactor code and unit tests

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* rearrange imports

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* remove calling of goroutine

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* update logic to set publich version annotation

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* removed unused constants

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* make reviewable

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* add license info for cluster_test.go

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* ignore errors in updateAppsWithTopologyPolicy

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* modify error message

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* gofmt

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* add retry logic to handle conflict errors

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* using cmd to print and add log for retried applications

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* using context as first argument

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* log namespace in error

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* optimize retry logic

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* add pagination for listing applications

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

---------

Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>
Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>
Co-authored-by: vishal210893 <vishal210893@gmail.com>
2025-05-01 14:31:11 +05:30
glaxman
edf3be272e fix(traitdefinition): podsecuritycontext - Make localhostProfile optional for other types and provide it only for Localhost. Fixes #6772 (#6773)
Signed-off-by: glaxman <508625+glaxman@users.noreply.github.com>
2025-05-01 09:29:03 +05:30
Oleg Tsymbal
b4f9db4af8 Fix(Helm): make tolerations, nodeSelector, affinity more generic (#6771)
* Fix(Helm): make tolerations, nodeSelector, affinity more generic

Signed-off-by: Oleg Tsymbal <dzirg44@gmail.com>

* Fix(Helm): make conditionals if and with consistent

Signed-off-by: Oleg Tsymbal <dzirg44@gmail.com>

* Fix(Helm): trigger the build to see if it is a problem with timeout

Signed-off-by: Oleg Tsymbal <dzirg44@gmail.com>

---------

Signed-off-by: Oleg Tsymbal <dzirg44@gmail.com>
2025-04-30 14:13:25 +05:30
PushparajShetty
78c0b2c04e Chore: update go and golangci version (#6767)
* update go and golangci version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update golangci version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update staticcheck version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update staticcheck version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update staticcheck version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update golangci_lint version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update golangci_lint version

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml and formating in go files

Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated .golangci.yaml and formating in go files

Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* updated makefile step

Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* fix formatting issue

Signed-off-by: Gowtham S <gowthams316@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update ginkgo tests

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* updated ginkgo tests

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* upgraded go/x/crypto to v0.37.0

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* go/kin-openapi version to v0.118.0 and go/x/net version upgraded to v0.39.0

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* upgrades go/x/oauth2 version to v0.29.0

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* update ginkgo test

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* upgrades alpine image version to 3.21

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* updates ginkgo tests

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

---------

Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>
Signed-off-by: Gowtham S <gowthams316@gmail.com>
Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>
2025-04-29 03:46:08 +08:00
Anoop Gopalakrishnan
5d42a3b507 Fix: Failing issue-commands workflow (#6766)
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-04-25 06:16:59 +08:00
alingse
1588736b4e Fix: call errors.Wrap with a nil value error err (#6739)
Signed-off-by: alingse <alingse@foxmail.com>
2025-04-22 03:56:57 +05:30
Amit Singh
27965fb8aa Chore: updates vuln dependencies versions (#6757)
* chore: updates vuln dependencies versions

Signed-off-by: Amit Singh <singhamitch@outlook.com>

* fix check-diff tests

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

* updated import for deprecated package

Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>

---------

Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>
Co-authored-by: Gowtham <gowthams316@gmail.com>
Co-authored-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>
Co-authored-by: PushparajShetty <116911361+PushparajShetty@users.noreply.github.com>
2025-04-18 10:22:27 +05:30
PushparajShetty
262daacb63 fix the initilization for trait in output section (#6762)
Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>
2025-04-18 10:21:54 +05:30
PushparajShetty
fb17af5e75 update workflow package to fix output compatibility (#6761)
Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>
2025-04-17 03:14:49 -07:00
jguionnet
5122eb575b Update score card action version (#6759)
Signed-off-by: jguionnet <jguionnet@guidewire.com>
2025-04-15 23:25:36 +05:30
Ayush Kumar
d93e292142 feat: add signed releases, SBOMs, and SLSA provenance (#6749)
- Add SPDX SBOMs for Vela Core and CLI images
- Sign and attest images to GHCR and DockerHub
- Generate and attest SLSA provenance
- Include SBOMs for binaries via GoReleaser
- Sign artifact checksums for integrity

Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
2025-04-15 11:22:37 +08:00
shivin
f9e15c55ad upgrade vulnerable packages (#6755)
Signed-off-by: Gowtham S <gowthams316@gmail.com>
2025-04-14 22:37:52 +05:30
jguionnet
af7f623cba Feat: added support for stateful set (#6638)
* StatefulSet Draft

Signed-off-by: jguionnet <jguionnet@guidewire.com>

* First running version

Signed-off-by: jguionnet <jguionnet@guidewire.com>

* Add generated component definition

Signed-off-by: jguionnet <jguionnet@guidewire.com>

* Adding an statefulset example inline with the component doc

Signed-off-by: jguionnet <jguionnet@guidewire.com>

* Adjustment to an example defining a simplistic statefulset and trait

Signed-off-by: jguionnet <jguionnet@guidewire.com>

* Fix PR Review comments

Signed-off-by: jguionnet <jguionnet@guidewire.com>

* After running make reviewable and more ...

Signed-off-by: jguionnet <jguionnet@guidewire.com>

---------

Signed-off-by: jguionnet <jguionnet@guidewire.com>
2025-04-12 07:17:21 +08:00
Ayush Shyam Kumar
d487012468 adds slsa generator to the workflow (#6747)
Signed-off-by: Shivin Gopalani <gopalanishivin@gmail.com>
Signed-off-by: Ayush <ayushshyam.official.888@gmail.com>
Co-authored-by: Ayush Kumar <aykumar@guidewire.com>
2025-04-09 14:17:56 -07:00
ClarenceLiu
fc8888cb4d Fix(CUE): remove duplicate tcpSocket in startup-probe (#6528)
Signed-off-by: ComingCL <1328004790@qq.com>
2025-04-03 21:34:15 +05:30
dependabot[bot]
9558cb8491 Chore: (deps): Bump docker/build-push-action from 6.3.0 to 6.15.0 (#6740)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.3.0 to 6.15.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](1a162644f9...471d1dc4e0)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-31 22:32:21 +05:30
Chaitanyareddy0702
bde50df3e5 Fix: Vela not deleting the definition revisions after cleaning up the definitions (#6738)
Signed-off-by: svc-gh-gokarna_gwre <svc-gh-gokarna@guidewire.com>
Co-authored-by: svc-gh-gokarna_gwre <svc-gh-gokarna@guidewire.com>
2025-03-29 06:16:03 +08:00
Vishal Kumar
dba2676cd9 Fix: modified webservice componenet definition to define resource req and … (#6714)
* modified webservice componenet definition to define resource req and limit

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* maintained backward compatibility and introduce new parameter limit for resource limit

Signed-off-by: vishal210893 <vishal210893@gmail.com>

* updated definition in cue file and run make reviewable command to generate component definition

Signed-off-by: vishal210893 <vishal210893@gmail.com>

---------

Signed-off-by: vishal210893 <vishal210893@gmail.com>
2025-03-27 05:50:27 +08:00
Brian Kane
8ee02c6506 Feat: Enable CueX compiler in component & trait templating (#6720)
* Feat: Enable CueX compiler in component & trait templating

* Feat: Enable CueX compiler in component & trait templating

Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-03-25 07:52:51 +08:00
shivin
0751c15ee5 Fix: support task component to be one-time run to completion (#6733)
* added metadata.name for Job to be combination of app name and component name

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

* make reviewable

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>

---------

Signed-off-by: Shivin Gopalani <sgopalani@guidewire.com>
Co-authored-by: Shivin Gopalani <sgopalani@guidewire.com>
2025-03-25 04:56:51 +05:30
dependabot[bot]
1a16e52e36 Chore: (deps): Bump docker/setup-qemu-action from 3.0.0 to 3.6.0 (#6735)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3.0.0 to 3.6.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](68827325e0...29109295f8)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-25 02:36:44 +05:30
Jonatas Teixeira
853a077107 Fix(parser) - The app.Spec.Policies[idx].Name must be a valid string (#6723)
* Fix(parser) - Valid value must be an empty string or consist of alphanumeric characters, '-', '' or '.', and must start and end with an alphanumeric character

Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>

* Fix(e2e) - Increase waiting to prevent test start before port-forwared be finished

Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>

* Fix(e2e) - Adjust the time

Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>

* Fix(e2e) - Increase waiting to prevent test start before port-forwared be finished - By using gomega

Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>

* Fix(e2e) - Change vela command to get app status

Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>

---------

Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>
2025-03-25 02:28:45 +05:30
shivin
c5d9f69c9c Fix: removing detached clusters from resource trackers (#6728)
* removing detached clusters from resource trackers

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* resolve merge conflicts

Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* resolved code conflicts

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>

* update TestGetAddonStatus test case

Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>

---------

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>
Signed-off-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Shivin Gopalani <sgopalani@guidewire.com>
Co-authored-by: Pushparaj Shetty K S <kspushparajshetty@gmail.com>
2025-03-19 07:35:06 +08:00
dependabot[bot]
e0f162e47d Chore: (deps): Bump docker/login-action from 3.0.0 to 3.4.0 (#6726)
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.0.0 to 3.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](343f7c4344...74a5d14239)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-17 22:57:49 +05:30
Chaitanyareddy0702
d9fcebb9e8 Feat: support token retrieval via AuthInfo.Exec command (#6721)
Signed-off-by: co_gwre <co@guidewire.com>
Co-authored-by: co_gwre <co@guidewire.com>
2025-03-13 07:44:18 +05:30
Anoop Gopalakrishnan
c48ded1994 Fix: build failure due to deprecated actions/cache (#6711)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 35s
E2E MultiCluster Test / detect-noop (push) Successful in 2s
E2E Test / detect-noop (push) Successful in 3s
Go / detect-noop (push) Successful in 2s
license / Check for unapproved licenses (push) Failing after 8s
Registry / publish-core-images (push) Failing after 14s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 27s
Unit-Test / detect-noop (push) Successful in 2s
Definition-Lint / definition-doc (push) Failing after 7m7s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m51s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m36s
Go / staticcheck (push) Successful in 2m16s
Go / check-diff (push) Successful in 18m47s
Go / lint (push) Failing after 20m12s
Go / check-cli-image-build (push) Failing after 4m29s
Go / check-core-image-build (push) Successful in 6m31s
Unit-Test / unit-tests (push) Failing after 13m24s
Go / check-windows (push) Has been cancelled
* Fix(build): Upgrade actions/cache version

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Fix(build): Update actions/cache

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-03-05 12:03:01 +08:00
yyzxw
424e433963 Feat: add controller metrics (#6650)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 4m24s
E2E MultiCluster Test / detect-noop (push) Successful in 24s
E2E Test / detect-noop (push) Successful in 20s
Go / detect-noop (push) Successful in 23s
license / Check for unapproved licenses (push) Failing after 2m40s
Registry / publish-core-images (push) Failing after 53s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 41s
Unit-Test / detect-noop (push) Successful in 16s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m25s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m12s
CodeQL / Analyze (go) (push) Failing after 16m11s
Go / staticcheck (push) Successful in 18m56s
Go / lint (push) Successful in 20m1s
Go / check-diff (push) Failing after 15m2s
Go / check-cli-image-build (push) Failing after 2m41s
Go / check-core-image-build (push) Successful in 18m10s
Unit-Test / unit-tests (push) Failing after 13m17s
Go / check-windows (push) Has been cancelled
* feat: add controller metrics

Signed-off-by: yyzxw <1020938856@qq.com>

* Fix: README changes after make reviewable

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: yyzxw <1020938856@qq.com>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Co-authored-by: Anoop Gopalakrishnan <2038273+anoop2811@users.noreply.github.com>
Co-authored-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-03-02 17:02:58 -08:00
dependabot[bot]
b51957ef9f Chore: (deps): Bump golangci/golangci-lint-action from 6.1.1 to 6.5.0 (#6690)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 6m35s
E2E MultiCluster Test / detect-noop (push) Successful in 19s
E2E Test / detect-noop (push) Successful in 16s
Go / detect-noop (push) Successful in 16s
license / Check for unapproved licenses (push) Failing after 2m38s
Registry / publish-core-images (push) Failing after 46s
CodeQL / Analyze (go) (push) Failing after 11m34s
Unit-Test / detect-noop (push) Successful in 2s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 48s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 13s
Go / staticcheck (push) Successful in 2m7s
E2E Test / e2e-tests (v1.29) (push) Failing after 2m23s
Go / lint (push) Successful in 12m8s
Go / check-diff (push) Failing after 15m33s
Go / check-core-image-build (push) Successful in 4m53s
Go / check-cli-image-build (push) Failing after 3m17s
Unit-Test / unit-tests (push) Failing after 5m4s
Go / check-windows (push) Has been cancelled
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 6.1.1 to 6.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](971e284b60...2226d7cb06)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-02 09:25:57 -08:00
huochexizhan
cd0b0988f9 fix: fix incorrect nil return value (#6705)
Signed-off-by: huochexizhan <huochexizhan@outlook.com>
2025-03-02 09:23:56 -08:00
Taosh
ead624e553 chore: quick deploy button for kubevela (#6692)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m48s
E2E MultiCluster Test / detect-noop (push) Successful in 9s
E2E Test / detect-noop (push) Successful in 8s
Go / detect-noop (push) Successful in 8s
license / Check for unapproved licenses (push) Failing after 22s
Registry / publish-core-images (push) Failing after 22s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 35s
Unit-Test / detect-noop (push) Successful in 9s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 27s
E2E Test / e2e-tests (v1.29) (push) Failing after 24s
Definition-Lint / definition-doc (push) Failing after 6m49s
Go / staticcheck (push) Successful in 2m59s
Go / lint (push) Failing after 19m45s
Go / check-diff (push) Failing after 21m3s
Go / check-core-image-build (push) Failing after 5m16s
Go / check-cli-image-build (push) Failing after 3m11s
Unit-Test / unit-tests (push) Failing after 13m17s
Go / check-windows (push) Has been cancelled
Signed-off-by: 青炽 <hanyuntao.hyt@alibaba-inc.com>
Co-authored-by: 青炽 <hanyuntao.hyt@alibaba-inc.com>
2025-02-28 19:07:41 -08:00
Daniel Higuero
f5aed7aefd Update CODEOWNERS (#6695)
Remove dhiguero from codeowners
2025-02-28 19:02:20 -08:00
shivin
30249d5297 Fix: fix for skipping deletion of orphan resources (#6700)
* fix for skipping deletion of orphan resources

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>

* gofmt fix

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>

---------

Signed-off-by: Pushparaj Shetty KS <kspushparajshetty@gmail.com>
2025-02-28 19:00:31 -08:00
Anoop Gopalakrishnan
472e1f1e59 Fix: upddate deprecated action versions (#6702)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 33s
E2E MultiCluster Test / detect-noop (push) Successful in 9s
E2E Test / detect-noop (push) Successful in 9s
Go / detect-noop (push) Successful in 9s
license / Check for unapproved licenses (push) Failing after 15s
CodeQL / Analyze (go) (push) Failing after 1m55s
Registry / publish-core-images (push) Failing after 24s
Unit-Test / detect-noop (push) Successful in 9s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 36s
E2E Test / e2e-tests (v1.29) (push) Failing after 29s
Go / staticcheck (push) Successful in 20m2s
Go / lint (push) Failing after 22m11s
Go / check-core-image-build (push) Successful in 8m59s
Go / check-cli-image-build (push) Successful in 2m41s
Go / check-diff (push) Failing after 15m22s
Unit-Test / unit-tests (push) Failing after 5m29s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 35s
Go / check-windows (push) Has been cancelled
2025-02-28 11:08:05 +08:00
Tianxin Dong
33cd16d425 chore: update workflow to fix the compatibility for outputs (#6701)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 1m38s
E2E MultiCluster Test / detect-noop (push) Successful in 27s
E2E Test / detect-noop (push) Successful in 21s
Go / detect-noop (push) Successful in 26s
Definition-Lint / definition-doc (push) Successful in 3m19s
Registry / publish-core-images (push) Failing after 38s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 28s
Unit-Test / detect-noop (push) Successful in 2s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 19s
E2E Test / e2e-tests (v1.29) (push) Failing after 18s
license / Check for unapproved licenses (push) Failing after 3m3s
Go / staticcheck (push) Successful in 3m8s
Go / lint (push) Failing after 19m52s
Go / check-core-image-build (push) Failing after 4m24s
Go / check-cli-image-build (push) Failing after 3m5s
Go / check-diff (push) Successful in 25m18s
Unit-Test / unit-tests (push) Failing after 12m41s
Go / check-windows (push) Has been cancelled
Signed-off-by: FogDong <fog@bentoml.com>
2025-02-27 00:16:28 +05:30
Amit Singh
793ba55455 fix: switches to new helm repo url (#6694)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m2s
Definition-Lint / definition-doc (push) Failing after 7m6s
E2E MultiCluster Test / detect-noop (push) Successful in 25s
E2E Test / detect-noop (push) Successful in 35s
Go / detect-noop (push) Successful in 17s
license / Check for unapproved licenses (push) Failing after 2m49s
Registry / publish-core-images (push) Failing after 55s
Unit-Test / detect-noop (push) Successful in 23s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 2m27s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m37s
Go / staticcheck (push) Successful in 19m8s
Go / lint (push) Failing after 19m44s
Go / check-diff (push) Failing after 15m16s
Go / check-core-image-build (push) Failing after 4m5s
Go / check-cli-image-build (push) Failing after 3m1s
Unit-Test / unit-tests (push) Failing after 13m10s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 51s
Signed-off-by: Chitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
2025-02-20 20:41:12 +05:30
Tianxin Dong
711c9f0053 fix: fix addon check (#6687)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m21s
Definition-Lint / definition-doc (push) Failing after 7m18s
E2E MultiCluster Test / detect-noop (push) Successful in 26s
E2E Test / detect-noop (push) Successful in 19s
Go / detect-noop (push) Successful in 19s
license / Check for unapproved licenses (push) Failing after 2m57s
Registry / publish-core-images (push) Failing after 45s
Unit-Test / detect-noop (push) Successful in 21s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m39s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m21s
Go / staticcheck (push) Successful in 17m18s
Go / lint (push) Failing after 19m39s
Go / check-diff (push) Failing after 14m58s
Go / check-core-image-build (push) Failing after 3m51s
Go / check-cli-image-build (push) Failing after 3m4s
Unit-Test / unit-tests (push) Failing after 12m46s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 56s
Signed-off-by: FogDong <fog@bentoml.com>
2025-02-12 13:18:39 +08:00
Kanchan Dhamane
bc15e5b359 Feat: Semantic versioning support for Definitions (#6648)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 1m43s
Definition-Lint / definition-doc (push) Failing after 6m13s
E2E MultiCluster Test / detect-noop (push) Successful in 24s
E2E Test / detect-noop (push) Successful in 17s
Go / detect-noop (push) Successful in 21s
license / Check for unapproved licenses (push) Failing after 2m38s
Registry / publish-core-images (push) Failing after 40s
Unit-Test / detect-noop (push) Successful in 20s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m55s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m18s
Go / staticcheck (push) Successful in 18m35s
Go / lint (push) Failing after 19m38s
Go / check-diff (push) Failing after 15m7s
Go / check-core-image-build (push) Failing after 3m45s
Go / check-cli-image-build (push) Failing after 2m23s
Unit-Test / unit-tests (push) Failing after 12m43s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 48s
* feature: Add Semantic versioning to KubeVela Definitions

Fixes https://github.com/kubevela/kubevela/issues/6435
Fixes https://github.com/kubevela/kubevela/issues/6534

Changes:
- Adds an optional "Version" field for all Definition Specs.
- Adds the following new validations to Webhooks for Definitions:
	- Validate the "Version" field follows Semantic versioning.
	- Dis-allow conflicting versioning fields ( Name annotation, Spec.Version)
- Adds the following new validations to Webhooks for Application:
	- Dis-allow the use of both the "publishVersion" & "autoUpdate" annotations.
- Enahnce "multiStageComponentApply" feature to support auto updates.

Boy Scout Changes:
- Fixes Plugin e2e tests broken by the fix for 6534.
- Fixes the dryRun and livediff commands to respect the "-n" namespace flag.
- Fixes the Application ValidationWebhook to respect the "-n" namespace flag.

Co-authored-by: Rahul Kumar <35751394+bugbounce@users.noreply.github.com>
Co-authored-by: Chaitanya Reddy <chaitanyareddy0702@gmail.com>
Co-authored-by: Vibhor Chinda <vibhorchinda@gmail.com>
Co-authored-by: Shivin Gopalani <gopalanishivin@gmail.com>

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

* feature: Add KEP to define the proposal

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

* fix: Rebase and fix merge conflicts

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

* Fix: Adds unit test cases

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>

---------

Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>
Co-authored-by: bugbounce <35751394+bugbounce@users.noreply.github.com>
2025-02-03 11:09:28 +08:00
Eko Simanjuntak
d0d7beb700 fix: return error before accesing mapping resource (#6660)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 2m18s
Definition-Lint / definition-doc (push) Failing after 6m5s
E2E MultiCluster Test / detect-noop (push) Successful in 18s
E2E Test / detect-noop (push) Successful in 21s
Go / detect-noop (push) Successful in 19s
license / Check for unapproved licenses (push) Failing after 2m30s
Registry / publish-core-images (push) Failing after 49s
Unit-Test / detect-noop (push) Successful in 18s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m28s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m17s
Go / staticcheck (push) Successful in 18m20s
Go / lint (push) Failing after 19m38s
Go / check-diff (push) Failing after 15m6s
Go / check-core-image-build (push) Failing after 4m1s
Go / check-cli-image-build (push) Failing after 3m2s
Unit-Test / unit-tests (push) Failing after 13m29s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 41s
Signed-off-by: Eko Simanjuntak <ecojuntak@gmail.com>
2025-01-25 00:36:13 +05:30
dependabot[bot]
e63d8c33ec Chore: (deps): Bump github.com/go-git/go-git/v5 from 5.8.1 to 5.13.1 (#6668)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 1m30s
Definition-Lint / definition-doc (push) Failing after 6m23s
E2E MultiCluster Test / detect-noop (push) Successful in 22s
E2E Test / detect-noop (push) Successful in 24s
Go / detect-noop (push) Successful in 27s
license / Check for unapproved licenses (push) Failing after 2m46s
Registry / publish-core-images (push) Failing after 1m5s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 46s
Unit-Test / detect-noop (push) Successful in 26s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 3m12s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m13s
Go / staticcheck (push) Successful in 19m3s
Go / lint (push) Failing after 19m42s
Go / check-diff (push) Failing after 11m44s
Go / check-core-image-build (push) Failing after 3m8s
Go / check-cli-image-build (push) Failing after 2m32s
Unit-Test / unit-tests (push) Failing after 12m55s
Go / check-windows (push) Has been cancelled
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.8.1 to 5.13.1.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.8.1...v5.13.1)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 01:56:32 +05:30
dependabot[bot]
3779f828ae Chore: (deps): Bump docker/setup-buildx-action from 3.0.0 to 3.8.0 (#6678)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3.0.0 to 3.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f95db51fdd...6524bf65af)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 01:54:37 +05:30
dependabot[bot]
4d744a35d4 Chore: (deps): Bump golang.org/x/crypto from 0.25.0 to 0.32.0 (#6672)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 1m54s
Definition-Lint / definition-doc (push) Failing after 7m11s
E2E MultiCluster Test / detect-noop (push) Successful in 25s
E2E Test / detect-noop (push) Successful in 25s
Go / detect-noop (push) Successful in 21s
license / Check for unapproved licenses (push) Failing after 2m40s
Registry / publish-core-images (push) Failing after 38s
Unit-Test / detect-noop (push) Successful in 30s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 3m26s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m13s
Go / staticcheck (push) Successful in 20m3s
Go / lint (push) Failing after 19m36s
Go / check-diff (push) Failing after 15m14s
Go / check-core-image-build (push) Failing after 3m22s
Go / check-cli-image-build (push) Failing after 2m16s
Unit-Test / unit-tests (push) Failing after 12m30s
Go / check-windows (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Failing after 53s
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.25.0 to 0.32.0.
- [Commits](https://github.com/golang/crypto/compare/v0.25.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 03:09:33 +08:00
Thomas Schuetz
9f09436359 Feat: add securityContext and podSecurityContext traits (#6666)
Some checks failed
Definition-Lint / definition-doc (push) Failing after 1m45s
CodeQL / Analyze (go) (push) Failing after 1m49s
E2E MultiCluster Test / detect-noop (push) Successful in 18s
E2E Test / detect-noop (push) Successful in 26s
Go / detect-noop (push) Successful in 21s
Registry / publish-core-images (push) Failing after 1m24s
license / Check for unapproved licenses (push) Failing after 2m53s
Unit-Test / detect-noop (push) Successful in 26s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Failing after 1m56s
E2E Test / e2e-tests (v1.29) (push) Failing after 1m24s
Sync SDK / sync_sdk (push) Failing after 23m1s
Go / staticcheck (push) Successful in 19m14s
Go / check-diff (push) Failing after 15m19s
Go / check-core-image-build (push) Failing after 4m25s
Go / lint (push) Failing after 21m4s
Go / check-cli-image-build (push) Failing after 3m26s
Unit-Test / unit-tests (push) Failing after 8m53s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 20s
Go / check-windows (push) Has been cancelled
* feat: add securityContext and podSecurityContext traits

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
Signed-off-by: Thomas Schütz <thomas.schuetz@karriere.at>

* Fix: broken runner config for workglow (#6669)

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Signed-off-by: Thomas Schütz <thomas.schuetz@karriere.at>

* fix: fix spaces at for statements

Signed-off-by: Thomas Schütz <thomas.schuetz@karriere.at>

---------

Signed-off-by: Thomas Schuetz <thomas.schuetz@t-sc.eu>
Signed-off-by: Thomas Schütz <thomas.schuetz@karriere.at>
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
Co-authored-by: Anoop Gopalakrishnan <2038273+anoop2811@users.noreply.github.com>
2025-01-10 22:24:22 +05:30
Anoop Gopalakrishnan
c6765c6ff0 Fix: broken runner config for workglow (#6669)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 8m37s
Definition-Lint / definition-doc (push) Failing after 6m9s
E2E Test / detect-noop (push) Successful in 20s
Go / detect-noop (push) Successful in 25s
license / Check for unapproved licenses (push) Failing after 3m7s
E2E MultiCluster Test / detect-noop (push) Failing after 10m51s
Registry / publish-core-images (push) Failing after 1m5s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 4m5s
Unit-Test / detect-noop (push) Successful in 20s
E2E Test / e2e-tests (v1.29) (push) Failing after 12m25s
Go / staticcheck (push) Successful in 18m25s
Go / lint (push) Failing after 20m3s
Go / check-core-image-build (push) Failing after 4m15s
Go / check-cli-image-build (push) Failing after 3m8s
Go / check-diff (push) Failing after 17m20s
Unit-Test / unit-tests (push) Failing after 13m22s
Go / check-windows (push) Has been cancelled
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Has been cancelled
Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2025-01-06 13:37:59 +08:00
Ai Ranthem
a5606b7808 Chore: (deps): Update k8s to 1.29 (#6654)
Some checks failed
CodeQL / Analyze (go) (push) Failing after 6m23s
Definition-Lint / definition-doc (push) Failing after 3m8s
E2E MultiCluster Test / detect-noop (push) Successful in 6s
E2E Test / detect-noop (push) Successful in 3s
Go / detect-noop (push) Successful in 2s
license / Check for unapproved licenses (push) Failing after 18s
Registry / publish-core-images (push) Failing after 1m4s
Unit-Test / detect-noop (push) Successful in 20s
Sync SDK / sync_sdk (push) Failing after 3m9s
Go / staticcheck (push) Successful in 6m17s
Go / check-diff (push) Failing after 19m4s
Go / check-core-image-build (push) Failing after 5m44s
Go / check-cli-image-build (push) Failing after 3m31s
Unit-Test / unit-tests (push) Failing after 13m54s
Go / lint (push) Failing after 1h53m27s
Scorecards supply-chain security / Scorecards analysis (push) Failing after 1m27s
E2E MultiCluster Test / e2e-multi-cluster-tests (v1.29) (push) Has been cancelled
E2E Test / e2e-tests (v1.29) (push) Has been cancelled
Go / check-windows (push) Has been cancelled
* chore: update k8s to 1.29

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* fix: unit test

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* fix: lint

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* fix: lint

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* fix: e2e

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* fix: lint and e2e test

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* test(e2e): increase timeout

Signed-off-by: phantomnat <w.nattadej@gmail.com>

* fix e2e and scripts

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* make reviewable

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* rollback a unnecessary ut change

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

* update go.mod to import merged workflow

Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>

---------

Signed-off-by: phantomnat <w.nattadej@gmail.com>
Signed-off-by: AiRanthem <zhongtianyun.zty@alibaba-inc.com>
Co-authored-by: phantomnat <w.nattadej@gmail.com>
2025-01-03 07:54:42 +08:00
dependabot[bot]
a6bd2d5fc3 Chore: (deps): Bump golangci/golangci-lint-action from 3.7.0 to 6.1.1 (#6634)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.7.0 to 6.1.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](3a91952989...971e284b60)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-10 03:30:43 +05:30
Jonatas Teixeira
f7b1eee7f3 fix: include the build labels and annotaiton metadata (#6655)
Signed-off-by: Jonatas Teixeira <jonatas.teixeira@hellofresh.com>
2024-12-09 13:15:34 +08:00
HongKuang
903f3dfe44 chore: fix function name in comment (#6499)
Signed-off-by: hongkuang <liurenhong@outlook.com>
2024-12-03 14:50:37 +08:00
Tianxin Dong
0f780dec75 Feat: add new providers and fix definitions (#6599)
* feat: add new providers and fix definitions

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix definitions and tests

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix lint and helm

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix definitions

Signed-off-by: FogDong <fog@bentoml.com>

* fix: add multicluster

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix e2e

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix dynamic client for cli

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix api gen

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix lint

Signed-off-by: FogDong <fog@bentoml.com>

---------

Signed-off-by: FogDong <fog@bentoml.com>
2024-10-01 12:29:44 +05:30
YoungLH
b1d62aa6ca Fix: Correct spelling of "application" in deletion message (#6626) (#6628)
Previously, the deletion message for applications contained a typo where "application" was misspelled as "appplication". This commit corrects the spelling to "application" in the message:

- Before: "Start deleting appplication %s/%s\n"
- After: "Start deleting application %s/%s\n"

This change improves the clarity of the output message when deleting applications.

Signed-off-by: YoungLH <974840768@qq.com>
2024-09-27 14:10:17 +08:00
Chaitanyareddy0702
613174384a Feat(#6505): Add support for Cue Required field feature (#6622)
* Fix: e2e-tests and unit-tests

- Remove gomega from workflow e2e-test step
- Change the app phase to WorkFlowFailed when there is an error in workflow
- Change the app10.yaml file

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

Author: VibhorChinda <vibhorchinda@gmail.com>

* Feat: Add strict cue required field parameter validation

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>

---------

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Co-authored-by: VibhorChinda <vibhorchinda@gmail.com>
2024-09-20 20:28:44 +05:30
Tianxin Dong
3f87c6f2e7 fix: fix github action token (#6608)
Signed-off-by: FogDong <fog@bentoml.com>
2024-08-27 16:52:14 +08:00
Harshita Sao
9370981639 fix: fixed the pinned dependencies issue (#6602)
Signed-off-by: harshitasao <harshitasao@gmail.com>
2024-08-18 22:36:07 +08:00
Tianxin Dong
0f978aed40 chore: use official workflow version (#6588)
Signed-off-by: FogDong <fog@bentoml.com>
2024-07-29 14:08:56 +08:00
Tianxin Dong
4f8bf44684 Refactor: use cuex engine (#6575)
* refactor: use cuex engine

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix lint

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix unit test

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix static check and sdk tests

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix testdata

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix velaql unit test

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix docgen parser

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix cuegen

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix velaql

Signed-off-by: FogDong <fog@bentoml.com>

* fix: delete useless print

Signed-off-by: FogDong <fog@bentoml.com>

* fix: set client for ql

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix mt tests

Signed-off-by: FogDong <fog@bentoml.com>

* fix: set kubeclient in generator

Signed-off-by: FogDong <fog@bentoml.com>

* fix: use pass kube client

Signed-off-by: FogDong <fog@bentoml.com>

* fix: simplify ql

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix lint

Signed-off-by: FogDong <fog@bentoml.com>

* fix: add wf debug back

Signed-off-by: FogDong <fog@bentoml.com>

* fix: add loader

Signed-off-by: FogDong <fog@bentoml.com>

---------

Signed-off-by: FogDong <fog@bentoml.com>
2024-07-27 17:44:20 +08:00
dependabot[bot]
a565b48ae6 Chore: (deps): Bump actions/setup-node from 4.0.0 to 4.0.3 (#6582)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.0 to 4.0.3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](8f152de45c...1e60f620b9)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 20:11:42 +05:30
dependabot[bot]
9993fba94d Chore: (deps): Bump actions/github-script from 6.4.1 to 7.0.1 (#6407)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d7906e4ad0...60a0d83039)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-15 20:09:05 +05:30
shreyas pandya
e3f0a6006d Fix(docs): documentation where schematic for component definition refers to kube (#6579)
* cue structure implemented

Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>

* indent fix

Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>

* Fix(docs): correct example by changing schematic from kube to cue

- fixes #6436

Signed-off-by: Shreyas <pandyashreyas1@gmail.com>

---------

Signed-off-by: Kartikay <kartikay_2101ce32@iitp.ac.in>
Signed-off-by: Shreyas <pandyashreyas1@gmail.com>
Co-authored-by: Kartikay <kartikay_2101ce32@iitp.ac.in>
2024-07-15 14:27:44 +05:30
dependabot[bot]
4aeeaa7294 Chore: (deps): Bump docker/build-push-action from 5.0.0 to 6.3.0 (#6571)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5.0.0 to 6.3.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](0565240e2d...1a162644f9)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-12 22:21:59 +08:00
Kanchan Dhamane
5dbbbce4ea chore: updates the make fmt command (#6577)
Signed-off-by: kanchan-dhamane <74534570+kanchan-dhamane@users.noreply.github.com>
2024-07-12 22:19:12 +08:00
Yuping Fan
a0ae9c68ee Fix(CUE): fix namespaces field missing in the required at affinity trait (#6567)
Signed-off-by: Yuping Fan <coderfyp@gmail.com>
Co-authored-by: Yuping Fan <coderfyp@gmail.com>
2024-07-10 11:08:43 +08:00
dependabot[bot]
eba6a7001b Chore: (deps): Bump golang.org/x/crypto from 0.23.0 to 0.25.0 (#6569)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.25.0.
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 11:07:49 +08:00
Vibhor Chinda
79bf139958 Cleaned/Deleted the worklows after every test case (#6565)
Signed-off-by: vchinda <vchinda@guidewire.com>
Co-authored-by: vchinda <vchinda@guidewire.com>
2024-07-03 16:12:53 +08:00
Tianxin Dong
82dad1ebbb Chore: update go version to 1.22 (#6560)
* chore: update go version to 1.22

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix lint

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix unit test

Signed-off-by: FogDong <fog@bentoml.com>

* fix: update static check tool

Signed-off-by: FogDong <fog@bentoml.com>

* fix: add debug

Signed-off-by: FogDong <fog@bentoml.com>

* fix: use ghcr to fix dockerhub rate limit

Signed-off-by: FogDong <fog@bentoml.com>

* fix: use ghcr for addons

Signed-off-by: FogDong <fog@bentoml.com>

* fix: add more timeout for e2e multicluster test

Signed-off-by: FogDong <fog@bentoml.com>

* fix: use ghcr

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix e2e addon image

Signed-off-by: FogDong <fog@bentoml.com>

* fix: test addon terraform version

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix admission image

Signed-off-by: FogDong <fog@bentoml.com>

* fix: fix terraform version

Signed-off-by: FogDong <fog@bentoml.com>

---------

Signed-off-by: FogDong <fog@bentoml.com>
2024-07-03 16:10:56 +08:00
Anoop Gopalakrishnan
c085d83aa8 Chore: Add Fog, Anoop and Daniel as codeowners (#6564)
* Chore: Add Anoop and Daniel as codeowners

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Add Fog as a codeowner

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

* Chore: Removed @zzxwill due to non existent error

- Codeowners file was saying the the user handle did not have access to
  the repo

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>

---------

Signed-off-by: Anoop Gopalakrishnan <anoop2811@aol.in>
2024-07-03 16:10:34 +08:00
Chaitanyareddy0702
52873eb7da Fix: e2e-tests and unit-tests (#6562)
- Remove gomega from workflow e2e-test step
- Change the app phase to WorkFlowFailed when there is an error in workflow
- Change the app10.yaml file

Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>

Author: VibhorChinda <vibhorchinda@gmail.com>
2024-07-02 16:42:55 +08:00
yukunjie
d5709623ae Fix(CUE): fix volumns variable err bug in vela-cli (#6537)
Signed-off-by: yukunjie <yukunjie007@163.com>
Co-authored-by: yukunjie <yukunjie007@163.com>
2024-06-17 16:17:34 +08:00
Tianxin Dong
de4f89e914 fix: disable auto maxprocs logging (#6530)
Signed-off-by: FogDong <fog@bentoml.com>
2024-06-07 16:12:41 +08:00
dependabot[bot]
fdcdf659d8 Chore: (deps): Bump golang.org/x/crypto from 0.21.0 to 0.23.0 (#6518)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.21.0 to 0.23.0.
- [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 13:24:21 +08:00
dependabot[bot]
856718ef8e Chore: (deps): Bump golang.org/x/net from 0.21.0 to 0.23.0 (#6506)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 11:43:28 +08:00
dependabot[bot]
dbd230e7ff Chore: (deps): Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (#6439)
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.3.3 to 1.3.7.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.3.3...v1.3.7)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 11:40:25 +08:00
Tianxin Dong
8917780555 fix: bump pkg version to fix the client bug (#6507)
Signed-off-by: FogDong <fog@bentoml.com>
2024-04-22 15:31:51 +08:00
曾子恒
f46bfcf131 Fix(CUE): fix variable error bug in startup-probe (#6472)
The original variable is "grtcpSocketpc", but this variable does not
exist in the file. According to the context, it should be "tcpSocket".
In addition, its type needs to be int to work properly.

Signed-off-by: zengziheng <zengziheng@datacloak.com>
Co-authored-by: zengziheng <zengziheng@datacloak.com>
2024-04-07 10:38:33 +08:00
yyzxw
5bdd0db6e7 Chore: update chart readme (#6494)
Signed-off-by: yyzxw <1020938856@qq.com>
Co-authored-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
2024-04-01 16:06:20 +08:00
yyzxw
838ff055b8 chore: ci yaml err (#6492)
Signed-off-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
Co-authored-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
2024-04-01 10:28:12 +08:00
Awadabang
24756fc507 fix: comma ok (#6457)
Signed-off-by: Awadabang <sheunggz@gmail.com>
Co-authored-by: Awadabang <sheunggz@gmail.com>
2024-03-15 22:50:47 +08:00
dependabot[bot]
81b54781a2 Chore: (deps): Bump google.golang.org/protobuf from 1.31.0 to 1.33.0 (#6479)
Bumps google.golang.org/protobuf from 1.31.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-15 22:49:56 +08:00
dependabot[bot]
d27cc318f2 Chore: (deps): Bump golang.org/x/crypto from 0.18.0 to 0.21.0 (#6474)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.18.0 to 0.21.0.
- [Commits](https://github.com/golang/crypto/compare/v0.18.0...v0.21.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-15 22:48:51 +08:00
Paul Sweeney
4e16b047f9 Fix: allow different service and container port (#6477)
Signed-off-by: kolossi <github@kolossi.co.uk>
Co-authored-by: kolossi <kolossi@github.com>
2024-03-15 22:46:22 +08:00
msun1996
c512bbe93a Fix: zstd encoder concurrency number in k8s container, upgrade kubevela/pkg version to 1.9.0 (#6462) (#6476)
Signed-off-by: hanzhaoyang <hanzhaoyang@jd.com>
Co-authored-by: hanzhaoyang <hanzhaoyang@jd.com>
2024-03-15 22:44:55 +08:00
Daniel Higuero
1a001e5b29 Address GolangCI lint 1.55 errors (#6453)
Signed-off-by: Daniel Higuero <daniel@napptive.com>
2024-02-07 17:27:32 +08:00
Paul Sweeney
42d75e09e5 Fix: add cronjob support for annotations, resources, and volumeMounts (#6422)
* Fix: add cronjob support for annotations, resources, and volumeMounts

Signed-off-by: kolossi <github@kolossi.co.uk>

* Fix: cronjob support change if shortcuts to chained ifs

Signed-off-by: kolossi <github@kolossi.co.uk>

* Fix: cronjob support change if shortcuts to chained ifs

Signed-off-by: kolossi <github@kolossi.co.uk>

---------

Signed-off-by: kolossi <github@kolossi.co.uk>
Co-authored-by: kolossi <kolossi@github.com>
2024-01-22 13:11:52 +08:00
Eray
5101401837 Fix: hpa build-in trait corresponding to cpu parameters when try to use memory (#6434)
Signed-off-by: Eray Arslan <relfishere@gmail.com>
2024-01-22 13:10:26 +08:00
dependabot[bot]
b9bfc4ac75 Chore: (deps): Bump golang.org/x/crypto from 0.14.0 to 0.18.0 (#6442)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.18.0.
- [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-22 13:09:42 +08:00
Tyler Gillson
86dc53afab Fix: load local ComponentDefinitions recursively (#6414)
* fix: load local componentdefinitions recursively

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* test: add dry-run offline def dir test

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

* test: fix unit tests

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>

---------

Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
2024-01-04 08:47:59 -08:00
Tyler Gillson
62efa9c787 fix: prevent kube client lookup in GetFakeClient (#6428)
Signed-off-by: Tyler Gillson <tyler.gillson@gmail.com>
2023-12-26 20:44:03 +08:00
dependabot[bot]
0c449d52b1 Chore: (deps): Bump actions/setup-go from 4.1.0 to 5.0.0 (#6426)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.1.0 to 5.0.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](93397bea11...0c52d547c9)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-26 20:41:14 +08:00
dependabot[bot]
7a69a3b52b Chore: (deps): Bump fkirc/skip-duplicate-actions from 5.3.0 to 5.3.1 (#6380)
Bumps [fkirc/skip-duplicate-actions](https://github.com/fkirc/skip-duplicate-actions) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/fkirc/skip-duplicate-actions/releases)
- [Commits](12aca0a884...f75f66ce18)

---
updated-dependencies:
- dependency-name: fkirc/skip-duplicate-actions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-25 11:03:58 +08:00
dependabot[bot]
7973864c22 Chore: (deps): Bump thehanimo/pr-title-checker from 1.4.0 to 1.4.1 (#6375)
Bumps [thehanimo/pr-title-checker](https://github.com/thehanimo/pr-title-checker) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/thehanimo/pr-title-checker/releases)
- [Commits](https://github.com/thehanimo/pr-title-checker/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: thehanimo/pr-title-checker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-25 11:00:45 +08:00
Daniel Higuero
f88b167b04 Fix: helm template adding namespace (#6423)
* fix: helm template adding namespace

Signed-off-by: Daniel Higuero <daniel@napptive.com>

* revert commented makefile

Signed-off-by: Daniel Higuero <daniel@napptive.com>

---------

Signed-off-by: Daniel Higuero <daniel@napptive.com>
2023-12-25 10:57:39 +08:00
caiqi1111
8b8c00fbba Fix: update build.mk (#6374)
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-12-05 13:13:07 +08:00
Ryan
5f04812d06 Feat: add annotations and labels to gateway.cue (#6397)
* add annotations and labels to gateway.cue and update gateway.yaml by "make reviewable"

Signed-off-by: YanRyan <527421522@qq.com>

* Update vela-templates/definitions/internal/trait/gateway.cue

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>

* Update vela-templates/definitions/internal/trait/gateway.cue

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>

* Update vela-templates/definitions/internal/trait/gateway.cue

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>

* accept FogDong suggestions, use make reviewablew to update gateway.yaml

Signed-off-by: YanRyan <527421522@qq.com>

* Update vela-templates/definitions/internal/trait/gateway.cue

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com> (+2 squashed commits)
Squashed commits:
[2ad1ed5e3] Update vela-templates/definitions/internal/trait/gateway.cue

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>
[a644195ae] Update vela-templates/definitions/internal/trait/gateway.cue

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>

---------

Signed-off-by: YanRyan <527421522@qq.com>
Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>
2023-11-20 14:33:29 +08:00
dependabot[bot]
9c037c8233 Chore: (deps): Bump zeebe-io/backport-action from 1.4.0 to 2.1.1 (#6399)
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 1.4.0 to 2.1.1.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](bd68141f07...08bafb375e)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 22:09:43 +08:00
dependabot[bot]
dc14baf1d8 Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.11.0 to 2.13.1 (#6400)
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.11.0 to 2.13.1.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.11.0...v2.13.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-14 22:09:04 +08:00
dependabot[bot]
003f329b31 Chore: (deps): Bump actions/setup-node from 3.8.1 to 4.0.0 (#6385)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.1 to 4.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](5e21ff4d9b...8f152de45c)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-06 15:09:05 +08:00
dependabot[bot]
b036624efc Chore: (deps): Bump ossf/scorecard-action from 2.2.0 to 2.3.1 (#6386)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](08b4669551...0864cf1902)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-02 17:28:04 +08:00
qiaozp
73c9c75c6f Chore: bump terraform-controller to v0.8.0 (#6363)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-10-01 12:01:07 +08:00
dependabot[bot]
cdcda5c9f9 Chore: (deps): Bump github.com/go-resty/resty/v2 from 2.7.0 to 2.8.0 (#6357)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-30 22:57:44 -05:00
dependabot[bot]
5861988909 Chore: (deps): Bump actions/checkout from 4.0.0 to 4.1.0 (#6360)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](3df4ab11eb...8ade135a41)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-27 08:19:22 +08:00
Mcduller
d3581b9189 Fix: fix the vela show error when format the output markdown (#6356)
Signed-off-by: Mcduller <1596582524@qq.com>
2023-09-25 14:34:37 +08:00
caiqi1111
30fb7a56a0 Fix: validate cue template in webhook handler and add policyvaladatin… (#6355) 2023-09-22 08:42:12 -05:00
caiqi1111
786e0f7755 Fix: update traitdefinitions apiVersions in validatingWebhookConfigur… (#6352)
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-09-21 11:44:28 +08:00
dependabot[bot]
544cc4afb6 Chore: (deps): Bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#6351)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.10.0 to 3.0.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](885d1462b8...f95db51fdd)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-20 10:53:54 +08:00
Anoop Gopalakrishnan
a07acc02c9 Feat: Add command to list all workflows in vela-cli (#6326)
- fixes #6326

Signed-off-by: Muralicharan Gurumoorthy <muralicharan.gurumoorthy@gmail.com>
Co-authored-by: Muralicharan Gurumoorthy <muralicharan.gurumoorthy@gmail.com>
2023-09-20 10:19:08 +08:00
dependabot[bot]
26faaaf4f9 Chore: (deps): Bump golang.org/x/oauth2 from 0.11.0 to 0.12.0 (#6346)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.11.0 to 0.12.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 18:11:24 +08:00
dependabot[bot]
ac9aa16579 Chore: (deps): Bump docker/login-action from 2.2.0 to 3.0.0 (#6349)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](465a07811f...343f7c4344)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 16:52:37 +08:00
dependabot[bot]
a8cc84587c Chore: (deps): Bump goreleaser/goreleaser-action from 4.6.0 to 5.0.0 (#6348)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.6.0 to 5.0.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](5fdedb94ab...7ec5c2b0c6)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 16:52:16 +08:00
dependabot[bot]
263081a105 Chore: (deps): Bump docker/setup-qemu-action from 2.2.0 to 3.0.0 (#6350)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.2.0 to 3.0.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](2b82ce82d5...68827325e0)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 16:50:12 +08:00
dependabot[bot]
308819db33 Chore: (deps): Bump github.com/hashicorp/hcl/v2 from 2.17.0 to 2.18.0 (#6344)
Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.17.0 to 2.18.0.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/hcl/compare/v2.17.0...v2.18.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 15:25:36 +08:00
dependabot[bot]
0defc5d312 Chore: (deps): Bump golang.org/x/crypto from 0.12.0 to 0.13.0 (#6347)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.12.0 to 0.13.0.
- [Commits](https://github.com/golang/crypto/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-19 15:25:18 +08:00
qiaozp
c8d53c103c Fix: unit test for http pkg (#6354)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-09-19 15:24:45 +08:00
dependabot[bot]
3655a90dfe Chore: (deps): Bump docker/build-push-action from 4.1.1 to 5.0.0 (#6340) 2023-09-13 03:43:45 +00:00
dependabot[bot]
e94426963d Chore: (deps): Bump actions/upload-artifact from 3.1.2 to 3.1.3 (#6337)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](0b7f8abb15...a8a3f3ad30)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 10:15:53 +08:00
yyzxw
5d8543fd8b Fix: gateway triat miss port name (#6329)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-09-13 10:03:37 +08:00
dependabot[bot]
48d1ba0538 Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.90.0 to 0.91.1 (#6323)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.90.0 to 0.91.1.
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.90.0...v0.91.1)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 10:03:20 +08:00
dependabot[bot]
eb1bb69a3e Chore: (deps): Bump github.com/cyphar/filepath-securejoin from 0.2.3 to 0.2.4 (#6330)
Bumps [github.com/cyphar/filepath-securejoin](https://github.com/cyphar/filepath-securejoin) from 0.2.3 to 0.2.4.
- [Release notes](https://github.com/cyphar/filepath-securejoin/releases)
- [Commits](https://github.com/cyphar/filepath-securejoin/compare/v0.2.3...v0.2.4)

---
updated-dependencies:
- dependency-name: github.com/cyphar/filepath-securejoin
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 10:02:46 +08:00
dependabot[bot]
a39a8356bd Chore: (deps): Bump actions/checkout from 3.6.0 to 4.0.0 (#6338)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...3df4ab11eb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 10:00:47 +08:00
dependabot[bot]
e3dc76d0cd Chore: (deps): Bump goreleaser/goreleaser-action from 4.4.0 to 4.6.0 (#6336)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.4.0 to 4.6.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](3fa32b8bb5...5fdedb94ab)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 09:59:16 +08:00
dependabot[bot]
5be6f38e54 Chore: (deps): Bump actions/cache from 3.3.1 to 3.3.2 (#6334)
Bumps [actions/cache](https://github.com/actions/cache) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](88522ab9f3...704facf57e)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 09:58:44 +08:00
dependabot[bot]
6961587c7f Chore: (deps): Bump golang.org/x/text from 0.12.0 to 0.13.0 (#6322)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-07 11:39:42 +08:00
qiaozp
6cbc12f9bb Fix: addon dependency package retrieving is not compatible to v-prefixed version (#6316) 2023-09-02 21:00:41 +08:00
dependabot[bot]
08548968f0 Chore: (deps): Bump github.com/onsi/gomega from 1.27.8 to 1.27.10 (#6307)
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.8 to 1.27.10.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.27.8...v1.27.10)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-31 16:04:50 +08:00
JohnJan
d787e95a08 Feat: apply-component supports namespace (#6248) 2023-08-31 14:08:48 +08:00
dependabot[bot]
c4f9c8f63f Chore: (deps): Bump gomodules.xyz/jsonpatch/v2 from 2.3.0 to 2.4.0 (#6308)
Bumps [gomodules.xyz/jsonpatch/v2](https://github.com/gomodules/jsonpatch) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/gomodules/jsonpatch/releases)
- [Changelog](https://github.com/gomodules/jsonpatch/blob/release-2.0/CHANGELOG.md)
- [Commits](https://github.com/gomodules/jsonpatch/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: gomodules.xyz/jsonpatch/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:57:35 +08:00
dependabot[bot]
6ee7eb345b Chore: (deps): Bump docker/setup-buildx-action from 2.9.1 to 2.10.0 (#6310)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.9.1 to 2.10.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](4c0219f9ac...885d1462b8)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:57:12 +08:00
dependabot[bot]
b5d42d3d4e Chore: (deps): Bump github.com/containerd/containerd from 1.7.3 to 1.7.5 (#6306)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.3 to 1.7.5.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.3...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:56:37 +08:00
dependabot[bot]
662597bbca Chore: (deps): Bump golang.org/x/oauth2 from 0.10.0 to 0.11.0 (#6309)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:56:11 +08:00
dependabot[bot]
9459aae74f Chore: (deps): Bump actions/checkout from 3.5.3 to 3.6.0 (#6311)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-28 21:55:23 +08:00
qiaozp
94cbcad471 Chore: tidy appHandler (#6300) 2023-08-28 11:01:33 +08:00
Mcduller
68a2223353 Fix: fix the error when create the same secret twice (#6290)
Signed-off-by: Mcduller <1596582524@qq.com>
2023-08-28 00:11:58 +08:00
yyzxw
15c0b1e218 Feat: enable unknown flags (#6303)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-08-27 17:20:25 +08:00
意琦行
faf5502fae fix: hide msg when no cluster uninstall (#6294) 2023-08-25 12:27:40 +08:00
suwliang3
bdf9bf16b8 feature: identity addon from helm chart structure (#6288)
Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-08-24 10:29:19 +08:00
JohnJan
6afe75efa6 Fix: container-ports trait reserve port name (#6274) 2023-08-23 15:09:56 +08:00
suwliang3
88a85eacb6 feature: add an annotation for the addon (#6256)
Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-08-22 17:30:12 +08:00
Pranav
c315e81757 Fix: Print command output using stdout channel #6268 (#6273)
Co-authored-by: Priyanaka Kotturi
2023-08-22 09:55:20 +08:00
dependabot[bot]
5b6b66a5cc Chore: (deps): Bump zeebe-io/backport-action from 1.3.1 to 1.4.0 (#6278)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 23:45:10 +08:00
dependabot[bot]
103bd9b42e Chore: (deps): Bump golang.org/x/tools from 0.11.0 to 0.12.0 (#6283)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 23:43:56 +08:00
yyzxw
b494185481 chore: add lint fix (#6275)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-08-21 18:02:13 +08:00
dependabot[bot]
9d479b7f7c Chore: (deps): Bump github.com/oam-dev/terraform-controller (#6284)
Bumps [github.com/oam-dev/terraform-controller](https://github.com/oam-dev/terraform-controller) from 0.7.11 to 0.7.12.
- [Release notes](https://github.com/oam-dev/terraform-controller/releases)
- [Commits](https://github.com/oam-dev/terraform-controller/compare/v0.7.11...v0.7.12)

---
updated-dependencies:
- dependency-name: github.com/oam-dev/terraform-controller
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 18:00:39 +08:00
dependabot[bot]
629592c7e7 Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.86.0 to 0.90.0 (#6282)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.86.0 to 0.90.0.
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.86.0...v0.90.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 17:59:50 +08:00
dependabot[bot]
b06dec994a Chore: (deps): Bump github.com/containerd/containerd from 1.7.2 to 1.7.3 (#6281)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 17:59:16 +08:00
dependabot[bot]
4218faac4b Chore: (deps): Bump golang.org/x/term from 0.10.0 to 0.11.0 (#6280)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.10.0 to 0.11.0.
- [Commits](https://github.com/golang/term/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 17:57:34 +08:00
dependabot[bot]
555e94a10c Chore: (deps): Bump golangci/golangci-lint-action from 3.6.0 to 3.7.0 (#6279)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](639cd343e1...3a91952989)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 17:54:46 +08:00
dependabot[bot]
5349f1663f Chore: (deps): Bump actions/setup-node from 3.7.0 to 3.8.1 (#6277)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.7.0 to 3.8.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](e33196f742...5e21ff4d9b)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 17:54:08 +08:00
dependabot[bot]
4778aacaaf Chore: (deps): Bump docker/setup-buildx-action from 2.9.0 to 2.9.1 (#6215)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.9.0 to 2.9.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](2a1a44ac4a...4c0219f9ac)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 16:42:11 +08:00
dependabot[bot]
dab2059bf8 Chore: (deps): Bump actions/setup-go from 4.0.1 to 4.1.0 (#6266)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](fac708d667...93397bea11)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-16 16:41:46 +08:00
dependabot[bot]
9c57c09878 Chore: (deps): Bump goreleaser/goreleaser-action from 4.3.0 to 4.4.0 (#6267)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](336e29918d...3fa32b8bb5)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 11:52:59 +08:00
dependabot[bot]
cc1ac251ce Chore: (deps): Bump github.com/google/go-containerregistry (#6264)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.15.2 to 0.16.1.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.15.2...v0.16.1)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 11:52:24 +08:00
dependabot[bot]
18fb098fce Chore: (deps): Bump golang.org/x/text from 0.11.0 to 0.12.0 (#6262)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-15 11:51:51 +08:00
qiaozp
5a5721048c Refactor: organize appHandler, remove unused flags (#6254) 2023-08-11 12:50:22 +08:00
qiaozp
bab5bb2caf Refactor: capabilities and workload in appfile parsing (#6250) 2023-08-10 14:41:20 +08:00
dependabot[bot]
cce1859294 Chore: (deps): Bump github.com/go-git/go-git/v5 from 5.7.0 to 5.8.1 (#6239)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-08 17:11:03 +08:00
Daniel Higuero
72bb0798ef Fix: test timeout due to hardcoded goproxy (#6246)
Co-authored-by: JohnJan <wuzhongjian_yewu@cmss.chinamobile.com>
2023-08-08 09:43:41 +08:00
qiaozp
29aa2b9644 Fix: issue bot permission (#6245) 2023-08-07 17:10:50 +08:00
qiaozp
307d1db36d Chore: revert "Feat: apply-component supports namespace" (#6247) 2023-08-07 15:44:20 +08:00
qiaozp
00ae0c9494 Feat: support offline dryrun with deploy step (#6234) 2023-07-26 18:09:01 +08:00
JohnJan
f0357fdc8f Feat: apply-component supports namespace (#6228)
* Feat: apply-component supports namespace

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: apply-component supports namespace

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-07-25 10:31:18 +08:00
dependabot[bot]
ef8b0ac00f Chore: (deps): Bump github.com/mattn/go-runewidth from 0.0.14 to 0.0.15 (#6229)
Bumps [github.com/mattn/go-runewidth](https://github.com/mattn/go-runewidth) from 0.0.14 to 0.0.15.
- [Commits](https://github.com/mattn/go-runewidth/compare/v0.0.14...v0.0.15)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-runewidth
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-24 17:23:38 +08:00
suwliang3
aaaf2bddac bug: The log printing error for the addon module (#6207)
Signed-off-by: suwanliang <suwanliang@cmss.chinamobile.com>
Co-authored-by: suwanliang <suwanliang@cmss.chinamobile.com>
2023-07-24 17:22:53 +08:00
dependabot[bot]
eeb6f08edf Chore: (deps): Bump golang.org/x/tools from 0.10.0 to 0.11.0 (#6217)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-24 13:37:50 +08:00
JohnJan
b9f1cc97a9 Feat: add container-ports trait for hostPort and hostIP (#6187)
* Feat: add container-ports trait for hostPort and hostIP

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: add container-ports trait for hostPort and hostIP

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: add container-ports trait for hostPort and hostIP

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: add container-ports trait for hostPort and hostIP

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: add container-ports trait for hostPort and hostIP

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-07-11 18:44:05 +08:00
Jianbo Sun
2117554d53 Fix: add deploy as built-in step to avoid parse in offline mode (#6201) 2023-07-11 17:23:32 +08:00
dependabot[bot]
9edd6ebc30 Chore: (deps): Bump golang.org/x/oauth2 from 0.9.0 to 0.10.0 (#6195)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-11 09:51:26 +08:00
dependabot[bot]
ccdfc409a8 Chore: (deps): Bump golang.org/x/term from 0.9.0 to 0.10.0 (#6197)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/term/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 22:43:09 +08:00
dependabot[bot]
449b3e0b49 Chore: (deps): Bump RyanSiu1995/kubebuilder-action (#6192)
Bumps [RyanSiu1995/kubebuilder-action](https://github.com/ryansiu1995/kubebuilder-action) from ed0e300b13152c2c2bfb104475665c7bf609332f to 7170cb0476187070ae04cbb6cee305e809de2693.
- [Release notes](https://github.com/ryansiu1995/kubebuilder-action/releases)
- [Commits](ed0e300b13...7170cb0476)

---
updated-dependencies:
- dependency-name: RyanSiu1995/kubebuilder-action
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 22:42:39 +08:00
dependabot[bot]
8be1fb29b4 Chore: (deps): Bump github.com/prometheus/client_golang (#6198)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 19:33:45 +08:00
dependabot[bot]
b42e6cf1e6 Chore: (deps): Bump golang.org/x/text from 0.10.0 to 0.11.0 (#6196)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.10.0...v0.11.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 19:32:43 +08:00
dependabot[bot]
096afa227b Chore: (deps): Bump docker/setup-buildx-action from 2.8.0 to 2.9.0 (#6193)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.8.0 to 2.9.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](16c0bc4a6e...2a1a44ac4a)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 19:32:16 +08:00
dependabot[bot]
57b74c3687 Chore: (deps): Bump actions/setup-node from 3.6.0 to 3.7.0 (#6194)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.6.0 to 3.7.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](64ed1c7eab...e33196f742)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 19:24:58 +08:00
dependabot[bot]
9203bbcdb8 Chore: (deps): Bump github.com/kubevela/workflow (#6177)
Bumps [github.com/kubevela/workflow](https://github.com/kubevela/workflow) from 0.5.1-0.20230412142834-be9e5a10baf0 to 0.6.0.
- [Release notes](https://github.com/kubevela/workflow/releases)
- [Commits](https://github.com/kubevela/workflow/commits/v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/kubevela/workflow
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-06 16:48:47 +08:00
JohnJan
f3e920ab60 Refactor: parse workloads (#6185)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-07-05 09:49:34 +08:00
Tanjim Hossain
6893a2b776 fix arm64 build, rm --platform flags in Dockerfile (#6170)
explicitly specify alpine version



explicitly specify alpine version

Signed-off-by: Audacious Tux <tangimhossain1@gmail.com>
2023-07-04 15:39:58 +08:00
Jianbo Sun
4637e3a918 Revert: "Feat: support applicator applying resources and update status (#6030)" (#6182) 2023-07-04 14:06:28 +08:00
dependabot[bot]
118f022cf5 Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.85.0 to 0.86.0 (#6180)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.85.0 to 0.86.0.
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.85.0...v0.86.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-04 12:17:36 +08:00
qiaozp
dabaf03e73 Chore: swtich between old and new registry in vela install (#6173)
* Chore: swtich between old and new registry in vela install

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add comments

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* minor fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-07-04 12:15:30 +08:00
iyear
64e4ab813d Fix: top command abnormal render (#6174)
* Fix: top command abnormal render

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: imports

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: gomod

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-07-04 12:09:02 +08:00
dependabot[bot]
2808de4733 Chore: (deps): Bump docker/setup-buildx-action from 2.7.0 to 2.8.0 (#6175)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](ecf95283f0...16c0bc4a6e)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 23:31:05 +08:00
dependabot[bot]
8059c30f57 Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.7.0 to 0.7.1 (#6179)
Bumps [sigs.k8s.io/gateway-api](https://github.com/kubernetes-sigs/gateway-api) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/kubernetes-sigs/gateway-api/releases)
- [Changelog](https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kubernetes-sigs/gateway-api/compare/v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/gateway-api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-03 23:30:56 +08:00
Somefive
48cf6fb10e Fix: vela install chart switch place (#6153)
* Fix: vela install chart switch place

Signed-off-by: Somefive <Somefive@foxmail.com>

* Fix: test case replace url

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

---------

Signed-off-by: Somefive <Somefive@foxmail.com>
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-06-29 17:48:12 +08:00
StevenLeiZhang
90246065d9 Fix: vela dry-run can not render Applicaiton, if x-definition(Compnent/Trait) is not installed to vela-system namespace (#6135)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-06-27 23:08:23 +08:00
dependabot[bot]
6e1cb04cd4 Chore: (deps): Bump golang.org/x/oauth2 from 0.8.0 to 0.9.0 (#6155)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 19:07:38 +08:00
dependabot[bot]
b8259c9979 Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.10.0 to 2.11.0 (#6159)
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.10.0 to 2.11.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.10.0...v2.11.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 19:07:16 +08:00
dependabot[bot]
110d475ae0 Chore: (deps): Bump github.com/go-git/go-git/v5 from 5.6.1 to 5.7.0 (#6156)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:23:55 +08:00
dependabot[bot]
141f7dcdeb Chore: (deps): Bump github.com/oam-dev/terraform-controller from 0.7.10 to 0.7.11 (#6157)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:23:22 +08:00
dependabot[bot]
1baa125cc1 Chore: (deps): Bump ossf/scorecard-action from 2.1.3 to 2.2.0 (#6160)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:21:43 +08:00
dependabot[bot]
7d3854d86a Chore: (deps): Bump sigs.k8s.io/kind from 0.18.0 to 0.20.0 (#6158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-27 10:14:01 +08:00
Somefive
6e9063d40c Fix: ci definition lint wrong config (#6148)
Signed-off-by: Somefive <Somefive@foxmail.com>
2023-06-21 13:48:53 +08:00
Somefive
c4f14ad261 Fix: remove forbid redirect for http get (#6147) 2023-06-21 13:46:44 +08:00
Somefive
257695f073 Fix: addon registry use kubevela.github.io and support redirect (#6133) 2023-06-20 16:30:27 +08:00
dependabot[bot]
162a8f346a Chore: (deps): Bump docker/setup-buildx-action from 2.6.0 to 2.7.0 (#6143)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](6a58db7e0d...ecf95283f0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 23:19:04 +08:00
dependabot[bot]
9b6019f93d Chore: (deps): Bump golangci/golangci-lint-action from 3.5.0 to 3.6.0 (#6141)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.5.0 to 3.6.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](5f1fec7010...639cd343e1)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 18:08:22 +08:00
dependabot[bot]
d283c2fbeb Chore: (deps): Bump goreleaser/goreleaser-action from 4.2.0 to 4.3.0 (#6145)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](f82d6c1c34...336e29918d)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 17:57:04 +08:00
dependabot[bot]
10e458c06d Chore: (deps): Bump golang.org/x/tools from 0.9.3 to 0.10.0 (#6136)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.9.3...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 17:56:40 +08:00
dependabot[bot]
2ca31b41a0 Chore: (deps): Bump github.com/prometheus/client_model (#6139)
Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](https://github.com/prometheus/client_model/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 17:56:04 +08:00
dependabot[bot]
c43368457f Chore: (deps): Bump github.com/containerd/containerd from 1.7.1 to 1.7.2 (#6140)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 17:54:38 +08:00
dependabot[bot]
69dd0d0b20 Chore: (deps): Bump docker/build-push-action from 4.1.0 to 4.1.1 (#6142)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](44ea916f6c...2eb1c1961a)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 17:52:04 +08:00
dependabot[bot]
7af4bd5a49 Chore: (deps): Bump zeebe-io/backport-action from 1.3.0 to 1.3.1 (#6144)
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](b9f8a0a03e...bf5fdd624b)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-19 17:51:35 +08:00
StevenLeiZhang
28004bc26f Fix: vela top crash, when view Application topology (#6127)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-06-18 10:20:46 +08:00
Somefive
da3618ad27 Chore: remove useless envbinding env (#6122)
* Chore: remove useless envbinding env

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix go proxy

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-15 14:50:20 +08:00
zhaohuiweixiao
189555ba16 Refactor: addon dependency installation logic (#6045)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-06-15 11:20:50 +08:00
zhaohuiweixiao
49327b8910 Fix: addon args is not changed when reinstall it without args (#6065)
* Fix: addon args is not changed when reinstall it without args

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: addon args review modify

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-06-14 16:59:35 +08:00
Somefive
a513029ec8 Fix: vela addon registry add allow redirect (#6120)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-14 14:22:12 +08:00
dependabot[bot]
b05ea09d5a Chore: (deps): Bump github.com/getkin/kin-openapi from 0.94.0 to 0.118.0 (#6106)
Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.94.0 to 0.118.0.
- [Release notes](https://github.com/getkin/kin-openapi/releases)
- [Commits](https://github.com/getkin/kin-openapi/compare/v0.94.0...v0.118.0)



---
updated-dependencies:
- dependency-name: github.com/getkin/kin-openapi
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 12:00:31 +08:00
zhaohuiweixiao
ff52cf58ba Fix: can not get the APISchema when registry is not version registry (#6066)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-06-13 10:36:03 +08:00
zhaohuiweixiao
95fa62164a Fix: addon status list addon info error when there are mulitiple registries (#6073)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-06-13 10:34:52 +08:00
dependabot[bot]
b576bee882 Chore: (deps): Bump github.com/onsi/gomega from 1.27.7 to 1.27.8 (#6105)
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.7 to 1.27.8.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.27.7...v1.27.8)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 20:52:36 +08:00
dependabot[bot]
9599e67275 Chore: (deps): Bump github.com/hashicorp/hcl/v2 from 2.16.2 to 2.17.0 (#6107)
Bumps [github.com/hashicorp/hcl/v2](https://github.com/hashicorp/hcl) from 2.16.2 to 2.17.0.
- [Release notes](https://github.com/hashicorp/hcl/releases)
- [Changelog](https://github.com/hashicorp/hcl/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/hcl/compare/v2.16.2...v2.17.0)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/hcl/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 20:52:18 +08:00
dependabot[bot]
8626a4d988 Chore: (deps): Bump docker/setup-qemu-action from 2.1.0 to 2.2.0 (#6108)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](e81a89b173...2b82ce82d5)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 20:51:42 +08:00
dependabot[bot]
ef2df1231c Chore: (deps): Bump docker/build-push-action from 4.0.0 to 4.1.0 (#6109)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 4.1.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](3b5e8027fc...44ea916f6c)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 20:51:30 +08:00
dependabot[bot]
8a794a08cd Chore: (deps): Bump github.com/stretchr/testify from 1.8.3 to 1.8.4 (#6104)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 18:55:33 +08:00
dependabot[bot]
36efea15a3 Chore: (deps): Bump docker/login-action from 2.1.0 to 2.2.0 (#6110)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](f4ef78c080...465a07811f)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 18:53:21 +08:00
dependabot[bot]
799dfbe781 Chore: (deps): Bump actions/checkout from 3.5.2 to 3.5.3 (#6112)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](8e5e7e5ab8...c85c95e3d7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 18:53:00 +08:00
dependabot[bot]
06cacb80a0 Chore: (deps): Bump docker/setup-buildx-action from 2.4.1 to 2.6.0 (#6111)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2.4.1 to 2.6.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](f03ac48505...6a58db7e0d)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 17:37:09 +08:00
dependabot[bot]
652368fdb3 Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.83.0 to 0.85.0 (#6103)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.83.0 to 0.85.0.
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.83.0...v0.85.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-12 17:35:42 +08:00
Somefive
f1bae16723 Chore: remove schematic kube and helm (#6099)
* Chore: remove unused code

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove schematic Kube & Helm

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-12 10:41:02 +08:00
suwliang3
c0cbe24dc4 Feat: optimize "application-resource-tree-view" (#6096)
* feature: Optimize "application-resource-tree-view"

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* fix: go fmt

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* fix: modif staticcheck

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-06-09 09:44:36 +08:00
Somefive
c255d21ad6 Chore: remove unnecessary go mod (#6093)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-08 15:32:57 +08:00
merusso
be3b990df0 Feat(#5861): Support addon dependencies version ranges (#6002)
* Feat(#5861): Support addon dependencies version ranges

This change enables addon maintainers to define version ranges for
dependencies in an addon's metadata.yaml file.

This behavior is similar to the version range allowed in the `system`
section of the metadata file. The version range expression for
`dependencies` follows the same format as for `system`.

Example:

```yaml
dependencies:
  - name: addon1
    version: ">= 2.3.3, < 3.0.0"
  - name: addon2
    version: ">= 0.1.0, < 1.0.0"
```

When installing an addon, the behavior varies depending on whether the
dependency is already installed.

If a dependency is already installed, the installed version will be
validated against the version range, and installation will fail with an
error if there's a mismatch.
If a dependency is not installed, the version range will be used to
select the addon version to be installed. If no addon version matching
the range exists, the installation will fail with an error.

Fixes #5861

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): remove unused ctx parameter

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): Add comment for IsLocalRegistry

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): unexport AddonInfoMap

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): unexport addonInfo

Signed-off-by: Michael Russo <merusso@gmail.com>

* chore: replace map[string]addonInfo with addonInfoMap for consistency

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix: add short circuit when dependency version is not specified

Signed-off-by: Michael Russo <merusso@gmail.com>

* feat: Add test for multiple validation errors

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix: Run go mod tidy

Signed-off-by: Michael Russo <merusso@gmail.com>

* feat: add tests for ToVersionedRegistry

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix: simplify listInstalledAddons loop

Signed-off-by: Michael Russo <merusso@gmail.com>

* feat: listAvailableAddons returns addons from multiple sources

Changes:
* implement ListAddonInfo in Registry
* add interface to aid testing of listAvailableAddons
* add tests for listAvailableAddons

Signed-off-by: Michael Russo <merusso@gmail.com>

* refactor: simplify validateAddonDependencies

move logic from validateAddonDependencies to
calculateDependencyVersionToInstall.

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): Implicit memory aliasing in for loop.

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): non-wrapping format verb for fmt.Errorf

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): indent-error-flow: (revive)

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): unexported-return

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): exported type comment format (revive)

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): refactor AddonInfo to ItemInfo, avoid "stutter" (revive)

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): add comment to exported method Registry.ListAddonInfo

Signed-off-by: Michael Russo <merusso@gmail.com>

* fix(lint): fix stutter, rename AddonInfoLister to ItemInfoLister

Signed-off-by: Michael Russo <merusso@gmail.com>

* chore: Add suite tests for Registry.ListAddonInfo()

Signed-off-by: Michael Russo <merusso@gmail.com>

* Test: add test cases for addon.sortVersionsDescending

Signed-off-by: Michael Russo <merusso@gmail.com>

---------

Signed-off-by: Michael Russo <merusso@gmail.com>
2023-06-07 11:44:54 +08:00
Yang Gang
30bc8c95f7 Chore: Cache the DiscoveryClient for cli command. (#6091)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-06-07 09:58:46 +08:00
dependabot[bot]
cacbad3bb5 Chore: (deps): Bump github.com/google/go-containerregistry (#6081)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.15.1 to 0.15.2.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.15.1...v0.15.2)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 10:13:25 +08:00
Yang Gang
114cf4005e Chore: Fix duplicate logs and parameter wrong hints. (#6086)
Signed-off-by: yanggang <gang.yang@daocloud.io>
2023-06-06 09:52:09 +08:00
dependabot[bot]
f28c050530 Chore: (deps): Bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 (#6077)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](08e2f20817...5f1fec7010)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 09:50:24 +08:00
dependabot[bot]
25e4d6278e Chore: (deps): Bump zeebe-io/backport-action from 1.2.0 to 1.3.0 (#6078)
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](a759fd2d7d...b9f8a0a03e)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 09:50:08 +08:00
dependabot[bot]
5bbae04963 Chore: (deps): Bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3 (#6084)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 09:49:54 +08:00
dependabot[bot]
85213e656d Chore: (deps): Bump thehanimo/pr-title-checker from 1.3.7 to 1.4.0 (#6079)
Bumps [thehanimo/pr-title-checker](https://github.com/thehanimo/pr-title-checker) from 1.3.7 to 1.4.0.
- [Release notes](https://github.com/thehanimo/pr-title-checker/releases)
- [Commits](https://github.com/thehanimo/pr-title-checker/compare/v1.3.7...v1.4.0)

---
updated-dependencies:
- dependency-name: thehanimo/pr-title-checker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 17:48:02 +08:00
dependabot[bot]
c07033092e Chore: (deps): Bump github.com/cloudtty/cloudtty from 0.5.2 to 0.5.3 (#6083)
Bumps [github.com/cloudtty/cloudtty](https://github.com/cloudtty/cloudtty) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/cloudtty/cloudtty/releases)
- [Commits](https://github.com/cloudtty/cloudtty/compare/v0.5.2...v0.5.3)

---
updated-dependencies:
- dependency-name: github.com/cloudtty/cloudtty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-05 17:47:41 +08:00
Somefive
8e6bed2340 Fix: application gc not blocked by apprev gc (#6074)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-05 11:04:23 +08:00
Somefive
f15eba2c5f Chore: remove legacy rollout and scope (#6068)
* Chore: remove legacy rollout & scope

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* remove outdated params

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-05 10:57:38 +08:00
qiaozp
057e640ce2 Chore: remove migrated swagger json (#6075)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-06-05 10:08:42 +08:00
Susheel Pal
715ec0cbe2 Fix: typo (#6069)
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-06-05 09:35:28 +08:00
Somefive
7a8264ddf3 Fix: issue command permission error (#6071) 2023-06-03 08:53:41 +08:00
Somefive
eb4b1a8161 Fix: vela def vet can be used without Kubernetes (#6063) 2023-06-01 14:15:45 +08:00
Somefive
1a6dafafde Feat: support custom cascading gc policy (#6059) 2023-06-01 10:12:10 +08:00
Paul Sweeney
e215b18a3e Feat: Fix ingress service name for multiple gateway traits (#6067)
Signed-off-by: Paul Sweeney <psweeney@travelrepublic.co.uk>
2023-06-01 09:48:29 +08:00
Somefive
dd899c2b39 Chore: remove outdated apis(v1alppha2 ApplicationConfiguration Component, and HealthScope, Rollout) (#6041)
* remove outdated api

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix rt test: no component rt

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* recover context.revision to component hash

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-06-01 09:32:49 +08:00
yyzxw
d6788f12dd feature: parallel init cluster info (#6060)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-31 19:31:08 +08:00
qiaozp
c039328682 Fix: component-pod-view not showing podIP, hostIP, nodeName (#6058)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-31 14:36:46 +08:00
Somefive
af7922d87c Chore: remove oss upload in CI (#6051) 2023-05-31 14:14:05 +08:00
Somefive
04cd510ddc Chore: use package function to replace parallel function (#6052) 2023-05-31 14:01:30 +08:00
yyzxw
1c0f2c4c7d feature: expose probe params in helm chart (#6044)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-31 09:46:22 +08:00
Somefive
ff881f930c Fix: ignore kind not match err for vela def (#6053)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-30 17:03:41 +08:00
Somefive
057441bc76 Chore: set CLI verbose output to be hidden by default (#6016)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-30 14:53:41 +08:00
dependabot[bot]
d3b1006935 Chore: (deps): Bump github.com/onsi/gomega from 1.27.6 to 1.27.7 (#6048)
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.27.6 to 1.27.7.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.27.6...v1.27.7)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 10:57:30 +08:00
dependabot[bot]
8818f5485b Chore: (deps): Bump github.com/imdario/mergo from 0.3.15 to 0.3.16 (#6046)
Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo) from 0.3.15 to 0.3.16.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/v0.3.15...v0.3.16)

---
updated-dependencies:
- dependency-name: github.com/imdario/mergo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-30 09:52:51 +08:00
dependabot[bot]
159bb73b8f Chore: (deps): Bump gomodules.xyz/jsonpatch/v2 from 2.2.0 to 2.3.0 (#6050)
Bumps [gomodules.xyz/jsonpatch/v2](https://github.com/gomodules/jsonpatch) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/gomodules/jsonpatch/releases)
- [Changelog](https://github.com/gomodules/jsonpatch/blob/release-2.0/CHANGELOG.md)
- [Commits](https://github.com/gomodules/jsonpatch/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: gomodules.xyz/jsonpatch/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 21:25:28 +08:00
Somefive
268400e163 Feat: support applicator applying resources and update status (#6030)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-29 17:57:34 +08:00
dependabot[bot]
a1f57e4a90 Chore: (deps): Bump github.com/openkruise/rollouts (#6047)
Bumps [github.com/openkruise/rollouts](https://github.com/openkruise/rollouts) from 0.1.1-0.20220622054609-149e5a48da5e to 0.3.0.
- [Release notes](https://github.com/openkruise/rollouts/releases)
- [Changelog](https://github.com/openkruise/rollouts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/openkruise/rollouts/commits/v0.3.0)



---
updated-dependencies:
- dependency-name: github.com/openkruise/rollouts
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 17:53:17 +08:00
dependabot[bot]
9d214c49f2 Chore: (deps): Bump github.com/stretchr/testify from 1.8.2 to 1.8.3 (#6049)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-29 17:52:35 +08:00
yyzxw
99ad780261 chore: add controller ut (#6043)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-29 11:55:06 +08:00
Ahmed Qashlan
a849435db2 Feat(velaql): read max depth for query iterator from env. (#6039)
* Feat(velaql): read max depth for query iterator from env

Signed-off-by: Ahmed Qashlan <ahmedelqashlan@gmail.com>

* Feat(velaql): read max depth for query iterator from env.

Ref #6014

Signed-off-by: Ahmed Qashlan <ahmedelqashlan@gmail.com>

---------

Signed-off-by: Ahmed Qashlan <ahmedelqashlan@gmail.com>
2023-05-29 10:49:46 +08:00
Somefive
5ccec581e6 Chore: remove acr in ci (#6040)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-26 15:41:19 +08:00
Somefive
2298dd73dc Feat: revert ci to kind (#6035)
* Feat: revert ci to kind

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* feat: use internal runner

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix test bug

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 17:49:44 +08:00
Somefive
ef4bb07fb3 Chore: remove dm (#6036)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 13:54:35 +08:00
Somefive
4d81ba8909 Feat: support force resource location with dispatch (#6033)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-25 10:18:50 +08:00
Somefive
0df7803022 Feat: add validation for invalid definition attribute (#6029)
* Feat: add validation for invalid definition attribute

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix flaky test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-24 16:40:42 +08:00
Somefive
e109d4e525 Chore: upgrade kubebuilder installation in unit-test ci (#6018)
* Chore: upgrade kubebuilder installation in unit-test ci

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* upgrade ingress in kuebuilder test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-23 14:46:22 +08:00
Somefive
868cd32012 Chore: auto prune ci network after test (#6028)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-23 14:45:55 +08:00
dependabot[bot]
9246929a1f Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.6.2 to 0.7.0 (#6020)
* Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.6.2 to 0.7.0

Bumps [sigs.k8s.io/gateway-api](https://github.com/kubernetes-sigs/gateway-api) from 0.6.2 to 0.7.0.
- [Release notes](https://github.com/kubernetes-sigs/gateway-api/releases)
- [Changelog](https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kubernetes-sigs/gateway-api/compare/v0.6.2...v0.7.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/gateway-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Chore: upgrade CRD yaml

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-05-23 14:43:41 +08:00
dependabot[bot]
f080f80779 Chore: (deps): Bump github.com/nacos-group/nacos-sdk-go/v2 (#6019)
Bumps [github.com/nacos-group/nacos-sdk-go/v2](https://github.com/nacos-group/nacos-sdk-go) from 2.1.0 to 2.2.2.
- [Release notes](https://github.com/nacos-group/nacos-sdk-go/releases)
- [Commits](https://github.com/nacos-group/nacos-sdk-go/compare/v2.1.0...v2.2.2)



---
updated-dependencies:
- dependency-name: github.com/nacos-group/nacos-sdk-go/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 11:13:09 +08:00
dependabot[bot]
7b132d62b5 Chore: (deps): Bump golang.org/x/crypto from 0.6.0 to 0.9.0 (#6021)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.6.0 to 0.9.0.
- [Commits](https://github.com/golang/crypto/compare/v0.6.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 11:10:49 +08:00
Somefive
c66a63909e Feat: support remote cluster client to allow user use CRD resource in managed cluster without installing CRD to hub cluster (#6008)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-23 10:15:20 +08:00
dependabot[bot]
2c341db8c0 Chore: (deps): Bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2 (#6022)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.2.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:41:19 +08:00
dependabot[bot]
da662a2f93 Chore: (deps): Bump actions/setup-go from 4.0.0 to 4.0.1 (#6023)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](4d34df0c23...fac708d667)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:41:05 +08:00
dependabot[bot]
af606be896 Chore: (deps): Bump codecov/codecov-action from 3.1.3 to 3.1.4 (#6024)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](894ff025c7...eaaf4bedf3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-23 09:40:51 +08:00
yyzxw
3cb0f7b330 refactor: parse trait & scope (#6017)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-22 19:21:01 +08:00
dependabot[bot]
338703baf5 Chore: (deps): Bump github.com/containerd/containerd from 1.7.0 to 1.7.1 (#6025)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 19:09:27 +08:00
caiqi1111
3a933780de Fix: add cluster information for vela adopt help (#6015)
Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-05-22 16:32:33 +08:00
yyzxw
dc52498b1d refactor: enhanced code readability (#6012)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-21 15:19:06 +08:00
Somefive
aa36edbc3a Fix: ci tool version (#6011) 2023-05-19 15:56:44 +08:00
iyear
ff79438c8f Feat: add gen-cue to Makefile (#6009)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-05-19 14:44:10 +08:00
yyzxw
933d85c735 chore: add flags test (#6007)
Signed-off-by: yyzxw <1020938856@qq.com>
Signed-off-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
Co-authored-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
2023-05-18 17:48:05 +08:00
Somefive
1b9bdffd06 fix multicluster adopt (#5988)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-18 10:44:25 +08:00
iyear
f3f2af81b4 Refactor: transparent and extensible cuegen decl (#6006)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-05-18 10:00:49 +08:00
Somefive
c4bd532523 Fix: ci docker install (#6005)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-17 19:59:59 +08:00
Dhanu Saputra
208a4aed2d Feat: application_controller should be responsible for deleting application revision (#5739)
* [Feature] application_controller should be responsible for deleting application revision

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* test

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: fix reviews, add tests

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: rebase master

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: make func private

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision clean

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: fix staticcheck

Signed-off-by: dhanu <andreasdhanu@gmail.com>

* delete-app-revision: fix review

Signed-off-by: dhanu <andreasdhanu@gmail.com>

---------

Signed-off-by: dhanu <andreasdhanu@gmail.com>
2023-05-17 17:41:01 +08:00
Somefive
530d7c5bd6 Feat: support resource update policy (#6003) 2023-05-17 16:11:06 +08:00
zhaohuiweixiao
eaa7f5821e Fix: list addon commond displays only the first 20 entries when addon registry is gitlab type (#5999)
* Fix: list addon commond displays only the first 20 entries when addon registry is gitlab type

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: add tips for registry addon command

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: modify the addon registry command tip

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-05-17 15:32:14 +08:00
Somefive
34d6898fac Fix: cleanup ci for minimal chart (#6004) 2023-05-17 09:47:42 +08:00
Somefive
da8588c887 Feat: support customizing application revision limit number in policy (#5995)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-16 16:12:37 +08:00
yyzxw
1af82cd282 cleanup: remove unused code and fix typo (#5986)
Signed-off-by: yyzxw <1020938856@qq.com>
Signed-off-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
Co-authored-by: xiaowu.zhu <xiaowu.zhu@daocloud.io>
2023-05-16 12:37:00 +08:00
Somefive
e0d106024b Feat: remove vela install version requirement upper bound (#5996)
* Feat: relax vela install requirement upper bound

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: typo

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-16 11:57:40 +08:00
Dani
fb539048fb CUE line spaces and typo (#5997)
Signed-off-by: André Gomes <andre3000pt@gmail.com>
2023-05-16 10:50:31 +08:00
dependabot[bot]
454887e450 Chore: (deps): Bump golang.org/x/sync from 0.1.0 to 0.2.0 (#5993)
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.1.0 to 0.2.0.
- [Commits](https://github.com/golang/sync/compare/v0.1.0...v0.2.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 18:51:03 +08:00
dependabot[bot]
e500c7992e Chore: (deps): Bump github.com/google/go-containerregistry (#5991)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.14.0 to 0.15.1.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.14.0...v0.15.1)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 17:42:17 +08:00
dependabot[bot]
f66bd51391 Chore: (deps): Bump github.com/alibabacloud-go/cs-20151215/v3 (#5990)
Bumps [github.com/alibabacloud-go/cs-20151215/v3](https://github.com/alibabacloud-go/cs-20151215) from 3.0.32 to 3.0.35.
- [Release notes](https://github.com/alibabacloud-go/cs-20151215/releases)
- [Changelog](https://github.com/alibabacloud-go/cs-20151215/blob/master/ChangeLog.txt)
- [Commits](https://github.com/alibabacloud-go/cs-20151215/compare/v3.0.32...v3.0.35)

---
updated-dependencies:
- dependency-name: github.com/alibabacloud-go/cs-20151215/v3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 17:35:32 +08:00
dependabot[bot]
31a0158d90 Chore: (deps): Bump golang.org/x/oauth2 from 0.7.0 to 0.8.0 (#5992)
Bumps [golang.org/x/oauth2](https://github.com/golang/oauth2) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/oauth2/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/oauth2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-15 17:35:13 +08:00
Dani
7b119e687d Chore: CUE code quality changes (#5987)
* Update topologyspreadconstraints.cue

Update cue comment standard in one file

Signed-off-by: André Gomes <andre3000pt@gmail.com>

* Update expose.cue

Corrected cue format

Signed-off-by: André Gomes <andre3000pt@gmail.com>

* make reviewable ran

Signed-off-by: André Gomes <andre3000pt@gmail.com>

* Update apply-terraform-config.cue

usae -> usage

Signed-off-by: André Gomes <andre3000pt@gmail.com>

* make reviewable ran again

Signed-off-by: André Gomes <andre3000pt@gmail.com>

---------

Signed-off-by: André Gomes <andre3000pt@gmail.com>
2023-05-15 17:18:21 +08:00
Somefive
d59b116d06 Feat: upgrade ginkgo to v2 (#5940)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-15 16:07:51 +08:00
Somefive
643429d474 Chore: update dependabot settings (#5984)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-05-15 09:51:33 +08:00
yyzxw
f6a9d6675d test: add ut (#5985)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-05-15 09:50:50 +08:00
Siege Lion
d19bb89ce7 Fix: fix the typo error in vela top (#5982) 2023-05-12 22:41:41 +08:00
dependabot[bot]
c56820a164 Chore: (deps): Bump github.com/rogpeppe/go-internal from 1.9.0 to 1.10.0 (#5963)
Bumps [github.com/rogpeppe/go-internal](https://github.com/rogpeppe/go-internal) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/rogpeppe/go-internal/releases)
- [Commits](https://github.com/rogpeppe/go-internal/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/rogpeppe/go-internal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-12 14:25:15 +08:00
iyear
e5b9dca03c Feat: support def gen-doc command (#5975)
* Feat: support def gen-doc command

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: ci error

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: typo

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-05-12 14:24:49 +08:00
dependabot[bot]
c8f2c744f8 Chore: (deps): Bump github.com/docker/distribution from 2.8.1+incompatible to 2.8.2+incompatible (#5980)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-12 13:54:31 +08:00
dependabot[bot]
8a71a96bb4 Chore: (deps): Bump github.com/openkruise/kruise-api from 1.3.0 to 1.4.0 (#5964)
Bumps [github.com/openkruise/kruise-api](https://github.com/openkruise/kruise-api) from 1.3.0 to 1.4.0.
- [Commits](https://github.com/openkruise/kruise-api/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/openkruise/kruise-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-12 13:46:50 +08:00
dependabot[bot]
4ff33308d2 Chore: (deps): Bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 (#5979)
Bumps [github.com/cloudflare/circl](https://github.com/cloudflare/circl) from 1.1.0 to 1.3.3.
- [Release notes](https://github.com/cloudflare/circl/releases)
- [Commits](https://github.com/cloudflare/circl/compare/v1.1.0...v1.3.3)

---
updated-dependencies:
- dependency-name: github.com/cloudflare/circl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-12 13:37:40 +08:00
Paul Sweeney
4a1ed788a0 Fix: Restore service creation for gateway trait (#5978) 2023-05-12 13:32:33 +08:00
dependabot[bot]
761c308e6f Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.9.2 to 2.9.4 (#5960) 2023-05-10 06:47:56 +00:00
iyear
01e4dcb667 Feat: only print to stdout (#5958) 2023-05-10 14:17:16 +08:00
Paul Sweeney
6ca20121e2 Feat: Add support for multiple gateway traits (#5860)
Co-authored-by: paul <paul@kolossi.co.uk>
2023-05-10 11:21:39 +08:00
iyear
af0556a52b Feat: provider doc generator (#5968)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-05-10 10:25:35 +08:00
Xinwei Xiong
68743841cd Chore: Give the help information of Makefile to make it more clear (#5638)
* chore(Makefile): Give the help information of Makefile to make it more readable

Signed-off-by: Xinwei Xiong <3293172751nss@gmail.com>

fix: Fixed some spelling mistakes

Signed-off-by: Xinwei Xiong <3293172751nss@gmail.com>

fix: part of the makefile shows a problem

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>

* fix: makefile targer image-cleanup

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>

---------

Signed-off-by: Xinwei Xiong(cubxxw) <3293172751nss@gmail.com>
2023-05-09 18:55:25 +08:00
dependabot[bot]
72560661cc Chore: (deps): Bump golang.org/x/oauth2 from 0.6.0 to 0.7.0 (#5961) 2023-05-08 09:43:18 +00:00
suwliang3
c06c5dd9fd Fix: The addon page displays the deleted addon (#5924)
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
2023-05-08 14:10:12 +08:00
dependabot[bot]
df3a9901e9 Chore: (deps): Bump github.com/spf13/cobra from 1.6.1 to 1.7.0 (#5945) 2023-05-08 02:32:45 +00:00
dependabot[bot]
932b48dc89 Chore: (deps): Bump golang.org/x/term from 0.6.0 to 0.7.0 (#5941)
Bumps [golang.org/x/term](https://github.com/golang/term) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/golang/term/releases)
- [Commits](https://github.com/golang/term/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 21:04:17 +08:00
dependabot[bot]
b54a153b25 Chore: (deps): Bump github.com/cloudtty/cloudtty from 0.2.0 to 0.5.2 (#5942)
Bumps [github.com/cloudtty/cloudtty](https://github.com/cloudtty/cloudtty) from 0.2.0 to 0.5.2.
- [Release notes](https://github.com/cloudtty/cloudtty/releases)
- [Commits](https://github.com/cloudtty/cloudtty/compare/v0.2.0...v0.5.2)

---
updated-dependencies:
- dependency-name: github.com/cloudtty/cloudtty
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 21:04:01 +08:00
dependabot[bot]
944d782d17 Chore: (deps): Bump github.com/fluxcd/helm-controller/api (#5953)
Bumps [github.com/fluxcd/helm-controller/api](https://github.com/fluxcd/helm-controller) from 0.32.1 to 0.32.2.
- [Release notes](https://github.com/fluxcd/helm-controller/releases)
- [Changelog](https://github.com/fluxcd/helm-controller/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fluxcd/helm-controller/compare/v0.32.1...v0.32.2)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/helm-controller/api
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 21:03:38 +08:00
dependabot[bot]
9ffec640f4 Chore: (deps): Bump github.com/prometheus/client_golang (#5954)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 21:03:26 +08:00
zhaohuiweixiao
91e31c1673 Fix: restrict the rules that automatically add topology strategy to addons to be valid only for the yaml type (#5957)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-05-06 21:47:19 +12:00
iyear
e675cdafc4 Feat: add vela def gen-cue command (#5956)
* Feat: add vela def gen-cue command

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: golangci-lint G304 error

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: remove useless stat

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: remove useless log

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: type alias

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-05-05 20:26:13 +09:00
Somefive
e828d3c8cf Feat: allow empty policy name (#5917) 2023-05-04 16:48:43 +08:00
Somefive
0921f43262 Chore: update dependabot settings (#5946) 2023-05-04 16:39:50 +08:00
qiaozp
5cb942c444 Fix: trait not added in Go SDK (#5950)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-05-04 10:20:52 +08:00
dependabot[bot]
258a1abcdd Chore: (deps): Bump github.com/briandowns/spinner from 1.11.1 to 1.23.0 (#5824) 2023-04-28 09:25:14 +00:00
Somefive
5c8a44a066 Chore: upgrade moby dependency to fix security issue (#5937)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-28 16:16:53 +08:00
Somefive
be85b1d579 add retest for pr (#5936)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-28 15:47:26 +08:00
dependabot[bot]
392d2382de Chore: (deps): Bump github.com/google/go-containerregistry (#5927)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.13.0 to 0.14.0.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.13.0...v0.14.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-28 15:16:47 +08:00
dependabot[bot]
bf03d9a016 Chore: (deps): Bump github.com/go-logr/logr from 1.2.3 to 1.2.4 (#5929)
Bumps [github.com/go-logr/logr](https://github.com/go-logr/logr) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/go-logr/logr/releases)
- [Changelog](https://github.com/go-logr/logr/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-logr/logr/compare/v1.2.3...v1.2.4)

---
updated-dependencies:
- dependency-name: github.com/go-logr/logr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-28 15:15:15 +08:00
dependabot[bot]
b3a6b778e7 Chore: (deps): Bump github.com/form3tech-oss/jwt-go (#5930)
Bumps [github.com/form3tech-oss/jwt-go](https://github.com/form3tech-oss/jwt-go) from 3.2.3+incompatible to 3.2.5+incompatible.
- [Release notes](https://github.com/form3tech-oss/jwt-go/releases)
- [Changelog](https://github.com/form3tech-oss/jwt-go/blob/master/VERSION_HISTORY.md)
- [Commits](https://github.com/form3tech-oss/jwt-go/compare/v3.2.3...v3.2.5)

---
updated-dependencies:
- dependency-name: github.com/form3tech-oss/jwt-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-28 15:14:49 +08:00
zhaohuiweixiao
98deab08f5 Fix: install dependency is invalid for runtime addon when it's cluster arg is nil (#5865)
* Fix: install dependency is invalid for runtime addon when it's clusters arg is nil

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: add unit test for getDependencyArgs and checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: Simplified the checkDependencyNeedInstall func logic

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: add comments for checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-04-28 10:16:33 +08:00
Somefive
d6541d0c4f Chore: add e2e ci env bootstrap & remove multlcluster legacy rollout ci (#5926)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-27 13:55:19 +08:00
Somefive
fb79ee433c Chore: refactor vela cli entrance (#5909)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-27 10:02:47 +08:00
Somefive
9def4087df Fix: multicluster disable installation (#5922)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-26 13:58:47 +08:00
Somefive
b9fa400cd0 Chore: update code owners (#5923)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-26 11:31:34 +08:00
dependabot[bot]
479221f49f Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.4.3 to 0.6.2 (#5829)
* Chore: (deps): Bump sigs.k8s.io/gateway-api from 0.4.3 to 0.6.2

Bumps [sigs.k8s.io/gateway-api](https://github.com/kubernetes-sigs/gateway-api) from 0.4.3 to 0.6.2.
- [Release notes](https://github.com/kubernetes-sigs/gateway-api/releases)
- [Changelog](https://github.com/kubernetes-sigs/gateway-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kubernetes-sigs/gateway-api/compare/v0.4.3...v0.6.2)

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---
updated-dependencies:
- dependency-name: sigs.k8s.io/gateway-api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix gateway related api

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2023-04-26 10:48:17 +08:00
dependabot[bot]
5df0aa055c Chore: (deps): Bump github.com/imdario/mergo from 0.3.13 to 0.3.15 (#5919)
Bumps [github.com/imdario/mergo](https://github.com/imdario/mergo) from 0.3.13 to 0.3.15.
- [Release notes](https://github.com/imdario/mergo/releases)
- [Commits](https://github.com/imdario/mergo/compare/v0.3.13...v0.3.15)

---
updated-dependencies:
- dependency-name: github.com/imdario/mergo
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 21:22:57 +08:00
dependabot[bot]
babf84f75b Chore: (deps): Bump sigs.k8s.io/kind from 0.17.0 to 0.18.0 (#5920)
Bumps [sigs.k8s.io/kind](https://github.com/kubernetes-sigs/kind) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/kubernetes-sigs/kind/releases)
- [Commits](https://github.com/kubernetes-sigs/kind/compare/v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/kind
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-25 21:22:35 +08:00
iyear
5b8c38ad3e Feat: initial provider generator (#5839)
* Feat: initial provider generator

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: distinguish any and ellipsis type

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-25 10:30:23 +08:00
dependabot[bot]
434cd4c2d0 Chore: (deps): Bump github.com/onsi/gomega from 1.27.5 to 1.27.6 (#5912) 2023-04-24 10:48:14 +00:00
dependabot[bot]
e7d57e96e8 Chore: (deps): Bump codecov/codecov-action from 3.1.2 to 3.1.3 (#5910)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](40a12dcee2...894ff025c7)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-24 17:37:20 +08:00
Somefive
bfb673e0c9 Feat: support multi policies (#5811)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 17:02:32 +08:00
Somefive
1c04656834 Fix: upgrade cluster register to support join ocm cluster with k8s 1.24+ (#5907)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 16:47:36 +08:00
dependabot[bot]
6ddb2ec53b Chore: (deps): Bump github.com/containerd/containerd from 1.6.18 to 1.7.0 (#5892) 2023-04-24 07:06:26 +00:00
caiqi1111
b4e499ba37 Fix: support get helm chart values from which index.yaml urls is not … (#5786)
* Fix: support get helm chart values from which index.yaml urls is not completed

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Fix: support get helm chart values from which index.yaml urls is not completed

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Fix: support get helm chart values from which index.yaml urls is uncomplted

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Fix: support get helm chart values from which index.yaml urls is uncompleted

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

---------

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-04-24 10:30:30 +08:00
Somefive
0174e9aa1f Fix: multi cluster inline policy load extra definitions (#5901)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 10:19:25 +08:00
Somefive
f328308d8e Feat: remove unused crd in chart (#5899)
* Feat: remove unused crd in chart

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 09:57:30 +08:00
JohnJan
efb2f1b083 Fix: parse template disable resolve provider functions (#5905)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-24 09:57:16 +08:00
Somefive
1aaab58f15 Feat: upgrade deps (#5900)
* Chore: cherry-pick #5821 #5822

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: upgrade cluster gateway

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: fix config test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-23 17:50:37 +08:00
Somefive
3de9e391ee Feat: vela cuex eval (#5562)
* Feat: vela cuex render

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* feat: CLI command `vela cuex eval <file>`

Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>

* responsive writer

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
Co-authored-by: Zhenghao Lou <rhzx3519@gmail.com>
2023-04-23 10:21:11 +08:00
dependabot[bot]
956eb31f29 Chore: (deps): Bump golang.org/x/text from 0.8.0 to 0.9.0 (#5897)
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.8.0 to 0.9.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21 22:46:16 +08:00
dependabot[bot]
681144319b Chore: (deps): Bump github.com/fatih/color from 1.13.0 to 1.15.0 (#5898)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.15.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-21 22:43:29 +08:00
iyear
9042ed078b Fix: make any as top value in cue (#5893)
* Fix: make any as top value in cue

Signed-off-by: iyear <ljyngup@gmail.com>

* Feat: support different cue special type in type option

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: unit test type option

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-21 16:45:34 +08:00
Somefive
dab1618eef Feat: refactor vela help (#5895)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-21 14:19:36 +08:00
JohnJan
5549619ef9 Feat: support validate properties with CueX (#5894)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-21 10:05:40 +08:00
dependabot[bot]
a427c1e4c2 Chore: (deps): Bump github.com/oam-dev/cluster-gateway (#5891)
Bumps [github.com/oam-dev/cluster-gateway](https://github.com/oam-dev/cluster-gateway) from 1.9.0-alpha.1.0.20230412030221-d9666385607f to 1.9.0-alpha.2.
- [Release notes](https://github.com/oam-dev/cluster-gateway/releases)
- [Commits](https://github.com/oam-dev/cluster-gateway/commits/v1.9.0-alpha.2)

---
updated-dependencies:
- dependency-name: github.com/oam-dev/cluster-gateway
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-20 17:57:11 +08:00
Somefive
106b7b3670 Feat: support mark stage in gc when workflow failed (#5882)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-20 14:05:45 +08:00
dependabot[bot]
351cb83f15 Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.80.0 to 0.83.0 (#5884)
Bumps [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) from 0.80.0 to 0.83.0.
- [Release notes](https://github.com/xanzy/go-gitlab/releases)
- [Changelog](https://github.com/xanzy/go-gitlab/blob/master/releases_test.go)
- [Commits](https://github.com/xanzy/go-gitlab/compare/v0.80.0...v0.83.0)

---
updated-dependencies:
- dependency-name: github.com/xanzy/go-gitlab
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 17:45:46 +08:00
JohnJan
3d9b1b68af Feat: support parse template depends on CueX (#5848)
* Feat: support parse template depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support parse template depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-19 17:40:56 +08:00
Somefive
feb819920e Feat: support connecting cluster via proxy url (#5875)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-19 11:12:02 +08:00
Somefive
859702900f Fix: upgrade dependencies (#5827)
* Fix: upgrade base

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* upgrade gateway api

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: (deps): Bump codecov/codecov-action from 3.1.1 to 3.1.2

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](d9f34f8cd5...40a12dcee2)

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix: revert gateway api

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add docker hub login for e2e

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-19 09:39:33 +08:00
Somefive
d1a37eb2d0 Test: pend multicluster rollout test (#5873)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-18 19:03:13 +08:00
Tianxin Dong
657fcc6c64 Fix: fix terminate suspending steps (#5872)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-18 16:57:30 +08:00
Tianxin Dong
0e77b2bcc3 Chore: update cue to v0.5.0 (#5869)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-18 16:14:45 +08:00
dependabot[bot]
95cc5f1c26 Chore: (deps): Bump actions/checkout from 3.4.0 to 3.5.2 (#5866)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.4.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](24cb908017...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-18 15:33:21 +08:00
Somefive
61dd692819 Chore: refactor e2e test (#5871)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-18 14:39:09 +08:00
dependabot[bot]
13eb7876f3 Chore: (deps): Bump github.com/dave/jennifer from 1.6.0 to 1.6.1 (#5847)
Bumps [github.com/dave/jennifer](https://github.com/dave/jennifer) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/dave/jennifer/releases)
- [Commits](https://github.com/dave/jennifer/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/dave/jennifer
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 16:32:55 +08:00
wyike
2821682c60 fix bug if addon parameter is Empty (#5856)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-14 17:45:09 +08:00
Jianbo Sun
863da991bc Feat: add new fields for addon metadata (#5845)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-14 17:16:38 +08:00
Basuotian
7b2e294a88 fix typo of clean-jobs example doc (#5855)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-04-14 11:32:28 +08:00
Jianbo Sun
08a773341d Fix: refine the erorr output format (#5843)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-13 15:59:34 +08:00
Tianxin Dong
fea7ae5935 Fix: fix the operate order in suspend & resume (#5841)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-13 11:29:22 +08:00
dependabot[bot]
4a08caf81e Chore: (deps): Bump k8s.io/klog/v2 from 2.90.0 to 2.90.1 (#5830)
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.90.0 to 2.90.1.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.90.0...v2.90.1)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-13 10:58:37 +08:00
Somefive
792f33d471 Feat: migrate prism cluster (#5836)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-12 20:25:24 +08:00
JohnJan
c007ad8df0 Feat: support config validation depends on CueX (#5796)
* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support config validation depends on CueX

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-04-12 13:58:12 +08:00
Tianxin Dong
05ac3eaeb7 Fix: fix multi clusters bottom in vela adopt (#5834)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-12 11:52:03 +08:00
Jianbo Sun
39e33c1260 Chore: update pr template and test github copilot (#5833)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-04-12 10:50:51 +08:00
iyear
167720f2e5 Chore: expose functions and refactor conversion style (#5828)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-11 22:50:01 +08:00
iyear
6397f973d2 Chore: add special field name test case (#5826)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-11 13:04:45 +08:00
dependabot[bot]
abb2732ce5 Chore: (deps): Bump github.com/chartmuseum/helm-push (#5724)
Bumps [github.com/chartmuseum/helm-push](https://github.com/chartmuseum/helm-push) from 0.10.2 to 0.10.3.
- [Release notes](https://github.com/chartmuseum/helm-push/releases)
- [Changelog](https://github.com/chartmuseum/helm-push/blob/main/.goreleaser.yml)
- [Commits](https://github.com/chartmuseum/helm-push/compare/v0.10.2...v0.10.3)

---
updated-dependencies:
- dependency-name: github.com/chartmuseum/helm-push
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 10:11:41 +08:00
dependabot[bot]
ab156efbb5 Chore: (deps): Bump github.com/fluxcd/helm-controller/api (#5798)
Bumps [github.com/fluxcd/helm-controller/api](https://github.com/fluxcd/helm-controller) from 0.21.0 to 0.32.1.
- [Release notes](https://github.com/fluxcd/helm-controller/releases)
- [Changelog](https://github.com/fluxcd/helm-controller/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fluxcd/helm-controller/compare/v0.21.0...v0.32.1)

---
updated-dependencies:
- dependency-name: github.com/fluxcd/helm-controller/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-11 10:08:21 +08:00
Somefive
bfa5f4c641 Feat: upgrade pkg & workflow (#5819)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-11 09:59:58 +08:00
Somefive
57dd6d105f Chore: update codeowners (#5818)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-10 13:59:32 +08:00
Somefive
d8af202242 Feat: upgrade k8s.io to 0.26 (#5758)
* Feat: upgrade k8s.io to 0.26

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: replace temp replace

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-10 11:19:05 +08:00
qiaozp
5ef0798d89 Chore: bump testing to Kubernetes v1.26 (#5816)
* Chore: bump testing to Kubernetes v1.25

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix condition in e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Bump e2e-multicluster-test to v1.25

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Bump e2e-rollout-test and rebase

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: EndpointSlice v1beta1 is depracated

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix vela ql test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove comment

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Bump all e2e test environment to v1.26

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-07 17:28:51 +08:00
zhaohuiweixiao
76dc154e92 Refactor: the addon dependency installation logic is accurate to the cluster (#5206)
* Refactor: the addon dependency installation logic is accurate to the cluster

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Fix: optimize the code based on the review

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Feat: add unit test for func checkDependencyNeedInstall

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-04-07 17:15:44 +08:00
Mcduller
eba40ab20d Feat: support vela def vet the input "dir" and many cue files (#5806)
* Feat: support vela def vet the input "dir" and many cue files

Signed-off-by: Mcduller <1596582524@qq.com>

* Feat: support vela def vet the input "dir" and many cue files

Signed-off-by: Mcduller <1596582524@qq.com>

---------

Signed-off-by: Mcduller <1596582524@qq.com>
2023-04-07 14:12:37 +08:00
朱晓兵
3ae9381d6c Feat: compatible with k8s last-applied-configuration while perfer app.oam.dev/last-applied-configuration in annotations (#5804)
* Fix: when taking over an existing resource for the first time, use kubectl last apply anno

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: '-' || 'skip' return nil

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: check-diff

Signed-off-by: zxbyoyoyo <596908030@qq.com>

---------

Signed-off-by: zxbyoyoyo <596908030@qq.com>
2023-04-07 11:05:42 +08:00
Tianxin Dong
c128c71e29 Fix: use step id to filter the log data and fix the regex (#5809)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-07 10:39:23 +08:00
iyear
2bd593855b Fix: can't reuse modified ref options (#5795)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-06 20:02:49 +08:00
Tianxin Dong
3c2d47be6e Fix: fix step id to name in workflow logs (#5805)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-04-06 14:56:22 +08:00
qiaozp
c24cbdc6f9 Feat: compatibility on componentDefinition spec.workload.definition field (#5800)
* Feat: compatibility on componentDefinition spec.workload.definition field

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove hack fallback

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-04-06 11:48:26 +08:00
dependabot[bot]
0a368ec856 Chore: (deps): Bump ossf/scorecard-action from 2.1.2 to 2.1.3 (#5790) 2023-04-06 03:05:09 +00:00
Tianxin Dong
7ea237d580 Feat: add mode in steps for step group (#5799) 2023-04-06 10:52:48 +08:00
iyear
06eb414f1e Feat: add type filter option (#5789)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-04-04 09:56:54 +08:00
wyike
52b1f20e5f Fix: filter rollout created by rolling-release in vela workflow resume (#5783)
* filter rollout created by rolling-release

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* use annotation instead trait type

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* use annotations instead of triat type

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* lint go import

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-04-03 15:28:46 +08:00
Somefive
d8f92e0b44 Feat: vela cluster join support overwrite (#5784)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-03 10:12:44 +08:00
zhaohuiweixiao
1a04121894 Feat: list addon with specify registry (#5780) 2023-03-31 17:47:41 +08:00
Jianbo Sun
6e4460e3fb Feat: expose trait with new ports (#5781)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-03-31 15:56:18 +08:00
Zhenghao Lou
784106cdf3 Fix: component name generated by vela adopt is not in lowecase (#5775)
CUE: fix the adopt-templates/default.cue

closes #5771

Signed-off-by: Zhenghao Lou <rhzx3519@gmail.com>
2023-03-30 13:58:32 +08:00
wyike
bb34012c3a Feat: add check prometheus metrics workflowStepDefinition (#5768)
* add metrics

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add check metrics

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add check-metrics definition example

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

rename example

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add default metrics

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-03-30 11:11:25 +08:00
iyear
d5ecb7b870 Refactor: split Generate function (#5763)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-29 17:56:41 +08:00
Tianxin Dong
d4576db82d Chore: stable the version of workflow to 0.5.0 for 1.8 release (#5759)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-29 11:49:01 +08:00
Somefive
542b32bcf4 Chore: fix definition parse logic and allow if/for comprehension & use op.#Suspend for deploy (#5743)
* Chore: fix definition parse logic and allow if/for comprehension & use op.#Suspend for deploy

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: flaky mc test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: flaky mc test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-28 15:35:15 +08:00
howieyuen
8619f1c413 Fix: vela top cannot switch the theme (#5745)
Signed-off-by: howieyuen <howieyuen@outlook.com>
2023-03-28 13:50:00 +08:00
dependabot[bot]
d06d3bee79 Chore: (deps): Bump rajatjindal/krew-release-bot from 0.0.43 to 0.0.46 (#5747)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 09:30:57 +08:00
qiaozp
2e109dd77b Fix: gateway message is wrong (#5748)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-27 22:25:09 +08:00
Basuotian
1afdb09964 vela adopt support multi-cluster adoption (#5635)
Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-03-27 15:28:44 +08:00
Somefive
b71efddfc8 Feat: fix flacky test (#5741)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-27 13:52:48 +08:00
Somefive
9dc0db4cfc Feat: add qps for load test client (#5733)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 18:04:18 +08:00
iyear
de790e6fae Feat: support nullable option (#5736)
Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-24 16:24:05 +08:00
Somefive
e70d2a1021 Feat: enhance vela adopt and refactor (#5728)
* Feat: enhance vela adopt and refactor

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: flaky mc test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 16:23:01 +08:00
Somefive
5790e57423 Feat: remove comp name dup check (#5727) 2023-03-24 15:21:58 +08:00
Somefive
4aa14fc337 Feat: support pause reconcile (#5732)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-24 13:19:44 +08:00
iyear
d694dff4de Refactor: option pattern (#5720)
* Refactor: option pattern

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: nil check and add tests

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-24 12:06:34 +08:00
qiaozp
6b4da4fa45 Feat: add sub-module to Golang SDK (#5655)
* wait to deal with go.mod

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* seperate def and module modifier

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix module import

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* refine code

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove the pointer reference in loop

generalize the language-specific argument parsing

amend tests

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove focused test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* update command usage

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-24 11:28:56 +08:00
S Code Man
fe279cf20d Fix: fix vela-minimal helm chart unrecognised options (#5721)
* fix(vela-minimal): fix unrecognised options

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>

* Fix(vela-minimal): make reviewable

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>

---------

Signed-off-by: florent.madiot.e <florent.madiot.e@thalesdigital.io>
2023-03-24 11:28:35 +08:00
Somefive
80da131171 Feat: upgrade helm values (#5722)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-23 18:40:06 +08:00
dependabot[bot]
332c7e42a7 Chore: (deps): Bump github.com/go-git/go-git/v5 from 5.5.1 to 5.6.1 (#5715)
Bumps [github.com/go-git/go-git/v5](https://github.com/go-git/go-git) from 5.5.1 to 5.6.1.
- [Release notes](https://github.com/go-git/go-git/releases)
- [Commits](https://github.com/go-git/go-git/compare/v5.5.1...v5.6.1)

---
updated-dependencies:
- dependency-name: github.com/go-git/go-git/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 13:03:14 +08:00
dependabot[bot]
7f1def40ad Chore: (deps): Bump github.com/xlab/treeprint from 1.1.0 to 1.2.0 (#5667)
Bumps [github.com/xlab/treeprint](https://github.com/xlab/treeprint) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/xlab/treeprint/releases)
- [Commits](https://github.com/xlab/treeprint/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: github.com/xlab/treeprint
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-22 13:02:38 +08:00
iyear
6976b2ba0c Feat: CUE generator with type conversion (#5585)
* Feat: CUE generator with type conversion

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: golangci-lint error

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: add licenses

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: go mod tidy

Signed-off-by: iyear <ljyngup@gmail.com>

* Tests: add util unit tests

Signed-off-by: iyear <ljyngup@gmail.com>

* Tests: add registry unit tests

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: add util_test.go header license

Signed-off-by: iyear <ljyngup@gmail.com>

* Tests: add tag unit tests

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: small bugs

Signed-off-by: iyear <ljyngup@gmail.com>

* Tests: add testdata

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: add licenses to testdata go files

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: modify according to FogDong

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: remove ident '_' addition

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: add tests and refactor files

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: remove useless escape test and ident placeholder

Signed-off-by: iyear <ljyngup@gmail.com>

* Chore: add more escape tests

Signed-off-by: iyear <ljyngup@gmail.com>

* Fix: index out of range and add edge case tests

Signed-off-by: iyear <ljyngup@gmail.com>

* Feat: support escaping separators ';' ':' ','

Signed-off-by: iyear <ljyngup@gmail.com>

---------

Signed-off-by: iyear <ljyngup@gmail.com>
2023-03-21 15:24:29 +08:00
xingming01
4d714ed2c2 Fix: Optimize the webhook log format (#5652)
Co-authored-by: caoxingming <caoxingming@jd.com>
2023-03-21 11:38:57 +08:00
dependabot[bot]
2f6ea93272 Chore: (deps): Bump golang.org/x/oauth2 from 0.3.0 to 0.6.0 (#5693)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-21 11:33:16 +08:00
dependabot[bot]
586f0f26c1 Chore: (deps): Bump actions/setup-go from 3.5.0 to 4.0.0 (#5706) 2023-03-21 03:29:46 +00:00
dependabot[bot]
7b47fdc046 Chore: (deps): Bump actions/checkout from 3.3.0 to 3.4.0 (#5708) 2023-03-21 02:41:55 +00:00
Tianxin Dong
971f6ffe4c Fix: use logs to show errs intead of return in adopt all (#5705)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-21 10:41:05 +08:00
Somefive
377753d1b1 Fix: system crd validation hook should not always use the default vela system (#5709)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-21 10:16:40 +08:00
dependabot[bot]
e961f8da88 Chore: (deps): Bump github.com/spf13/cobra from 1.6.0 to 1.6.1 (#5694) 2023-03-20 02:21:38 +00:00
dependabot[bot]
3acfecc9e4 Chore: (deps): Bump golang.org/x/text from 0.7.0 to 0.8.0 (#5692) 2023-03-20 02:20:49 +00:00
Somefive
50458bc455 Feat: memory optimization via enhance informer cache (#5683) 2023-03-20 10:19:21 +08:00
Tianxin Dong
b28b165048 Chore: update workflow version to fix depends on skip (#5698)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-17 17:14:33 +08:00
Tianxin Dong
59fc019243 Feat: add adopt all command (#5690)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-17 14:46:06 +08:00
dependabot[bot]
fa8899088c Chore: (deps): Bump github.com/alibabacloud-go/tea from 1.1.19 to 1.1.20 (#5681)
Bumps [github.com/alibabacloud-go/tea](https://github.com/alibabacloud-go/tea) from 1.1.19 to 1.1.20.
- [Release notes](https://github.com/alibabacloud-go/tea/releases)
- [Commits](https://github.com/alibabacloud-go/tea/compare/v1.1.19...v1.1.20)

---
updated-dependencies:
- dependency-name: github.com/alibabacloud-go/tea
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-17 13:38:52 +08:00
Somefive
b4ef7e915f Feat: add load testing app template (#5526)
* Feat: add load testing apptemplate

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: update region template

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: use configmap instead of secret and add cleanup script

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* enhance readme

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-16 18:57:04 +08:00
Somefive
0bff849689 Feat: change the cluster-gateway connect mode to direct and deprecate envbinding CRD (#5631)
* Feat: upgrade helm chart values

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* fix authentication issue

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-16 17:17:45 +08:00
dependabot[bot]
942e88cd29 Chore: (deps): Bump github.com/prometheus/client_golang (#5668)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 10:16:30 +08:00
dependabot[bot]
23383841db Chore: (deps): Bump actions/cache from 3.2.6 to 3.3.1 (#5663)
Bumps [actions/cache](https://github.com/actions/cache) from 3.2.6 to 3.3.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](69d9d449ac...88522ab9f3)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-16 10:14:16 +08:00
StevenLeiZhang
801c630c61 Fix: sample yaml of Trait storage does not work (#5679)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-03-16 10:00:30 +08:00
StevenLeiZhang
91bcedbf24 Fix: parameter type is conflict with Component webserice and Trait re… (#5579) 2023-03-15 20:36:00 +08:00
qiaozp
3ce7517b6b Feat: set right default value for oneOf schema if set (#5677) 2023-03-15 14:08:53 +08:00
dependabot[bot]
87f2a43bee Chore: (deps): Bump github.com/stretchr/testify from 1.8.1 to 1.8.2 (#5666) 2023-03-15 03:06:15 +00:00
msun1996
ad23240e4e Fix: The resource topology fails to display the pods under the cronjob (#5640) (#5642)
Signed-off-by: hanzhaoyang <hanzhaoyang@jd.com>
Co-authored-by: hanzhaoyang <hanzhaoyang@jd.com>
2023-03-14 18:41:56 +08:00
Somefive
0ae82d8034 Fix: mc flaky e2e test (#5661)
* Fix: mc flaky e2e test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add time for workflow rollback

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: load-test flaky

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-13 16:53:00 +08:00
qiaozp
e8b92a5d02 fix CVE-2023-27483 (#5657)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-03-13 16:15:54 +08:00
dependabot[bot]
c08cffbc4c Chore: (deps): Bump zeebe-io/backport-action from 1.1.0 to 1.2.0 (#5622) 2023-03-13 08:01:13 +00:00
dependabot[bot]
4f24f13fd7 Chore: (deps): Bump github.com/hashicorp/hcl/v2 from 2.12.0 to 2.16.2 (#5649) 2023-03-13 07:21:25 +00:00
dependabot[bot]
1159eef264 Chore: (deps): Bump github.com/emicklei/go-restful/v3 (#5650) 2023-03-13 07:21:07 +00:00
Somefive
d41c3ec0e7 Fix: cve-2022-4203 (#5658)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-13 15:07:48 +08:00
suwliang3
54311b9d06 Fix: add addon registry (#5646)
* Fix: add addon registry

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Fix: modify edit errors

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-03-13 14:12:32 +08:00
barnettZQG
50622ababc Chore: move the API server to the VelaUX repository (#5636)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-13 13:53:35 +08:00
wyike
a36eb4f2e2 Fix: loading definitions if lack in the revision when calculate dispatch stage of trait. (#5644)
* small fix for dispatch stage

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

revert useless commit

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add test case

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-03-13 11:22:44 +08:00
Somefive
4edb21782f Feat: add feature gate to allow disbale cluster watch at the start of vela-core (#5632)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-13 11:17:15 +08:00
qiaozp
6704e9794a Fix: push tags anyway in new release while syncing api and sdk (#5641) 2023-03-09 14:03:24 +08:00
qiaozp
07a05c419f Feat: sync sdk automatically (#5630) 2023-03-09 10:18:08 +08:00
barnettZQG
79f1d5cb03 Chore: optimize the package dependencies (#5596)
* Chore: optimize the package dependces

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the repetitive context

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the context key

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: Optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-03-07 16:19:37 +08:00
qiaozp
3f53c26bc8 Feat: enhance the SDK, fix generating bugs (#5586) 2023-03-07 15:12:54 +08:00
Tianxin Dong
388056fda0 Fix: stores workflow status in revison if it is restarted (#5604)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-03-07 14:13:56 +08:00
dependabot[bot]
c4fbc38ff4 Chore: (deps): Bump open-cluster-management.io/api from 0.7.0 to 0.10.0 (#5574)
Bumps [open-cluster-management.io/api](https://github.com/open-cluster-management-io/api) from 0.7.0 to 0.10.0.
- [Release notes](https://github.com/open-cluster-management-io/api/releases)
- [Commits](https://github.com/open-cluster-management-io/api/compare/v0.7.0...v0.10.0)

---
updated-dependencies:
- dependency-name: open-cluster-management.io/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 11:50:43 +08:00
Somefive
d60bb6224d Feat: optimize empty patch request (#5600)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-07 11:11:06 +08:00
dependabot[bot]
36128671c1 Chore: (deps): Bump dawidd6/action-homebrew-bump-formula from 3.8.3 to 3.9.0 (#5623)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-07 09:52:11 +08:00
dependabot[bot]
1762f7a294 Chore: (deps): Bump actions/cache from 3.2.5 to 3.2.6 (#5621) 2023-03-06 16:11:54 +00:00
zhaohuiweixiao
6fa0d98547 Fix: render addon application checkDeployClusters invalid (#5555)
* Fix: render addon application checkDeployClusters invalid

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

* Feat: add getClusters test logic

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2023-03-06 19:36:59 +08:00
Somefive
91638eba65 Fix: make read-only object not found error more clear (#5614)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-06 13:18:05 +08:00
Somefive
e7dad3c9be Fix: replication example componentdefinition miss workload field for webhook validation (#5615)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-06 13:17:48 +08:00
dependabot[bot]
ce749dd6bb Chore: (deps): Bump github.com/gdamore/tcell/v2 (#5583)
Bumps [github.com/gdamore/tcell/v2](https://github.com/gdamore/tcell) from 2.4.1-0.20210905002822-f057f0a857a1 to 2.6.0.
- [Release notes](https://github.com/gdamore/tcell/releases)
- [Commits](https://github.com/gdamore/tcell/commits/v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/gdamore/tcell/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 13:04:02 +08:00
Somefive
76a8d13a37 Feat: remove loop reduction & filter unnecessary apprev update (#5598)
* Feat: remove loop reduction

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: filter unnecessary rev update

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add retry for multicluster e2e test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-03 20:05:10 +08:00
caiqi1111
2f7b8b5ba8 Fix: length of name should be less than 32 (#5547)
* Fix: length of name should be less than 32

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

* Fix: length of name should be less than 32

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>

---------

Signed-off-by: caiqi <caiqi_yewu@cmss.chinamobile.com>
2023-03-03 16:35:02 +08:00
Somefive
0d27a412cc Feat: support direct connection mode for cluster gateway (#5595)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-03 10:29:15 +08:00
Somefive
4596aac043 Feat: upgrade cluster-gateway to use v1.8.0-alpha.3 & fix time metrics bug (#5593)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-02 14:49:48 +08:00
dependabot[bot]
5ed67d7bec Chore: (deps): Bump go.mongodb.org/mongo-driver from 1.11.1 to 1.11.2 (#5584) 2023-03-01 07:53:28 +00:00
JohnJan
c640dd24c7 Fix: add test for InterfaceSlice (#5590)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-03-01 15:34:26 +08:00
Somefive
65215c00e4 Feat: refactor prometheus metrics (#5592)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-03-01 14:32:35 +08:00
Siege Lion
0ace2033ba Feat: add more information about resource in vela top's topology view (#5577)
* Feat: add application detail view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add data source

Signed-off-by: HanMengnan <1448189829@qq.com>

---------

Signed-off-by: HanMengnan <1448189829@qq.com>
2023-03-01 13:39:33 +08:00
Tianxin Dong
41844eb461 Feat: add op.#Suspend and suspending phase in step (#5567) 2023-03-01 10:59:31 +08:00
JohnJan
7f54ca96e7 Fix: the array type cannot be converted to interface type (#5578)
* Fix: the array type cannot be converted to interface type

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: the array type cannot be converted to interface type

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: the array type cannot be converted to interface type

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: the array type cannot be converted to interface type

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-03-01 09:42:05 +08:00
Frank Zhao
f454ec34e4 docs: add leaderboard badge (#5581)
Signed-off-by: frank-zsy <syzhao1988@126.com>

Add contribution leaderboard badge to README.
2023-02-28 11:55:48 +08:00
dependabot[bot]
c8d4bfb150 Chore: (deps): Bump github.com/tidwall/gjson from 1.9.3 to 1.14.4 (#5576)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-27 20:30:11 +08:00
Somefive
c0234888a6 Feat: optimize list op (#5572)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-27 19:04:57 +08:00
Somefive
af10f11225 Feat: default enable multi-stage apply (#5530)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-27 17:38:09 +08:00
Siege Lion
c350cc3a23 Feat: Add Request and Limit metrics to vela status --metrics (#5546)
* Feat: Add Request and Limit metrics to vela status --metrics

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix function spec and const variable

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix logic of loading pod metrics

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: optimize  function structure

Signed-off-by: HanMengnan <1448189829@qq.com>

---------

Signed-off-by: HanMengnan <1448189829@qq.com>
2023-02-27 16:31:38 +08:00
msun1996
93a56c84c0 Fix: The resource topology fails to display the pods under the job (#5566) (#5568)
Signed-off-by: hanzhaoyang <hanzhaoyang@jd.com>
Co-authored-by: hanzhaoyang <hanzhaoyang@jd.com>
2023-02-27 16:28:50 +08:00
caiqi1111
1e7edabdab Fix: createTime and LoginTime wrong for login information (#5535) 2023-02-27 10:07:48 +08:00
zhanghw0354
4ad0c7a9c0 Docs: correct the doc of recycle application env api (#5537)
* correct the doc of recycle application env api

Signed-off-by: zhanghw0354 <zhanghaiwen_yewu@cmss.chinamobile.com>

* Feat: SDK generating framework (#5431)

Signed-off-by: zhanghw0354 <zhanghaiwen_yewu@cmss.chinamobile.com>

---------

Signed-off-by: zhanghw0354 <zhanghaiwen_yewu@cmss.chinamobile.com>
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
2023-02-27 10:00:39 +08:00
Echo
f846e25517 Fix: swagger DateType (#5563)
Signed-off-by: yueyongyue <yueyongyue@sina.cn>
2023-02-27 09:48:18 +08:00
dependabot[bot]
0d273b0ccb Chore: (deps): Bump golang.org/x/crypto from 0.4.0 to 0.6.0 (#5527)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.4.0 to 0.6.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/compare/v0.4.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 13:30:05 +08:00
dependabot[bot]
282bb4e977 Chore: (deps): Bump zeebe-io/backport-action from 0.0.9 to 1.1.0 (#5543)
Bumps [zeebe-io/backport-action](https://github.com/zeebe-io/backport-action) from 0.0.9 to 1.1.0.
- [Release notes](https://github.com/zeebe-io/backport-action/releases)
- [Commits](2ee900dc92...5984bcd72f)

---
updated-dependencies:
- dependency-name: zeebe-io/backport-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 13:29:36 +08:00
dependabot[bot]
0927700fcf Chore: (deps): Bump supercharge/mongodb-github-action (#5540)
Bumps [supercharge/mongodb-github-action](https://github.com/supercharge/mongodb-github-action) from 1.8.0 to 1.9.0.
- [Release notes](https://github.com/supercharge/mongodb-github-action/releases)
- [Changelog](https://github.com/supercharge/mongodb-github-action/blob/main/CHANGELOG.md)
- [Commits](538a4d2a10...d26215f71b)

---
updated-dependencies:
- dependency-name: supercharge/mongodb-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 13:29:01 +08:00
dependabot[bot]
597172ad35 Chore: (deps): Bump thehanimo/pr-title-checker from 1.3.5 to 1.3.7 (#5541)
Bumps [thehanimo/pr-title-checker](https://github.com/thehanimo/pr-title-checker) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/thehanimo/pr-title-checker/releases)
- [Commits](https://github.com/thehanimo/pr-title-checker/compare/v1.3.5...v1.3.7)

---
updated-dependencies:
- dependency-name: thehanimo/pr-title-checker
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-25 13:27:57 +08:00
dependabot[bot]
13761891af Chore: (deps): Bump github.com/prometheus/client_model (#5557) 2023-02-24 12:28:19 +00:00
dependabot[bot]
9ecfa55056 Chore: (deps): Bump docker/setup-buildx-action from 2.2.1 to 2.4.1 (#5542)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 17:27:22 +08:00
dependabot[bot]
41cf74e6ae Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.8.0 to 2.8.3 (#5544)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-22 17:25:44 +08:00
Ramesh Krishna
0f6c89b7f9 Feat: update version of terraform-controller to v0.7.10. (#5550) 2023-02-22 10:27:28 +08:00
qiaozp
8ff77c4486 Feat: SDK generating framework (#5431) 2023-02-21 15:54:44 +08:00
StevenLeiZhang
b1fc313519 Fix: vela top can not show Containers and Pod metrics, when the Component is deployed to member cluster (#5534)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-02-20 14:05:47 +08:00
Tianxin Dong
3a8746e07f Feat: support resume a specific suspend step in workflow (#5505)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-02-18 17:04:17 +08:00
dependabot[bot]
a37b865a61 Chore: (deps): Bump github.com/alibabacloud-go/cs-20151215/v3 (#5529) 2023-02-17 12:01:02 +00:00
Somefive
46320e93dc Feat: expose cluster gateway metrics (#5523)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-17 16:01:16 +08:00
dependabot[bot]
a1840d5290 Chore: (deps): Bump github.com/containerd/containerd (#5520) 2023-02-17 03:38:27 +00:00
dependabot[bot]
80d149a8d8 Chore: (deps): Bump github.com/google/go-containerregistry from 0.9.0 to 0.13.0 (#5519)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-17 10:44:24 +08:00
dependabot[bot]
d90cfa5cd2 Chore: (deps): Bump github.com/alibabacloud-go/darabonba-openapi/v2 from 2.0.0 to 2.0.4 (#5518)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 19:03:37 +08:00
suwliang3
e2ab8aad48 Fix: delete the secret of the cluster (#5497)
* Fix: delete the secret of the cluster

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Fix: add test

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Fix: modify error

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Fix: solve check-diff

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Fix: modify test

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-02-16 14:03:47 +08:00
Afzal
39c24cfdb9 Fix: removes default parameter name for terraform provider (#5468)
Co-authored-by: afzalbin64 <afzal442@gmail.com>
Fixes https://github.com/kubevela/kubevela/issues/5427
2023-02-16 13:52:51 +08:00
Somefive
f008411f4a Feat: add load testing script (batch apply applications) (#5506)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-16 13:34:25 +08:00
dependabot[bot]
7d52ceadc8 Chore: (deps): Bump github.com/openkruise/kruise-api from 1.1.0 to 1.3.0 (#5510) 2023-02-16 03:58:29 +00:00
dependabot[bot]
874cd73850 Chore: (deps): Bump github.com/containerd/containerd (#5511)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.12 to 1.6.17.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.12...v1.6.17)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 11:49:37 +08:00
wyike
319b5c2de9 Feat: The vela-apiserver supports displaying chart values stored in the OCI registry (#5458)
* support helm chart values

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

rebase

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

no lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add test and deprecated API

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix url bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix tests panic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* return values.yaml

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix return values

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add multiple valeus yaml in

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add old interface back

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

---------

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-02-15 13:59:25 +08:00
qiaozp
57cd4ceb7e Fix: read-only definition in cue spec (#5498) 2023-02-15 11:35:10 +08:00
dependabot[bot]
03943752de Chore: (deps): Bump github.com/xanzy/go-gitlab from 0.60.0 to 0.80.0 (#5503)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-15 11:25:17 +08:00
Somefive
e209b2835d Feat: support parallelize-state-keep (#5504)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-15 10:00:51 +08:00
dependabot[bot]
5c9e109155 Chore: (deps): Bump sigs.k8s.io/kind from 0.9.0 to 0.17.0 (#5502)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 21:25:58 +08:00
Siege Lion
059f248e2b Feat: add cli command vela metrics to display resource number and resource status (#5479)
* Feat: add command vela metrics

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add printer

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: small fix
Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add cli tips

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: remove metrics command

Signed-off-by: HanMengnan <1448189829@qq.com>

---------

Signed-off-by: HanMengnan <1448189829@qq.com>
2023-02-14 13:51:35 +08:00
qiaozp
48db981db2 Chore: add codeowner (#5496)
* Chore: add codeowner

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* finer-grained permission

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* backup

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-14 13:50:53 +08:00
Somefive
c222862b32 Fix: pprof addr checked before parsed (#5495)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-14 11:33:17 +08:00
dependabot[bot]
30278993d9 Chore: (deps): Bump k8s.io/klog/v2 from 2.70.1 to 2.90.0 (#5466)
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.70.1 to 2.90.0.
- [Release notes](https://github.com/kubernetes/klog/releases)
- [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md)
- [Commits](https://github.com/kubernetes/klog/compare/v2.70.1...v2.90.0)

---
updated-dependencies:
- dependency-name: k8s.io/klog/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 11:27:35 +08:00
dependabot[bot]
345b17a534 Chore: (deps): Bump github.com/fatih/color from 1.13.0 to 1.14.1 (#5453)
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.13.0 to 1.14.1.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.13.0...v1.14.1)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 10:00:08 +08:00
dependabot[bot]
53842dc5c5 Chore: (deps): Bump goreleaser/goreleaser-action from 4.1.1 to 4.2.0 (#5490)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](9754a253a8...f82d6c1c34)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 09:49:31 +08:00
dependabot[bot]
a4dfe30b4c Chore: (deps): Bump github.com/emicklei/go-restful-openapi/v2 (#5440)
Bumps [github.com/emicklei/go-restful-openapi/v2](https://github.com/emicklei/go-restful-openapi) from 2.3.0 to 2.9.1.
- [Release notes](https://github.com/emicklei/go-restful-openapi/releases)
- [Changelog](https://github.com/emicklei/go-restful-openapi/blob/v2/CHANGES.md)
- [Commits](https://github.com/emicklei/go-restful-openapi/compare/v2.3.0...v2.9.1)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful-openapi/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-14 09:48:50 +08:00
dependabot[bot]
7397936edc Chore: (deps): Bump github.com/deckarep/golang-set from 1.7.1 to 1.8.0 (#5454)
Bumps [github.com/deckarep/golang-set](https://github.com/deckarep/golang-set) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/deckarep/golang-set/releases)
- [Commits](https://github.com/deckarep/golang-set/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/deckarep/golang-set
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 19:48:37 +08:00
dependabot[bot]
cb5fa0c122 Chore: (deps): Bump actions/github-script from 6.3.3 to 6.4.0 (#5494)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.3.3 to 6.4.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](d556feaca3...98814c53be)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 19:42:43 +08:00
dependabot[bot]
8946fcf045 Chore: (deps): Bump actions/cache from 3.0.11 to 3.2.5 (#5493)
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.11 to 3.2.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](9b0c1fce7a...6998d139dd)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 19:42:20 +08:00
dependabot[bot]
8992bdf15a Chore: (deps): Bump ossf/scorecard-action from 2.1.0 to 2.1.2 (#5492)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.0 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](937ffa90d7...e38b1902ae)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 19:41:54 +08:00
dependabot[bot]
0f32ed9197 Chore: (deps): Bump actions/checkout from 3.2.0 to 3.3.0 (#5491)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](755da8c3cf...ac59398561)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-13 19:41:37 +08:00
Somefive
930ead942e Fix: recover application watcher when sharding disabled (#5488)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-13 16:57:59 +08:00
qiaozp
22cb57d3e7 Feat: add cloud resource data passing KEP (#5489)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-13 15:50:56 +08:00
qiaozp
ff05180cb9 Fix: apply-terraform-provider and container-image definition (#5485)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-13 11:08:04 +08:00
Vasco Lameiras
0d61e7825e Fix: apiVersion of CronJob for 1.25+ clusters (#5480)
Signed-off-by: Vasco Lameiras <lameiras@gmail.com>
2023-02-11 15:27:05 +08:00
Charlie Chiang
762667ad71 Fix: use correct helm value when setting apprev compression (#5477)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2023-02-10 19:17:07 +08:00
StevenLeiZhang
98e04eba10 Feat: need podAntiAffinity for vela pods, in order to make kubevela high availability (#5465)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-02-10 16:30:30 +08:00
Tianxin Dong
4a16b2f6fe Feat: add category for workflow step definition (#5471)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-02-10 14:23:04 +08:00
Somefive
7f7814851b Fix: pod view invalid cue for special pod output (#5472)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-10 13:04:15 +08:00
Somefive
1d62ab648f Feat: enhance expose trait and adopt (#5470)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-10 11:29:24 +08:00
Jianbo Sun
c2de316eae Chore: fix krew release with new binary format for .exe (#5459)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-02-08 21:54:41 +08:00
Somefive
4a6f98da27 Fix: expose trait load balance cue check bug (#5460)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-08 20:48:55 +08:00
qiaozp
6dc9dda0d4 Fix: stop sending update to brew and krew if alpha version (#5451)
* Fix: stop sending update to brew and krew if alpha version

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add rc

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

---------

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-08 16:27:03 +08:00
Somefive
a31a66758c Fix: suppress klog logs output for vela top (#5448) 2023-02-08 15:48:44 +08:00
dependabot[bot]
4ebbfb171e Chore: (deps): Bump go.mongodb.org/mongo-driver from 1.5.1 to 1.11.1 (#5443)
Bumps [go.mongodb.org/mongo-driver](https://github.com/mongodb/mongo-go-driver) from 1.5.1 to 1.11.1.
- [Release notes](https://github.com/mongodb/mongo-go-driver/releases)
- [Commits](https://github.com/mongodb/mongo-go-driver/compare/v1.5.1...v1.11.1)

---
updated-dependencies:
- dependency-name: go.mongodb.org/mongo-driver
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 14:53:40 +08:00
dependabot[bot]
2f2371deb2 Chore: (deps): Bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#5437)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 14:52:33 +08:00
Somefive
bde4ebb32e Fix: use get before create or update (#5444)
* Fix: use get before create or update

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: ignore resource not found error when manage privileges for target

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-08 14:49:58 +08:00
Jianbo Sun
c12bf436a0 Chore: refine readme with more featrues (#5447)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-02-08 14:47:30 +08:00
qiaozp
5dda2d58d7 Fix: simplify notification parameters (#5445) 2023-02-08 13:42:15 +08:00
dependabot[bot]
c0c1f6fdbb Chore: (deps): Bump github.com/onsi/ginkgo/v2 from 2.1.6 to 2.8.0 (#5441)
Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.1.6 to 2.8.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/ginkgo/compare/v2.1.6...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 17:16:02 +08:00
dependabot[bot]
fa7218f70a Chore: (deps): Bump actions/upload-artifact from 3.1.1 to 3.1.2 (#5435)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](83fd05a356...0b7f8abb15)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 16:22:55 +08:00
dependabot[bot]
515504466c Chore: (deps): Bump github.com/gertd/go-pluralize from 0.1.7 to 0.2.1 (#5438)
Bumps [github.com/gertd/go-pluralize](https://github.com/gertd/go-pluralize) from 0.1.7 to 0.2.1.
- [Release notes](https://github.com/gertd/go-pluralize/releases)
- [Commits](https://github.com/gertd/go-pluralize/compare/v0.1.7...v0.2.1)

---
updated-dependencies:
- dependency-name: github.com/gertd/go-pluralize
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:52:50 +08:00
dependabot[bot]
eba8b8afa0 Chore: (deps): Bump actions/setup-node from 3.5.1 to 3.6.0 (#5434)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.5.1 to 3.6.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](8c91899e58...64ed1c7eab)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:50:46 +08:00
dependabot[bot]
1ce1fc47ec Chore: (deps): Bump docker/build-push-action from 3.2.0 to 4.0.0 (#5433)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3.2.0 to 4.0.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](c56af95754...3b5e8027fc)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:49:35 +08:00
dependabot[bot]
996e55de04 Chore: (deps): Bump github.com/coreos/go-oidc (#5439)
Bumps [github.com/coreos/go-oidc](https://github.com/coreos/go-oidc) from 2.1.0+incompatible to 2.2.1+incompatible.
- [Release notes](https://github.com/coreos/go-oidc/releases)
- [Commits](https://github.com/coreos/go-oidc/compare/v2.1.0...v2.2.1)

---
updated-dependencies:
- dependency-name: github.com/coreos/go-oidc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:48:38 +08:00
dependabot[bot]
232a387d67 Chore: (deps): Bump golangci/golangci-lint-action from 3.3.0 to 3.4.0 (#5436)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](07db5389c9...08e2f20817)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:46:35 +08:00
dependabot[bot]
ba0173fdd6 Chore: (deps): Bump rajatjindal/krew-release-bot from 0.0.38 to 0.0.43 (#5432)
Bumps [rajatjindal/krew-release-bot](https://github.com/rajatjindal/krew-release-bot) from 0.0.38 to 0.0.43.
- [Release notes](https://github.com/rajatjindal/krew-release-bot/releases)
- [Changelog](https://github.com/rajatjindal/krew-release-bot/blob/master/.goreleaser.yml)
- [Commits](3320c0b546...92da038bbf)

---
updated-dependencies:
- dependency-name: rajatjindal/krew-release-bot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-07 13:46:08 +08:00
Somefive
e2f95e065a Feat: update sharding using pkg (#5430)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-07 11:12:40 +08:00
Echo
7694519fb9 Fix: dingding notification message.text.content (#5424)
* Fix: dingding notification message.text.content

Signed-off-by: yueyongyue <yueyongyue@sina.cn>
2023-02-06 19:13:42 +08:00
Jianbo Sun
46d762fd95 Create dependabot.yml (#5423)
Signed-off-by: Jianbo Sun jianbo.sjb@alibaba-inc.com
2023-02-06 16:39:13 +08:00
Somefive
b7e0cd86be Feat: add deploy inline policy and support loading definitions when lack in the revision (#5416)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-06 15:58:44 +08:00
Tianxin Dong
6324c16a68 Chore: update cue to v0.5.0-beta.5 (#5421)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-02-06 13:36:08 +08:00
fsl
3a3def1f42 Fix: update CVE-2022-3996 vuln (#5417)
Signed-off-by: fengshunli <1171313930@qq.com>
2023-02-04 20:53:17 +08:00
Karanjot Singh
c9d6bfef42 Fix: Add confirmation prompt for vela adopt --apply with existing app name (#5376)
* Add confirmation prompt for vela adopt --apply with existing app name

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Added changes according to the review

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Fixed Userinput and used loadremoteApplication

Signed-off-by: Karanjot Singh <drquark@duck.com>

minor fixes

Signed-off-by: Karanjot Singh <drquark@duck.com>

used loadRemoteApplication

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor Fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

Minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Used f.Client().Get method

Signed-off-by: Karanjot Singh <drquark@duck.com>

minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

minor fix

Signed-off-by: Karanjot Singh <drquark@duck.com>

* Changed bool to False

Signed-off-by: Karanjot Singh <drquark@duck.com>

---------

Signed-off-by: Karanjot Singh <drquark@duck.com>
2023-02-03 18:01:35 +08:00
huaxk
8ec8bd9390 Fix: multiple initialization containers are not supported in traits (#5110) (#5413)
Signed-off-by: huaxk <huaxk@163.com>
2023-02-03 15:57:05 +08:00
Somefive
ce63df6b26 Feat: enhance health check to support bypass component check and add parameter to context (#5412)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-03 15:49:13 +08:00
JohnJan
47b027f328 Fix: sync project from app crd to velaux (#5403)
* Fix: sync project from app crd to velaux

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: sync project from app crd to velaux

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: sync project from app crd to velaux

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: sync project from app crd to velaux

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: sync project from app crd to velaux

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: sync project from app crd to velaux

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

---------

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-02-02 15:30:18 +08:00
wyike
1b993ffcc9 fix bugs of specified addonName (#5404)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-02-01 16:41:50 +08:00
Somefive
cca8338832 Fix: ignore validation webhook for ref-objects typed component (#5397)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-01 16:00:38 +08:00
Somefive
a38bbc72cf Fix: skip last-applied-configuration error for threewaymergepatch (#5402)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-02-01 15:58:57 +08:00
qiaozp
17bff50005 Fix: longer releaser timeout (#5399)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-02-01 13:57:09 +08:00
Basuotian
27177bbc38 Fix: use the namespace specified in the resource if -n is not s… (#5379)
* fix #5368, use the namespace specified in the resource if -n is not specified

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* add default namespace for the case missing namespace in resourceRef

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

* add test case

Signed-off-by: Basuotian <basuoluomiu@gmail.com>

---------

Signed-off-by: Basuotian <basuoluomiu@gmail.com>
2023-01-31 20:02:05 +08:00
fsl
2fb17cd159 Fix: update package dependencies (#5388)
Signed-off-by: fengshunli <1171313930@qq.com>
2023-01-31 18:31:29 +08:00
barnettZQG
df1fe1dedd Feat: add the updating the application trigger API (#5382)
* Feat: add the updating the application trigger API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: imported more than once

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

---------

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-31 17:11:21 +08:00
Jianbo Sun
66dd2a70b7 Fix: aligin config create to be managed by apps with Dispatch function (#5384)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-01-31 16:55:37 +08:00
suwliang3
647fdf89f6 Feat: add the func of additionalInfo for workload (#5325)
* Fix: create default trait for webservice

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Feat: add the func of additionalInfo for workload

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* modify podAdditionalInfo

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

---------

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-01-31 13:42:32 +08:00
qiaozp
f5e9e9393a Fix: rework on apisrever e2e test covergae (#5385)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-01-31 13:04:31 +08:00
Somefive
9efbb72850 Feat: support sharding in controller (#5360)
* Feat: bootstrap sharding

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor end-e2e-core-shards script

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

---------

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-31 13:03:29 +08:00
Tianxin Dong
951fd83461 Chore: update workflow version to fix panic (#5383)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-31 10:56:46 +08:00
qiaozp
f9e8f4222f Fix: replace homemade release script with goreleaser (#5380)
Fixes https://github.com/kubevela/kubevela/issues/5347
2023-01-31 10:08:09 +08:00
barnettZQG
c52cd98713 Fix: failed to create the record when rollbacking the application (#5377)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-30 18:56:50 +08:00
Somefive
f733d74647 Feat: upgrade cluster gateway to 1.7.0 (#5354)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-18 11:07:13 +08:00
Tianxin Dong
250824bf05 Feat: add workflow step scope in doc gen (#5351)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-17 16:08:38 +08:00
Stephen Ni
59e5d292b4 Docs: fix README.md ad-hoc (#5345)
Signed-off-by: nisiyong <stephen.ni@outlook.com>

Signed-off-by: nisiyong <stephen.ni@outlook.com>
2023-01-17 10:35:37 +08:00
Somefive
b342ab0f86 Feat: vela cluster export config (#5336)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-16 18:03:38 +08:00
Somefive
9dc102021e Feat: remove useless storage driver (#5350)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-16 18:03:04 +08:00
Tianxin Dong
9304315972 Fix: delete example url in definitions that refer to workflowrun example (#5344)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-16 16:24:08 +08:00
gökhan
4ec9214c79 Feat: reuse same logic for cluster labels (#5346)
Issue: https://github.com/kubevela/kubevela/issues/5171

Signed-off-by: Gokhan Karadas <gokhan.karadas@trendyol.com>

Signed-off-by: Gokhan Karadas <gokhan.karadas@trendyol.com>
Co-authored-by: Gokhan Karadas <gokhan.karadas@trendyol.com>
2023-01-16 15:46:42 +08:00
ZhaoweiWang
5289bd9817 fix: fix --cluster when addon enable (#5332)
Signed-off-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>

Signed-off-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>
Co-authored-by: zhaowei.wang <zhaowei.wang@metabit-trading.com>
2023-01-13 17:04:33 +08:00
Tianxin Dong
5158fcf6c1 Fix: optimize skip reconcile and expose error if the traits patch an invalid workload like terraform (#5334)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-13 17:04:22 +08:00
Tianxin Dong
9ab6fe4188 Feat: upgrade the workflow version to v0.4.0 (#5335)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-13 16:56:21 +08:00
Somefive
1e15e27c8c Fix: conflict while using gc policy and shared-resource policy concurrently (#5330)
* Fix: conflict while using gc policy and shared-resource policy concurrently

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: github ci

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-13 15:51:15 +08:00
barnettZQG
df3f134f12 Fix: maintain compatibility with old project data (#5328)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-13 13:55:32 +08:00
StevenLeiZhang
5ec3bd5ef7 Feat: need one Trait to set Rollout strategy of Workload (#5257)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>

Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-01-12 17:18:15 +08:00
hnd4r7
cd5ef33951 velaql support indexing into exported array field (#5320)
Signed-off-by: hnd4r7 <307365651@qq.com>

Signed-off-by: hnd4r7 <307365651@qq.com>
2023-01-12 10:12:38 +08:00
Girish
5136269c6f Fix typo in the long cli description of vela system command (#5321) 2023-01-12 10:08:20 +08:00
barnettZQG
fbaea02408 Fix: the developer user can't load the definition (#5317)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-11 18:27:56 +08:00
wyike
c4f3026065 small optimzie for addon (#5316)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

name the compoennt

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-01-11 16:10:46 +08:00
Tianxin Dong
19a7f4e05e Fix: fix permissions for backport in commands (#5308)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-11 14:54:28 +08:00
Xunzhuo
51b8d0c8ce fix: errorMsg when uninstall vela (#5304)
Signed-off-by: bitliu <bitliu@tencent.com>

Signed-off-by: bitliu <bitliu@tencent.com>
2023-01-11 14:47:57 +08:00
JohnJan
59e8b88d0a Fix: create a config with the same name reported an incorrect error (#5270)
* Fix: create a config with the same name reported an incorrect error

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: create a config with the same name reported an incorrect error

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2023-01-11 14:23:41 +08:00
barnettZQG
f7d34cbe8a Feat: enhance the application synchronizer (#5299)
* Feat: enhance the application synchronizer

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-11 14:20:47 +08:00
cezhang
1ce5c6d8ea Feat: vela dry-run render results should be affected by override policy and deploy workflowstep (#4815)
* [Feature] vela dry-run render results should be affected by override policy and deploy workflowstep

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* multiple input files support; policy,workflow support; new flag: merge orphan policy or workflow

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* add more tests

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* fix comment issues

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* add tests

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* fix e2e

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* fix tests

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2023-01-11 13:52:49 +08:00
old prince
bee732b107 Fix: Index structure map[string]string,Mongo resulting in inconsistent results obtained by filtering non-string type by index. (#5274)
Signed-off-by: old.prince <di7zhang@gmail.com>

Signed-off-by: old.prince <di7zhang@gmail.com>
2023-01-11 13:05:26 +08:00
wyike
ff802ad2c5 Fix: more explicit error when addon package hasn't a metadata.yaml (#5298)
* more explicit error when addon package hasn't a metadata.yaml

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix checkdiff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix commets

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2023-01-11 11:45:41 +08:00
Somefive
332b48e39b Chore: vela delete doc (#5301) 2023-01-11 10:59:40 +08:00
hnd4r7
6ad7a72b6c Fix: don't return err if subresource type is not found when listing application resources (#5295)
Signed-off-by: hnd4r7 <307365651@qq.com>

Signed-off-by: hnd4r7 <307365651@qq.com>
2023-01-10 22:10:00 +08:00
Tianxin Dong
432a5f37b7 Fix: fix backport command action caused by upgrades (#5300)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-10 19:02:21 +08:00
Tianxin Dong
b71a8a353a Fix: fix vela debug cli to find id for step (#5294)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-10 16:46:21 +08:00
old prince
46b31b2569 Fix: Delete appplication fails if status.workflow.endTime not specified. (#5287)
Error Details:
E0106 08:12:02.807341       1 controller.go:317] controller/application "msg"="Reconciler error" "error"="Application.core.oam.dev \"test\" is invalid: status.workflow.endTime: Invalid value: \"null\": status.workflow.endTime in body must be of type string: \"null\"" "name"="test" "namespace"="test" "reconciler group"="core.oam.dev" "reconciler kind"="Application"

If the workflow is not completed, the endtime should be null, and the deletion of the application will fail

Signed-off-by: old.prince <di7zhang@gmail.com>

Signed-off-by: old.prince <di7zhang@gmail.com>
2023-01-10 15:14:10 +08:00
Charlie Chiang
3f5d558f22 Test: let addon helper tests use local helm server (#5286)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2023-01-09 12:09:27 +08:00
Jianbo Sun
5d6848b1c6 Chore: update makefile with velaql in make def-install (#5285)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-01-06 17:45:50 +08:00
Somefive
69293f4094 Feat: upgrade cluster-gateway to support client-identity-exchange config (#5284)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-06 16:37:57 +08:00
barnettZQG
3a917cb6af Fix: the addon management APIs support the user impersonation (#5282)
* Fix: the addon management APIs support the user impersonation

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-06 15:11:56 +08:00
barnettZQG
1c43c6d1c5 Fix: keep the workflow data structure in MongoDB (#5276)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-06 15:11:42 +08:00
barnettZQG
9bbf7bf01b Fix: make the synced workflow name normative (#5278)
* Fix: make the synced workflow name normative

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: query the latest workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-06 15:11:29 +08:00
Somefive
5a845104fb Feat: support interactive mode to manually skip encountered errors (#5266) 2023-01-06 15:03:47 +08:00
Somefive
693eb3cb1d Feat: add pre-dispatch dryrun check (#5277)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-01-06 10:46:50 +08:00
Jianbo Sun
78f5827fa6 Fix: move notes to the right to avoid package head to be invalid format (#5280)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2023-01-06 10:29:34 +08:00
Tianxin Dong
af8a7eb695 Fix: check the legacy definitions in vela install (#5268)
* Fix: check the legacy definitions in vela install

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* take over views

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-05 19:13:19 +08:00
barnettZQG
97ce8ba500 Feat: add the API that rollbacks the application (#5273)
* Feat: add the API that rollbacks the application

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: use the klog/v2 package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-05 17:45:42 +08:00
qiaozp
03d892bcf1 Fix: apiserver k8sclient have duplicated multicluster wrapper (#5275)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2023-01-05 15:42:38 +08:00
Tianxin Dong
360c9e24b2 Feat: support hostpath in storage and vela cli (#5265)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-05 10:08:54 +08:00
barnettZQG
ba0a726cfc Fix: make the impersonation feature work (#5261)
* Fix: make the impersonation feature work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: update the document of the chart

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-04 16:58:03 +08:00
aimuz
b2f4e237c2 docs: update bot.md link fail (#5262)
Signed-off-by: aimuz <mr.imuz@gmail.com>

Signed-off-by: aimuz <mr.imuz@gmail.com>
2023-01-04 11:52:29 +08:00
Tianxin Dong
5f71d05db1 Fix: fix inputs conflict for workflow (#5251)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2023-01-04 10:45:51 +08:00
barnettZQG
340059989b Feat: enhance the workflow restful APIs (#5252)
* Feat: enhange the workflow restful APIs

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the workflow record status is empty

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some logs

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: enhance the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-04 09:56:36 +08:00
suwliang3
5b636e451a Feat: Detect the correctness of the custom addon repository when adding add… (#5221)
* Detect the correctness of the custom addon repository when adding addon registry

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* wrap error

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* don't check if the registry is not helm

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* modify unit-test

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* Modify unit-test

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2023-01-03 20:02:59 +08:00
James Dobson
ecc77f8cae Test: prevent notification step definition test from failing when re-run. (#5253)
Signed-off-by: James Dobson <jdobson@guidewire.com>

Signed-off-by: James Dobson <jdobson@guidewire.com>
2023-01-03 13:46:07 +08:00
StevenLeiZhang
8a5239575a Feat: need one new Trait to support HorizontalPodAutoscaler of CPU/MEM/PodCustomMetrcs (#5225)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>

Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2023-01-03 11:17:31 +08:00
william302
6461625832 Docs: correct update project user api's doc description (#5244)
Signed-off-by: william302 <william902@qq.com>

Signed-off-by: william302 <william902@qq.com>
Co-authored-by: william302 <william902@qq.com>
2023-01-03 11:02:55 +08:00
James Dobson
28f6f42ed4 Fix: apply label to pod for vela-cli workflow step definition. Fixes #5247 (#5248)
Signed-off-by: James Dobson <jdobson@guidewire.com>

Signed-off-by: James Dobson <jdobson@guidewire.com>
2023-01-03 10:47:34 +08:00
old prince
7bc2f4e8d1 Fix:Dry-run from revision application,Problems caused by resource version lower than the current version (#5246)
Signed-off-by: old.prince <di7zhang@gmail.com>

Signed-off-by: old.prince <di7zhang@gmail.com>
2023-01-03 10:46:59 +08:00
barnettZQG
d588def0af Feat: versioned the context backend values to the app revision (#5231)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2023-01-02 21:23:12 +08:00
Somefive
6c12b968a7 Fix: add permission for release ci (#5245)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-31 13:23:03 +08:00
Somefive
18f778a871 Fix: gc failure cause workflow restart not working properly (#5240)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-29 23:15:02 +08:00
Siege Lion
0f6c244d81 Fix: remove cluster field from pod view in vela top and optimize some ui (#5237) 2022-12-29 19:58:43 +08:00
my-git9
2fb0633354 cleanup ioutil for newer go version (#5238)
Signed-off-by: xin.li <xin.li@daocloud.io>

Signed-off-by: xin.li <xin.li@daocloud.io>
2022-12-29 19:34:45 +08:00
Tianxin Dong
38aa522016 Chore: update workflow version to add restart from step and fix bugs (#5233)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-12-29 18:34:59 +08:00
dependabot[bot]
7cc7ea2fa0 Chore(deps): Bump github.com/containerd/containerd from 1.6.6 to 1.6.12 (#5235)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.6 to 1.6.12.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.6...v1.6.12)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-27 18:04:49 +08:00
Somefive
88f4c33d72 Feat: upgrade dependency (#5217) 2022-12-27 16:28:13 +08:00
qiaozp
a11f2cdae5 Fix: dependency makefile variable error (#5234)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-27 15:45:45 +08:00
Somefive
f0902e91d1 Feat: add prestart-hook for vela-core and add crd guard check (#5232)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-27 10:18:01 +08:00
qiaozp
8988d9a224 Fix: pin dependencies to hash (#5223)
* Fix: pin dependencies to hash

remove useless action and makefile steps

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reinstall golangci-lint with certain version

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback setup node

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-26 17:36:14 +08:00
qiaozp
cadaa996da Fix: remove useless field when loading pod in top (#5228)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-26 11:57:42 +08:00
xingming01
25b9350fd4 Feat: the webservice component has no args parameter #5226 (#5227)
Add the args parameter to the webservice component

Signed-off-by: xingming01 <whatissoftware@163.com>

Signed-off-by: xingming01 <whatissoftware@163.com>
2022-12-26 10:38:49 +08:00
Joshua Agboola
a9bc43a9dd Feat: Support SSH for retrieving terraform modules in private git repo (#5059)
* Feat: Support SSH for retrieving terraform modules in private git repo

Signed-off-by: motilayo <44736801+motilayo@users.noreply.github.com>

* fix lint errors

Signed-off-by: motilayo <44736801+motilayo@users.noreply.github.com>

* fix gofmt lint error

Signed-off-by: motilayo <joshuaagboola@live.ca>

* update gitCredentialsReference to gitCredentialsSecretReference, validate secret, improve known_hosts logic

Signed-off-by: motilayo <joshuaagboola@live.ca>

* SImplify logic to get publickey

Signed-off-by: motilayo <joshuaagboola@live.ca>

* Set known_hosts and export SSH_KNOWN_HOSTS

Signed-off-by: motilayo <joshuaagboola@live.ca>

* Call GetGitSSHPublicKey for cli

Signed-off-by: motilayo <joshuaagboola@live.ca>

* fix parser.go - nil check for ref.Client

Signed-off-by: motilayo <joshuaagboola@live.ca>

* Unit test for GetGitSSHPublicKey

Signed-off-by: motilayo <joshuaagboola@live.ca>

* improve test coverage

Signed-off-by: motilayo <joshuaagboola@live.ca>

* make reviewable

Signed-off-by: motilayo <joshuaagboola@live.ca>

* minor improvements & cleanup

Signed-off-by: motilayo <joshuaagboola@live.ca>

* update secret name in test

Signed-off-by: motilayo <joshuaagboola@live.ca>

Signed-off-by: motilayo <44736801+motilayo@users.noreply.github.com>
Signed-off-by: motilayo <joshuaagboola@live.ca>
2022-12-23 16:27:27 +08:00
qiaozp
4ad8a13b5e Feat: support data-passing in deploy step (#5161)
* Feat: support component data-passing in deploy step

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* health check with input

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add union test for io and replication

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* use pkg/slices.parMap

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reduce the GET request

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix break test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-23 14:50:28 +08:00
Jianbo Sun
c7c6009e1c Chore: enhance workflow with specific git commit id (#5220)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-21 14:29:54 +08:00
Tianxin Dong
a5a1a2ed15 Fix: optimize build push image step (#5215)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-12-20 17:28:01 +08:00
Somefive
8798371454 Feat: change health check resource fetch order (#5190)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-20 17:09:47 +08:00
Somefive
9151b3d51f Fix: registry permission (#5216)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-20 17:07:07 +08:00
Somefive
8ef512d9f6 Feat: gc orphan resources (#4847)
* Feat: support orphan resource when deleting application

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Test: add test for vela delete --orphan

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-20 16:14:23 +08:00
Somefive
c98d0d5bd1 Feat: vela adopt command (#5197)
* Feat: vela adopt

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support adopt native resources

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Test: add test for vela adopt

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-12-20 16:12:34 +08:00
Siege Lion
4e611fe736 Feat: vela top supports custom theme features (#5180)
* Feat: add the diy theme feature

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update go mod to fix vela top can't show on some terminal

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: embed theme file

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add theme selector and add test cases

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix type bug

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some file bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-12-20 14:13:26 +08:00
qiaozp
3f600b2e28 Fix: add write package permission in registry CI (#5213)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-20 12:01:41 +08:00
Tianxin Dong
0b21c54236 Fix: fix ci with override-definitions for definitions conflict (#5208)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-12-20 11:40:06 +08:00
qiaozp
2899fa6f8f Fix: limit github action permission (#5210)
* Fix: limit github action permission

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* all limit

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-20 10:21:02 +08:00
Jianbo Sun
9bd443cded Chore: add ossf/scorecard-action to secure workflows (#5209)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-19 19:18:30 +08:00
Tianxin Dong
1f7b9cebcc Feat: add unify step definitions from catalog (#5199)
* Feat: add unify step definitions from catalog

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add kaniko executor example

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-12-19 17:06:51 +08:00
Tianxin Dong
863b36226d Fix: add controller version for pipeline in velaux (#5185)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-12-19 13:41:24 +08:00
zhaohuiweixiao
1ebb64d4d4 Fix: addon ls comman does not show the componentless application (#5201)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2022-12-19 12:42:31 +08:00
suwliang3
e6fe7eb7d3 Feat: rollout support statefulsets (#5202)
* rollout support workload

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

* modify the error output

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2022-12-19 12:08:42 +08:00
Jianbo Sun
dcb5378ff9 Feat: support NOTES.cue in addon for additional info printer (#5195)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-16 18:07:27 +08:00
Jianbo Sun
c94fa21c28 Feat: optimize controller default value for better performance (#5194)
* Feat: optimize controller default value for better performance

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* try to fix rollout e2e-test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

try 2 fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
Co-authored-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-12-16 17:54:59 +08:00
suwliang3
2b3da03da8 Feat: return notFound error when deleting app (#5189)
Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>

Signed-off-by: suwanliang_yewu <suwanliang_yewu@cmss.chinamobile.com>
2022-12-14 18:47:57 +08:00
zhaohuiweixiao
66fbd104e9 Fix: The error of cannot fetch addon package breaks the loop to continue looking for addon package in the remaining registries (#5187)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2022-12-14 13:35:12 +08:00
Jianbo Sun
ac9cf58afa Feat: support fallback to kubeconfig namespace when env not set (#5182)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-13 14:53:54 +08:00
Jianbo Sun
b6f4328167 Feat: support outputs objects for policy (#5183)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-13 14:52:16 +08:00
wyike
e63aa444e5 Fix: check if enabling operation will uninstall controller from some clusters (#5179)
* check clusters parameter of addon will uninstall from clusters

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* revert go mod

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* skip verify version check

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix for error notice

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-12-12 13:40:48 +08:00
qiaozp
54285e6c64 Feat: add multicluster test for vela logs (#5168)
* Feat: add multicluster test for vela logs

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reviewable

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-09 10:43:54 +08:00
Jianbo Sun
48bf5cb644 Fix: readme badge broken (#5175)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-08 20:05:22 +08:00
dependabot[bot]
336408f3d0 Chore(deps): Bump github.com/containerd/containerd from 1.5.13 to 1.5.16 (#5169)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.13 to 1.5.16.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.5.13...v1.5.16)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-08 10:57:11 +08:00
Jianbo Sun
b9e7c710d8 Feat: add options for addon parameter (#5166)
* Feat: add options for addon parameter

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: wrongly report disbaled when addon is not existed

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-07 17:22:38 +08:00
Jianbo Sun
c8b24ab363 Fix: vela show docs can't generate composition type (#5163)
* Fix: vela show can not display or result

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: vela show docs can't generate composition type

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-06 16:12:45 +08:00
qiaozp
62b4d9144f Fix: CollectLogsInPod won't work in multicluster (#5160)
* Fix: CollectLogsInPod won't work in multicluster

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* clean up

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-06 15:49:39 +08:00
qiaozp
6627dc33a9 Fix: can not logs from pod of subclusters (#5157)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-03 21:07:11 +08:00
Siege Lion
49335fdcdb Feat: Introduce timeout mechanism into cache and update network request mechanism in vela top (#5153)
* Fix: update cache to lru cache with expire time

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add auto refresh to topology view and fix the refresh bug in resource view
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-12-03 12:43:33 +08:00
qiaozp
b8c08c3574 Feat: support huawei cloud terraform generation (#5144)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-12-03 12:42:52 +08:00
zhaohuiweixiao
32354d7fb1 Fix: addon upgrade command does not recognize the --clusters flag (#5143)
Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>

Signed-off-by: zhaohuihui <zhaohuihui_yewu@cmss.chinamobile.com>
2022-12-03 12:42:24 +08:00
Tianxin Dong
11c6b2bc98 Fix: update the workflow vendor and delete mode in workflow spec (#5149)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-12-02 19:04:12 +08:00
Jianbo Sun
ec07e641ee Chore: refine logs and align using klog/v2 (#5145)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-12-02 14:50:06 +08:00
jguionnet
3b8cd84f82 Feat: Add startup probe trait (#5093)
* Feat: Add startup probe trait

Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>

* Feat: Implemented review comments in startup probe trait

Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>

Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>
2022-12-02 11:49:00 +08:00
Ziqi Zhao
88545e5aa8 fix format error (#5146)
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>

Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2022-12-01 16:00:32 +08:00
qiaozp
bc041cf940 Fix: vela status --endpoint show no IP when only one master node (#5129)
Add fallback if no worker node

check app exist

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-30 10:41:11 +08:00
JohnJan
9aa2ec3ccd Refactor: Use github.com/spf13/cobra to execute cmd for vela-core (#5126)
* Refactor: Use github.com/spf13/cobra to execute cmd for vela-core

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Refactor: Use github.com/spf13/cobra to execute cmd for vela-core

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Refactor: Use github.com/spf13/cobra to execute cmd for vela-core

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-11-28 17:56:38 +08:00
Somefive
1dd08f35ef Fix: container image cue (#5127)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-28 11:35:20 +08:00
Somefive
a205fff1a7 Fix: add fogdong to codeowners of packages (#5134)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-28 11:33:39 +08:00
wyike
191dbcc58d Fix: bug of filter registry func will modify origin data (#5118)
* fix filter registry func flaky

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-11-24 15:05:38 +08:00
Jianbo Sun
cd565f362f Chore: add definition example doc CI check (#5117)
* Chore: add definition example doc CI check

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: add example doc for trait

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-24 14:47:41 +08:00
Jianbo Sun
e5d8fcf2f8 Fix: apiserver image build and add CI check for it (#5116)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-24 12:11:16 +08:00
Charlie Chiang
fdc4622208 Feat: add support for compressing apprev using gzip and zstd (#5090)
* Feat: add support for compressing apprev using gzip and zstd

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use move compressible fields into a separate struct

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use compression util from kubevela/pkg

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix core-api-test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add compression ratio in `revision list`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-11-24 10:27:13 +08:00
Somefive
734025f03f Feat: takeover & readonly policy (#5102)
* Feat: takeover & readonly

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add cue def for read-only and take-over

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Docs: add example doc

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-24 09:48:27 +08:00
wyike
277d94f447 Fix: bug when addon dependent an addon in other registry (#5083)
* fix several bugs of addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix error and add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments and fix apiserver test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix typo

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add parameter in apiserver and test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-11-24 09:42:28 +08:00
Somefive
e05f34392d Fix: multicluster cluster scope ref (#5111)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-23 19:41:29 +08:00
basefas
8516ede345 fix: update actions (#5108)
Signed-off-by: basefas <basefas@hotmail.com>

Signed-off-by: basefas <basefas@hotmail.com>
2022-11-23 10:05:25 +08:00
basefas
6363967895 Fix: update actions to solve 「 deprecated 」warnings (#5094)
* Fix: update actions to solve 「 deprecated 」warnings

Signed-off-by: basefas <basefas@hotmail.com>

* fix: update action & delete unused parameter

Signed-off-by: basefas <basefas@hotmail.com>

Signed-off-by: basefas <basefas@hotmail.com>
2022-11-22 23:22:25 +08:00
qiaozp
655697f2fd Fix: end test environments (#5106)
* Fix: end test environments

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-22 19:06:51 +08:00
Somefive
8252b1eada Fix: patchOutputs bug for multiple outputs (#5101)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-22 10:52:49 +08:00
Jianbo Sun
139009546c Chore: merge goverance doc to community repo (#5103)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-22 10:19:30 +08:00
JohnJan
1530f6c24f Refactor: Use github.com/spf13/cobra to execute cmd for apiserver (#5085)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-11-22 10:08:31 +08:00
Somefive
eddd131dcd Docs: add KEPs introduction to the main repo (#5099)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-21 15:19:31 +08:00
Tianxin Dong
78f4e00dac Fix: fix acr webhook for enterprise registry (#5097)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-21 14:16:04 +08:00
jguionnet
66bffabc1b Feat: add topologySpreadConstraints traits (#5081)
* Feat: add topologySpreadConstraints traits

Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>

* make reviewable formatting and file gen

Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>

Signed-off-by: Jerome Guionnet <jguionnet@guidewire.com>
2022-11-21 11:02:05 +08:00
Jianbo Sun
c89f268af1 Feat: support dry-run with cue format definition (#5078)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-16 18:09:59 +08:00
Tianxin Dong
ee28112015 Feat: add print message example (#5077)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-16 16:32:08 +08:00
Tianxin Dong
a5c7804185 Feat: add apply component definition for docs (#5070)
* Feat: add apply component definition for docs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add apply component definition for docs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-16 14:02:50 +08:00
qiaozp
85d5eec8b4 Fix: code vulnerability (#5054)
* Fix: code vulnerability

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* lint

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* imports

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* use space

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reuse sanitize function

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-16 13:47:03 +08:00
Jianbo Sun
3bd38584d7 Feat: support vela up --wait and --timeout (#5073)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-15 20:59:15 +08:00
Jianbo Sun
2c7f294279 Chore: update test case and remove unnecessary info (#5069)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-15 20:02:30 +08:00
nuclearwu
380d0ff9a1 Fix: remove unnecessary case in field selector (#5064)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-11-15 15:00:30 +08:00
Tianxin Dong
2bbf957c29 Fix: fix fill array with array in inputs (#5066)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-15 14:13:34 +08:00
Jianbo Sun
467e7c992b Chore: Cleanup useless examples (#5067)
* Chore: remove appdeployment examples as it's already deprecated

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: remove approllout docs as it's already deprecated

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: remove kubecon 2020 demo as it's not worked due to deprecation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: remove unused Observability Implementation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-15 14:02:13 +08:00
wyike
e706b5d4a3 add tests (#5058)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-11-15 13:16:11 +08:00
qiaozp
84feb2beb4 Fix: update action script (#4959) 2022-11-14 19:42:57 +08:00
tigerK
46c8f104c3 [docs]cpuscaler traits documentation example (#5062)
Signed-off-by: yanru.lv <yanru.lv@daocloud.io>

Signed-off-by: yanru.lv <yanru.lv@daocloud.io>
2022-11-14 16:55:12 +08:00
Tianxin Dong
23c959fb71 Fix: unify stdlib for workflow and kubevela (#5053)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-14 13:24:24 +08:00
qiaozp
a74fb181b3 Chore: remove legacy o11y logic (#5046)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-14 11:43:23 +08:00
nuclearwu
b8535d2c5e Fix: Failed to get detail policy for application (#5043)
* Fix: Failed to get detail policy for application

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: Failed to get detail policy for application

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-11-10 19:23:48 +08:00
Tianxin Dong
986a3a1f2a Fix: add debug for workflowrun and support debug sub steps (#5037)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-10 10:53:10 +08:00
Siege Lion
522efff188 Fix: fix the stuck problem and use LRU cache to promote the speed of loading topology (#5002)
* Fix: fix the stuck problem and use lru cache to promote the speed of loading topology

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: reuse existing lru golang library

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-11-09 16:08:57 +08:00
Somefive
afd363b896 Feat: support webservice containing duplicate port with different protocol (#5034)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-09 13:14:27 +08:00
nuclearwu
a944f47313 Feat: support field selector filter for 'vela ls' (#5016)
* Feat: support field selector filter for 'vela ls'

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support field selector filter for 'vela ls'

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support field selector filter for 'vela ls'

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Feat: support field selector filter for 'vela ls'

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-11-09 11:27:25 +08:00
qiaozp
755005bb56 Fix: higher version contraint in install command (#5021)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-09 11:24:57 +08:00
wyike
5ad47a1947 Fix: remove the reference of v1beta1 ingress (#5026) 2022-11-08 22:59:31 +08:00
Tianxin Dong
7c0918375e Fix: temporary fix comments in comprehesions for env trait (#5020)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-08 15:26:27 +08:00
Tianxin Dong
d6466368c1 Feat: add scope label in workflow step defs (#4980)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-08 15:05:27 +08:00
wyike
5d0b64773e use vi as ingress's target apiVersion (#5019)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

revert test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-11-08 12:03:09 +08:00
qiaozp
e79e12fbe6 Fix: vela status will always get external ip first (#5014)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-07 17:54:54 +08:00
nuclearwu
853df82f4a Fix: vela cluster join reports 'resource name may not be empty' error (#4998)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-11-07 16:13:39 +08:00
Siege Lion
0e849d142c Fix: fix problem of loading pods of cronjob (#5007)
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-11-07 11:06:14 +08:00
qiaozp
7e012f5ca0 Fix: remove duplicate mock server in CI (#5011)
* Fix: not killing mock server process every time

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove redundent mock server

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-07 10:13:12 +08:00
nuclearwu
ef897db10b Feat: support label selector filter for 'vela ls' (#4966) 2022-11-06 11:43:10 +08:00
wyike
85489c63b4 Fix: forbid 302 request to avoid SSRF (#5000)
* fix helm chart list endpoint SSRF CVE

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* revert error log

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* change with const value

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-11-04 20:15:20 +08:00
barnettZQG
7f1a9010dc Chore: update the API schema (#4992)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-04 12:00:04 +08:00
Jianbo Sun
6b79104923 Fix: test ci windows (#4990)
* Fix: test ci windows

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: rename add exe suffix for command

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: trim extra commands

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-11-03 15:20:29 +08:00
yangs
0c3db0b0e6 Feat: add build check for generate kubevela-core-api (#4973)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-11-03 13:25:55 +08:00
Somefive
89237d2681 Fix: app contains app override the child app with parent app label (#4985)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-11-02 22:38:59 +08:00
Tianxin Dong
0a53eb2973 Fix: fix filepath for windows (#4984)
* Fix: fix filepath for windows

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* test ci

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-02 22:38:39 +08:00
barnettZQG
195d35dcc6 Fix: enhance the default permissions (#4975)
* Fix: enhance the default permissions

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-01 20:50:49 +08:00
Tianxin Dong
19fbe2faa8 Feat: allowing restart a compeleted workflow (#4972)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-11-01 20:34:56 +08:00
qiaozp
4b9e071558 Fix: mongodb can not decode runtime.Object (#4971)
* Fix: mongodb can not decode runtime.Object

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* reuse struct

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix no output when filter

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-11-01 17:20:30 +08:00
barnettZQG
fa44776702 Fix: grant the permission to read the ConfigMap in the vela-system namesapce (#4961)
* Fix: grant the permission to read the ConfigMap in the vela-system namespace

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-11-01 09:58:18 +08:00
qiaozp
23cbc9c91f Feat: implement pipeline APIs (#4908)
* add context when run pipeline

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Feat: implement pipeline API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Extract get log logic and implement getPipelineRunLog API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Init and delete pipeline contexts

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix panic

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Allow not specifying context

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* change pipeline to path parameter

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add permission check filter

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* project -> projects in route

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix route conflict

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add project alias

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Feat: change the list pipeline API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: filter the project

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the error of the run APi

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* fix log pipeline run API

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix lint, fix the error of log api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix error returning

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: change the lable to annotation

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* remove log config not found error

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix pipeline list api return no context info

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: create the namespace

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* get pipeline lastrun info

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* allow query single step output

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* organize code in api layer

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix project filter, add context value when get pp run, extend lastRun

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix get output and implement get input api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: change the last run

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* if query sub-step outout, return it directly

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Fix: change the run stats

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the output

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* flatten the input/output api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* more info for i/o vars

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix nested i/o struct

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add fromStep in input api

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add e2e test skeleton

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add more e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* use db to store pipeline

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* keep the last 5k lines of log

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* use stern param to keep last lines of logs

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* filter, nil labels, spec check

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* empty res, index, detail param

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Add e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix e2e test and unit test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add context e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* goimports

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add more test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* review

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* remove optional tag in returned value, unify the imports name

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add stop test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* more coverage

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* single case selct

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* optimize log color

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add default permission and role

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix permission ut

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* change the log api implementation

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add color, add container order

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix filter nil will cut all log

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* longer timeout and lint

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-31 23:59:04 +08:00
Tianxin Dong
8f4ce76543 Chore: stable the version of cue and workflow (#4963)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-31 14:27:46 +08:00
barnettZQG
2dfe233ebe Fix: do not change the workflow after the env changed (#4954)
* Fix: do not change the workflow after the env changed

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: check app when deleting the target from a env

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-31 11:15:48 +08:00
Tianxin Dong
73bed17869 Feat: add mode in workflow template (#4926)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-31 10:57:05 +08:00
wyike
21bf141019 Fix: bocde error override origin error message (#4951)
* fix bcode error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-29 16:02:30 +08:00
nuclearwu
c990bcdf66 Fix: update namespace only if it doesn't have the env label (#4947)
* Fix: update namespace only if it doesn't have the env label

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

* Fix: update namespace only if it doesn't have the env label

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-10-29 10:35:21 +08:00
tangoliu
14ac74f76d It is unnecessary to judge that the index function is not null (#4944)
Signed-off-by: liutiangang <liutiangang@cmbchina.com>

Signed-off-by: liutiangang <liutiangang@cmbchina.com>
2022-10-29 09:11:18 +08:00
Tianxin Dong
63c7285b8b Feat: sync the model of api workflow with core (#4936)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-28 17:43:00 +08:00
wyike
560dad3873 more error info for apiservice and add tests (#4927)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

change the mock addon version

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-28 17:35:46 +08:00
Somefive
b97c3af09f Fix: apiserver & vela status use multi-cluster client (#4916) 2022-10-28 14:02:42 +08:00
Siege Lion
de9fa2f821 Fix: can't obtain pods generated by Crontask component (patch of PR 4925) (#4942)
* Fix: get label selector from cronJob

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: use scheme create obj

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update method of generating selector

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update cron-task

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-28 10:57:48 +08:00
Jianbo Sun
63c9896d82 Fix: update export2config and export2secret example (#4932)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-27 19:06:17 +08:00
wyike
cad525ff16 fix gitlab addon registry (#4934)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-27 19:03:57 +08:00
Tianxin Dong
01c759dcd1 Fix: fix gen doc for container image (#4935)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-27 19:03:13 +08:00
Young-Zen
ea12c0f11e Fix: get Application status using jsonpath filter expression (#4923)
Signed-off-by: yanghaojia <yanghaojia@coding.net>

Signed-off-by: yanghaojia <yanghaojia@coding.net>
Co-authored-by: yanghaojia <yanghaojia@coding.net>
2022-10-27 14:41:55 +08:00
Siege Lion
bd5864f40a Fix: can't get pods of CronTask component (#4925)
* Fix: get label selector from cronJob

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update cron-task yaml

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-27 10:47:47 +08:00
Tianxin Dong
b7a763c074 Feat: support operations for workflow run (#4920)
* Feat: support operations for workflow run

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-26 16:04:34 +08:00
朱晓兵
c4a0c1480d Feat: enhance the apply-once capability (#4874)
* Feat: enhance the apply-once capability

Signed-off-by: 朱晓兵 <596908030@qq.com>

* Fix: add unit-test

Signed-off-by: 朱晓兵 <596908030@qq.com>

* Fix: adjustment variable name

Signed-off-by: 朱晓兵 <596908030@qq.com>

* Fix: add doc

Signed-off-by: 朱晓兵 <596908030@qq.com>

* Fix: adjustment variable name

Signed-off-by: 朱晓兵 <596908030@qq.com>

Signed-off-by: 朱晓兵 <596908030@qq.com>
2022-10-25 21:15:21 +08:00
Tianxin Dong
2324357907 Fix: add sub step in vela workflow logs (#4915)
* Fix: add sub step in vela workflow logs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-25 16:39:38 +08:00
ZhongsJie
1e3759bb25 Feat: add feature docs and controller parameters for MultiStageComponentApply (#4873)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>

Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-10-25 14:51:26 +08:00
Tianxin Dong
56f200fb59 Fix: deprecated resolve reference in gen open API (#4913)
* Fix: depracted resolve reference in gen open API

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-25 11:13:41 +08:00
Somefive
210db6de95 Feat: add timeout for reconcile (#4912)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-24 21:36:42 +08:00
barnettZQG
2255b0a6c7 Feat: Refer to the generation when checking the application status (#4901)
* Feat: Refer to the generation when checking the application status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the starting status overrided the deleting status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-24 19:32:45 +08:00
Tianxin Dong
5c1bf0ad70 Fix: support sub steps in vela status (#4911)
* Fix: support sub steps in vela status

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add http do in stdlib

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-24 15:58:57 +08:00
barnettZQG
accc7f9a83 Fix: assign the value for the registry of the addon (#4910)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-24 14:14:11 +08:00
barnettZQG
b41391a4fa Chore: wrong endpoint for LoadBalancer type service(revert #4729) (#4902)
* Chore: wrong endpoint for LoadBalancer type service(revert #4729)

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-22 12:38:08 +08:00
qiaozp
70c036a4be Fix: legacy API in gateway trait (#4899)
* Fix: legacy API in gateway trait

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback version

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-10-21 12:00:56 +08:00
Jianbo Sun
70f0500825 Feat: support context.clusterVersion for definition graceful upgrade (#4890)
* Feat: support context.clusterVersion for definition graceful upgrade

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: add test for context.clusterVersion

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: use control plane context cluster

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-20 20:31:29 +08:00
barnettZQG
7855b0024d Chore: change the package name of the readme-generator-for-helm (#4894)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-20 16:29:34 +08:00
Siege Lion
44b4afbcdf Feat: add the container view to vela top (#4892)
* Feat: add content to help view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the feature of viewing log of pod

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the container view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case and fix some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-20 14:58:41 +08:00
wyike
416f68860e Feat: workflowStep of printing message in status (#4877)
* enable addon provider

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add failed

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add backofflimit 0

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete namespace label

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

upgrade workflow

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add test and fix small bugs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add clean jobs with labelselector

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

go mod tidy

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

use mock addon as test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

use rollout

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

walk around mock addon registry

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

use rollout test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix time

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

more time

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

optimize revert configmap

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

upgrade go text

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

revert two definitions

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless files

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* upgrade workflow package

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-20 11:38:47 +08:00
Tianxin Dong
95b3b31b11 Feat: remove workflow step logs to vela workflow logs (#4883)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-20 11:18:48 +08:00
barnettZQG
7fc3d7c23b Fix: the api schema can not be generated (#4889)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-20 10:57:23 +08:00
barnettZQG
072ef8f724 Fix: exit waiting after the workflow failed (#4879)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-19 11:24:01 +08:00
Siege Lion
ab4348ed67 Feat: add the feature of viewing log of pod in vela top (#4870)
* Feat: add content to help view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add cluster data to pod view

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the feature of viewing log of pod

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-18 19:47:27 +08:00
nuclearwu
2175bb519e Feat: createOrUpdateApplication support dryRun operation (#4860)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-10-18 17:25:28 +08:00
Somefive
f1107c5018 Feat: allow empty cluster for cluster selector (#4880)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-18 17:19:16 +08:00
Jianbo Sun
c0e1a1a323 Feat: support parameter in health check of definition (#4872)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-18 17:16:23 +08:00
barnettZQG
9e00d48206 Fix: upgrade the workflow to support the provider about the config (#4878)
* Fix: upgrade the workflow to support the provider about the config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the yaml

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: retry CI

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the definitions

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-18 17:15:14 +08:00
barnettZQG
0fb55d9f8d Fix: remove the owner references (#4881)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-18 17:14:31 +08:00
qiaozp
dc7d791127 Feat: pipeline API for apiserver (#4840) 2022-10-17 20:11:06 +08:00
Tianxin Dong
51c803cc12 Chore: upgrade workflow vendor version (#4876)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-17 19:28:04 +08:00
Tianxin Dong
ccf7bdd2d6 Feat: support step logs in vela logs (#4845)
* Feat: support step logs in vela logs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-17 19:01:59 +08:00
barnettZQG
49ed837f97 Feat: support to manage the configs by the CLI, UI, and workflow. (#4794)
* Feat: support to manage the integrations by the CLI and the workflow

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the xml

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the unit test for the nacos writer

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the integration API

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: make the provider commands to be deprecated

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: make the unit test work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: rename the integration to the config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: make the unit test cases work

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: refactor the config commands

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the distribution status for the config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: sort the import packages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: refine the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: refine the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: get the content format before render the content

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some examples

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the command test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add the definitions of the workflow step

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some tests

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add some tests

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: retry the CI

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: refine some words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-10-17 17:15:45 +08:00
Tianxin Dong
5a4bdd4f6e Fix: fix array in definition (#4875)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-17 15:50:28 +08:00
Somefive
0a9be7c164 Fix: prevent workflow end time refill (#4864)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-15 10:55:07 +08:00
Somefive
4fba13c813 Fix: prevent rerun application while upgrading due to old apprev lack app workflow (#4852)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-14 22:05:55 +08:00
Tianxin Dong
913c740a87 Chore: use use fix and optimize definitions (#4851)
* Chore: use use fix and optimize definitions

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: use fields instead of structs

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-10-13 17:08:33 +08:00
Jianbo Sun
2c4febb9cf Fix: support default value of ui schema (#4857)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-13 14:02:40 +08:00
chengleqi
a03751e0ae Fix: change LabelResourceRuleFormat from Annotations to Labels (#4850)
* fix: change Annotations to Labels

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>

* fix: add FormatYAML label for test case

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>

* add json format rules test case

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
2022-10-12 15:23:04 +08:00
chengleqi
2d5871cfeb feat: add Resource Relationships for kustomize (#4849)
Signed-off-by: chengleqi <chengleqi5g@hotmail.com>

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
2022-10-11 19:57:09 +08:00
Somefive
bbdce2f6ee Chore: fix flaky multicluster test (#4848)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-11 19:22:30 +08:00
Somefive
fb45a94bb8 Feat: add export service (#4841)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-11 10:25:56 +08:00
Jianbo Sun
15c0e4122e Chore: prevent restart/resume/suspend/terminate workflow when application running (#4839)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 20:22:29 +08:00
Jianbo Sun
556535be84 Chore: omit empty message in workflow step status (#4837)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 17:32:58 +08:00
Somefive
17afabc1ff Feat: support context.cluster (#4836)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-09 14:08:02 +08:00
Jianbo Sun
9c5b7a526d Fix: align sha256sums file with binary name (#4830)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 10:09:05 +08:00
Jianbo Sun
4d1c8e886d Chore: add IP for gateway trait (#4833)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-10-09 10:02:12 +08:00
wyike
ba3c0305c4 fix bugs and add tests (#4831)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-10-08 17:12:05 +08:00
ZhongsJie
3299184d3b Feat: provide stage field for TraitDefinition (#4570)
* Feat: provide stage field for TraitDefinition

Signed-off-by: ZhongsJie <zhongsjie@gmail.com>

* Feat: Refactor the collect health status fn

Signed-off-by: ZhongsJie <zhongsjie@gmail.com>

Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-10-08 10:38:06 +08:00
Somefive
4c56fac228 Fix: workqueue & controller client metrics not registered correctly (#4814)
* Fix: workqueue & controller client metrics not registered correctly

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: support merging metrics registry

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-10-08 10:35:13 +08:00
Siege Lion
fd11f90d96 Feat: add resource topology view in vela top (#4817)
* Feat: add some feature

1. add more column of application and managed resource

2. alter <ESC> to exist key and add <Q> as the back key
Signed-off-by: HanMengnan <1448189829@qq.com>

* Refactor: refactor the yaml view and help view with singleton  design pattern

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: some small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: some small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-10-08 10:23:12 +08:00
Diego Pinheiro
0aaab7fa30 fix typo (#4827)
Signed-off-by: Diego Pinheiro <diego.milhomes@gmail.com>

Signed-off-by: Diego Pinheiro <diego.milhomes@gmail.com>
2022-10-07 17:05:46 +08:00
Diego Pinheiro
37384fc200 fix - typo (#4826)
Signed-off-by: Diego Pinheiro <diego.milhomes@gmail.com>

Signed-off-by: Diego Pinheiro <diego.milhomes@gmail.com>
2022-10-07 17:05:09 +08:00
chengleqi
0f67440b26 Fix: Update Ingress APIVersion form v1beta1 to v1 in test case (#4819)
* Update ingress form v1beta1 to v1 in test case

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>

* Change package name from v12 to networkingv1

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>

Signed-off-by: chengleqi <chengleqi5g@hotmail.com>
2022-10-07 08:33:52 +08:00
Tianxin Dong
91e470acfc Fix: fix render fields in debug command (#4811)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-30 14:00:33 +08:00
Jianbo Sun
09e628025a Feat: beautify addon list experience (#4807)
* Feat: beautify addon list experience

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: addon list e2e test

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: refine logs

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-30 13:23:27 +08:00
Siege Lion
bd728cbdbc Feat: Add more data field to application view and managed resource view in vela top (#4781)
* Fix: fix the bug of cluster list

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add some feature

1. add more column of application and managed resource

2. alter <ESC> to exist key and add <Q> as the back key
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-30 10:45:49 +08:00
Somefive
b79dc3bccf Feat: enhance collect service endpoints (#4806)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-30 10:44:16 +08:00
qiaozp
72827b29f2 Chore: simplify enqueueing app reconcile request for rt (#4810)
* Chore: simplify the enqueue app reconcile request for rt

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* Reduce useless type convert

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-30 10:41:39 +08:00
Somefive
feca6ccb84 Feat: workflow will rerun when application workflow changes (#4808)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-29 22:41:59 +08:00
Somefive
cfcf24b657 Feat: add image-pull-policy to init-container (#4809)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-29 22:41:36 +08:00
Somefive
b5f0363a3d Feat: add port name to CollectServiceEndpoints (#4801)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-29 10:24:36 +08:00
qiaozp
aed06c3021 Chore: bump some dependencies to make sure license exists (#4803) 2022-09-28 20:57:17 +08:00
Xu Cheng
b8c2b7aa96 Fix: interface updateUser missing read body (#4802)
Signed-off-by: 1ch0 <github1ch0@163.com>

Signed-off-by: 1ch0 <github1ch0@163.com>
2022-09-28 17:21:37 +08:00
Tianxin Dong
7fa40dbe77 Feat: support workflow get-context cli (#4795)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-28 17:18:08 +08:00
Somefive
0fceb5ee59 Fix: add path clean for request (#4799)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-28 14:22:47 +08:00
nuclearwu
070d612a3d Fix: it does not check the same name for 'vela env init' (#4796)
Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>

Signed-off-by: wuzhongjian <wuzhongjian_yewu@cmss.chinamobile.com>
2022-09-28 10:58:29 +08:00
Somefive
668a637f86 Feat: upgrade go1.19 (#4790) 2022-09-28 10:19:28 +08:00
Tianxin Dong
9b6ec588f5 Chore: revert the definitions after cue upgrade (#4786)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-27 10:35:10 +08:00
qiaozp
e6507cd6cd Fix: allow to read definition from user's namespace when force delete (#4778) 2022-09-26 22:30:20 +08:00
Siege Lion
6287a9caeb Fix: fix the bug of cluster list (#4772)
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-26 14:49:50 +08:00
Somefive
6e986d8db1 Fix: prevent workflow rerun when appspec struct change (#4755)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-26 10:35:24 +08:00
barnettZQG
e99e1a650f Fix: deprecate the cue-packages command (#4762) 2022-09-23 16:53:52 +08:00
barnettZQG
9da8cb619d Fix: memory leak of the apiserver (#4773)
* Fix: memory leak of the apiserver

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: listen to the context done event

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the shutdown code

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-23 16:49:17 +08:00
Somefive
cb61b30e43 Fix: gc legacy rt with regularization (#4769)
* Fix: gc legacy rt with regularization

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Test: add test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-23 10:41:08 +08:00
Somefive
b9058ca360 Feat: remove skip revision affect (#4774)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-22 19:14:21 +08:00
Tianxin Dong
db3249a0b5 Chore: update cue version to fix panic in def (#4758)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-21 11:48:57 +08:00
Somefive
3fc268d13d Fix: auth lack perm for rollout (#4763)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-20 20:32:27 +08:00
barnettZQG
c780a1b2c2 Feat: optimize the definition controllers (#4751)
* Feat: optimize the definition controllers

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: generate the different label key

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: update the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-20 15:20:19 +08:00
Tianxin Dong
d98016aa3d Fix: use value instead of instance in openapi.gen (#4739)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-20 15:18:31 +08:00
Jianbo Sun
99d25a3657 Feat: support no browserver when using vela show without --web (#4756)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-20 15:18:16 +08:00
Siege Lion
d38b20de64 Feat: add feature of refreshing resource view and fix the bug of stucking (#4743)
* Fix: add test cases

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix bugs in resource view switch

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: optimize the method of resource view render

1. Separate view loading and data rendering to optimize the view rendering speed

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix the bug of ctx value transmit in resource view switch

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: Add the feature of auto refresh
Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: small fix

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-20 11:28:51 +08:00
Jianbo Sun
cdbf14c328 Feat: support addon dry-run to get the yaml results (#4753)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-19 17:24:07 +08:00
Somefive
dd22f27e39 Fix: panic when properties empty (#4745)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-19 11:17:24 +08:00
barnettZQG
e2cc8b466b Fix: query the resource duplicately (#4714)
* Fix: query the resource duplicately

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add an e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-19 10:23:10 +08:00
Siege Lion
e1cfd483cd Doc: add the design document of vela-top (#4736)
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-16 16:59:13 +08:00
qiaozp
7a7ce85acb Fix: wrong endpoint for LoadBalancer type service (#4729)
* Fix: wrong endpoint for LoadBalancer type service

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix cli test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-16 16:41:26 +08:00
Tianxin Dong
cd9ac72531 Chore: update cue version to attr and notification (#4734)
* Chore: update cue version to attr and notification

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: docgen test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-09-16 16:28:35 +08:00
Somefive
b898cecf2f Feat: fix empty cluster topology and support select non-control-plane clusters (#4731)
* Feat: fix empty cluster selector topology and support select non-control-plane clusters

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: panic bug for list clusters

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-15 17:32:07 +08:00
Siege Lion
67f1901015 Refactor: rename interfaces and functions in vela top to promote semanticity (#4727)
* Fix: rename two interface name to make the name more specific

1. rename the ResourceListener to ViewListener
2. rename the Component to View

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update the type of ”Main“ field in component.app

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: rename some functions of pageStack to make the name more readable

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some name

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add more test case

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix time format bug

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix test case in cluster_namespace_test.go

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-15 17:10:18 +08:00
Jianbo Sun
43131d88f5 Chore: update test coverage (#4730)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-09-15 13:55:16 +08:00
qiaozp
682c76b8c0 Fix: vela show panic for component markdown format (#4706)
* Fix: vela show panic for component markdown format

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* move code

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-14 16:29:25 +08:00
Somefive
ac52f4aba8 Chore: remove manualscaler (#4716)
* chore: remove manualscaler CRD define in apis/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manualscaler CRDs yaml in charts/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler design in design/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler code in doc/ hack/ legacy/ references/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: remove manual scaler code in pkg/ test/ vela-templates/

Signed-off-by: arcosx <arcosx@outlook.com>

* chore: fix some code

Signed-off-by: arcosx <arcosx@outlook.com>

* Chore: remove manualscaler in test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove outdated tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove outdated tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: arcosx <arcosx@outlook.com>
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
Co-authored-by: arcosx <arcosx@outlook.com>
2022-09-14 16:28:09 +08:00
barnettZQG
1adc6d8803 Fix: the workflow records do not delete if the driver is MongoDB (#4718)
* Fix: the workflow records do not delete if the driver is MongoDB

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-14 13:15:26 +08:00
barnettZQG
86f32574cb Fix: CVE-2022-27664 (#4721)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-09-14 12:08:42 +08:00
yangs
62710f4b01 Fix: fix the sync api script (#4720)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-09-14 11:16:44 +08:00
Tianxin Dong
3a2809f658 Fix: fix config parameter in ql (#4717)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-13 20:07:54 +08:00
Siege Lion
dd13caf3c5 Fix: fix the vela system info command can not work (#4713)
Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-13 16:18:19 +08:00
Charlie Chiang
c2d6dfe920 Fix: fix uninstallation continues when answer is no (#4709)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-09-12 21:46:58 +08:00
Somefive
cea9ef5c97 Chore: use functions from kubevela/pkg (#4693)
* Chore: use functions from kubevela/pkg

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: rename multiclusterpkg to pkgmulticluster

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-09 15:10:18 +08:00
Siege Lion
15004d9ad8 Feat: highlight the Yaml text of vela top (#4689)
* Fix: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix test case of the refactored code and some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: highlight yaml text

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix the bug in table stop.

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-09 09:33:04 +08:00
Tianxin Dong
01bf4c5ac4 Feat: add failed state in workflow (#4695)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-07 16:23:51 +08:00
qiaozp
fbf25c6ba2 Feat: add nodeport in webservice (#4696)
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-07 11:33:45 +08:00
qiaozp
d7f57ed122 Feat: request token when vela auth gen-kubeconfig (#4687)
* Feat: request token when vela auth gen-kubeconfig

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* 1.24 test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* more test on 1.24

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* rollback some logic and fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-05 17:34:51 +08:00
Somefive
19b672846f Chore: remove duplicated feature flags for workflowrun (#4691)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-09-05 16:33:21 +08:00
Nan Li
3b3e7ebb9d Fix: useless log when enabling addon (#4680)
* Fix: useless log when enabling addon

Signed-off-by: loheagn <loheagn@icloud.com>

* lint code

Signed-off-by: loheagn <loheagn@icloud.com>

Signed-off-by: loheagn <loheagn@icloud.com>
2022-09-05 13:27:28 +08:00
wyike
b9cb8fa591 fix enable addon cannot update definition bug (#4684)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-09-02 17:45:09 +08:00
Siege Lion
8df436aa3b Refactor: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code (#4679)
* Fix: refactor the source of all kinds of views, use the "Factory Method" design patterns to rewrite the code to upgrade the quality of code

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix test case of the refactored code and some bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: rename the interface of ResourceView

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-09-02 17:29:12 +08:00
Tianxin Dong
239c5474dd Chore: refactor workflow from workflow engine (#4631)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-09-02 12:55:03 +08:00
qiaozp
a3e1c4d5ce Chore: Update CODEOWNERS (#4682) 2022-09-02 11:09:59 +08:00
qiaozp
6d77b9c651 Chore: Add v1.23 to regular CI test (#4673)
* Chore: use higher k8s version in CI

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* 1.23

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* egress-selector-mode=disabled

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* egress-selector-mode=disabled

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add hub args

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix e2e test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix multicluster test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix multicluster test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add all egress

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix test

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* version matrix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* cal egress arg

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* regular v1.23 and restict concurency

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-09-01 16:57:13 +08:00
barnettZQG
d1159170d0 Fix: unknown field cluster (#4670)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-31 17:44:23 +08:00
qiaozp
d595a0592f Fix: flaky CI test (#4669) 2022-08-31 16:38:59 +08:00
qiaozp
e3c1e391f9 Chore: Migrate to k3d in CI & trim redundant steps (#4652) 2022-08-31 08:08:37 +08:00
Hair1ossTeenager
b462edeae6 Update definition.go (#4666)
fix bug, use labels to replace annotation
2022-08-30 13:59:25 +08:00
cezhang
bab9534ed8 Feat: vela revision support read the apprevision details in yaml format (#4659)
Signed-off-by: cezhang <c1zhang.dev@gmail.com>

make reviewable

fix errors

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix error

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix error

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix errors

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

fix errors

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2022-08-30 13:58:47 +08:00
Siege Lion
a393fb03d1 Feat: load the Yaml text of resource in vela top (#4665)
* Fix: fix inconsistent menu hints

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add the feature that a new view of yaml was added and by it the user can load the yaml text of resource

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-30 10:20:10 +08:00
Somefive
5116ef3398 Feat: add controller parameters for apply-once (#4663)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-29 15:35:18 +08:00
47
4e08ece053 Feat: System diagnose (#4662)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

* Feat: 1.the system info command displays the environment variables

* Fix: Making syntax simple

* Feat(system info):1.ARGS多行展示2.指定名称时无须指定namespace3.优化界面展示,支持原始打印或者以wide/yaml形式打印4.指定名称时,打印更可读信息

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:add comment

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:syntactic redundancy

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Add signoff

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:System diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Diagnose cluster-gateway pod's status

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
2022-08-29 14:00:15 +08:00
Siege Lion
3531249e1b Feat: add a new resource level view: pod view (#4661)
Pod view is the next level view of managed resource view

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-29 10:30:22 +08:00
47
a4ad1ad40f Feat: System Info & Diagnose (#4657)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

* Feat: 1.the system info command displays the environment variables

* Fix: Making syntax simple

* Feat(system info):1.ARGS多行展示2.指定名称时无须指定namespace3.优化界面展示,支持原始打印或者以wide/yaml形式打印4.指定名称时,打印更可读信息

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:add comment

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:syntactic redundancy

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Feat:Display all ARGS

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Add signoff

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

Signed-off-by: foursevenlove <foursevenlove@gmail.com>
2022-08-26 16:51:17 +08:00
Tianxin Dong
20bd1eeec5 Fix: fix notification workflow step (#4656)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-25 11:47:02 +08:00
Somefive
514ef4cc42 Feat: add get topology placement in multi-cluster provider (#4636)
* Feat: add get topology placement in multi-cluster provider

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: velaql in workflow use auth

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove ui-hidden & support filter outer

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-24 19:24:08 +08:00
Yuedong Wu
68c1da847d fix: add supported but missing provider (#4645)
Signed-off-by: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com>

Signed-off-by: Yuedong Wu <57584831+lunarwhite@users.noreply.github.com>
2022-08-23 21:15:32 +08:00
Tianxin Dong
ea20b6c47d Fix: fix signedKey using platform id (#4634)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-23 17:45:47 +08:00
Tianxin Dong
1e87f455e8 Fix: optimize workflow debug cmd (#4638)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-23 15:32:50 +08:00
Siege Lion
5a241078b7 Feat: add new system info to system info board and optimize code (#4640)
newly added system info including:
1. Cluster num
2. App running num
3. cpu and mem usage condition of vela-core
4. cpu and mem usage condition of vela-core cluster gateway

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-22 18:00:49 +08:00
qiaozp
36ee590071 Feat: add base resource section for component ref (#4635)
* Feat: add base resource section for component ref

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* read from local

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* beautify

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format imports

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-20 10:26:39 +08:00
Somefive
afb0466bcc Fix: open basic lit fails lookup path (#4632)
* Fix: open basic lit fails lookup path

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-19 16:51:11 +08:00
Charlie Chiang
309eb2e702 Feat: support zstd compression in resourcetracker (#4630)
* Feat: zstd compression in resourcetracker

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: zstd compression in resourcetracker

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: add license header

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: clearer test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: add notices

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: better benchmarks

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add gzip to e2e

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Revert: revert compression in e2e test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-08-18 16:18:56 +08:00
qiaozp
924d55381e Feat: component replication (#4449) 2022-08-17 14:04:57 +08:00
qiaozp
bcb3550025 Fix: up command example (#4626)
* Fix: up command example

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* typo

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-17 11:33:12 +08:00
Somefive
8c6d97809b Feat: support compression in ResourceTracker (#4613)
* Feat: support compression in ResourceTracker

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add test & chart values

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor comments and feature name

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-16 18:00:53 +08:00
Somefive
b9ab50ea93 Fix: skipGC remove labels for multi-cluster resource not use correct ctx (#4616)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-15 10:57:38 +08:00
Siege Lion
2e18eaa3b2 Feat: add filtering features to the Application view and K8S object view of vela top (#4612)
* Feat: when `vela top` launch, can specify the namespace of the presentation application

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: add filtering function to the k8s object view of the `vela top` command, which can be filtered by cluster and cluster namespace

Signed-off-by: HanMengnan <1448189829@qq.com>

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-15 10:36:12 +08:00
barnettZQG
72591788a6 Fix: the create time of the synced policies is zero (#4604)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-12 14:37:39 +08:00
Somefive
ad6f07297c Feat: align resource selector across policies (#4595)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-12 10:45:36 +08:00
barnettZQG
c0249c5cc3 Fix: remove the ui-hidden label and the grafana traits (#4606)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-11 17:24:04 +08:00
Charlie Chiang
be0914f839 Chore: update backport bot os (#4590)
* Chore: update backport bot os

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* go with the latest version

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-08-11 14:53:06 +08:00
wyike
14d3b676ec add rc test (#4600)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-11 14:52:43 +08:00
Somefive
d7919110cd Feat: support use update instead of patch for apply (#4592)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-10 21:30:43 +08:00
wyike
e63377092a Fix: try to fix addon flaky test (#4593)
* only for test

test

show info

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

try to fix e2e-test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

try to fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-10 19:44:21 +08:00
Tianxin Dong
436ff916b6 Fix: fix writing logs to file (#4587)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-09 23:30:23 +08:00
Zhiyu Wang
beabd4faf8 Fix: addon dependency 1.1 legacy support (#4585)
Signed-off-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
2022-08-09 20:23:32 +08:00
Somefive
f23e2a8442 Fix: gc resources without resourceversion (#4583)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-09 19:20:31 +08:00
Somefive
aa1f090fb6 Fix: add status code for cue struct (#4580)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-09 15:19:32 +08:00
Siege Lion
4d3ef75601 Feat: Add a new CLI command: vela top which can display system information and resource status in UI form (#4556)
* Feat: UI sketch init

Signed-off-by: HanMengnan <1448189829@qq.com>

* Feat: Resource data load finish

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: optimize code struct

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case and fix some bugs
1. add test case to package model
2. fix a bug of ListClusters
3. optimize code structure

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix go.mod package version

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix some bugs and optimize code structure

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix irregular code and add comments

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: supplement test cases and fix bugs

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: move the `vela status --ui` command out and add it as a new command `vela top`

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: fix package import sequence and go.mod

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add copyright header

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: update description and example of command `vela top`

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: convert color variables to const variables

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-08-09 10:56:22 +08:00
Tianxin Dong
c3ca308489 Chore: update cue version to 0.4.3 (#4425)
* Chore: update cue version to 0.4.3

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve some comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* rebase and add more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-08-08 17:57:48 +08:00
Somefive
22553d73e5 Feat: deprecated envbinding (#4576)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-08 16:15:58 +08:00
yangs
148feeb4fd Feat: definition support controller requirement (#4573)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-08-08 16:05:31 +08:00
Somefive
a2acd06ab1 Docs: add description for shared-resource (#4572)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-08 12:04:09 +08:00
Yan Xiaodong
ad879dadfb Fix: Vela CLI 纳管集群后,无法通过APi接口对该集群创建namespace #4421 (#4507)
* Fix: Vela CLI 纳管集群后,无法通过APi接口对该集群创建namespace #4421

Signed-off-by: yanxiaodong <yanxd0818@cmbchina.com>

* Fix: Vela CLI 纳管集群后,无法通过APi接口对该集群创建namespace #4421

Signed-off-by: yanxiaodong <yanxd0818@cmbchina.com>
2022-08-08 12:02:25 +08:00
Somefive
0b03f99765 Fix: remove multicluster app test for apply-in-order for addon (#4554)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-08 11:56:44 +08:00
wyike
db26a037f3 Fix: fix addon bond component annotaion (#4571)
* fix miss spell annotation

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-08 11:49:48 +08:00
Charlie Chiang
2d8cb1278c Fix: reject applications with empty policy properties (#4563)
* Fix: reject applications with empty policies

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: change err msg

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: use 400 instead of 422 to show err msg

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-08-05 15:03:52 +08:00
qiaozp
fcafbef8c5 Fix: vela CLI provider compatibility (#4561)
* Fix: vela CLI provider compatibility

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* List interface won't return NotFoundError

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* format imports

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-05 14:05:23 +08:00
Somefive
6fbbdc97ca Fix: typo in load-test readme (#4560)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-04 17:27:41 +08:00
Somefive
9fae4df34e Fix: compare resource without version (#4559)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-04 17:26:31 +08:00
Somefive
afc1d425d7 Feat: ignore control check for resource without resource version (#4553)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-04 15:27:25 +08:00
Jianbo Sun
fce66879e7 Chore: fix cli description to remove html tag format (#4550)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-08-03 19:18:57 +08:00
barnettZQG
bb67ecaecf Fix: remove the cloudshell dockerfile (#4546)
* Fix: remove the cloudshell dockerfile

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the configmap name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the way to get the namespace

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-03 15:49:40 +08:00
ghostloda
ccb122d4a7 Feat: report the manifest name when addon enabling failed (#4545)
* Feat: Report the manifest name when Addon enabling failed

Signed-off-by: ghostloda <78798447@qq.com>

* Apply suggestions from code review

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
Signed-off-by: ghostloda <78798447@qq.com>

* Apply suggestions from code review

Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: ghostloda <78798447@qq.com>

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
Co-authored-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-08-03 13:51:20 +08:00
qiaozp
7964ec90e4 Fix: sidecar trait (#4541)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-02 23:08:44 +08:00
barnettZQG
5e7135f00d Fix: upgrade the cloudshell image (#4538)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-02 22:17:54 +08:00
wyike
258d816184 Feat: Check def binding to a component (#4531)
* finish logic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* finish tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-02 21:36:58 +08:00
Somefive
53e5a3ff2d Feat: support change resource gc policy from onAppUpdate to Never (#4530)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-02 20:17:47 +08:00
qiaozp
233fe5e7a7 Fix: publish chart version (#4535)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-02 20:12:22 +08:00
qiaozp
b4c65441c9 Chore: update chart-publishing, only push index and new charts (#4529)
* Chore: update chart-publishing, only push index and new charts

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-08-02 19:28:11 +08:00
Somefive
73f983e61e Fix: storage patch env (#4523)
* Fix: empty health policy do not check object existence

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: fix health check error

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: app use storage and env trait

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-02 19:17:16 +08:00
barnettZQG
c8a16adfe8 Feat: add the daemonset resource rule for building the tree (#4525)
* Feat: add the daemonset resource policy for building the tree

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the import package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some function and variable names

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-02 19:12:54 +08:00
Arena.Su
d300d1b2d7 Feat: add http status and code from http cmd run (#4516)
* Feat: add http status and code from http cmd run

Signed-off-by: suxiang <704427617@qq.com>

* Feat: fix unit test error

Signed-off-by: suxiang <704427617@qq.com>

* Feat: status is not necessary

Signed-off-by: suxiang <704427617@qq.com>

* Feat: make reviewable

Signed-off-by: suxiang <704427617@qq.com>

* Feat: add unit test

Signed-off-by: suxiang <704427617@qq.com>

* Feat: make reviewable

Signed-off-by: suxiang <704427617@qq.com>
2022-08-02 16:16:10 +08:00
wyike
1053501df1 Fix: fix e2e flaky tests (#4521)
* try to show

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add mock server back

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix flaky tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e-test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

only for tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

* only for tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-08-02 15:16:42 +08:00
Somefive
aaf3f14fee Fix: empty health policy do not check object existence (#4496)
* Fix: empty health policy do not check object existence

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: fix health check error

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-08-02 10:56:37 +08:00
barnettZQG
8dfc8e35a6 Fix: can not find the resource when the resource namespace is diffrent with application (#4517)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 22:41:41 +08:00
barnettZQG
976d683185 Feat: refactor CLI commands related to resources (#4500)
* Feat: refactor CLI commands related to resources

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove the old test case.

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize test cases

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: rename 'vela pods' to 'vela status --pod'

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: sort the objects

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: list the pod by the labels

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: order the tree resource

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: set multicluster config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 19:44:27 +08:00
barnettZQG
b05d3bb066 Fix: there is no color in the diff report (#4511)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-08-01 18:26:38 +08:00
Zhiyu Wang
f7d3fbaeca Fix: missing return when token is null (#4512)
Signed-off-by: Zhiyu Wang <cloudsky.newbis@gmail.com>
2022-08-01 16:02:18 +08:00
codinghuang
f1790e5e6b Feat: support set labels for env (#4422)
* Feat: support set labels for env

Signed-off-by: codinghuang <codinghuang@qq.com>

* Refactor: Remove util.ParseLabelString

use k8s.io/apimachinery/pkg/labels

Signed-off-by: codinghuang <codinghuang@qq.com>
2022-07-29 19:14:05 +08:00
barnettZQG
4334c4c195 Fix: failed to assign the default role for the users who log in from dex (#4491)
* Fix: failed to assign the default role for the users who log in from dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: cluster e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the ensure namespace error is ignored

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-29 17:17:43 +08:00
barnettZQG
c6ae772cc1 Fix: CloudShell read-only authorization is not automatically revoked (#4495)
* Fix: CloudShell read-only authorization is not automatically revoked

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: rename the prefix

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-29 16:42:24 +08:00
wyike
c372578e59 Fix: check definition of addon whether is conflict (#4493)
* fix checksemver

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

override defs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add test and fix some special cases

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix checkdiff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix flags

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-29 16:42:16 +08:00
47
8a82ac6277 Feat: System Info & Diagnose (#4379)
* Feat: System Info & Diagnose

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.misspelling 2.license

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix: pattern of imported package

Signed-off-by: foursevenlove <foursevenlove@gmail.com>

* Fix:1.return error instead of panic 2.get deployment by label instead of by namespace 3.when getting a single deployment, the result is displayed in multi rows. Feat: 1.the system info command displays the cpu and memory metrics 2.the system info command displays the numbers of ready pods and desired pods.

* Feat: 1.the system info command displays the environment variables

* Fix: Making syntax simple
2022-07-29 13:47:35 +08:00
qiaozp
7cdaa09660 Chore: organize appliesToWorkloads field of trait defs, add doc example (#4483)
* Chore: organize appliesToWorkloads field of trait defs, add doc example

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix gen

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add deprecate label

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* fix script to read all definition in directory

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* add comment

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* go.mod

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* update some usage, better trait doc gen

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* minor fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* minor fix

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>

* postpone markdown escape pipe char

Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-07-29 11:20:55 +08:00
忘尘
20877f7946 Fix: repeat query configuration type (#4492)
Signed-off-by: ghostloda <78798447@qq.com>
2022-07-28 14:11:32 +08:00
Arena.Su
b95980a92b Feat: delete multi apps from vela delete cli command (#4484)
Signed-off-by: suxiang <704427617@qq.com>
2022-07-27 18:58:21 +08:00
Jianbo Sun
4283a0caef Chore: update code owner (#4482)
* Chore: update code owner

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: update code owner

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-27 17:24:50 +08:00
Somefive
1fcb6395db Fix: rename pressure-test to load-test (#4481)
* Fix: rename pressure-test to load-test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: rename in texts

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-27 11:48:52 +08:00
Charlie Chiang
edc6d9c551 Fix: address vela-core crash due to empty policy properties (#4473)
* Fix: fix topology core crash

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: same problem in other places

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove empty line

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: raise error when empty topology is used

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: raise error when empty override policy is used

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-27 08:45:01 +08:00
Charlie Chiang
feede077f6 Feat: show warnings about internal addon rendering logic (#4472)
* Feat: show warnings about addon rendering logic

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: update vela init to not show warnings

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use setter

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* fix check-diff

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-26 23:35:50 +08:00
yangs
cfda756e0f Fix: fix logs to record the right publish version (#4471)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-07-26 23:33:18 +08:00
Jianbo Sun
932553ac83 Chore: refactor addon enable with package (#4467)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-26 15:22:37 +08:00
Jianbo Sun
24c6514874 Fix: docker file fail to build for vela cli (#4464)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 22:44:26 +08:00
Arena.Su
70eb639ba7 Feat: delete svc flag from vela delete cli cmd (#4448)
Signed-off-by: suxiang <704427617@qq.com>
2022-07-25 22:17:07 +08:00
yangs
c2a4169e6d Fix: The apply failure error is ignored when the workflow is executed (#4455)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-07-25 22:16:24 +08:00
Jianbo Sun
8fd47ef5b9 Feat: support vela addon enable with package (#4443)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 22:15:59 +08:00
Somefive
e595879da9 Feat: add featuregates to disallow url in ref-objects (#4446)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-25 22:03:10 +08:00
wyike
c68061bca7 Feat: support outputs for addon (#4444)
* support outputs for addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-25 21:32:32 +08:00
Charlie Chiang
bb8f4e426a Feat: make addon init use the latest CUE addon template (#4434)
* Feat: make addon init use the latest CUE addon template

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: simplify init cmd

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: ignore metadata

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: remove status

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* do not marshal to application

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: only look for output field

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: use global constant

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests according to changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-25 21:32:01 +08:00
barnettZQG
89037b2123 Feat: support to query the alias of the project member (#4441)
* Feat: support to query the alias of the project member

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 21:28:35 +08:00
Jianbo Sun
4814bce594 Feat: adapt vela port-forward with the velaql (#4439)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 21:27:31 +08:00
barnettZQG
26234f5ebf Fix: the history applications are repeatedly synchronized (#4447)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 21:25:33 +08:00
Jianbo Sun
6a9064b823 Revert "Chore: upgrade kind in tests, fix flaky test (#4105)" (#4450)
This reverts commit 8aaf526877.
2022-07-25 19:07:46 +08:00
Charlie Chiang
572fba3539 Fix: address failure when rendering addon API schemas (#4433)
* Fix: address failure when rendering addon API schemas

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: address failure when rendering addon API schemas

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-25 17:00:57 +08:00
barnettZQG
73627b8d54 Fix: support to test authentication with dex (#4429)
* Fix: support to test login with dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: support to update the user when the login mode is dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: systemInfoService is nil

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 15:26:47 +08:00
barnettZQG
e2031c1a7f Feat: support to init the roles of the user who login by dex (#4431)
* Feat: support to init the roles of the user which login by dex

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: make the sub string to lower

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-25 11:13:04 +08:00
Jianbo Sun
cae4aa4a76 Chore: update description of policy/workflowstep definition (#4428)
* Chore: update description of policy definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: support workflow step generation for doc

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: refactor package refereces/plugins to references/docgen

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: add examples of def docs for workflow step

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: refine workflow description

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: refine the workflow step definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: update workflow step definition

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-25 10:34:26 +08:00
ivyilike
3e57246740 Feat: support vela def apply for directory (#4142)
Co-authored-by: ivyilike <pww123@cmbchina.com>

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-24 16:34:13 +08:00
qiaozp
573f60170c Feat: trim redundant makefile denpendency (#4426)
Signed-off-by: qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
2022-07-23 14:02:50 +08:00
wyike
25b0cb8ee1 Feat: Addon support app template written by cuelang. (#4401)
* pass tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

refactor some codes

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

WIP delete useless workflow

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add checklegacy addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

refactor some logics

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix panic test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless addon test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix empty clusterargs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* rewrite some logic to support parameter ui

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* rename template cue

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix panic test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix render tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix checkdiff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* update file header

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-22 17:58:19 +08:00
barnettZQG
96ece000dc Feat: support to sync the revision and the workflow status (#4419)
* Feat: support to sync the revision and the workflow status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: pass the unit test and e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: update the component pod view

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the pod struct does not match

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: optimize the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-22 16:14:38 +08:00
StevenLeiZhang
67f3f2747a Fix: vela addon upgrade missing the history args (#4388)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-07-22 14:39:09 +08:00
Charlie Chiang
5890b58aea Feat: get raw Application yaml, json or jsonpath (#4415)
* Feat: get raw Application

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: add gvk

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: git rid of managedFields

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typos

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add test and make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-22 14:36:50 +08:00
barnettZQG
68967f7af8 Fix: the env name is empty (#4412)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-22 10:37:04 +08:00
Jianbo Sun
68a9565a1f Chore: trim debug info (#4423)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-22 10:36:38 +08:00
qiaozp
8aaf526877 Chore: upgrade kind in tests, fix flaky test (#4105)
* Chore: upgrade kind in tests, fix some hacky test.

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* longer wait

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* make e2e-multicluster test timeout 20m

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* switch to kind v0.14.0

Signed-off-by: 伊灵 <qiaozhongpei.qzp@alibaba-inc.com>
2022-07-22 10:09:31 +08:00
Jianbo Sun
957302cb9d Feat: support vela kube apply for CUE and JSON files (#4420)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-21 16:02:57 +08:00
ZhongsJie
285a5cce18 Fix: ignore save when source is local-path (#4417)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-07-21 14:30:49 +08:00
ZhongsJie
d386b64ea2 Feat: provide defualt namespace for dry-run (#4416)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-07-21 10:04:20 +08:00
Tianxin Dong
181bc926f6 Fix: fix backoff time after default backoff times (#4413)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-20 15:45:23 +08:00
barnettZQG
ab6c1a57eb Fix: the empty SectionName causes panic (#4408)
* Fix: the empty SectionName causes panic

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 22:05:56 +08:00
TIEDPAG
e37b0276c8 Feat: support addon helm repo skip tls verify (#4122) (#4146)
* Feat: support addon helm repo skip tls verify (#4122)

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: mv http server to BeforeSuite

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci error

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix merge

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Feat: support addon helm repo skip tls verify (#4122)

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: mv http server to BeforeSuite

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci error

Signed-off-by: damianqin <damianqin@tiedpag.club>

* Fix: fix ci

Signed-off-by: damianqin <damianqin@tiedpag.club>

Co-authored-by: damianqin <damianqin@tiedpag.club>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-19 18:00:28 +08:00
Somefive
fd784e291c Feat: add several policy definition (#4409)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-19 15:47:01 +08:00
Tianxin Dong
16dfc1bf8a Feat: add pending phase in workflow step (#4365)
* Feat: add pending phase in workflow step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-19 14:31:20 +08:00
barnettZQG
f876a0b8f8 Fix: only compare with the default environment (#4402)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-19 11:01:33 +08:00
wyike
60129e0f94 Fix: fetch workflowpolicy policy info when request detail policy info (#4403)
* fix several bugs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix commentes

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

move test back

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-19 10:29:41 +08:00
Somefive
e747eae779 Fix: prevent apply existing orphan resource (#4399)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-18 19:23:41 +08:00
Jianbo Sun
b24e7523d8 Feat: generate docs for reference automatically (#4377)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: refactor hardcode example to embd.FS

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: refactor doc gen for general types

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: update generate format

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: generate terraform reference docs

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: add definition reference generate script

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: refine output format

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: remove dup annotation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: update doc

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add i18n support

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: add translation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: add policy definition gen

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add compatibility for lable Annotation change

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add more tests

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Feat: allow mark example doc url on annotation

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: align vela show with vela def doc-gen, add vela def show equals with vela show

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-18 19:22:55 +08:00
barnettZQG
a519a6c89d Feat: optimize the dry run feature (#4364)
* Feat: optimize the dry run feature

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the bcode

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some names

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-18 14:01:11 +08:00
Charlie Chiang
ace23f1c6f Feat: enhance addon init (#4370)
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-18 10:40:42 +08:00
Zheng Xi Zhou
557f7197b5 Fix: examples on how to use cloud resources (#3385)
Added RDS and OSS examples to show to use cloud resources

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-07-18 10:18:42 +08:00
Jianbo Sun
01737d62b0 Chore: split unit test from e2e test for apiserver and use skip-dup v4 (#4369)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-16 17:34:52 +08:00
barnettZQG
945852284f Fix: read the ca cert from the test env (#4391)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-15 22:09:13 +08:00
Tianxin Dong
eed081fd6f Fix: fix volumes duplicate in list (#4387)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-15 20:09:44 +08:00
wyike
203a7dfbda add two fileds (#4383)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-15 16:00:59 +08:00
Somefive
cba8cb4c94 Fix: add usage comment for ref-objects (#4384)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-14 18:49:54 +08:00
barnettZQG
1fc65f56bf Feat: support HTTPRoute to generate endpoint (#4378)
* Feat: support HTTPRoute to generate endpoint

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: print the inner in CLI

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 18:15:20 +08:00
wyike
c29e980e8a Fix: fail directly when app terminated (#4363)
* fail directly when app terminated

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* support suspend

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix typo

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-14 18:14:09 +08:00
barnettZQG
e52ae78bd7 Fix: the project manager no permission to query the project base info (#4380)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-14 11:54:58 +08:00
wyike
930d866e09 Feat: velaux support override policy (#4352)
* velaux support override policy

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* in the middle of add test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

in the middle of work

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

reverse flacky test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix goling

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add test for syspend step

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-14 11:52:49 +08:00
Somefive
3159da0bb3 Fix: several minor bugs (#4367)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-14 10:51:22 +08:00
Jianbo Sun
8571aa76ef Fix: abuse timeout context in terraform provider (#4374)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 15:47:15 +08:00
Jianbo Sun
072b80f6c6 Feat: support vela def apply for yaml definition (#4372)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 15:31:30 +08:00
Jianbo Sun
cde76989a0 Feat: support resource topology for endpoints (#4362)
* Feat: support resource topology for endpoints

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: add and refactor the test for endpoint

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-13 14:51:06 +08:00
Somefive
3b3898bf71 Feat: add status check for expose trait (#4356)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-12 13:24:56 +08:00
barnettZQG
c43575a63c Fix: add the job of independently publishing chart packages (#4360)
* Fix: add the job of independently publishing chart packages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the job of independently publishing chart packages

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-12 12:23:28 +08:00
huiwq1990
b0020b0600 cleanup cluster exist check (#4357)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-12 11:11:06 +08:00
Tianxin Dong
a8d5403fee Feat: optimize imports packages to reduce 75% cpu with better performance (#4345)
* Feat: optimize imports packages

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-11 17:32:18 +08:00
Jianbo Sun
649aaa29a4 Chore: upgrade cloud.google.com/go/compute to 1.7.0 (#4350)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-11 17:29:23 +08:00
Somefive
40c76071a8 Fix: init container bug (#4351)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 17:02:03 +08:00
Jianbo Sun
4bd4e9014f Feat: support read from URL for --file command globally (#4346)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-11 16:59:54 +08:00
Somefive
0cb85d897a Fix: health check use original ns if no override and original exists (#4349)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 16:46:14 +08:00
Somefive
2cfedf7439 Fix: escape resource name for label selector (#4348)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 15:26:14 +08:00
Somefive
b9b6c5f8bf Fix: ignore empty output file (#4347)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-11 14:59:32 +08:00
Somefive
ec094f2e36 Fix: enhance sidecar & init traits (#4341)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-08 19:08:38 +08:00
barnettZQG
b7bf9df55f Feat: supports multiple difference compare modes (#4334)
* Feat: supports multiple difference alignment modes

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change field name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-08 09:38:18 +08:00
Somefive
201f68c6cd Feat: add daemon component def (#4335)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-07 19:48:52 +08:00
Somefive
cae7b327f8 Feat: reuse informer for app metrics (#4336)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-07 16:46:35 +08:00
Somefive
fd70aa96e9 Fix: disable apprev status update when apprev disabled (#4337)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-07 15:32:46 +08:00
Charlie Chiang
3a6d947f07 Feat: create VelaQL views using vela ql apply (#4324)
* Feat: create VelaQL views using `vela ql create`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: merge reusable function

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format import

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for `status` or `export` fields

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: rename variables

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-07 13:59:16 +08:00
wyike
5de790413f Feat: support self-signed helm repo (#4322)
* support self-signed helmrepo

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix golint

fix golint error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add certkey and certfile

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-07 12:21:59 +08:00
barnettZQG
09acc8a989 Fix: the target conflict when syncing the application (#4312)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-06 17:54:16 +08:00
Jianbo Sun
37605a1a8d Fix: filter last applied config for CRD, fixes #3679 (#4331)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-06 17:42:54 +08:00
Jianbo Sun
e0ab16851e Chore: refine the output of velaux addon fixes #3902 (#4332)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-07-06 17:42:20 +08:00
wyike
4ed3171b8e Fix: more cluster system info range. (#4329)
* more collect info

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-06 16:13:33 +08:00
huiwq1990
a3ab08741e end logic not use (#4325)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-06 15:46:10 +08:00
huiwq1990
c97124a30f Feat: add policy parser test (#4174)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-07-06 15:42:06 +08:00
Charlie Chiang
da5282a15d Feat: show or list revisions in vela def get and vela show (#4307)
* Feat: support --version when getting definitions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for vela show

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-06 15:41:00 +08:00
Charlie Chiang
be317c412a Feat: print complex values in addon parameters (#4309)
* Feat: support nested parameters in addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show all params

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: handle any addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: add a error check on json marshell

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-07-06 15:39:46 +08:00
Sumit Tembe
a422ae8ab4 Feat: don't ask user confirmation when delete with --force or --yes (#4259)
* feature: don't ask user confirmation when delete with --force or --yes

Signed-off-by: Sumit Tembe <sumit.tembe@outlook.com>

* added a new flag 'yes'

* don't skip user confirmation for --force

* skip user confirmation for --yes
2022-07-06 15:34:41 +08:00
Somefive
4509b974ad Feat: enhance deploy workflow step generator (#4315)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-06 14:31:46 +08:00
jiangshantao
d85f95fa19 Fix: ref-objects parameter with invalid field definition (#4319)
* fix: ref-objects parameter with invalid field definition

which cause validating webhook failed when use ref-objects component

Signed-off-by: jiangshantao <jiangshantao-dbg@qq.com>

* fix: run make reviewable

Signed-off-by: jiangshantao <jiangshantao-dbg@qq.com>

Co-authored-by: jst <jst@meitu.com>
2022-07-06 14:09:00 +08:00
barnettZQG
0e71a9d044 Feat: set the cloudshell instance max live time (#4313)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-05 10:58:00 +08:00
Jianbo Sun
eea8570e10 Feat: add the CloudShell feature (#4280)
* Feat: add the CloudShell feature

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: handle the error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change the auth package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the CSR name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the generate function

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 23:31:15 +08:00
barnettZQG
2af8ab13d6 Fix: fail to query the application logs with the special characters (#4305)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-07-01 20:14:05 +08:00
Jianbo Sun
9042bb29d5 Fix: Jfrog Webhook Handler Cannot Get Right Image (#4301)
Merge branch 'release-1.4'

Apply suggestions from code review

Co-authored-by: lqs429521992 <lqs429521992@qq.com>

Update webhook.go

Fix: format

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Co-authored-by: qingsliu <lqs429521992@qq.com>
2022-07-01 20:04:50 +08:00
Tianxin Dong
c6d170fef6 Fix: fix the goroutine leak in http request (#4298)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-07-01 17:52:54 +08:00
Somefive
8f11b5b1a4 Fix: kube apply ignore userinfo for rt (#4297)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-01 17:30:55 +08:00
wyike
7df0f20f70 support only provide vela or kubernetes version requirement (#4284)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

helm package logic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-07-01 17:06:22 +08:00
Somefive
51a60593cf Fix: context.namespace use override namespace when rendering component and trait (#4291)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-07-01 15:28:25 +08:00
Charlie Chiang
b2dfee134b Feat: print addon parameters recursively (#4290)
* Feat: support nested parameters in addon parameters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show all params

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-30 23:38:38 +08:00
huiwq1990
68d2d84880 addon use cluster sdk to check deploy (#4282)
Signed-off-by: huiwq1990 <huiwq1990@163.com>
2022-06-30 19:10:32 +08:00
Somefive
de37545a12 Feat: disable component revision for component wo rollout (#4281)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-30 16:22:46 +08:00
qiaozp
7a87e6e632 Chore: avoid update version file when publish smaller version (#4272)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-06-30 15:50:04 +08:00
Somefive
0469ba494e Fix: controller use cluster client to support empty label selector selecting local cluster (#4275)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-29 19:04:28 +08:00
Siege Lion
cdafc03e7d Feat: search useful addon version automatically (#4232)
* Feat: search useful addon version automatically

Verify whether the current addon version meets the system version requirements according to the obtained specified version. There are two system version requirements: Vela core version, K8s version.

If meet the requirements and continue to perform the next task.

If the requirements are not met, obtain the highest version that meets the requirements

Refs #4181

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: Optimize function implementation and code order, and modify test cases

add more comments of function

optimize package import sequence

optimize user interaction logic and error information extraction logic

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: change template string of regular expression to const type string

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-06-29 17:46:56 +08:00
Jianbo Sun
0ece1d4400 Chore: update readme (#4279)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-29 16:22:55 +08:00
Somefive
ffb0d2fa87 Feat: enhance ServiceAccount trait to support privileges (#4276)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-29 14:59:06 +08:00
Jianbo Sun
71df27a8c3 Fix: support stdin and url for vela ql (#4274)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-29 14:50:24 +08:00
Charlie Chiang
370940070b Feat: filter definitions by which addon installed them (#4156)
* Feat: filter by source addon in `vela def list`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: change header year to 2022

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use generic filters for extensibility

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: change variable addonFilter to addonName

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests according to code changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: unify SearchDefinition params using filters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: simplify tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove redundant code

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests with multiple filters

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show SOURCE-ADDON column in `def list`, if any

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add addon filter to apiserver definition-lists

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix lint issues

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: update swagger doc accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for filter Applying

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add a helper function to apply filters to lists

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add OwnerAddon to DefinitionBase

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for OwnerAddon field

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add addon util tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-29 10:55:50 +08:00
Charlie Chiang
d3454ec9d5 Feat: implement addon push command (#4261)
* Feat: implement addon push command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: split functions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add command usages

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for addon push command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: fix lint

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix old incomplete tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: also add test in pkg/addon

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: sort import

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: add break in for loop and remove default repo checks

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format imports

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: add a cli option to keep original Chart.yaml

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typo in comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add more help text

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-28 20:16:45 +08:00
Tianxin Dong
4ecb26e8a2 Feat: store outputs for unsuccessful steps in workflow context (#4270)
* Feat: store outputs for unsuccessful steps in workflow context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix the test of velaql

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-28 18:49:17 +08:00
Jianbo Sun
0e98959d61 Fix: trim quot char for velaql output (#4267)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-27 16:48:31 +08:00
Jianbo Sun
8b441b6579 Fix: provider can't be added since 1.4 as context abused && Feat: add cache for remote terraform module in vela show (#4256)
* Fix: provider can't be added since 1.4 as context abused

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add cache for remote terraform module in vela show

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: add message for terraform resource in error state

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-27 11:31:06 +08:00
Tianxin Dong
82fc74840d Fix: fix the dash case in if validate for inputs (#4253)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-27 11:28:00 +08:00
Sumit Tembe
5b9fb49a91 Feat: omit service output if there's nothing (#4260)
Signed-off-by: Sumit Tembe <sumit.tembe@outlook.com>
2022-06-27 10:18:43 +08:00
Carmen de Lope Contreras
15a56408fc environment from configmap or secret not mandatory in task and crontask componentdefinition (#4252)
Signed-off-by: Carmendelope <carmen@napptive.com>
2022-06-25 08:56:07 +08:00
Somefive
92fa67cd69 Feat: support url in ref-objects (#4240)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 19:34:51 +08:00
wyike
c4e1f39d28 Feat: Support kruise rollout (#4243)
* Feat: support kruise rollout

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

resolve roll back

fix

add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix

* fix rollback

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

topology filter by owner reference

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix imports

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

* rollback related tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

rename the operator

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix bugs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

* clean args before start

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

* remove replace go mod

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix operation tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Co-authored-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 18:03:04 +08:00
StevenLeiZhang
dc660fc97d Fix: vela status print wrong STATUS (#4239)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-06-24 17:00:38 +08:00
Charlie Chiang
f8833e34bc Feat: implement addon init command (#4162)
* Feat: implement addon create command

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make global vars local

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix typos

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: create test for file utils

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: use -p flag to manually specify paths

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: make changes according to comments

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: create empty scaffold if Chart-related paramaters are not provided

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: fix golangci-lint warnings

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add cli tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show URL in errors if an invalid URL is detected

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-24 14:25:36 +08:00
Somefive
198fcfcc73 Feat: add metrics for workflow and app phase (#4236)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 14:15:02 +08:00
wyike
22fe52b19c Feat: skip validating version check (#4231)
* skip validating version check

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix commments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add compatible logic for old controller

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* modify minimal

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-24 14:11:57 +08:00
Somefive
9c7d3f408d Feat: support shared resource (#4213)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-24 10:56:27 +08:00
Zheng Xi Zhou
4c90e90fff Fix: fixed the problems of display definition in web and support displaying WorkflowStep and Policy (#4234)
* Fix: fixed the problems of display definition in web

Some ComponentDefinitions, TraitDefinitions, WorkflowDefinitions
failed to show the usage in web browser

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

* set printable type for {}

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

* support WorkflowSteps and Policies

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

Co-authored-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
2022-06-23 19:45:49 +08:00
Tianxin Dong
e10928d96f Feat: add mode and meta in workflow (#4206)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-23 10:55:34 +08:00
Tianxin Dong
72ac218982 Feat: add timeout and if examples (#4226)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-23 10:30:24 +08:00
Somefive
85173a7597 Fix: json-patch & json-merge-patch open result (#4225)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-22 19:55:58 +08:00
Tianxin Dong
f7be1cd2fc Feat: support more expressions in if and op.Fail (#4151)
* Feat: support more expressions in if

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix cache overrides context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix skip status

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in tasks

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add fail action

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix annotation in tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add failed reason in substeps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix look up nil value

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* optimize the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add status in if

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix dash case

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-22 14:51:23 +08:00
barnettZQG
cf296b757c Chore: change the acr registry address (#4214)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-22 13:48:33 +08:00
barnettZQG
2ec18bd52e Feat: add the API for querying the image info (#4209)
* Feat: add the API for querying the image info

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-21 15:03:55 +08:00
Somefive
73be281273 Fix: cue patch remove temp var (#4207)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-20 17:36:28 +08:00
Jianbo Sun
71a02b434b Feat: support dry run for policy (#4201)
* Feat: support dry run for policy

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: upgrade runc package

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-20 16:15:06 +08:00
barnettZQG
2ac3a7562d Feat: support to manage the CLI-created apps in VelaUX (#4197)
* Feat: support for automatically hosting CLI-created apps

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: add the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-20 16:06:48 +08:00
Charlie Chiang
e81d8ddacb Fix: skip endpoint table if no endpoints are found in addons (#4166)
* Feat: skip endpoint table if no endpoints are found in addons

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: rename function name

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: update tests to also exclude endpoints

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: reduce code changes

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-20 10:37:40 +08:00
Zhiyu Wang
e572235434 Feat: cli def alias support (#4185)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-06-18 10:34:44 +08:00
Jianbo Sun
f157515251 Feat: enhance velq ql and support cue file (#4196)
* Feat: enhance velq ql and support cue file

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* add statement

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-17 13:44:09 +08:00
Somefive
6ed041c590 Fix: clear namespace for cluster scoped resource for dispatching (#4193)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-16 14:29:08 +08:00
Zheng Xi Zhou
195c4267c6 Fix: fix the annotation for APIService (#4187)
Make the annatation for cert-manger be the same as the new version
secret

Signed-off-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>

Co-authored-by: Zheng Xi Zhou <zhengxi.zzx@alibaba-inc.com>
2022-06-16 11:01:18 +08:00
wyike
d2fca08acb Feat: cli addon add registry add more git types (#4170)
* add more git types

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-16 10:54:23 +08:00
maoyangLiu
dc0c194833 fix typo mistake (#4186) 2022-06-15 19:05:08 +08:00
Somefive
27ec48b617 Fix: enhance CLI for managing OCM clusters (#4165)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-15 11:18:59 +08:00
Xiangbo Ma
9d414ce123 Fix: fix trait customStatus error when controlPlanOnly=true (#4167)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-06-15 11:18:26 +08:00
Siege Lion
a9210487fa Fix: add handle of ".yml" type in readviewfile function (#4172)
handle of files of type ".yml" is ignored in the original function

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-06-15 00:29:16 +08:00
Siege Lion
0c190ef329 Feat: add the feature that views in addon are applied independently.(#3905) (#4154)
* Feat: add the feature that views in addon are applied independently.(#3905)

separate the deployment of views in addon and deploy them separately instead of nested in application.

see the issue for details

Refs #3905

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add test case of readViewFile.

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add the apply method of yaml view.

Signed-off-by: HanMengnan <1448189829@qq.com>

* Fix: add addon suit-test case

Signed-off-by: HanMengnan <1448189829@qq.com>
2022-06-13 20:07:20 +08:00
Tianxin Dong
87673093e9 Feat: add timeout in workflow step (#4121)
* Feat: add timeout in workflow step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: implement timeout in steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* support backoff time for timeout

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix resume workflow cli

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* set suspend to false when terminate the workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add validate workflow step name and more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* optimize the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-06-13 14:30:52 +08:00
barnettZQG
75156d5e75 Feat: optimize the API that list and detail definition (#4147)
* Fix: ignore the error that the definition API schema is not exist

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: disable the cache when listing the definitions

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-13 13:24:30 +08:00
Somefive
2411399683 Feat: support insecure cluster (#4157)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-06-13 13:14:25 +08:00
kang.feng
f978519e69 Fix: mongoDB datastore can't list special email user(#4104) (#4129)
* Add description column to vela trait and component command (#4107)

Signed-off-by: Holger Protzek <holger.protzek@springernature.com>
Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)
     change the function name from verifyUserValue to verifyValue
     add test case to test kubeapi.go:87

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)
     change the function name from verifyUserValue to verifyValue
     add test case to test kubeapi.go:87
     add delete test case

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)
     optimize the test case

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)
     optimize the test case use user
     change all verify timing in kubeapi

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Fix: mongoDB datastore can't list special email user(#4104)

Signed-off-by: fengkang <fengkangb@digitalchina.com>

Co-authored-by: Holger Protzek <3481523+hprotzek@users.noreply.github.com>
2022-06-10 15:26:48 +08:00
dependabot[bot]
6eca997ddd Chore(deps): Bump github.com/emicklei/go-restful/v3 (#4144)
Bumps [github.com/emicklei/go-restful/v3](https://github.com/emicklei/go-restful) from 3.0.0-rc2 to 3.8.0.
- [Release notes](https://github.com/emicklei/go-restful/releases)
- [Changelog](https://github.com/emicklei/go-restful/blob/v3/CHANGES.md)
- [Commits](https://github.com/emicklei/go-restful/compare/v3.0.0-rc2...v3.8.0)

---
updated-dependencies:
- dependency-name: github.com/emicklei/go-restful/v3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-10 10:19:11 +08:00
Charlie Chiang
f8272d822b Chore: fix potential bot failures (#4141)
* Chore: fix potential bot failures

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: add npm cache

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Chore: fix ubuntu version to 20.04 in issue-commands

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-06-09 22:45:05 +08:00
wyike
cbf9776fea Fix: api not exist don't break whole query process (#4130)
* make resource tree more

resourceTree more robust

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* log the error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-09 11:36:08 +08:00
ZhongsJie
ca0faa1f46 Fix: vela addon registry get panic (#4135)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-06-09 10:15:47 +08:00
JarHMJ
146bcbd9a8 Feat: render color for outputs of vela up command (#4133)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-06-09 10:15:05 +08:00
Charlie Chiang
b77cdaf5f5 Fix(cli): avoid incorrect addon name when using dot as local addon path (#4126)
* Fix(cli): avoid issues when using dot as local addon path

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): add tests for `vela addon enable .`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): use sample addon to test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): fix typos in tests accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): correct file path

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): do not focus single test

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test(cli): fix typos in tests accordingly

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: correct error output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-06-09 10:12:19 +08:00
Holger Protzek
deaf309f9b Add description column to vela trait and component command (#4107)
Signed-off-by: Holger Protzek <holger.protzek@springernature.com>
2022-06-08 14:28:32 +08:00
dependabot[bot]
910cb50ac3 Chore(deps): Bump github.com/containerd/containerd from 1.5.10 to 1.5.13 (#4123)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.10 to 1.5.13.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.5.10...v1.5.13)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-07 21:13:24 +08:00
Jianbo Sun
c1ccfb1d83 Fix: bump oamdev/kube-webhook-certgen to v2.4.1 to support arm64 (#4113)
* Fix: split the image build process to make it faster

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: bump oamdev/kube-webhook-certgen to v2.4.1 to support arm64

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-05 14:16:31 +08:00
Jianbo Sun
05b45fa52c Fix: change the image name in ghcr to align with docker image registry (#4110)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-04 14:11:58 +08:00
Afzal Ansari
373abf4fe7 Fix: refactors lint issues in missing err in json return value (#3828)
* refactors error return value of encoding addon

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactor error return value of encoding kubeapi

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors error return value of encoding worker

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors error return value of encoding handle

Signed-off-by: afzal442 <afzal442@gmail.com>

* Modifies the json returned err

Signed-off-by: afzal442 <afzal442@gmail.com>

Skips the err

Signed-off-by: afzal442 <afzal442@gmail.com>

adds suggestion for error()

Signed-off-by: afzal442 <afzal442@gmail.com>

* Adds error return value

Signed-off-by: afzal442 <afzal442@gmail.com>

minor changes

Signed-off-by: afzal442 <afzal442@gmail.com>

* updates extendedfile method and adjusts the error

Signed-off-by: afzal442 <afzal442@gmail.com>

* fixes lint error

Signed-off-by: afzal442 <afzal442@gmail.com>
2022-06-03 15:36:55 +08:00
wyike
a00fee91fc Fix: hold the force uninstalling process untill the last addon been deleted (#4101)
* hold the force uninstalling process untill the last addon been deleted

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add period

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-06-02 16:28:08 +08:00
Jianbo Sun
7f3b55efa0 Chore: add @StevenLeiZhang into owners file and ajust for more flexible owners (#4100)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-06-02 13:34:09 +08:00
StevenLeiZhang
e012bbd1e4 Fix: vela provider delete command's example is wrong (#4094)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-06-02 11:02:19 +08:00
barnettZQG
c82bcf146a Fix: the new default values do not take effect when upgrading the vela core (#4092)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-02 10:22:10 +08:00
barnettZQG
f550e89331 Fix: show the default password (#4091)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-02 10:01:04 +08:00
barnettZQG
f47dc5f598 Fix: load the provider subcommands on demand (#4086)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-06-01 16:21:18 +08:00
Somefive
985d49d9e6 Feat: use deferred config in CLI (#4083) 2022-06-01 08:31:01 +08:00
wyike
f04f29dff0 Fix(addon): more note info and filter prerelease addon version (#4081)
* more note info and filter prerelease addon version

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* wrap the error optimize the show info

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix golint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-31 18:56:04 +08:00
barnettZQG
ffbd53e3e1 Chore: hide some definitions in VelaUX (#4073)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 16:39:36 +08:00
barnettZQG
c691649256 Fix: change the region to customRegion (#4075)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 16:17:39 +08:00
StevenLeiZhang
3484e8102d Fix: Improve vela provider add response (#4055)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-31 16:14:46 +08:00
Shukun Zhang
f8c24ba912 Feat: vela ql into vela-cli (#3519)
Signed-off-by: Shukun Zhang <2236407598@qq.com>
2022-05-31 16:12:04 +08:00
Jianbo Sun
efb6475f2a Fix: upgrade from v1.3+ to v1.4+ with new secret for cluster-gateway (#4072)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-31 16:04:34 +08:00
StevenLeiZhang
f8f0730ed8 Fix: Can not delete terraform provider (#4070)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-31 15:01:00 +08:00
barnettZQG
a5cd007311 Chore: change the key features in readme (#4064)
* Chore: change the key features and add the demo entrance

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: reuse the Highlights

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: remove the demo

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-31 14:26:22 +08:00
barnettZQG
b13eb4adb5 Fix: remove the tcp protocol prefix in the endpoint string (#4059)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-30 20:11:55 +08:00
wyike
48236f69bd Fix: CI workflow for rollout acr image build and push (#4061)
* fix the rollout acr image

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix

test

test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

finish fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* merge two sction

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-30 19:34:57 +08:00
Tianxin Dong
7508794798 Fix: set workflow to finish before record in controller revision (#4060)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-30 19:29:23 +08:00
Tianxin Dong
65f17bf37f Fix: fix the dependency gc policy to reverse dependency (#4063)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-30 19:27:43 +08:00
barnettZQG
f5267f7654 Fix: the policies can not be deleted (#4057)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-30 16:21:07 +08:00
yangs
c8eb0b4dbd Fix: fail to get the endpoints via the velaql (#4056)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-05-30 15:48:28 +08:00
qiaozp
8fb38672f5 Fix: release script condition syntax (#4042)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-05-28 01:28:19 +08:00
Somefive
383a2bd695 Feat: minimize controller privileges & enforce authentication in multicluster e2e test (#4031)
* Feat: enable auth in multicluster test & restrict controller privileges while enabling authentication

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: fix statekeep permission leak & comprev cleanup leak

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: use user info in ref-object select

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: set legacy-rt-gc to disabled by default

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: pending healthscope with authentication test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-28 01:26:06 +08:00
Tianxin Dong
fcfb1012d6 Feat: add if in workflow (#3941)
* Feat: add if in workflow struct

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: implement the if in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: support dependency and skip for suspend step

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the rebase from sub steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: support if in sub steps

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Test: add more tests in discover and custom

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Lint: fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Tests: add more tests in application controller

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: change failed after retries into reason

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix the terminate cli

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* remove the terminate workflow to pkg and add feature gates

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* nit fix

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make finish condition more clear

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-27 22:01:14 +08:00
Somefive
fd024bc3e2 Fix: env trait error when existing env exists (#4038)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-27 21:07:28 +08:00
wyike
c8264b8c34 some small fixes (#4033)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-27 18:36:47 +08:00
barnettZQG
6eb7af9aea Feat: add the creating and deleting permission APIs (#4026)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 17:41:29 +08:00
ZhongsJie
39d5ce48dc Feat: add affinity trait to merge node and pod affinity (#3973)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-05-27 17:36:39 +08:00
Xiangbo Ma
3538007fc4 Fix: error message of vela init env is not clear (#4016)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-27 17:34:02 +08:00
Xiangbo Ma
83704058af Fix: vela port-forward not working for webservice component (#4007)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-27 17:14:15 +08:00
barnettZQG
1226a14cbd Fix: unknown field ignoreTerraformComponent (#4013)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 17:12:19 +08:00
yangs
d0a725b51e Fix: velaql fail to parse query result to json format (#4011)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-05-27 16:23:15 +08:00
Somefive
57309884fc Feat: enhance controller auth by removing useless features & add authentication for componentrevision+healthcheck (#3992)
* Feat: use application identity in gc & componentrevision & collectHealthStatus

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: remove useless features and roles

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: remove DELETE from mutating webhook

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: enhance deploy error display

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: e2e test vela cli output match & controllerrevision recycle for serviceaccount impersonation

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-27 15:50:21 +08:00
zq200618
260c831df2 Fix: step group documentation update and bug fix of firstExecuteTime not record (#3975)
Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Fix: step group documentation update and bug fix of firstExecuteTime not record

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Co-authored-by: Qiang Zheng <zhengq20018@cmbchina.com>
2022-05-27 11:25:38 +08:00
barnettZQG
3a887ecdf9 Fix: fail to query the count with mongodb (#4012)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-27 10:45:40 +08:00
wyike
adc99bf390 Feat: optimize some logic of topology resource-tree (#4003)
* format

finish tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

no lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add pvc

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* go mod tidy

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix panic bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix panic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-26 22:17:20 +08:00
barnettZQG
1ada3fb467 Fix: optimized the version comparison (#4001)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 19:30:19 +08:00
barnettZQG
f3d4db686d Fix: add some default permissions about the configuration (#3998)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 17:21:23 +08:00
Somefive
1815dd4962 Feat: upgrade cluster-gateway version (#3986)
* Feat: upgrade cluster-gateway version

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: multicluster test unstable

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-26 17:20:28 +08:00
Somefive
5cfc2878b7 Feat: support impersonation for application in apiserver (#3985)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-26 16:42:30 +08:00
StevenLeiZhang
c80b8c0502 Fix: add Target fail by fetch terraform-provider error (#3988)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-26 15:45:22 +08:00
StevenLeiZhang
dc8f558d8a Fix: delete Project fail (#3981)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-26 11:30:54 +08:00
qiaozp
46bdc8025e Fix: don't update version file when publish alpha/beta version (#3989)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-05-26 11:30:29 +08:00
Jianbo Sun
9244efe813 Feat: build docker image(oamdev/vela-cli) for vela-cli (#3976)
fixes #1392

One of the use case could be https://github.com/kubevela/kubevela/discussions/3821

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-26 10:27:31 +08:00
barnettZQG
4288b216e2 Fix: initialize kube config multiple times (#3984)
* Fix: initialize kube config multiple times

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-26 10:19:05 +08:00
wyike
dae0358bc0 Feat: mechanism to let user add relationship mapping rule by configmap (#3968)
* WIP add some code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix all tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add comment

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

delete useless code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

go mod vendor

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix failed test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-25 16:44:46 +08:00
Xiangbo Ma
dfb33e0ea7 Fix: kustomize not read environment variables (#3970)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-25 11:22:35 +08:00
wyike
1d82378053 Fix: velaql appliedResource bug and add e2e-test (#3965)
* fix bug and add e2e-test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-24 17:58:53 +08:00
barnettZQG
5daec5b017 Feat: support to configure the qps and burst (#3961)
* Feat: support to configure the qps and burst

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the comment

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-24 16:36:07 +08:00
Somefive
cb5630af48 Fix: enhance grant privileges output (#3962)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-24 14:31:32 +08:00
Jianbo Sun
cdfdc7febd Deprecate: oam runtime is no longer maintained, users should use kubevela instead (#3958)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-24 10:24:22 +08:00
Diego Pinheiro
3f725cab01 Chore: Bump kubectl sdk (#3960)
* bump kubectl sdk version

Signed-off-by: diego-milhomes <diego.milhomes@stackspot.com>

* bump kubectl sdk version

Signed-off-by: s4rd1nh4 <diego.milhomes@gmail.com>

* bump kubectl sdk version

Signed-off-by: s4rd1nh4 <diego.milhomes@gmail.com>

Co-authored-by: diego-milhomes <diego.milhomes@stackspot.com>
2022-05-24 09:58:28 +08:00
Somefive
897f07fbec Feat: vela kube delete (#3952)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-24 09:38:22 +08:00
Tianxin Dong
a855eddedc Fix: refactor the step group in workflow (#3956)
* Fix: refactor the step group in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add tests for discover

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-23 20:17:13 +08:00
Somefive
7976b32ba4 Fix: grant privilege readonly incorrect binding (#3953)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-23 17:23:08 +08:00
wyike
ec0b12861b Feat: velaql provider for get application resource-tree (#3944)
* first commit

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

refactor code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

finish all tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

resolve confilict

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

revert code

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix golint error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix checkdiff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add more test for pod status

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* cue fmt

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add filter

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

* fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix log error

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-05-23 16:41:19 +08:00
Somefive
2818f2ac4c Fix: listKubeCluster page=0 (#3951)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-23 14:06:55 +08:00
barnettZQG
09ce919b2b Feat: Refactoring the API Server module for better layering (#3945)
* Feat: Refactoring the API Server module for better layering

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: code style

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: fix the lint errors

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-23 12:17:28 +08:00
JarHMJ
02903cd1c4 Feat: support download kustomize in local folder (#3949)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-05-23 10:58:08 +08:00
qiaozp
75700e7dc8 Feat: make gateway trait's host field optional (#3912)
* Feat: make gateway trait's host field optional

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* modity hint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* revert

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-05-23 10:55:43 +08:00
Somefive
c5b28cb4b3 Feat: vela auth grant-privileges (#3943)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-23 10:47:13 +08:00
zq200618
7d9c647b1a Feat: support step group with substep in the workflow (#3772)
Signed-off-by: zhengq2006 <zhengq200618@cmbchina.com>

workflow substep develop

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>

Feat: support step group with substep in the workflow

Signed-off-by: Qiang Zheng <zhengq20018@cmbchina.com>
2022-05-23 10:26:21 +08:00
Jianbo Sun
493a609864 Chore: trim updated docs, make the source clean (#3946)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-22 15:13:41 +08:00
Noorain Panjwani
564cbaf5d4 Feat(cli): added the offline flag to the dry-run command (#3875)
* Feat(cli): Added an offline flag to the 'dry-run' command

Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>

* Using a fake client now for offline mode

Signed-off-by: Noorain Panjwani <noorain.panjwani@gmail.com>
2022-05-21 23:00:45 +08:00
Oiar
250f395109 Feat: gateway trait support https protocol (#3832) (#3925)
Signed-off-by: Oiar <643921472@qq.com>
2022-05-21 22:59:57 +08:00
JarHMJ
55f82781ce Feat: support chart value to disable conversation on application crd (#3890)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-05-21 22:57:38 +08:00
StevenLeiZhang
ba7c22a37e Fix: addon compare vela version failure (#3928)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-21 00:25:46 +08:00
Will Li
fecdc23fd3 Fix(cli): try to get mapValue type name (#2474)
* Fix(cli): try to get mapValue type name

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Fix: update output format based on comment and fix typo

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Style: make the change reviewable

Signed-off-by: Cuichen Li <cuichli@cisco.com>

* Fix: test

Signed-off-by: Cuichen Li <cuichli@cisco.com>
2022-05-21 00:25:20 +08:00
Zheng Xi Zhou
334446c264 Feat: support force delete Terraform typed application (#3929)
* Feat: support force delete Terraform typed application

If a Terraform typed application hangs on deletion, it could be forced to
delete by command line `vela delete xxx --force`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix copyright

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Upgrade terraform controller api version

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add one more tests

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix two unit-tests

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-05-20 18:17:10 +08:00
Jianbo Sun
6bef810dc3 Fix: remove last-applied-config annotation for configmap and secret (#3939)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-20 17:08:36 +08:00
Zheng Xi Zhou
8ab311f2ff Feat: API of retrieving image registry secrets by image and its tag (#3719)
* Feat: check existence of an image

Checked existence of an image in
- public docker hub
- private image registry

Add an API to retrieve image registry secrets by an image and or
its tag. In veluaUX, it will help auto-fill uesrs' imagePullSecrets
fields

Fix https://github.com/kubevela/velaux/issues/436

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* replace the implementation with libary google/go-containerregistry

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* address comments

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add more testcases

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix UT

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-05-20 15:23:58 +08:00
Somefive
0cd1ae155c Feat: vela kube apply --cluster (#3931)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-20 12:11:58 +08:00
ivyilike
1657326c38 Feat: webservice support healthProbe With http (#3930)
Signed-off-by: ivyilike <pww123@cmbchina.com>
2022-05-19 20:54:21 +08:00
Siege Lion
9436e7ffa0 Fix: fix a spelling error of velaQL usage document (#3932) 2022-05-19 20:53:51 +08:00
Charlie Chiang
eb5f416e4e Feat: add more detailed output for vela addon status (#3876)
* Feat: show available versions and dependencies in `addon status`

Also prettify output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: show addon dependencies in `addon status`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: adjust `addon status` output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove spaces in `addon status` output

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: truncate string if available versions too long

if a local addon has been installed, the AVAILABLE-VERSIONS column of the registry one will not truncate. this commit fixes that.

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Perf: avoid unnecessary network requests to improve performance

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: do not display remote info for local addons

Limit Description length when using `addon list`

Use simpler method to get addon info

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for cli/addon limitStringLength, generateParameterString

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: fix output being empty if the searched addon does not exist anywhere

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for generateAddonInfo

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for generateAddonInfo and FindWholeAddonPackagesFromRegistry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: format code

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: correct unnecessarily focused tests

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: remove unused code blocks

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: remove unnecessary output to stdout

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: remove added registry after tests has been completed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: new RegistryDataStore every test, to avoid panics

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix failing tests due to incorrect registry name

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: move logic to get addon package out of where it is supposed to get addon status

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add test cases for secret-getting in TestGetAddonStatus

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: return error if an addon is not installed, nor does it exist in the registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: rename GetAddonWholePackage to GetDetailedAddon as per wonderflow

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: require --verbose option to show details in `vela addon status`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Feat: require --verbose option to show details in `vela addon status`

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* chore: run make reviewable

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: fix configmap being already existed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Fix: fix output show addon does not exist when verbose is off and an addon is not installed, but it does exist in the registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: fix golangci-lint issues

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-05-19 16:21:36 +08:00
Kethavath Siva Naik
1cc5c54d32 Fix: corrected minor typo in code (#3913)
Signed-off-by: Kethavath Siva Naik <sivanaikk0903@gmail.com>
2022-05-19 10:55:41 +08:00
Somefive
12ec62dd65 Feat: vela auth list-privileges (#3923)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-18 20:57:39 +08:00
barnettZQG
1822e03505 Feat: support filter the resource by kind or apiVersion (#3901)
* Feat: support filter the resource by kind or apiVersion

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: update the env workflow after deleting a component

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-18 19:39:08 +08:00
Tianxin Dong
d9aa541f12 Feat: add the design of if condition in workflow (#3922)
* Feat: add the design of if condition in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make the if example more clear

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-18 17:43:53 +08:00
Somefive
9d6706d48e Feat: vela auth gen-kubeconfig (#3911)
* Feat: vela create kubeconfig

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-18 16:14:00 +08:00
Xiangbo Ma
fc078bbd93 Feat: extend apply-once to allow specified path configuration to drift (#3899)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-17 16:29:16 +08:00
StevenLeiZhang
f7687e3506 Fix: update API document (#3915)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-17 11:53:29 +08:00
Somefive
4d73715422 Feat: controller auto-impersonation (#3906)
* Feat: add featrue flags for controller auto impersonation

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add auto-detect for kubeconfig identity

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-16 18:05:56 +08:00
barnettZQG
30308fa8a1 Feat: add the component name field for the trigger (#3884)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-16 13:10:46 +08:00
ZhongsJie
0442baf932 Feat: create the definition for built-in policies (#3894)
Signed-off-by: Shijie Zhong <zhongsjie@cmbchina.com>
2022-05-16 13:10:26 +08:00
barnettZQG
987b369bee Fix: fail to create the cloud service application (#3893)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-16 11:10:06 +08:00
Afzal Ansari
3aa16bb5d1 Refactor: Minor changes on shell script to support double quotes format and [ ] POSIX (#3889)
* refactors sync sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* fixes POSIX sh, as [[ ]] is undefined.

Signed-off-by: afzal442 <afzal442@gmail.com>
2022-05-14 13:21:28 +08:00
barnettZQG
3fdf39c8e1 Feat: change the default workflow step with deploy type (#3878)
* Feat: change the default workflow step with deploy type

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: format the cue script of the deploy step

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: error words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-13 14:24:14 +08:00
ZhongsJie
a19e90ea2c Fix: modify the template definition to solve the trait cli error Signed-off-by: Shijie Zhong <zhongsjie@cmbchina.com> (#3877)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-05-13 10:52:23 +08:00
Tianxin Dong
f447e6c642 Fix: delete context when patch outputs in trait (#3854)
* Fix: delete context when patch outputs in trait

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* use patchOutputs instead of outputs in patch

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix typo

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-12 18:38:57 +08:00
Somefive
0d3d75f29a Fix: use vela prism for accessing clusters as alternative (#3866)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-12 17:12:58 +08:00
cnfatal
a8ad79b1f2 Feat(charts): add cert-manager support for "cluster-gateway" component in chart "vela-core" (#3848)
* fix(charts): remove a not built in cap "containerizedwokrload" from disableCaps

Signed-off-by: cnfatal <cnfatal@gmail.com>

* Perf(charts): mv cluster-gateway to a dir

Signed-off-by: cnfatal <cnfatal@gmail.com>

* Feat(charts): support cert-manager on "cluster-gateway"

changes:
1. replace flag "--cert-dir" with "--tls-cert-file" and "--tls-private-key-file" due to cert-manager Certificate only support "k8s" style tls secret(with files "tls.crt","tls.key","ca.crt").
2. add cert-manager cainject annotation for APIService "v1alpha1.cluster.core.oam.dev"
3. add cert-manager Certificate for secret  "<release>-cluster-gateway-tls"
4. fix a typo in `values.yaml` , "optimize.optimizeCachedGvks" -> "optimize.cachedGvks" withch cause helm template failed

Signed-off-by: cnfatal <cnfatal@gmail.com>
2022-05-12 13:10:41 +08:00
Somefive
967bc7786d Fix: use vela prism for accessing clusters as alternative (#3849)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-12 10:47:35 +08:00
barnettZQG
fc5bcc6c33 Fix: the endpoints is repeated and can not query the ingress with v1 version (#3862)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-05-11 14:27:38 +08:00
JarHMJ
02f5a96a72 Feat: run image scan CI for every pull request and fix CVEs in time (#3855)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-05-11 14:09:10 +08:00
Xiangbo Ma
1989b2f4a8 Fix: whencontrolPlaneOnly=true, There are probability to report error "resource not found" (#3850)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-11 13:59:02 +08:00
Somefive
0529ad8581 Fix: ignore no kind match error in gc (#3861)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-11 12:41:14 +08:00
Carmen de Lope Contreras
f808827882 Fix(makefile): update kustomize version to be available for darwin-arm64 (#3846)
* Fix(makefile): update kustomize version to be available for darwin-arm64

Signed-off-by: Carmendelope <carmen@napptive.com>

* make reviewable changes

Signed-off-by: Carmendelope <carmen@napptive.com>
2022-05-11 10:03:16 +08:00
Tianxin Dong
20f1d54bf3 Fix: add parse comments in lookupScript to make patch work (#3839)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-10 13:36:44 +08:00
Afzal Ansari
e6d47d3758 refactors http write resp to use 'html/template' instead (#3829)
Signed-off-by: afzal442 <afzal442@gmail.com>
2022-05-10 13:36:00 +08:00
Charlie Chiang
a598272491 Fix: resolve locally installed addons not being displayed (#3827)
* Fix: resolve locally installed addons not being displayed

Addressed an issue where locally installed addons may not be displayed
if one with the same name is in the registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: revert incorrect auto-formatting

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: change original variable name to avoid confusions

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add tests for outputs from `vela addon list`
when an addon with the same as registry one is locally installed

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: use more concise method to check length

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Test: add one more test condition for dual addons
i.e. local and registry

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Refactor: simplify testing logic by removing unneeded looping

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>

* Style: add missing license header

Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
2022-05-10 13:35:12 +08:00
StevenLeiZhang
b260348f30 Fix: sensitive field of addon registry is exposed (#3837)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-10 10:08:28 +08:00
StevenLeiZhang
938fde9bba Fix: The new addon can not shown in the Addons page (#3835)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-10 10:02:13 +08:00
Zheng Xi Zhou
7bfcd6acc5 Fix: don't override user definied region (#3503)
* Fix: don't override user definied `region`

Fix #https://github.com/oam-dev/kubevela/issues/3384

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix check-diff

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix UT

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* revert some changes

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-05-09 15:10:31 +08:00
Afzal Ansari
8d99a35f01 Fix: Refactors shell to have double quotes format (#3830)
* refactors double quote to prevent globbing and word splitting e2e sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors e2e_core sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors cleanup sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors header-chk sh

Signed-off-by: afzal442 <afzal442@gmail.com>

* refactors installdef sh

Signed-off-by: afzal442 <afzal442@gmail.com>
2022-05-09 11:23:45 +08:00
Tianxin Dong
d593b7ad9c Feat: support multi keys in patchKey (#3826)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-08 10:39:01 +08:00
StevenLeiZhang
88fb854a26 Feat: Support basic-auth or reuse chartmuseum as addon registry (#3787)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-05-07 23:39:34 +08:00
Somefive
d2cb1bfd4a Feat: add support for apprt (#3824)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-07 20:31:41 +08:00
Jianbo Sun
eefccfb565 Chore: seprate test into linux env which can't be execute in darwin (#3823)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-07 18:14:12 +08:00
JarHMJ
d25676a68e Feat: Add short name velaapp for application CRD (#3816)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-05-07 16:52:51 +08:00
cezhang
877ab3909d Fix: update latest version Fix: 1.2 upgrade 1.3 workflowstep XXX not found (#3804)
* Fix: 1.2 upgrade 1.3 workflowstep XXX not found

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

handle publishversion case

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

* add test

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

add test

Signed-off-by: cezhang <c1zhang.dev@gmail.com>

lint code

Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2022-05-07 12:07:26 +08:00
Xiangbo Ma
93841b479a Feat: Add example doc for controlPlaneOnly (#3810)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-05-06 14:33:52 +08:00
dependabot[bot]
94a82ce18d Chore(deps): Bump github.com/containerd/containerd from 1.5.4 to 1.5.10 (#3815)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.5.4 to 1.5.10.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.5.4...v1.5.10)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-05 19:11:28 +08:00
Jianbo Sun
6f927d326b Chore: add governance file and refer to the community repo (#3814)
* Chore: update docs

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: add governance file and refer to the community repo

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-05-05 18:08:54 +08:00
Tianxin Dong
6c151ebcf1 Fix: add some message to make debug more clear (#3812)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-05 17:51:45 +08:00
qiaozp
331a25186e Chore: bump helm to v3.7.0 (#3767)
* Chore: bump helm to v3.7.0

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* tidy

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* tidy

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* tidy without compat

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-05-05 17:51:17 +08:00
Zhiyu Wang
7f23165ee5 Feat: deploy user info (#3744)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-05-05 17:22:40 +08:00
Tianxin Dong
ba0c226925 Feat: add some links in readme (#3811)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-05-05 15:17:19 +08:00
Somefive
3cde2337c6 Feat: upgrade dependencies (#3776)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-05-05 14:37:50 +08:00
JarHMJ
c8ae44c7e1 Test: add some unittest to addon cache (#3801)
Signed-off-by: huangminjie <minjie.huang@daocloud.io>
2022-05-04 10:31:44 +08:00
barnettZQG
99bb76a3fd Fix: update latest version (#3794)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-29 17:49:47 +08:00
Kunshuai Zhu
b74d5011da Feat: vela-core helm chart supports configure multicluster metrics (#3788)
* vela-core helm charts support config multicluster metrics

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* update comment

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* update readme

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
2022-04-29 16:57:53 +08:00
Jianbo Sun
755ccad654 Chore: update some docs to the new org url (#3792)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-04-29 15:59:29 +08:00
StevenLeiZhang
0e4a480a4e Fix: useless \n is printed in log message (#3791)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-04-29 15:44:10 +08:00
StevenLeiZhang
57dcab5f18 Fix: log message wraps wrong arguments (#3781)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-04-29 13:26:58 +08:00
Daniel Higuero
9642ed9d9e Fix: Add application name to the generated workload entities (#3786)
* Add application name to the generated workload

Signed-off-by: Daniel Higuero <daniel@napptive.com>

* Make the PR reviewable

Signed-off-by: Daniel Higuero <daniel@napptive.com>
2022-04-29 10:35:14 +08:00
barnettZQG
2cc32e6c62 Chore: sync the cli binaries to OSS (#3764)
* Feat: show the parsing capability error message

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: sync the cli binaries to OSS

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-28 19:18:16 +08:00
Somefive
7f5b8ef957 Fix: env trait compatible with valueFrom (#3778)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-28 17:49:01 +08:00
Somefive
1bd9a0eca3 Fix: kubectl check err (#3759)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-28 16:32:38 +08:00
Somefive
512664b9b3 Feat: support dependsOn in deploy workflowstep (#3750)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-28 16:29:34 +08:00
wyike
7935447d44 Fix: addon cli parse any type (#3775)
* fix addon parse any type

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* test int

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-28 15:58:23 +08:00
Xiangbo Ma
9238fc3edf Feat: Support trait with custom resource be dispatched to hubcluster. (#3774)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-04-28 13:44:52 +08:00
Tianxin Dong
6761b18229 Fix: fix up command add debug policy (#3770)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-27 21:31:07 +08:00
barnettZQG
7b2f4af610 Feat: add some APIs to manage the definitions (#3749)
* Feat: add a api for update the ui schema

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add an API to change the definition status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change cache key

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the error words

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-27 14:23:05 +08:00
Tianxin Dong
a257c18e73 Fix: fix revision in webservice (#3758)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-27 14:17:48 +08:00
Tianxin Dong
a1ada2609e Feat: add default user in dex (#3753)
* Feat: add default user in dex

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix e2e test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* remain log

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-27 10:21:10 +08:00
wyike
8f127ce715 Fix: fix the bug of vela cli enable addon by localDir on windows os (#3761)
* fix windows bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix several issue

fix bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix unit-test

* add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-26 20:52:19 +08:00
qiaozp
af53a58b8e Fix: velaux addon hint after enable (#3747)
* Fix: velaux addon hint after enable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* check if upgrade

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-26 15:27:43 +08:00
Zheng Xi Zhou
b4894cc284 Fix: use Terraform provider name as application in CLI (#3742)
* Fix: use Terraform provider name as application in CLI

In CLI, use Terraform provider name as application name when
create a Provider. Also display there providers in VelaUX.
1). manually created a Terraform Provider object, like https://github.com/oam-dev/terraform-controller/blob/master/getting-started.md#aws
2). by enabling a Terraform provider addon in version older than v1.3.0
3). by create a Terraform provider via `vela provider add`
4). by VelaUX

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add UTs

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-26 12:53:14 +08:00
Zheng Xi Zhou
75def656fb Fix: public image registry config could not be created (#3736)
Fix #3663

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-25 13:58:22 +08:00
wyike
fa75c1f4a5 use unical project filter func to list secret (#3741)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix pointer

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-25 10:05:31 +08:00
Zhiyu Wang
cdc1550e17 Feat: apiserver definition alias (#3721)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-04-24 18:03:55 +08:00
qiaozp
b8b254e582 Chore: fix e2e test check tag exist and set matrix (#3743)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-24 18:03:36 +08:00
Somefive
2d28fb35eb Feat: multi-cluster authentication (#3713)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-24 14:48:26 +08:00
qiaozp
d7c6f6cc73 Chore: fix missing trigger for e2e tests (#3738)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-24 10:15:28 +08:00
StevenLeiZhang
4162c413b3 Fix: vela-cli does not print cluster name, if application installed in default cluster (#3691)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-04-24 09:16:34 +08:00
Ziqi Zhao
172d41583f enhance slack url (#3727)
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2022-04-22 18:02:06 +08:00
Zheng Xi Zhou
58edb344f6 Feat: check whether a project matched a config's project (#3725)
* Feat: check whether a project matched a config's project

If the config project is not nil, it's matched whether the project
matched the target project.
If the config project is nil, the target project matched the config.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* change imports order

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* change imported libraries order again

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-22 17:53:41 +08:00
qiaozp
1125f87fd7 Feat: run e2e test on several K8s version (#3714)
* Feat: run e2e test on several K8s version

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* upgrade kind version

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* rollback 1.22

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* bump up kruise

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* with sha

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* try fix ci

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* use 1.22

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* remove sah

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* revert kind

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-22 17:05:19 +08:00
Xiangbo Ma
520e67f63b Feat: Delete the annotation "kubernetes.io/last-applied-configuration" in applicationRevision. Signed-off-by: Xiangbo Ma <maxiangboo@cmbchina.com> (#3724)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-04-22 17:04:24 +08:00
Tianxin Dong
7eb0002692 Feat: add sequential in gc policy (#3701)
* Feat: add sequential in gc policy

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* tidy the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add suite test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add example docs and update the field

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change the name to dependency

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-22 16:34:07 +08:00
barnettZQG
1237f7350e Feat: change the webservice and config-image-registry definitions (#3732)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-22 16:33:23 +08:00
Basuotian
7907618a6a Feat: add env for sidecar and init-container trait (#3730)
Signed-off-by: tianshuai <tianshuai@huya.com>

Co-authored-by: tianshuai <tianshuai@huya.com>
2022-04-22 15:59:34 +08:00
fengkang01
54e333148f Feat(lang): The policy controller generate the OpenAPI schema (#3703)
* Fix: The policy controller generate the OpenAPI schema  (#3683)

Signed-off-by: DESKTOP-FV8IFEC\10690 <1069029381@qq.com>

* Feat(lang): The policy controller generate the OpenAPI schema  (#3683)

The policy controller does not generate the OpenAPI schema #3683
add CapabilityPolicyDefinition struct comment
add StoreOpenAPISchema of CapabilityPolicyDefinition comment

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Feat(lang): The policy controller generate the OpenAPI schema  (#3683)

The policy controller does not generate the OpenAPI schema #3683
fix unit-test

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Feat(lang): The policy controller generate the OpenAPI schema  (#3683)
fix unit-test about policydefinition_controller_test.go
The policy controller does not generate the OpenAPI schema #3683
fix unit-test

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Feat(lang): The policy controller generate the OpenAPI schema  (#3683)
fix unit-test about policydefinition_controller_test.go

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Feat(lang): The policy controller generate the OpenAPI schema  (#3683) gen crd

Signed-off-by: fengkang <fengkangb@digitalchina.com>

* Feat(lang): The policy controller generate the OpenAPI schema  (#3683) make reviewable

Signed-off-by: fengkang01 <fengkangb@digitalchina.com>

Co-authored-by: DESKTOP-FV8IFEC\10690 <1069029381@qq.com>
2022-04-22 15:53:20 +08:00
wyike
c126a5b272 fix several issues (#3729)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-22 15:47:08 +08:00
wyike
3eb1f53606 specify staticcheck version (#3726)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix the workflow

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

try to fix

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix make file

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix makefile

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-22 14:16:15 +08:00
Tianxin Dong
426b22d2e5 Feat: add log provider (#3711)
* Feat: add log provider

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lift

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix vet

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix rebase vet

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-22 13:14:51 +08:00
Arena.Su
007f13d2ee Feat(delay suspend): delayDuration in suspend step properties (#3644)
* Feat(delay suspend): add delayDuration in suspend step properties to support delay by certain time.Duration

Signed-off-by: suxiang <suxiang@asiainfo.com>
Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(delay suspend): add delayDuration parameter to suspend cue

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): optimize wait suspend

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): change e2e test to local cluster env

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): fix WaitSuspend status modify bug

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): suspend cue parameter type error

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): set waitDuration optional param in suspend workflow step

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): add lost suspend.yaml

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): change solution to add suspendState

Signed-off-by: ArenaSu <704427617@qq.com>

* Feat(wait suspend): change durationWaiting to duration and add isPatch to gcResourceTrackers

Signed-off-by: ArenaSu <704427617@qq.com>
2022-04-22 11:40:13 +08:00
wyike
81d479aedf Fix: change systemInfo some fields (#3715)
* add some field an calculate workflow step

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix the calculate job cannot start issue

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-22 10:18:28 +08:00
Lei Chu
25e33cdd6d Fix: embed.FS filepath that follow the unix style file path when running on windows (#3718)
* fix: "builtin-apply-component.cue: file does not exist"

Signed-off-by: lei.chu <1062186165@qq.com>

* fix: "builtin-apply-component.cue: file does not exist"

Signed-off-by: lei.chu <1062186165@qq.com>
2022-04-21 14:31:53 +08:00
qiaozp
900653a2da Feat: vela def gen-api command (#3699)
* Feat: vela def go-gen command

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Add unittest

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* header

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Add test case

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* more test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add optional prefix, add omitempty in json tag

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-20 18:08:24 +08:00
StevenLeiZhang
e3612ac352 Fix: vela-core does not report error, when component depends on invalid component (#3636)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-04-20 13:37:34 +08:00
Diego Pinheiro
62fb10625d Fix: Addressing CVEs (#3708)
* fix - patching vuln go mod

Signed-off-by: Diego Milhomes Pinheiro <diego.milhomes@ORA-7869.local>
Signed-off-by: s4rd1nh4 <diego.milhomes@gmail.com>

* fix - addressing cves

Signed-off-by: Diego Milhomes Pinheiro <diego.milhomes@ORA-7869.local>
Signed-off-by: s4rd1nh4 <diego.milhomes@gmail.com>

* fix - cves

Signed-off-by: Diego Milhomes Pinheiro <diego.milhomes@ORA-7869.local>
Signed-off-by: s4rd1nh4 <diego.milhomes@gmail.com>

* fix - cves

Signed-off-by: Diego Milhomes Pinheiro <diego.milhomes@ORA-7869.local>
Signed-off-by: s4rd1nh4 <diego.milhomes@gmail.com>
2022-04-20 09:54:49 +08:00
Somefive
571e154af3 Fix: bind env to system namespace (#3706)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-19 20:55:59 +08:00
wyike
2ac4ddad03 Feat: calculate systemInfo everyday periodically and store them in datastore (#3689)
* add framework

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add

finish the framework

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

finish test manually

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add update time

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

adding test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

finish test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

abs

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* move start func to leader election call back funcs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* resolve the recycle import problecm

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix issue

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci
2022-04-19 10:24:54 +08:00
Somefive
c5e1855a55 Feat: support disable legacy gc upgrade operation (#3694)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-18 17:05:47 +08:00
Zheng Xi Zhou
cb4a9ea1a8 Fix: set provider name as the config name (#3687)
- For VelaUX, hidden a provider name (users don't need to manual set it). Used
the application/component name (config name) to be the provider name.
- Store description of a config to the annotation of the config application

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-18 16:47:51 +08:00
Tianxin Dong
21216055fb Feat: add vela debug command (#3580)
* Feat: add debug configmap if debug policy is specified

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add vela debug command

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make code reviewable

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix sonartype lift

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix cue string

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: display better for debug

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* tidy the go mod

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add debug test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change uitable vendor

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add more tests

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* pass resource keeper from handler

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix rebase

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Pending test temporary

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-18 11:06:14 +08:00
Michiel Stigter
eb60d94a06 Feat: Expose optimizeDisableComponentRevision in helm chart (#3470)
* Feat: Expose optimizeDisableComponentRevision in helm chart

Signed-off-by: michiel <michiel.stigter@springer.com>

* Feat: Expose optimizeDisableComponentRevision in helm chart

Signed-off-by: michiel <michiel.stigter@springer.com>

* Feat: Expose optimizeDisableComponentRevision in helm chart

Signed-off-by: michiel <michiel.stigter@springer.com>

* Feat: Expose optimizeDisableComponentRevision in helm chart

Signed-off-by: michiel <michiel.stigter@springer.com>

* Feat: Add all the other possible optimization params to the helm-values.

Taken from: https://kubevela.io/docs/platform-engineers/system-operation/performance-finetuning#advanced-optimization

Signed-off-by: michiel <michiel.stigter@springer.com>
2022-04-15 17:48:14 +08:00
Somefive
8998537dc8 Fix: rt resource key compare mismatch local cluster (#3681)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-15 16:13:07 +08:00
barnettZQG
4ddfe32fc4 Fix: can not query the instance list for the app with apply once policy (#3670)
* Fix: can not query the instance list for the app with apply once policy

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change the test case about ListResourcesInApp

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-15 14:38:01 +08:00
wyike
28e2284284 mock an addon to fix flaky test (#3665)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-15 10:30:05 +08:00
Tianxin Dong
62ecc70ade Fix: fix token invalid after the server restarted (#3658)
* Fix: fix token invalid after the server restarted

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Pending test temporary

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Pending test temporary

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-14 22:25:43 +08:00
Somefive
5857aa8790 Fix: vela status tree show cluster alias & raw format (#3659)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-14 19:35:47 +08:00
ZhongsJie
49646ddc8e Feat: enhance storage trait to support multi-mountToEnv config Signed-off-by: Shijie Zhong <zhongsjie@cmbchina.com> (#3657)
Signed-off-by: ZhongsJie <zhongsjie@gmail.com>
2022-04-14 19:34:12 +08:00
Jianbo Sun
707905d877 Fix: add label from inner system in CR can prevent sync (#3655)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-04-14 19:32:53 +08:00
barnettZQG
7d3ef0595a Fix: duplicately list pods in velaQL (#3650)
* Fix: duplicately list pods in velaQL

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the create time of synced app is empty

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-14 17:43:54 +08:00
Zheng Xi Zhou
af6dc4bda3 Fix: failed to deploy application when no there is no avaiable (#3652)
When there are configs, but not in the project where the appliation
is about to deploy, the sync application will hit an issue. It will
lead to block the deploy of an application.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-14 17:25:34 +08:00
Zheng Xi Zhou
f44bd7c6dd Fix: refine the config sync logic (#3602)
* Fix: refine config management

- Refine the config sync logics

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* address comments

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-14 13:03:59 +08:00
wyike
eaec8348d9 Fix: try to fix CVE (#3641)
* try to fix cve

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add parse input func

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* use santize

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-14 10:03:15 +08:00
wyike
2849dfc1fb Fix: clear info when addon version cannot meet require (#3642)
* first

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

version miss match erro for addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

add log

* add test for this

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

small fix
2022-04-14 10:02:47 +08:00
Somefive
d657ea4daf Feat: rework vela up to support specified revision (#3634)
* Feat: rework vela up to support specified revision

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add legacy compatibility

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: fix test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-13 22:20:07 +08:00
Zhiyu Wang
68500b3f17 Fix: verify password valid (#3545)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-04-13 19:39:00 +08:00
Somefive
c33eaa0609 Fix: enhance vela status tree print (#3639)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-13 17:46:55 +08:00
Somefive
7a0d2b552b Feat: support alias in cluster (#3630)
* Feat: support alias in cluster

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test for cluster alias

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-13 13:58:35 +08:00
Zheng Xi Zhou
385b2462e9 Feat: refine config creation and provide config list (#3637)
- Make the api of creation a config to be async
- In listing config page, show the status of a config

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-13 13:45:41 +08:00
Kunshuai Zhu
0c35753530 Feat: allow select resource by resource type for gc policy (#3598)
* Feat: allow select resource by resource type for gc policy

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Modify match label key

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Unified label key

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
2022-04-12 18:51:07 +08:00
Somefive
0e97aa2291 Feat: vela status --tree (#3609)
* Feat: vela status --tree

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support show not-deployed clusters

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add tests

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add multicluster e2e coverage

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: minor fix

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-12 17:58:45 +08:00
Tianxin Dong
7fcb89906c Fix: fix dex login with existed email (#3623)
* Fix: fix dex login with existed email

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add dex connector check

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* unset users' alias

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-12 16:29:21 +08:00
Somefive
86ef2d68e0 Fix: flags for controller (#3627)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-12 16:12:50 +08:00
wyike
2e57be1022 Feat: support basic auth private helm repo (#3595)
* support auth

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix check diff

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

fix

add comments

fix test

* add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

add more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* extract set auth info as a global func

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* return bcode

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-12 14:33:44 +08:00
Gallardot
ad01f3062a Feat: add HealthProbe for sidecar (#3629)
* Feat: add HealthProbe for sidecar

Signed-off-by: Gallardot <tttick@163.com>

* Feat: add HealthProbe for sidecar

Signed-off-by: Gallardot <tttick@163.com>
2022-04-12 13:21:51 +08:00
Somefive
b6fac3f4d5 Fix: cli default switch on feature flags (#3625)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-11 20:40:13 +08:00
Min Kim
2eb7826070 bump cluster-gateway to 1.3.2 (#3619)
Signed-off-by: yue9944882 <291271447@qq.com>
2022-04-11 19:31:51 +08:00
Zheng Xi Zhou
5f7371815c Feat: add api of listing configs for project when creating a target (#3581)
* Feat: add api of listing configs for project

In a project, list configs by its type

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* address comments

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix ci

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add query parameter definition

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update pkg/apiserver/rest/webservice/project.go

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-11 19:05:18 +08:00
wyike
d6b96fee5a Fix: add e2e apiserver test for addon (#3607)
* add e2e apiserver test for addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete comment

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* close the reponse body

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* cover list enabled addon

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix e2e test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix test

* fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-11 17:46:46 +08:00
Jianbo Sun
85c673a574 Fix: reuse chart values in vela install (#3616)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-04-11 09:50:18 +08:00
qiaozp
7e6d9ccc73 Fix: vela logs without specified resource name (#3605)
* Fix: vela logs without specified resource name

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add unittest

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-04-08 17:22:05 +08:00
Avery
e65dcf12db add sorting for properties, outputs, writeSecretRefParameters in vela def doc-gen (#3593)
Signed-off-by: Nicola115 <2225992901@qq.com>
2022-04-08 15:27:35 +08:00
Diego Pinheiro
fd5faed71a Chore: Nominate s4rd1nh4 as a Reviewer member (#3603)
Signed-off-by: GitHub <noreply@github.com>
2022-04-08 13:21:45 +08:00
Zheng Xi Zhou
b1823084af Fix: add terraform aws provider without AWS_SESSION_TOKEN (#3590)
* Fix: add terraform aws provider without AWS_SESSION_TOKEN

Fix #3589 and refine prompts for cli

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-07 13:41:29 +08:00
namo
83fe4a160e Feat(lang): add addons gitlab support (#3543)
* add addons gitlab support

Signed-off-by: Namo <lgj112113@163.com>

* add addons gitlab support

Signed-off-by: Namo <lgj112113@163.com>

* test file edit

Signed-off-by: Namo <lgj112113@163.com>

* typo edit

Signed-off-by: Namo <lgj112113@163.com>

* notes edit

Signed-off-by: Namo <lgj112113@163.com>

* move third party imports block

Signed-off-by: Namo <lgj112113@163.com>

* code format edit

Signed-off-by: Namo <lgj112113@163.com>

* notes edit

Signed-off-by: Namo <lgj112113@163.com>

* create addon registry bug fix

Signed-off-by: Namo <lgj112113@163.com>

* add gitlab addon registry bug fix

Signed-off-by: Namo <lgj112113@163.com>

* add addon gitlab support test file

Signed-off-by: Namo <lgj112113@163.com>

* add addon gitlab support test note edit

Signed-off-by: Namo <lgj112113@163.com>

* add addon gitlab branch support and fix bug

Signed-off-by: Namo <lgj112113@163.com>

* addon gitlab registry repo name invalid

Signed-off-by: Namo <lgj112113@163.com>

Co-authored-by: Namo <lgj112113@163.com>
2022-04-07 11:05:14 +08:00
Somefive
8af3dec0df Fix: add feature-gates to command-line args (#3591)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-04-06 17:00:44 +08:00
Tianxin Dong
edebcc6c59 Fix: fix refresh code expired bcode (#3582)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-06 14:36:05 +08:00
Jianbo Sun
32382ba6be Chore: add new code flow for kubevela milestone (#3586)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-04-06 13:34:30 +08:00
Zheng Xi Zhou
46ef6f9df4 Fix: add response struct to config deletion api (#3579)
Added an empty struct in the API of config deletion

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-06 13:32:49 +08:00
Jianbo Sun
aea98ff5bf Chore: try fix lint (#3571)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-04-06 10:19:53 +08:00
wyike
c093676575 aglin config secret label (#3576)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix not update label

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix addon cannot update label bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

revert
2022-04-01 16:59:15 +08:00
wyike
ed05b4b035 aglin config secret label (#3574)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-04-01 16:13:12 +08:00
Zheng Xi Zhou
3aa4412a0f Fix: remove config image registry (#3572)
Temporarily removed image registry config

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-04-01 01:07:43 +08:00
wyike
ef4b9816e1 fix bug (#3569)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix bugs

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

fix
2022-04-01 01:04:29 +08:00
Tianxin Dong
1c5aab1852 Fix: fix dex config field (#3568)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-04-01 00:51:17 +08:00
Zheng Xi Zhou
966dbc1c74 Feat: add config management apis (#3562)
* Feat: add config management apis

Added some APIs for config management

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix check-diff

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix ci issue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix config sync

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix static check

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix sync

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Fix: sync config bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2022-04-01 00:15:03 +08:00
qiaozp
4eafb46c87 Chore: bump test k8s to 1.20 (#3567)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-31 22:12:55 +08:00
Tianxin Dong
a97a4d0ed7 Feat: add update dex config in apiserver (#3548)
* Feat: add update dex config in apiserver

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* use get connectors to get dex connectors

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* lint the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: seperate dex config from a component to an application

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: use dex config from secret

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix not found

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix restart dex

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix system info

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix restart

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-31 18:42:18 +08:00
Jianbo Sun
77c02f9eec Chore: add video records in readme for chinese community call (#3565)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-31 18:05:22 +08:00
Jianbo Sun
3157efd421 Chore: refine chart readme and notes (#3563)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-31 17:33:06 +08:00
wyike
8ff93b33e2 Feat: add helm repo list endpoint (#3564)
* add helm repo list

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix commit

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* build swagger

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-31 17:18:54 +08:00
qiaozp
c6b9abe4c4 Chore: bump k8s version contraint (#3560)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-31 16:42:14 +08:00
Somefive
150ef6e99e Fix: livediff minor bug (#3558)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-31 13:13:55 +08:00
wyike
0ada407fbe optimize the ux of addon (#3557)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix

fix
2022-03-31 10:24:20 +08:00
Somefive
c4af1ba643 Fix: topology use original resource namespace when not specify (#3554)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-30 19:52:10 +08:00
qiaozp
de84421487 Feat: add name param in vela logs (#3556)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-30 17:56:59 +08:00
yangs
38a8a7f88a Fix: fix the componentDefinition webservice parameter error (#3553)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-03-30 15:55:49 +08:00
Xiangbo Ma
b4ddf0e4c3 Feat: a new ComponentDefinition cron-task Signed-off-by: Xiangbo Ma <maxiangboo@cmbchina.com> (#3541)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-03-30 13:27:21 +08:00
wyike
47050c90b6 Fix: cli addon multicluster bug (#3547)
* fix addon multicluster bug

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

delete useless test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

asd

asd

* fix test race condition

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-29 23:03:57 +08:00
barnettZQG
685d73a20c Feat: support with metadata as context render cue file in the addon (#3549)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-29 22:13:56 +08:00
Somefive
dde8a8e4c0 Fix: addon support empty components (#3542)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-29 16:42:43 +08:00
Min Kim
943af3ddf6 bump cluster-gateway to v1.3.0 (#3540)
Signed-off-by: yue9944882 <291271447@qq.com>
2022-03-29 16:18:38 +08:00
Somefive
a5c2edf777 Feat: allow select resource by component name for gc policy (#3539)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-29 14:00:50 +08:00
wyike
83d8022ce9 quick fix addon registry (#3537)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-29 12:40:25 +08:00
Zheng Xi Zhou
6d63014c6f Feat: support config management (#3430)
* Feat: componentDefinitions for Config management

Added ComponentDefinitions for config management
- helm chart repository
- image registry
- Dex connector
- Terraform provider

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update vela-templates/definitions/internal/component/config-image-registry.cue

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>

* address comments again

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>
Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
2022-03-29 10:28:07 +08:00
Jianbo Sun
d3fbd5fd45 Fix: addon API panic and override workflow step for addon installation (#3533)
* Fix: addon API panic

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: use policy to deploy addon

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: use create or update app instead of patch apply on addon update

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: unit test

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-29 02:37:57 +08:00
barnettZQG
b0202ebf14 Fix: change the default permission name (#3531)
* Fix: change default permission name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the addon api bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: set local cluster name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-28 23:37:25 +08:00
Tianxin Dong
295164229d Fix: optimize err for auth in apiserver (#3526)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-28 22:35:56 +08:00
Jianbo Sun
ba09cf5c2e Fix: fix migrate data duplicate in list API and add cluster info in addon status (#3528)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-28 22:30:35 +08:00
Somefive
099e25a552 Fix: enhance ref object to support health check for deployment (#3529)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 22:13:51 +08:00
Min Kim
b2f5b69380 chore: bump cluster-register (#3514)
Signed-off-by: yue9944882 <291271447@qq.com>
2022-03-28 21:57:44 +08:00
Zheng Xi Zhou
5d61cee3f6 Fix: support multiple-tenant cloud resources (#3305)
* Fix: support multiple-tenant cloud resources

Split terraform-xxx to two parts, the original addon will only install
definitions, and the provider object will be created by `vela provider`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* continue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* continue 0302

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support `vela provider list`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* generate a configmap in an addon terraform-xxx

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix listing providers

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support add a provider

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support delete a provider

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* support legacy providers

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-03-28 21:55:33 +08:00
Somefive
2af198bda7 Docs: add feature docs for multi-cluster and application revision (#3530)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 21:47:57 +08:00
wyike
161d2646cb Feat: helm repo as addon registry to support addon's multi-version (#3523)
* versioned registry impl
add more test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ui

fix

fix

fix

modify addon registry
2022-03-28 21:25:38 +08:00
Avery
4f8e7506f9 Fix: fix bugs in vela def doc-gen from local file (#3490)
* fix bugs in using local filepath as markdown filename; fix bugs in parseLocalFile

Signed-off-by: Nicola115 <2225992901@qq.com>

* ignore control character mismatch between lc.TerraformConfiguration and raw text

Signed-off-by: Nicola115 <2225992901@qq.com>

* goimports

Signed-off-by: Nicola115 <2225992901@qq.com>

* store remote and local in MarkDownReference struct

Signed-off-by: Nicola115 <2225992901@qq.com>

* gofmt

Signed-off-by: Nicola115 <2225992901@qq.com>

* fix too many argument bugs in generate.go:45

Signed-off-by: Nicola115 <2225992901@qq.com>

* fix invalid comment

Signed-off-by: Nicola115 <2225992901@qq.com>
2022-03-28 20:57:24 +08:00
Somefive
160ef64855 Feat: support livediff for referred object (#3525)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 17:52:33 +08:00
Guangzhe Huang
905c49eb81 Fix: fix undefined field error in email workflowstep (#3522)
Signed-off-by: huanggze <gzhuang2014@gmail.com>
2022-03-28 16:14:13 +08:00
Somefive
c4a8fcf29c Feat: rework referred objects for version (#3446)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 16:09:12 +08:00
Somefive
e72690bade Fix: ignore kubebuilder generated file in code coverage (#3524)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 16:08:59 +08:00
barnettZQG
044c4bf73c Feat: add RBAC support (#3493)
* Feat: add the rbac data model

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some api about the project

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add CRUD about the project and the project user

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add CRUD about the role and perm check filter function

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: update swagger config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add default roles and perm policies

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add perm check filter for all webservice

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change the method that find project name

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: query applications and envs by user perm

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support get login user info

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change default permissions

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change PermPolicy to Permission

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some unit test and fix the e2e test error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change some comment word

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e api path error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-28 16:03:11 +08:00
Somefive
795231ceb5 Feat: add revision command (#3506)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-28 14:47:47 +08:00
Min Kim
3f621e57b2 bugfix: helm install cluster-gateway be compatible w/ existing APIService w/o annoation (#3512)
Signed-off-by: yue9944882 <291271447@qq.com>
2022-03-28 11:52:47 +08:00
Somefive
9fc992ea3e Fix: concurrent write to controller revision (#3520)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-27 19:56:25 +08:00
Tianxin Dong
c2f5175fd1 Fix: fix parse token error validate (#3507)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-25 22:34:32 +08:00
Kunshuai Zhu
a7d3cd5d1a Chore: Nominate JooKS-me as a Reviewer member (#3508)
Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
2022-03-25 18:04:11 +08:00
yangs
ccfab6ce7f Feat: add health check for componentdefinition task (#3509)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-03-25 16:21:57 +08:00
Tianxin Dong
03cd0d144a Feat: add login handle for apiserver (#3471)
* Feat: add login handle for apiserver

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix go lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: clean up code and add user in ctx

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix swagger conflict

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add auth in apiserver e2e test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: nit fix for apiserver e2e test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-24 17:59:09 +08:00
Somefive
741544c00c Feat: rework apprev (#3498)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-24 14:40:19 +08:00
Jianbo Sun
723a5d83ca Fix: vela status --endpoint format (#3502)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-24 09:47:15 +08:00
StevenLeiZhang
8af5afa5dc Fix: api-server fail to start, when multi-cluster is disabled (#3501)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-03-23 20:46:29 +08:00
Tianxin Dong
aaa1db8760 Fix: fix workflow cli must have workflow in spec (#3469)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-23 17:16:39 +08:00
Jianbo Sun
c5baa1cae9 Feat: support specify cluster in addon installation (#3497)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-23 14:33:15 +08:00
Wei (段少)
eda7e6c5a0 Chore: Nomiante Daniel as a Maintainer (#3491)
Signed-off-by: BinaryHB0916 <davidduan0916@gmail.com>
2022-03-23 09:49:38 +08:00
Jianbo Sun
e5fd150cd5 Fix: add client validation and severside dry run for vela dry-run (#3485)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-22 16:39:36 +08:00
barnettZQG
d041d8c35d Feat: support delete the readonly application (#3492)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-22 15:49:55 +08:00
wyike
345e4c8144 fix disable addon check several bugs (#3488)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-22 10:06:16 +08:00
Jianbo Sun
9a8ec5d797 Fix: delete app won't be synced in UI (#3487)
* Fix: delete app won't be synced in UI

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: cache should be ignored in app meta not exist

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-22 10:04:10 +08:00
Jianbo Sun
d9a676a688 Feat: add page index for env list API (#3482)
* Feat: add page index for env list API

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: add check for target create without namespace or name

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: adress commnets

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-21 19:28:28 +08:00
Jianbo Sun
9a3ad7ef84 Feat: add readOnly for velaux application which is synced from CR (#3479)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-21 16:33:29 +08:00
朱晓兵
9671e3b232 Fix(context): add support for context.appLables and context.appAnnotations (#3463) (#3468)
* Fix(context): add support for context.appLables and context.appAnnotations (#3463)

Signed-off-by: zxbyoyoyo <596908030@qq.com>
Signed-off-by: 朱晓兵 <596908030@qq.com>

* Fix: unit test

Signed-off-by: 朱晓兵 <596908030@qq.com>

* Fix: recover deleted field

Signed-off-by: 朱晓兵 <596908030@qq.com>
2022-03-21 12:02:30 +08:00
Jianbo Sun
0c97f8311c Chore: Nominate fourierr as a Reviewer member (#3475)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-21 12:01:39 +08:00
wyike
a6460d67b6 Feat: check if an addon is been used while disabling. (#3457)
* first commit

add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

fix test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fetch only definitions from registry for lagacy addon app

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

* fix error test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-21 10:38:56 +08:00
Tianxin Dong
3ea2ac6d0f Feat: add user management apis (#3458)
* Feat: add user management apis

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add e2e test and some nit fix

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add password validate

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add email modification in update user

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix user detail to user base

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix rebase

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: add password check in create user

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: fix bcode confilt

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-19 15:51:32 +08:00
wyike
13c420dada Fix: optimize helm repository logic put cache lower layer and return bcode when error (#3466)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-18 18:36:19 +08:00
Jianbo Sun
6354912bba Feat: sync application from CR to data store (#3428)
* Feat: sync application from CR to data store

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feature: address comments

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add migrate database feature to avoid max 63 charactor in kubeapi storage

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* update the sync data

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-18 09:55:15 +08:00
barnettZQG
5209be6da9 Feat: add the conditions for ui schema spec (#3461)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-18 09:52:58 +08:00
maxiangbo
8f9908e723 Feat: support the mountPath of trait-storage-secret is optional (#3462)
* Feat: support the mountPath parameter of trait-storage-secret is optional Signed-off-by: maxiangbo maxiangboo@cmbchina.com

Signed-off-by: fourierr <maxiangboo@qq.com>

* Feat: support the mountPath parameter of trait-storage is optional Signed-off-by: maxiangbo maxiangboo@cmbchina.com

Signed-off-by: fourierr <maxiangboo@qq.com>
2022-03-17 20:04:57 +08:00
Evan Li
296c82344b Fix(workflow): correct terraform component health check (#3456)
Closes: #3355
Signed-off-by: Evan Li <evan.li97@outlook.com>
2022-03-16 20:30:50 +08:00
Somefive
2d19454a35 Feat: enhance labels & annotations trait (#3454)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-16 17:50:12 +08:00
maxiangbo
f67d2db0d1 Fix: trait env and storage conflict Signed-off-by: maxiangbo maxiangboo@cmbchina.com (#3452)
Signed-off-by: fourierr <maxiangboo@qq.com>
2022-03-16 15:14:18 +08:00
Avery
3634ad6f18 Fix: enable provider elastic (#3453)
* enable provider ec

Signed-off-by: Nicola115 <2225992901@qq.com>

* rename provider ec as elastic

Signed-off-by: Nicola115 <2225992901@qq.com>
2022-03-16 15:07:25 +08:00
Tianxin Dong
6c5a40d768 Feat: add dex login in apiserver (#3417)
* Feat: add dex login in apiserver

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: get dex config from secret

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: delete cache for dex config

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ci

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-16 14:37:41 +08:00
wyike
c91a7ac273 Feat(apiserver): helm apiserver webservice (list chart, list version, extract helm values) (#3398)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-16 11:42:08 +08:00
barnettZQG
b437cf4310 Feat: support query the policy definitions (#3445)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-16 10:56:53 +08:00
Sunghoon Kang
040d5e1776 Chore: fix issue-commands workflow (#3451)
It seems that the `issue-commands` workflow keeps failing.

This commit fixes the `issue-commands` workflow by bumping up the
action version and replacing `npm install` with `npm ci` for
reproducibility.

Refs: https://github.com/oam-dev/kubevela-github-actions/pull/11

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-03-16 10:12:58 +08:00
barnettZQG
7bec3506f5 Feat: add auto clear data function for the memory cache (#3439)
* Feat: add auto clear data function for the memory cache

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add memory cache store

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add some test case for the utils package

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-15 19:14:20 +08:00
Jianbo Sun
efc1597317 Nominate devholic as as a Review member (#3444)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-03-15 16:45:26 +08:00
Kunshuai Zhu
38665e319d Feat: poll multi-cluster metrics and export to prometheus (#3429)
* Feat: poll multi-cluster metrics and export to prometheus

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* pass context to polling loop

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* move metrics definition to montitor/metrics/multicluster.go

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* remove pod usage metric and make reviewable

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* revert the change of GetClusterMetricsFromMetricsAPI

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* revert the change of GetClusterMetricsFromMetricsAPI

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Separate the polling logic into a function

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* add start menber function

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* make refreshPeriod a menber var

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* fix typo

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
2022-03-15 13:03:10 +08:00
barnettZQG
1e0f329304 Feat: add component definiton in the detail component response body (#3437)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-15 11:57:16 +08:00
Sunghoon Kang
1300a980f0 Feat: reconcile app with scoped permissions (#3434)
* Refactor: refactor multi cluster round trippers

Before adding more RoundTrippers, it would be better to expose common
logic in the utility package.

This commit exports `tryCancelRequest` at `utils` package, and make
`secretMultiClusterRoundTripper` implement `RoundTripperWrapper`
interface to allow chaining multiple round trippers.

Refs #3432

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Feat: reconcile app with scoped permissions

Currently, all Application resources are reconciled by the Roles bound
to the controller service account. This behavior gives us the power to
manage resources across multiple namespaces. However, this behavior can
be problematic in the soft-multitenancy environment.

This commit adds `serviceAccountName` to ApplicationSepc to reconcile
Application with the given service account for reconciling Application
with scoped permissions.

Refs #3432

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Refactor: extract context setter as method

https://github.com/oam-dev/kubevela/pull/3434#discussion_r825561603

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Feat: use annotation instead of spec

https://github.com/oam-dev/kubevela/issues/3432#issuecomment-1066460269

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Refactor: unify service account setter caller

https://github.com/oam-dev/kubevela/pull/3434#discussion_r825853612

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Refactor: rename GetServiceAccountName

https://github.com/oam-dev/kubevela/pull/3434#discussion_r826514565

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-03-15 11:55:50 +08:00
Zheng Xi Zhou
b6b81c336e Fix: add generate JDBC connection workflowDefintion (#3360)
* Fix: add generate JDBC connection workflowDefintion

Added a WorkflowDefinition

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* format .cue definition

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-03-15 10:53:22 +08:00
Somefive
e2275efe56 Feat: local virtual cluster + namespace in topology (#3436)
* Feat: virtual cluster local + namespace

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor some names

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-15 10:06:36 +08:00
Somefive
c054ee32b1 Fix: use clusterLabelSelector as default (#3438)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-14 19:30:52 +08:00
Somefive
19424cfaa4 Fix: add state keep for healthy suspend (#3426)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-14 14:38:43 +08:00
Rimond
a5fb09814e Fix(docs): rollout example error (#3427)
* modify docs errors

Signed-off-by: liming.jlm <liming.jlm@alibaba-inc.com>

* modify the incorrect file name

Signed-off-by: liming.jlm <liming.jlm@alibaba-inc.com>

Co-authored-by: liming.jlm <liming.jlm@alibaba-inc.com>
2022-03-14 13:13:05 +08:00
Hongchao Deng
c1b116b360 Chore: update CODEOWNERS to promote barnettZQG and leejanee (#3435)
Signed-off-by: Hongchao Deng <hongchaodeng1@gmail.com>
2022-03-14 10:22:57 +08:00
Shukun Zhang
3af893950e add vela status --endpoint into the tips for vela up (#3433)
Co-authored-by: zhangshukun <zhangshukun.7@bytedance.com>
2022-03-14 09:39:11 +08:00
barnettZQG
20583e089a Feat: support query applied resources by velaQL (#3423)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-11 21:22:58 +08:00
qiaozp
96f8e4dc4c Feat: support preventing component from garbage collection (#3424)
* Feat: support preventing component from garbage collect

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Chore: add doc for changes

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Chore: add comments

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Chore: change json tag

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-11 17:32:21 +08:00
wyike
68e2634911 add more test for complicated semver check (#3425)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-11 16:19:32 +08:00
Zheng Xi Zhou
c06dbf3142 Feat: upgrade API version for Terraform Controller (#3396)
* Upgrade API version for Terraform Controller

- Change json tag of spec.Region to `customRegion` in Configuration https://github.com/oam-dev/kubevela/issues/3384
- Use .status.observedGeneration to make Terraform outputs is latest https://github.com/oam-dev/terraform-controller/pull/269

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix ci

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-03-11 16:13:30 +08:00
Somefive
598de21f67 Feat: add support for json-patch and json-merge-patch (#3406)
* Feat: add support for json-patch and json-merge-patch

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add e2e test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: refactor json-patch field

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 14:57:50 +08:00
wyike
b13132ceba Feat: helm chart keep fluxcd addon while delete (#3404)
* keep fluxcd addon will delete

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-11 14:46:28 +08:00
Somefive
70408e4712 Feat: support vela cluster labels add/del to manage cluster labels (#3413)
* Feat: add vela cluster label command

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add vela cluster label command to help manage cluster labels

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add e2e test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: use vela cluster labels

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 14:13:17 +08:00
Somefive
b975c313c3 Fix: add parallelism params for deploy step (#3411)
* Fix: add parallelism params for deploy step

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add e2e test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 13:20:12 +08:00
Somefive
a8dfc99ec9 Fix: pend registry test (#3420)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-11 11:35:40 +08:00
Zheng Xi Zhou
ca8d66471a Feat: add @evanli18 as one Reviewer (#3402)
Fix #3330

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-03-10 20:25:47 +08:00
Somefive
d5e8b68ad2 Fix: rework parallel execution for ApplyComponents and ResourceKeeper Dispatch (#3407)
* Fix: applyComponents lock and rework parallel execution

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: rename

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-10 16:43:22 +08:00
Somefive
d8f95c9cf8 Feat: support multicluster service in application status (#3387)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-10 10:21:56 +08:00
maxiangbo
52f3636a2d Feat: support gitee repository in addon registry (#3393)
* Feat: support gitee repository in addon registry
Signed-off-by: fourierr <maxiangboo@163.com>

* Feat: support gitee repository in addon registry
Signed-off-by: maxiangbo <maxiangboo@cmbchina.com>

Signed-off-by: fourierr <maxiangboo@yeah.net>

* Feat: support gitee repository in addon registry Signed-off-by: maxiangbo <maxiangboo@cmbchina.com>

* Feat: support gitee repository in addon registry Signed-off-by: maxiangbo <maxiangboo@cmbchina.com>

Signed-off-by: fourierr <maxiangboo@qq.com>

Co-authored-by: fourierr <maxiangboo@yeah.net>
2022-03-10 10:11:45 +08:00
Diego Pinheiro
04db938ffa fix - rename docs example dir (#3408)
Signed-off-by: GitHub <noreply@github.com>
2022-03-10 10:02:46 +08:00
Somefive
f9635de027 Fix: auto deploy spec missing (#3386)
* Fix: auto deploy spec missing

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: modify test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-09 11:28:52 +08:00
Diego Pinheiro
d5ad037173 Fix: Helm Chart values.yaml typo (#3403)
* fix - typo

Signed-off-by: GitHub <noreply@github.com>

* fix - typo helm values

Signed-off-by: GitHub <noreply@github.com>
2022-03-09 11:18:46 +08:00
barnettZQG
600b3a7044 Feat: make the component list is in reverse order (#3350)
* Feat: update api doc

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: make the component list is in reverse order.

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: update swagger config

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-08 17:59:22 +08:00
Avery
7bc34b8dd9 Feat: support def doc-gen <LocalFile.yaml> and corresponding functions (#3368)
* add doc-gen --local <LocalFile> and corresponding functions

Signed-off-by: Nicola115 <2225992901@qq.com>

* go format

Signed-off-by: Nicola115 <2225992901@qq.com>

* refactor the usage of vela def doc-gen from local file; refactor the function GenerateReferenceDoc

Signed-off-by: Nicola115 <2225992901@qq.com>

* gofmt and goimports

Signed-off-by: Nicola115 <2225992901@qq.com>

* update prompts info

Signed-off-by: Nicola115 <2225992901@qq.com>

* remove parseLocalDefinition struct, using ComponentDefinition instead

Signed-off-by: Nicola115 <2225992901@qq.com>

* standardize the function ParseLocalFile

Signed-off-by: Nicola115 <2225992901@qq.com>

* add unit test for ParseLocalFile

Signed-off-by: Nicola115 <2225992901@qq.com>

* remove redundant functions

Signed-off-by: Nicola115 <2225992901@qq.com>

* remove redundant lines and do goimports formatting

Signed-off-by: Nicola115 <2225992901@qq.com>
2022-03-08 16:58:39 +08:00
Tianxin Dong
bef24bdf22 Fix: separate waiting and failed backoff time and make them configurable (#3362)
* Fix: separate waiting and failed backoff time and make them configurable

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change var name in chart values

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ci

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-03-08 16:04:19 +08:00
Zhiyu Wang
bed1fb373e Fix: The generated swagger.json is malformed. (#3372) (#3373)
Signed-off-by: Zhiyu Wang <zhiyuwang.newbis@gmail.com>
2022-03-08 15:48:05 +08:00
Somefive
b5ce5df9c5 Fix: remove deprecated rt field in app status (#3388)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-08 15:40:31 +08:00
Somefive
6e73c52116 Feat: enhance container related traits (#3359)
* Feat: enhance env trait

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: enhance container image trait

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add command trait

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-08 15:40:04 +08:00
Kunshuai Zhu
0b0ed60b42 Feat: init multi-cluster metrics management (#3365)
* Feat: init multi-cluster metrics management

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Refactor and add metrics collection for metrics-server

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Modify comment

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Fix staticcheck

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Fix some error

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Fix

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
2022-03-08 14:20:36 +08:00
Somefive
aeaa199982 Fix: remove useless envbinding crd (#3379)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-08 13:40:05 +08:00
qiaozp
751aed0098 Fix: install definition script (#3376)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-03-08 12:26:25 +08:00
Somefive
17ee4268e2 Fix: upgrade dependency to fix alerts (#3378)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-07 14:16:40 +08:00
Somefive
7a30ec61d6 Fix: remove unused variable (#3377)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-07 11:57:59 +08:00
Somefive
de81c24f42 Feat: support standalone style multi-cluster (#3223)
* Feat: ref component

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support topology and override

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add support for external policy and workflow

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add admission control

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: disable cross namespace ref object

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support labelSelector in ref-objects

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add pre approve for deploy step

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support comp/trait type in override policy even not used by prototype

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: support regex match for patch component name

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: labelSelector not work for cluster

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: ref workflow contains external policy

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: revision test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: parallel apply components

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add test for oam provider

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: service ref-comp & indirect trait ns

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: align namespace setting for chart

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add strict unmarshal and reformat

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: merge with cluster rework

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: patch trait-def

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: apply components + load dynamic component

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test for loadPoliciesInOrder

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: add test for open merge

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: reformat & add test for step generator

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test for parse override policy related defs

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test for multicluster provider (expandTopology and overrideConfiguration)

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add admission test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: revert trait status pass in component status

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test for dependency in workflowstep & standalone multicluster test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add check for ref and steps in WorkflowStep & enhance ref-objects scheme check

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-03-07 10:21:00 +08:00
dependabot[bot]
93425889ef Chore(deps): Bump github.com/containerd/containerd from 1.4.12 to 1.4.13 (#3364)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.4.12 to 1.4.13.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.4.12...v1.4.13)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-04 09:43:04 +08:00
old prince
91c6458f35 Fix:deploy application api return value (#3358) 2022-03-03 18:27:13 +08:00
wyike
1cb4426e4b fix windows bug (#3351)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-03 14:43:40 +08:00
Sunghoon Kang
3399742709 Fix: clone request if round tripper modifies it (#3354)
Currently, multicluster round trippers are modifying request directly.
However, golang documentation says `RoundTrip` should not modify the
request.

This commit fixes round trippers to clone the request before the
modification.

https://pkg.go.dev/net/http#RoundTripper

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-03-03 14:42:24 +08:00
c1_zh
4ec919e009 Feat: Addon yaml files discovery logic improvement (#3356)
Signed-off-by: cezhang <c1zhang.dev@gmail.com>
2022-03-03 13:12:23 +08:00
StevenLeiZhang
dfd316ef7b Fix: Position of parameter is always changing on addon's details page. (#3345)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-03-02 20:46:13 +08:00
Kingram
7f20b7c5be Fix: Fix the inaccurate judgment of ready status (#3317)
* fix: Fix the inaccurate judgment of ready status

Signed-off-by: kingram <kingram@163.com>

* fix: solve inaccurate isHealth

Signed-off-by: kingram <kingram@163.com>

* fix: update readyReplicas type

Signed-off-by: kingram <kingram@163.com>
2022-03-02 13:17:55 +08:00
wyike
12f63dcae5 fix hard code service account name in test (#3346)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-03-02 12:20:05 +08:00
barnettZQG
342b853315 Feat: add api for delete component (#3341)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-03-01 22:13:24 +08:00
Tianxin Dong
d6cf2cdd2f Fix: add process context in workflow (#3318)
* Fix: add process context in workflow

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add context data in process context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* delete usesless func

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* use multi cluster ctx in process ctx

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* remove debug log

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-02-28 10:30:55 +08:00
Tianxin Dong
b8fd610523 Feat: add helm chart doc and make command (#3331)
* Feat: add helm chart doc and make command

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix makefile and add generate helm doc in release ci

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-02-28 10:03:23 +08:00
Wei (段少)
4a58af76cf Update: Nominee Wei as a maintainer (#3326) 2022-02-24 14:52:52 +08:00
StevenLeiZhang
b54ddf4c1c Fix: The order of status displayed by vela ls is not correct (#3302)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-02-23 14:50:04 +08:00
wyike
ca486be4eb Fix: addon store&show complicated parameter (#3310)
* fix

fix complicate args storage

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* wrap logic in func and add mock test

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

solve confict

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix
2022-02-23 14:35:18 +08:00
barnettZQG
13b1e85442 Feat: add style and immutable parameters for uischema (#3309)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-23 14:23:07 +08:00
wyike
16414a0d9f Feat: addon support version check (#3304)
* addon support version check

add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add kubernetes tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* reorgnize the check logic

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix addon error bug in apiserver

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix comments

fix test

* add err addon bcode

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix comments

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-02-23 12:17:31 +08:00
Somefive
7059c8df79 Feat: rework cluster to align velaux and cli (#3299)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-02-22 15:48:22 +08:00
Jian.Li
fb831345f0 Fix: Let versioned controller uses a separate election locker in one cluster. (#3298)
* versioned leader election id

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* modify GenerateLeaderElectionID

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* add license header

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
2022-02-21 19:54:49 +08:00
Tianxin Dong
170debf3ae Fix: change seldon service from istio to ambassador (#3278)
* Fix: change seldon service from istio to ambassador

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* get service name form sdep

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-02-20 13:06:24 +08:00
wyike
015f3cf72b Feat: vela can set default namespace and user can enable fluxcd addon by default (#3280)
* vela default namespace and enable addon by default

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix lint

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix cli error

fix comments

* add tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-02-18 17:23:50 +08:00
yangs
67e88ffbaf Fix(charts): the qps and brust of reconcile client configurable (#3289)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-02-18 16:27:37 +08:00
Zheng Xi Zhou
37a523cbf7 Fix: not steady unit test (#3293)
The UT `TestGetOpenAPISchemaFromTerraformComponentDefinition` won't
succeed 100%. The required variables in the generated isn't in the expected
order all the time.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-02-18 15:15:10 +08:00
Jianbo Sun
42837ef162 Fix: make e2e CI more stable in vela show case (#3292)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-02-18 15:06:28 +08:00
Nash Tsai
1e022999a8 Refactor: refactor Helm chart with unnecessary 'systemDefinitionNames` value (#3267)
* refactor: refactor Helm chart with unnecessary 'systemDefinitionNamespace' value

* Revert "refactor: refactor Helm chart with unnecessary 'systemDefinitionNamespace' value"

This reverts commit 2ae764737f.

* Fix: Helm chart's 'Values.systemDefinitionNamespace' have default value of '.Release.Namespace' if unspecified.

* fix: fixed vela cli  referenced '{{.Values.systemDefinitionNamespace}}'

Co-authored-by: yungcheng.tyc <yungcheng.tyc@alibaba-inc.com>
2022-02-18 14:05:38 +08:00
Rui Jiang
8a1d0107b9 concurrent reconciles configurable (#3285)
Signed-off-by: jrkeen <jrkeen@hotmail.com>
2022-02-18 11:05:00 +08:00
Jianbo Sun
d3500b6d7c Chore: remove useless controller args to avoid confusion (#3284)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-02-17 19:13:40 +08:00
朱晓兵
debd9f2b40 Feat: add api for app compare、reset、dryrun (#3136)
* Feat: add api for app compare or reset

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: fix lint

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: fix lint

Signed-off-by: zxbyoyoyo <596908030@qq.com>

* Fix: fix imports

Signed-off-by: zxbyoyoyo <596908030@qq.com>
2022-02-17 13:58:48 +08:00
Zheng Xi Zhou
8eaa438631 Feat: add @wangwang as one Reviewer (#3268)
https://github.com/oam-dev/kubevela/issues/3261

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-02-16 19:46:24 +08:00
StevenLeiZhang
7102d7ad20 Fix: vela status api can not return customized arguments of addon (#3275)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-02-16 19:23:51 +08:00
Tianxin Dong
7b42515818 Fix: add DisableUpdateAnnotation for addon (#3260)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-02-16 15:27:22 +08:00
Tianxin Dong
7ee4b14a88 Feat: add seldon virtual service support in endpoints (#3259)
* Feat: add seldon virtual service support in endpoints

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-02-16 14:25:34 +08:00
barnettZQG
3d0b9b7c71 Feat: rollout controller is disabled by default (#3250)
* Feat: rollout controller is disabled by default

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: change rollout image pull policy

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: remove controller from the rollout addon in testdata

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: rollout controller is disabled by default

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: extended waiting time for the addon mock server

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-16 14:25:04 +08:00
Kunshuai Zhu
4bae08c2e2 Fix: Optimize error msg of addon enable/upgrade local path (#3222)
* Optimize error msg of addon enable/upgrade local path

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Fix and add unit test

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* Run make reviewable to include all changes

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* remove test case for windows

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>

* fix unit test.

Signed-off-by: zhukunshuai <jookunshuai@gmail.com>
2022-02-16 14:20:37 +08:00
Zheng Xi Zhou
46fce3262e Fix: properties table of cloud resource doc is broken (#3256)
If one column of a table contianers multiple line of a json
struct, it will break the table.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-02-16 11:03:11 +08:00
Zheng Xi Zhou
46967daf11 Fix: fixed required items for a Terraform ComponentDefinition (#3257)
If a Terraform variable is required, the item in OpenAPI schema
is required.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-02-15 18:53:40 +08:00
Wei (段少)
2fd8b7bc52 Feat: update owners_aliases (#3246)
* Update: ownerer-aliases

* Fix: keep up bootstrap-contributors

* Fix: reformat

* Fix: inherit all the maintainers from who maintain controller
2022-02-15 15:59:40 +08:00
Wei (段少)
a9e511d3a8 Feat: update logo to .svg (#3254) 2022-02-15 15:29:09 +08:00
Wei (段少)
37fb45bab8 Feat: update community.md (#3248) 2022-02-14 18:41:19 +08:00
barnettZQG
4a29776e8e Fix: registry don't have enough info to build a reader (#3237)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-14 18:04:34 +08:00
yangs
65522cabdb Fix: fix panic when user disable create apprevision (#3244)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-02-14 17:54:41 +08:00
Avery
d145487b96 Add cli support for provider gcp and baidu. (#3242)
Signed-off-by: Nicola115 <2225992901@qq.com>
2022-02-14 16:40:18 +08:00
wyike
7523576905 Feat: support complicated addon parameter (#3232)
* support complicated addon parameter

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

* fix: go mod tidy

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-02-14 14:02:16 +08:00
barnettZQG
5b356af7dc Fix: can not collector pod list with rollout trait (#3225)
* Fix: can not collector pod list with rollout trait

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: cue format error

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: default values and optional parameters cannot coexist

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-14 13:05:01 +08:00
wangcanfengxs
72a434134a Fix: remove duplicative route in application webservice. (#3236)
Signed-off-by: wangcanfeng <wangcanfeng@corp.netease.com>

Co-authored-by: wangcanfeng <wangcanfeng@corp.netease.com>
2022-02-14 13:03:58 +08:00
barnettZQG
5ab9f0986e Feat: remove the duplicate command (#3228)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-14 10:35:31 +08:00
barnettZQG
9fe9f98e30 Fix: apply crd error that the annotations too lang (#3231)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-14 10:33:50 +08:00
barnettZQG
fee4a3f2b8 Fix: the definition namespace is empty (#3227)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-11 19:56:29 +08:00
Shaw Ho
f0cbe816a6 Fix: ControllerRevision typo (#3214)
Signed-off-by: Xiaoxi He <xxhe@alauda.io>
2022-02-10 15:43:11 +08:00
Somefive
d7261cd965 Fix: disable cochange for apprev when def changes (#3217)
* Fix: disable cochange for apprev when def changes

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: add test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-02-10 11:40:46 +08:00
barnettZQG
17794e4ce1 Fix: upgrade package github.com/docker/cli for CVE-2021-41092 (#3216)
* Fix: upgrade package github.com/docker/cli for CVE-2021-41092

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: change go version to 1.17

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Chore: change go mod

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: change install cue shell

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-09 19:18:40 +08:00
barnettZQG
15418a6523 Feat: the golang version upgrade to 1.7 (#3208)
* Feat: the golang version upgrade to 1.7

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: install expat lib

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-09 15:17:50 +08:00
barnettZQG
fa1409f974 Fix: fix flag conflict (#3211)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-09 15:17:04 +08:00
Jianbo Sun
3157e65d8a Feat: Add image scan for vela core (#3210)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-02-09 14:00:12 +08:00
barnettZQG
f6eea78ec8 Feat: support install and uninstall vela core (#3181)
* Feat: support install and uninstall vela core

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support upgrade crd

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support set reuse args

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: apply CRD before install or upgrade

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-02-09 11:48:38 +08:00
Zheng Xi Zhou
24f147a72c Fix: support more Terraform variable types (#3204)
Support Any, set and some complicated variable types

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-02-08 18:48:38 +08:00
Jianbo Sun
7395994bdd Feat: add componentName in context for traitDefinition (#3200)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-02-08 16:26:16 +08:00
yangs
91125c6fec Feat: dispatch manifests in concurrent (#3060)
* Feat: dispatch manifests in concurrent

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

* Fix: merge workflow pkg convert to pkg util

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-02-08 16:25:57 +08:00
Jianbo Sun
0d8a9fc0de Chore: remove hack/website as docs moved to kubevela.io repo (#3197)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-02-08 16:24:26 +08:00
Jian.Li
68ada429f0 Feat: application support controller requirement (#3192)
* application controller version control

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* modify command arg name

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
2022-02-08 15:44:38 +08:00
Zheng Xi Zhou
2c41ee9c3c Fix: add unit test for getting Terraform Configuration from remote git (#3193)
Add another unit test when the configuration of Terraform locates
in a subpath of a git remote repository

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-02-08 10:16:13 +08:00
Chazza
53198a9d9d Add nodeselector to jobs (#2811)
Signed-off-by: Chazza <github@whalecoiner.com>

Co-authored-by: Chazza <charlie@whalecoiner.com>
2022-02-08 09:36:51 +08:00
Somefive
7e102d70e0 Fix: error msg in webhook too complicated to read (#3169)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-01-27 16:09:23 +08:00
Jianbo Sun
ce25bd9985 Chore: add changelog of v1.2.x (#3167)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-26 11:23:01 +08:00
Oliver Otte
225b59156f Fix: Use systemDefinitionNamespace core Helm Chart (#3163)
Use value in Addon Registry CM and the Test Application

Signed-off-by: Oliver Otte <otte@gonicus.de>
2022-01-25 19:16:38 +08:00
Jianbo Sun
a73a4c64c2 Fix: krew install template of kubectl-vela.exe (#3162)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-25 18:46:05 +08:00
Tianxin Dong
614472b95a Feat: support vela show for workflow step definition (#3140)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-25 15:03:38 +08:00
zeed-w-beez
8b350a7258 Fix: add context parameters into the error message (#3145)
Signed-off-by: zeed-w-beez <zeed.w.zhao@gmail.com>
2022-01-25 13:27:26 +08:00
wyike
8d13c3c7bc fix: vela addnon enable cannot support = (#3156)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-01-25 13:22:45 +08:00
wyike
2da60419fc Feat: addon parameter support ui-shcema (#3154)
* Feat: addon parameter support ui-shcema

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>

fix ci

* add more tests

Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-01-25 10:43:38 +08:00
Zheng Xi Zhou
7895560675 Fix: retrieve Terraform variables from variables.tf (#3149)
* Fix: retrieve Terraform variables from variables.tf

If Terraform modules/resources are stored in remote git repos, get
variables from file `varialbes.tf`, or from `main.tf`.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-24 11:52:07 +08:00
Zheng Xi Zhou
75dc45ced6 Fix: add providerRef in generated ComponentDefinition (#3142)
If the provider is not provider, append the providerRef section in
the generated ComponentDefinition

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-24 10:27:37 +08:00
Sunghoon Kang
665e2b6340 Feat: extend gateway trait to set class in spec (#3138)
* Feat: extend gateway trait to set class in spec

`kubernetes.io/ingress.class` annotation is deprecated in favor of
`.spec.ingressClassName`. However, there is no way to set it through
the gateway trait for now.

This commit extends the gateway trait by adding `classInSpec` to
parameter. Forcing the use of `.spec.ingressClassName` makes sense, but
some ingress controllers (including old versions) may not recognize
this field. Therefore, set default value of `classInSpec` to `false`
for backward compatibility.

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Chore: update classInSpec usage

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-01-23 10:11:47 +08:00
Tianxin Dong
cb7bc0e7f4 Fix: handle workflow cache reconcile (#3128)
* Fix: handle workflow cache reconcile

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix return and move backoff to memory

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* handle failed to patch case

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add store in err case

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make reviewable

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* do cleanup in ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-22 15:54:17 +08:00
Sunghoon Kang
4ad8913bbd Fix: prioritize namespace flag for vela up (#3135)
* Fix: prioritize namespace flag for `vela up`

Currently, CLI applies application to `default` namespace when there is
no explicit namespace in application spec, even if the namespace flag
is set.

This commit fixes issue by overriding the namespace if the namespace
flag is set.

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>

* Test: add test cases for overriding namespaces

Signed-off-by: Sunghoon Kang <hoon@linecorp.com>
2022-01-21 10:22:25 +08:00
Zheng Xi Zhou
947455adb9 Fix: support generate Terraform ComponentDefinition from local HCL file (#3132)
Besides generating a Terraform ComponentDefinition from a remote git repo,
support generate one from local HCL file

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-20 14:15:22 +08:00
Jian.Li
354e92cfbd Fix: workflow skip executing all steps occasionally (#3025)
* fix asi

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* fix lint

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* add trace tag

* add args for this feature

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* enable-asi-compatibility

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
2022-01-19 16:07:19 +08:00
StevenLeiZhang
7bdd3dd6e8 add imagePullSecrets for helm templates to support private docker registry (#3122)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-01-19 12:59:21 +08:00
Tianxin Dong
408c893cff Feat: add port name in webservice (#3110)
* Feat: add port name in webservice

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix port name in container

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* generate port name if not specified

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-18 18:59:48 +08:00
Zheng Xi Zhou
dd9ec2325a Fix: add app samples for Terraform definition (#3118)
Added application samples for all Terraform typed ComponentDefinition,
and also localize the title for AWS and AZure

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-18 18:08:30 +08:00
chwetion
951506b79b fix revision will change when add new trait with skiprevisionaffect to application (#3032)
Signed-off-by: chwetion <chwetion@foxmail.com>

Co-authored-by: chwetion <chwetion@foxmail.com>
2022-01-18 13:40:30 +08:00
Somefive
14b1354a68 Feat: support wild match for env patch (#3111)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-01-18 12:58:50 +08:00
qiaozp
bd2e574007 Fix: trait/comp command output without a new line (#3112)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-01-18 12:46:59 +08:00
chwetion
438a9fe7a5 Feat: add JFrog webhook trigger (#3104)
* add jfrog webhook to update application image

Signed-off-by: chwetion <chwetion@foxmail.com>

* edit jfrog default request header

Signed-off-by: chwetion <chwetion@foxmail.com>

Co-authored-by: chwetion <chwetion@foxmail.com>
2022-01-18 10:25:28 +08:00
Somefive
12f392cd92 Fix: rollout workload namespace not aligned with rollout (#3107)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-01-17 20:06:27 +08:00
StevenLeiZhang
af27e6a776 ignore vela-system, which is specified in needNamespace for addon metadata information (#3109)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-01-17 20:02:05 +08:00
StevenLeiZhang
f57815a5bf ignore files under the addon path of github addon registry (#3099)
Signed-off-by: StevenLeiZhang <zhangleiic@163.com>
2022-01-17 20:01:46 +08:00
Somefive
69527b257c Feat: support external revision in patch component (#3106)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-01-17 19:29:28 +08:00
barnettZQG
d88d4d8eca Fix: clear old data in mongodb unit test case (#3103)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-17 19:06:29 +08:00
Zheng Xi Zhou
4e881b44af Fix: support generate cloud resource docs in Chinese (#3079)
* Fix: support generate cloud resource docs in Chinese

`vela def doc-gen` will also generate Chinese cloud resource docs

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Continue the development

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add ut

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add ut and fix linting issue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Address comments

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Fix `Should not use dot imports. (ST1001) ` issue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add copyright

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-17 16:18:59 +08:00
wyike
800b50cf0b fix acr image no version (#3100)
Signed-off-by: 楚岳 <wangyike.wyk@alibaba-inc.com>
2022-01-17 16:09:21 +08:00
Jianbo Sun
3d9e1c7d80 Fix: use personel token of vela-bot instead of github token for homebrew update (#3096)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-17 11:45:01 +08:00
barnettZQG
fccc5df25e Fix: can't query data from the MongoDB (#3095)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-17 11:25:09 +08:00
yangsoon
6cee468743 Feat: add more performance optimization and prometheus metrics for controller (#3086)
* Feat: add more prometheus metrics

Signed-off-by: yangsoon <yangsoonlx@gmail.com>

* Feat: add detail gc rt duration metrics

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add monitor to client

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add all cache object

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Fix: watch job

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add deleg client

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add optimize for rt list and disable controllerrevision

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add apprev disable optimize

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Fix: optimize log

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add time recorder for app ctrl

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add in-memory workflow context

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add reconcile-reduction & random-pick-gc & optimize rt record

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: add optimize for healthcheck & resourcetracker trigger

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Feat: record the resource-tracker number by informer event-handler

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

* Feat: add promethus collect annotation in template

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

* Fix: command line comment bug

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: rename args and remove legacy controller metrics

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: make code reviewable

Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

* Chore: optimize flag descriptions

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: break optimize package

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: gc policy test

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2022-01-14 15:18:02 +08:00
wyike
102a155194 fix lost create time and spell error (#3089)
Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-14 15:10:56 +08:00
wyike
f39a3fb792 Feat: system information collection logic in apiserver (#3082)
* Feat: userInfoCollection

Signed-off-by: wangyike <wangyike_wyk@163.com>

* Signed-off-by: wangyike <wangyike_wyk@163.com>

change enable/disable to update interface

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-14 10:16:31 +08:00
Somefive
8b5d7ed395 Feat: reset re-sync time (#3008)
* Feat: set resync

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Fix: rename re-sync period

Signed-off-by: Somefive <yd219913@alibaba-inc.com>

* Chore: refactor return value

Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2022-01-13 20:12:54 +08:00
wyike
5b1c47c918 cue template health check skipStandard workload and fix test diverge (#3087)
Signed-off-by: wangyike <wangyike_wyk@163.com>

add annotation

Signed-off-by: wangyike <wangyike_wyk@163.com>

set skipStandardworkload in wl

Signed-off-by: wangyike <wangyike_wyk@163.com>

add annotation

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-13 19:08:43 +08:00
Jianbo Sun
c298c98f25 Fix: vela logs for namespace get from CLI and add container name args (#3084)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-12 21:22:42 +08:00
Jianbo Sun
7f7a9dcac0 Feat: vela up support read from stdin && refine CLI output && fix vela addon command (#3080)
* Feat: vela up support read from stdin

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: addon name missed in output and fix test

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: refine CLI output

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

Fix: add retry-on conflict on CLI

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-12 17:43:08 +08:00
barnettZQG
b4732ed275 Feat: add cluster name in service endpoint (#3076)
* Feat: add cluster name in service endpoint

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: add cli unit test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-12 14:44:22 +08:00
chwetion
bfbdb85503 Feat: add DockerHub webhook trigger (#3081)
* add dockerhub webhook to update application image

Signed-off-by: chwetion <chwetion@foxmail.com>

* fix e2e webhook response return value

Signed-off-by: chwetion <chwetion@foxmail.com>

* add e2e for dockerhub webhook

Signed-off-by: chwetion <chwetion@foxmail.com>

Co-authored-by: chwetion <chwetion@foxmail.com>
2022-01-12 11:37:06 +08:00
Zheng Xi Zhou
f41e0a3bb5 Fix: change vela def gen-doc to vela def doc-gen (#3078)
* Fix: change `vela def gen-doc` to `vela def doc-gen`

Address the comments to change the command line name

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2022-01-12 11:35:41 +08:00
Jianbo Sun
19a542ff11 Feat: support vela up from remote url file (#3075)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-11 17:28:45 +08:00
wyike
d64c78db47 Feat: addon enable support local dir for install offline (#3066)
* local reader

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix lint

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix comments and add test

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-11 11:29:10 +08:00
Kingram
ceb95229cd Feat: add Harbor webhook trigger (#3065)
* Feat: add harbor webhook trigger (#3029)

Signed-off-by: kingram <kingram@163.com>

* resolve comments

Signed-off-by: kingram <kingram@163.com>

* fix: add comments

Signed-off-by: kingram <kingram@163.com>
2022-01-10 21:26:43 +08:00
barnettZQG
ece47b5961 Fix: change namespace for the service-endpoints-view velaQL (#3071)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-10 21:25:07 +08:00
Basuotian
8be11a7e7e Feat: Add Lark support for notification (#3053) (#3059)
Signed-off-by: Shuai Tian <tians1@xiaopeng.com>

Co-authored-by: Shuai Tian <tians1@xiaopeng.com>
2022-01-10 19:42:06 +08:00
Zheng Xi Zhou
b354d2faa9 Fix: generate Terraform ComponentDefinition by vela cli (#3067)
* Fix: generate Terraform ComponentDefinition by vela cli

Support generate Terraform typed ComponentDefinition by `vela def init`

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-10 19:12:32 +08:00
Jianbo Sun
3af323365b Chore: refine CLI help message and docs (#3068)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-10 17:45:20 +08:00
Jianbo Sun
6a512c02a6 Chore: add autogen CLI reference doc script (#3063)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-10 15:28:04 +08:00
Minglong Song
b30ca0c8a2 Fix: Do not fiter event triggered by resync for application controller (#3064)
Signed-off-by: songminglong <1247768069@qq.com>
2022-01-10 14:48:58 +08:00
Zheng Xi Zhou
1a50dd76b5 Fix: generate docs for Terraform ComponentDefinition (#3051)
* Fix: generate docs for Terraform ComponentDefinition

Generated kubevela.io docs for Terraform typed ComponentDefinition
with `vela def gen-doc xxx` cli.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Refactor code

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add ut

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add ut

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* refine cloud resource title

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-10 14:08:48 +08:00
Zheng Xi Zhou
b17abe0081 Fix: add cue binary requirement in Development doc (#3062)
* Fix: add cue binary requirement in Development doc

If the version of cue binary is less than v0.3.0, like v0.2.0, `make reviewable`
will fail due to issue: "make: *** [fmt] Error 1". As `make reviewable` is a
required step for code contribution, add this prerequiste in the doc.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update contribute/developer-guide.md

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2022-01-10 13:01:46 +08:00
Jianbo Sun
12a106fcfe Fix: migrate test from crd v1beta1 to v1 (#3061)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-10 10:25:35 +08:00
barnettZQG
53d3ff6915 Fix: security alerts (#3058)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-07 16:27:23 +08:00
barnettZQG
d4762e09cd Feat: support query endpoints in status command and speed up CLI response (#3052)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-07 15:49:27 +08:00
Tianxin Dong
578aae6482 Fix: fix component definition status message (#3054)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-06 23:12:29 +08:00
Zheng Xi Zhou
96485ea0db Fix: when a provider is set in ComponentDefinition, it should look for the provider (#3047)
* Fix: when a provider is set in ComponentDefinition, it should look for the provider

Fixed the issue "The error message is not correct when AWS provider is not available"

Fix #3046

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-06 19:02:03 +08:00
Tianxin Dong
251c440453 Feat: add ACR webhook trigger (#3044)
* Feat: add ACR webhook trigger

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change to interface

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix payload types

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-06 17:31:02 +08:00
wyike
770894412a Chore: deprecate appDeployment related logic (#3050)
* deperecated appDeployment

Signed-off-by: wangyike <wangyike_wyk@163.com>

* delete more code

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-06 16:24:09 +08:00
Tianxin Dong
4d6c0eb9d5 Fix: reset step status to stopped if the workflow is terminated (#3049)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2022-01-06 15:15:28 +08:00
wyike
53081d043b Chore: deprecate and delete approllout related code (#3040)
* Fex: delete useles approllout related code

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix failed test

Signed-off-by: wangyike <wangyike_wyk@163.com>

Fix: failed e2e test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix-test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix e2e-test

Signed-off-by: wangyike <wangyike_wyk@163.com>

fix e2e rollout test

Signed-off-by: wangyike <wangyike_wyk@163.com>

* delete useless test code

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix failed unit-test

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-06 14:33:11 +08:00
Jianbo Sun
8495465087 Refactor: refine cli commands && align kubectl-vela with vela && use getnamespaceAndEnv for all (#3048)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-06 13:29:02 +08:00
qiaozp
5f31b9aad0 Feat: add test for registry name in addon response (#2858)
* add test for registry name when list addon

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* revert

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-01-06 11:48:34 +08:00
barnettZQG
9f2e43756e Feat: support query service endpoints by velaql (#3036)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2022-01-06 00:35:46 +08:00
Zheng Xi Zhou
8033279751 Fix: Generate doc for Terraform typed ComponentDefinition (#3041)
* Fix: Generate doc for Terraform typed ComponentDefinition

When the configuration of a Terraform Typed ComponentDefinition is in
remote Git, generate the properties for it. And generated outputs for
all Terraform ComponentDefinition

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-05 19:45:30 +08:00
chwetion
070b313897 Feat: support application trigger deletion (#3037)
* support application trigger deletion

Signed-off-by: chwetion <chwetion@foxmail.com>

* add unit test for deleting application trigger

Signed-off-by: chwetion <chwetion@foxmail.com>

Co-authored-by: chwetion <chwetion@foxmail.com>
2022-01-05 14:25:24 +08:00
wyike
c170cecd34 fix addon panic bug (#3026)
Signed-off-by: wangyike <wangyike_wyk@163.com>

Fix lint

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-05 13:40:51 +08:00
Somefive
acac0554f3 Fix: filter managedfields update events (#3043)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2022-01-05 13:30:58 +08:00
wyike
1bceea29be Fix: helm addon demo issues (#3033)
* helm-port-forward

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix several issues

Signed-off-by: wangyike <wangyike_wyk@163.com>

* Fix comments

Signed-off-by: wangyike <wangyike_wyk@163.com>
2022-01-04 15:57:57 +08:00
Jianbo Sun
3066cde46b Fix: fix vela show --web that can not show elems (#3039)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-04 15:57:24 +08:00
Jianbo Sun
15be6bc388 Fix: check error when client not created (#3038)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2022-01-04 14:52:35 +08:00
qiaozp
ac6b125b7f Fix: error case is not tested when generate api schema (#3035)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2022-01-04 11:14:57 +08:00
Zheng Xi Zhou
24c00fc99b Fix: don't skip health check for observability in single cluster (#3031)
* Fix: don't skip health check for observability in single cluster

When there is no clusters, users use cli to enable observability,
we use workflow `apply-application-in-parallel` to enable the addon.
This workflow will skip health check and the addon won't become ready.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Fix CI issue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2022-01-04 11:13:09 +08:00
barnettZQG
f468814371 Feat: add uischema manage command (#3021)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-30 14:38:00 +08:00
barnettZQG
a1b1d4a6f8 Fix: trigger webbook bug (#3024)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-30 14:37:40 +08:00
Tianxin Dong
82453b45f5 Fix: fix webhook definition (#3022)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-30 10:11:19 +08:00
Tianxin Dong
72a00b57e6 Feat: add webhook token in application (#2970)
* Feat: add webhook token in application

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Fix: change update cm to commit context

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* refactor the code

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix json merge

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add create and update time

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-30 10:10:34 +08:00
Jamie
ff4b10f0ee Fix: op.#Task couldn't work, debug task.cue and fix bugs (#3005)
Signed-off-by: yunjiazhong <yunjiazhong@tencent.com>

Co-authored-by: yunjiazhong <yunjiazhong@tencent.com>
2021-12-29 19:26:27 +08:00
Somefive
746eb0dbe4 Feat: support logs for velaql (#3011)
* Feat: support logs for velaql

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: extend parameter

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-28 20:49:56 +08:00
Somefive
a33d1e488a Feat: gc process ignore cluster not exists (#3007)
* Feat: gc process ignore cluster not exists

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Feat: gc process ignore cluster not exists

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-28 13:12:23 +08:00
Somefive
0d6173c1ca Fix: pending deprecated test (#3009)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-28 13:12:09 +08:00
barnettZQG
00a80b9ecb Feat: add request logging for the apiserver (#3012)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-28 11:41:53 +08:00
barnettZQG
8284581e0c Feat: set GOPROXY build arg (#3004)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-28 10:26:07 +08:00
Tianxin Dong
8a5759949a Fix: fix notfication properties for schema (#3006) 2021-12-27 20:00:26 +08:00
Zheng Xi Zhou
820db96eae Fix: change Grafana service type and remove domain parameter (#2996)
* Fix: change Grafana service type and remove domain parameter

Use Grafana service's external IP to visit the dashboard and
remove the prameter domain

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* address CI issues

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix api issue

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix ci

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix ci

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-12-26 20:38:19 +08:00
barnettZQG
4d69027300 Feat: check target where create and update env (#3003)
* Feat: check target where create and update env

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: list applications by env

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-25 14:20:36 +08:00
wyike
5210800cac Fix: add registryName into addon list (#2993)
* Fix: add registryName into addon list

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix congig map

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix several comments

Signed-off-by: wangyike <wangyike_wyk@163.com>

* small fix

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-25 12:37:23 +08:00
wyike
66881c13d3 Fix: more app info in addon status (#3000)
Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-25 11:01:59 +08:00
Jianbo Sun
5648c56cf5 Refactor: align velaux env and CLI env, they both use K8s namespace as (#2975)
* Refactor: use createOrUpdateNamespace as a common util function

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add ENV webservice handelr

* Fix: fix Env usecase logic

* Feat: Add Delete Env API

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: filter empty addon data

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: split makefiels and make it clear

* Feat: add k8s utils test

* Feat: Add env update interface

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: change env implementation

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: minor fix

* Revert "Fix: minor fix"

This reverts commit 9cafefa65a.

* Fix: use appusecase as parameter

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Refactor: align CLI vela env with new env design

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: minor fix

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Feat: add page index and alias of env

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: fix tests and licence header

* Fix: fix makefile and add default target

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: update build swagger.json

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: change update env api

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: list env with alias

* Feat: add log to env delete

* Fix: can not get app status

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support update workflow and refactor code

* Fix: lint

* Fix: remove swagger check

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: fix cli vela delete

* Fix: update test

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: update test

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Fix: app deploy unit test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: SortOrderDescending is not effective

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test case

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Feat: support default project/target/env

* Fix: make test and add swagger

* Fix: use separated datasource for unit test

* Fix: app rollback bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: fix e2e test

* Fix: kubeapi driver sort bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test

* Fix: api e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: e2e test fix

* Fix: try fix e2e test

* Fix: api e2e test

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

Co-authored-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-25 10:36:54 +08:00
Min Kim
27252f32de idempotent conditional apiservice deletion (#2997)
Signed-off-by: yue9944882 <291271447@qq.com>
2021-12-24 18:36:21 +08:00
Somefive
775faee96f Chore: add welcome logo in helm install notes (#2994)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-24 16:15:28 +08:00
qiaozp
e818921a87 Fix: return reasonable error make multi-registry work (#2995)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-24 16:06:07 +08:00
wyike
551992e8f2 fix panic bug of addon enable (#2985)
Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-24 11:12:26 +08:00
wyike
e519c6142a Chore: delete useless test (#2984)
* delete useless test

Signed-off-by: wangyike <wangyike_wyk@163.com>

* delete healthscope related test

Signed-off-by: wangyike <wangyike_wyk@163.com>

* small fix

Signed-off-by: wangyike <wangyike_wyk@163.com>

* remove useless report

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-23 18:13:00 +08:00
wyike
3198693ad7 Fix: cli addon registry style small fix (#2980)
* small fix

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix comments

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-23 14:37:22 +08:00
Tianxin Dong
88aa6c0e83 Fix: change update cm to commit context (#2979)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-23 11:45:56 +08:00
Zheng Xi Zhou
8b82a79d1d Fix: vela port-forward supports Addon Observability (#2977)
* Fix: vela port-forward supports Addon Observability

Support port forwarding service of Addon Observability in
multiple clusters

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* fix CI issues

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-12-22 21:08:00 +08:00
wyike
14a57fc656 vela cli support oss path and cli upgrade an addon (#2976)
Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-22 19:31:20 +08:00
Zheng Xi Zhou
d7ee46134d Fix: lowercase the key name in API response (#2978) 2021-12-22 18:14:34 +08:00
Jian.Li
6e5e26c19d fix message invalid (#2968)
Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
2021-12-22 12:47:27 +08:00
Zheng Xi Zhou
8750fc8fab Fix: implement addons/observability/status API (#2966)
* Fix: implement addons/observability/status API

Return all domains and the IPs from all clusters. And
provider the way to visit the console of observability

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* add unit tests

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-12-22 10:54:46 +08:00
qiaozp
7ed293e27e Fix: list addon will always return non-nil err (#2967)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-22 09:28:10 +08:00
Somefive
36ad77493c Fix: resource policy test flaky (#2969)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-22 09:27:21 +08:00
qiaozp
9317bb1cab Refactor: addon cache mechanism and code architecture (#2956)
* Refactor: fix addon cache and code

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* basic trim

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Fix list OSS bucket addon's meta

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* rename listAddonMeta func

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix enable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* rename and trim cache func call

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* remove same source code, use Registry to implement Source interface. Keep the compatibility of DeployTo fields.

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* complete github reader

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix read from github, fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* header

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* rename function, restore test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* try CI

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* sort out functions name. add detail test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* filter directory without metadata.yaml in oss

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add GitHub reader unit test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* clean up

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* header

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add cache arg

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* change field name

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* build swagger

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* some json tag, revert cache logic

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-21 09:31:37 +08:00
barnettZQG
2543b7b510 Fix: can not find target name in pod list (#2936)
* Fix: can not find target name in pod list

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: set create time for init trait

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-20 18:51:21 +08:00
qiaozp
7ef8cea7ce Chore: remove addons stored in configmap (#2951)
Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-20 17:21:03 +08:00
wyike
ae06ddacac Feat: addon compability code for 1.1 (#2961)
Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-20 14:34:45 +08:00
Somefive
db189f7527 Fix: optimize resourcetracker upgrade (#2959)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-20 13:05:53 +08:00
Tianxin Dong
9599e2da9d Docs: update some outdated content in workflow doc (#2962)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-20 11:35:22 +08:00
Tianxin Dong
6c4b7699b9 Fix: nit fix for workflow (#2957)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-20 11:00:07 +08:00
Tianxin Dong
add5d40bfc Feat: add init secret demo (#2955)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-18 14:31:18 +08:00
Somefive
2f7b20d8b8 Fix: amend fix for log sanitize (#2953)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-18 10:16:36 +08:00
Tianxin Dong
b85be11324 Feat: add workflow stability mechanism doc (#2960)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-18 10:11:38 +08:00
Zheng Xi Zhou
d11d171be8 Fix: enable Observability in runtime clusters (#2886)
* Fix: enable Observability in runtime clusters

Enabled add-on observability in runtime clusters. In each cluster, a sub-domain
will be allocated to the cluste

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>


* Fix:add workflow step definition and ut

Added a new workflow step definition `apply-application-in-parallel`,
and added more unit tests
2021-12-17 23:04:54 +08:00
Somefive
cb0e88d590 Fix: nil pointer aliyun sdk (#2954)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-17 15:15:23 +08:00
Tianxin Dong
f0d95c566f Fix: fix notification definition to show better (#2952)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-17 01:09:56 +08:00
Somefive
0a2a41046c Fix: ack dashboard url (#2932)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-16 21:25:43 +08:00
yangsoon
b57db36dd3 Fix: velaql compatible with v1.2.0-beta version (#2946)
Signed-off-by: yangsoon <yangsoonlx@gmail.com>
2021-12-16 21:15:07 +08:00
Tianxin Dong
f5e04a5575 Fix: fix apiserver snake case (#2944)
Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-16 21:14:25 +08:00
Somefive
4e91e3ab8d Fix: workflow step definition for ui (#2948)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-16 21:10:09 +08:00
Somefive
478d134778 Feat: upgrade cluster-gateway (#2941)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-16 21:06:02 +08:00
Somefive
5f2085b470 Feat: support parallel apply in deploy2env (#2938)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-16 21:05:23 +08:00
Somefive
416fc45999 Fix: security alert (#2945)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-16 21:03:54 +08:00
Jian.Li
133a89be3f Fix: deprecate CRD discovery for CUE import in Definition to prevent memory leak and OOM crash (#2925)
* Pause test case

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* fix lint

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* diable discover the open api of the CRD

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>

* fix definition test cases

Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
2021-12-16 17:53:15 +08:00
yangsoon
3b1f097807 Fix: change catlog helm repo path to https://charts.kubevela.net/example (#2942)
Signed-off-by: yangsoon <yangsoonlx@gmail.com>
2021-12-16 15:17:00 +08:00
wyike
e49dec5a3a Feat(cli): app status more info (#2937)
* Feat(cli): app status more info

Signed-off-by: wangyike <wangyike_wyk@163.com>

* more info

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix: delete invisible check

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-16 11:12:06 +08:00
Somefive
f15d748251 Feat: add cluster alias to dt (#2929)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-15 16:33:45 +08:00
barnettZQG
e17f6b931a Feat: support specified existing namespace while creating a project (#2931)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-15 14:42:18 +08:00
Somefive
a3bf61fa4f Feat: set multicluster enabled by default (#2930)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-15 12:11:28 +08:00
Tianxin Dong
655c2615e1 Feat: add workflow reconciling backoff time and failed limit times (#2881)
* Feat: add workflow failed after retries

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* Feat: add workflow reconcile backoff time

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* make reviewable

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve some comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* add tests

* fix rebase

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix status

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix requeue time interval

* resolve comments

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change time to pointer

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix pointer test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* change time to cm

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* resolve comments and add e2e test

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-15 11:33:33 +08:00
Somefive
4dc213469a Feat: add compatibility code for new rt (#2920)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-14 21:27:47 +08:00
yangsoon
03d79db919 Fix: fix sync-api CI (#2923)
Signed-off-by: yangsoon <yangsoonlx@gmail.com>
2021-12-14 17:25:24 +08:00
qiaozp
0fc65eb787 Feat: add mock server (#2911)
* add mock server

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* use mock server

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* complate terraform-alibaba addon

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* move to test dir

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* complete terraform

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add back oss

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* remove useless readme

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-14 14:52:10 +08:00
yangsoon
6d536a84d7 Feat: refactor velaql provider with new ResourceTracker architecture (#2915)
* Feat: refactor velaql with new ResourceTracker architecture

Signed-off-by: yangsoon <yangsoonlx@gmail.com>

* Feat: concurrently request the pod created by helm

Signed-off-by: yangsoon <yangsoonlx@gmail.com>
2021-12-14 13:09:40 +08:00
wyike
f5f5ff514f Feat: cli manage addon registry and apiserver addon status return app status info (#2910)
* Fix: cli add addon registry

add more detail info for addon workflow info

Signed-off-by: wangyike <wangyike_wyk@163.com>

* fix: set app status in addon status directly

Signed-off-by: wangyike <wangyike_wyk@163.com>

* add e2e test

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-13 19:47:32 +08:00
qiaozp
a67b7e90d0 Feat: add path argument to addon oss source (#2907)
* add path

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* pending test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* license

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* keep compatible

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-13 19:43:15 +08:00
Somefive
a89bb69a62 Fix: add design docs for ResourceTracker (#2909)
* Fix: enhance rt logic and add docs

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Fix: test conflict

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-13 19:41:42 +08:00
Min Kim
c5c664f316 pin ocm images version to v0.5.0 (#2900)
Signed-off-by: yue9944882 <291271447@qq.com>
2021-12-13 17:57:45 +08:00
qiaozp
53006b4137 Fix: move addon api to pkg/addon (#2905)
* move addon api to pkg/addon

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* license

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-13 17:47:53 +08:00
barnettZQG
f47ae0e498 Feat: support automatically creating scaler trait for webservice component (#2908)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-10 15:04:31 +08:00
Somefive
b622cbdb7f Feat: ResourceTracker new architecture (#2849)
* Feat: new rt

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>

* Fix: add publish version

Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-10 15:00:03 +08:00
qiaozp
94f32a317d Feat: support addon definition in cue format (#2896)
* move def func to pkg

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* split def schema render

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* render CUE definition

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-09 20:31:19 +08:00
Min Kim
b483840987 honor existing cluster-gateway installation if exists (#2904)
Signed-off-by: yue9944882 <291271447@qq.com>
2021-12-09 15:59:16 +08:00
Jian.Li
3e81fdf008 remove InsecureSkipVerify (#2903)
Signed-off-by: Jian.Li <lj176172@alibaba-inc.com>
2021-12-09 09:20:49 +08:00
barnettZQG
ad4b44696a Feat: add the project api (#2899)
* Feat: add the project api

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: fix e2e test bug

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-08 19:08:35 +08:00
barnettZQG
1563c582bc Feat: support additional properties parameter (#2880)
Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-08 17:46:45 +08:00
Jian.Li
3f2e76c75a Feat: HTTP Provider requires adding certificate chain from secret (#2771)
* http support load tls certs

* fix: TLS MinVersion too low
2021-12-08 11:39:04 +08:00
wyike
f7ebbf4fa0 Fix: create vela namespace (#2893)
Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-08 09:12:37 +08:00
Somefive
330c3e269c Fix: kubeconfig tmp file security (#2894)
Signed-off-by: Yin Da <yd219913@alibaba-inc.com>
2021-12-08 09:12:07 +08:00
Snyk bot
41e6a895a1 fix: hack/website/Dockerfile to reduce vulnerabilities (#2857)
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN9-CURL-1585151
- https://snyk.io/vuln/SNYK-DEBIAN9-GLIBC-356851
- https://snyk.io/vuln/SNYK-DEBIAN9-GLIBC-356851
- https://snyk.io/vuln/SNYK-DEBIAN9-GLIBC-356851
- https://snyk.io/vuln/SNYK-DEBIAN9-GLIBC-356851

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-07 18:07:19 +08:00
Jianbo Sun
e8f2b79721 Fix: use specific cli release download folder (#2889)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-07 17:53:04 +08:00
qiaozp
2947da2611 Fix: OSS read data race (#2875)
* Fix: read oss addon prefix bug

This bug is about list OSS bucket by prefix which will cause confusion between `terraform` and `terraform-alibaba`

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix data race

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix channel block

add test

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* reviewable

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-07 16:17:11 +08:00
Tianxin Dong
4b07f1d000 Feat: support generate definition schema from terraform remote (#2860) 2021-12-07 15:50:04 +08:00
wyike
99757814ab Feat: algin addon cli and apiserver (#2867)
Feat: cli aligin with apiserver

Fix comments

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-07 15:11:52 +08:00
Jianbo Sun
ecd7f62f89 Chore: add more frequency on CI image clean job && delete rollout-test image (#2883)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-06 16:37:34 +08:00
qiaozp
a62724fbd7 Fix: addon timeout is not acturally tracked (#2863)
* Fix: addon timeout is not acturally tracked,  better addon enable fail message

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add namespace

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* change wording

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-06 12:33:52 +08:00
Tianxin Dong
33ffc00c2e Fix: fix webservice and worker def (#2865) 2021-12-06 11:21:41 +08:00
Zheng Xi Zhou
bf03c82bc7 Fix: support displaying logs for Terraform typed applications (#2879)
Refined the logic to display logs for Terraform typed applications,
and upated the namespace of the pod running Terraform jobs

Fix https://github.com/oam-dev/kubevela/issues/2670

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-12-03 18:31:30 +08:00
yangsoon
a528431d63 Feat: add trait service-account (#2878)
Signed-off-by: yangsoon <songyang.song@alibaba-inc.com>

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-12-03 18:24:50 +08:00
Jianbo Sun
fb5716cc13 Feat: add vela apiserver release into github workflow (#2877)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-03 17:01:50 +08:00
Min Kim
589480af62 idempotent cluster join: filter out the clusters not yet accepted (#2859)
Signed-off-by: yue9944882 <291271447@qq.com>
2021-12-03 14:17:38 +08:00
Jianbo Sun
b8640222c8 Fix: mark test chart image in a fixed tag to avoid changed by release action (#2873)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-12-03 13:05:28 +08:00
Tianxin Dong
56f300846c Fix: fix sync from status version instead of anno (#2870)
* Fix: fix workflow sort

* fix sync from status

* fix lint

* fix apply

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix lint

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>

* fix ut

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-12-03 11:22:55 +08:00
qiaozp
95c2b8ce04 Fix: query addon status api 500 because of secret (#2866)
* Fix: query addon status api 500 because of secret

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Fix: enable addon failed because the file name of the cue template is used as the component name

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Fix: fix several oss read problem

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* use oss test endpoint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix ut

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-03 10:59:46 +08:00
Tianxin Dong
9b7286d6f5 Fix: fix workflow apserver sort and rollback status (#2862)
* Fix: fix workflow apiserver sort and rollback status

* fix ut
2021-12-02 20:04:53 +08:00
barnettZQG
27e1dd4a1b Fix: cloud resource type applications could not be identified (#2856)
* Fix: cloud resource type applications could not be identified

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>

* Fix: the cloud app properties can not set empty region value

Signed-off-by: barnettZQG <barnett.zqg@gmail.com>
2021-12-02 17:11:50 +08:00
Zheng Xi Zhou
7d341c4bd3 Fix: pass on properties of Terraform typed application to Configuration (#2847)
* Fix: pass on properties of Terraform typed application to Configuration

Pass on properties like `writeConnectionSecretRef`, `Region` and `providerRef`
to Configuration.

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>

* revert definitions

Signed-off-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-12-02 15:45:50 +08:00
Chwetion
59b458404e Feat: add deleting phase for apiserver application status model (#2854)
Signed-off-by: chwetion <chwetion@foxmail.com>

Co-authored-by: chwetion <chwetion@foxmail.com>
2021-12-02 10:16:27 +08:00
qiaozp
a6ef0644ff Feat: oss suppurt for addon (#2848)
* Add OSS source support for addon

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add unit test for pkg/addon

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* fix lint

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* add license

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-12-01 19:15:48 +08:00
Min Kim
d56a1e534b alternatively using the original endpoint from the hub kubeconfig as registry endpoint (#2751)
Signed-off-by: yue9944882 <291271447@qq.com>

upgrade cluster-register to v1.0.2

Signed-off-by: yue9944882 <291271447@qq.com>

improve logging

Signed-off-by: yue9944882 <291271447@qq.com>
2021-12-01 14:47:26 +08:00
Tianxin Dong
374c3cd3e0 Fix: reset record status when a new one is created (#2846)
* Fix: reset record status when a new one is created

* skip the new created one
2021-12-01 10:52:07 +08:00
wyike
163415479b Feat: list enabled addon from cluster interface and update addon (#2832)
make reviewable

lint

Feat: interface for update addon

nit import

fix comments

fix status args return

Signed-off-by: wangyike <wangyike_wyk@163.com>
2021-12-01 10:27:26 +08:00
barnettZQG
4294cc8a98 Feat: automatically populate the provider and region configuration for cloud app (#2841)
* Feat: automatically populate the provider and region configuration for cloud app.

* Fix: fix e2e test bug

* Fix: component name and type inconsistency

* Fix: fix unit test bug

* Fix: fix unit test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-12-01 10:26:33 +08:00
Zheng Xi Zhou
5630c02d7f Fix: add more fields for Terraform types definitions in api schema (#2836)
* Fix: add more fields for Terraform types definitions in api schema

Added `writeConnectionStringSecrecto`, `region` and `deleteResoruce`
fields for Terraform types definitions in OpenAPI schema

* fix ci issue

* fix header
2021-12-01 10:03:08 +08:00
Tianxin Dong
8dad1eadb4 Feat: add alias in list record api (#2833) 2021-11-30 19:04:42 +08:00
Zheng Xi Zhou
c588f85438 Fix: sync status of Terraform typed components to application (#2844)
Synchronized the status of an Terraform typed components to .status.
services of the application

Signed-off-by: zzxwill <zzxwill@gmail.com>
2021-11-30 17:49:59 +08:00
朱晓兵
13c0b08081 Fix: update envBinding related workflow bug (#2831)
* Fix: fix update envBinding related workflow bug

* Fix: support cloudresource step

* Fix: add unit test

* Fix: add unit test

* Fix: add unit test

* unit test

Co-authored-by: zhuxiaobing <zhuxiaobing@lixiang.com>
2021-11-30 17:24:29 +08:00
Tianxin Dong
52ac570faa Feat: add filter in list definitions (#2835)
* Feat: add filter in list definitions

* add workload type
2021-11-30 16:53:01 +08:00
Jian.Li
ec105cbb02 Fix: application conditions confusion. (#2834)
* fix condition confusion

* fix test cases
2021-11-30 16:43:27 +08:00
Wei (段少)
f8e1ddc52c Add up CII Best Practices badge (#2843) 2021-11-30 15:13:56 +08:00
barnettZQG
2abd98301f Feat: remove apiserver component from the chart (#2838)
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-30 12:42:18 +08:00
yangsoon
13b07674f1 Fix: fix flaky e2e-test of apiserver (#2840)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-30 10:37:52 +08:00
Somefive
f9ecc02417 Feat: rework rt (#2797) 2021-11-29 16:14:30 +08:00
Tianxin Dong
d1f56743cc Feat: add core definitions (#2664)
* Feat: add components and storage api-oriented defs

* add some examples

* change the dir

* resolve comments

* make reviewable

* fix example

* add labels and annotations in component

* add config map ref key in env

* add more traits

* add wfstep defs and rename

* fmt the cue

* re-struct all the definitions

* revert deprecated defs and add webhook def

* delete useless network trait

* fix generated tab

* fix indent

* fix webservice

* add labels

* comment webservice and worker's health check

* fix retainkeys

* fix webservice and worker's health check

* add suspend def which will be replaced by internal def

* fix cli and add labels

* fix script

* add ignore

* fix healthscope example
2021-11-29 15:02:16 +08:00
wyike
6184b6e0e6 Feat: install helm addon schema (#2815)
Fix: fix bug

Fix: rebase bug

fix rebase -i master

rename func
2021-11-29 13:24:52 +08:00
Zheng Xi Zhou
ac2169e2fa Fix: upgrade terraform controller to v0.2.10 (#2827)
- Clean RBAC
- Generate Job/Pod/ConfigMap/Secret in the namespace of a Configuration
- Fix: The secret generated by Terraform won't regenerate after it's manually deleted
- Fix status ProvisioningAndChecking
- The Kubernetes backend should keep consistent
- Override Region of a provider in Configuration
- Set region to spec.region
2021-11-29 10:38:27 +08:00
barnettZQG
96a9fb7d9e Feat: support auto creating workflow step for cloud app (#2826)
* Feat: support auto creating workflow step for cloud app

* Fix: fix unit test bug

* Fix: fix component cant not find bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-29 10:20:15 +08:00
Zheng Xi Zhou
92335eca17 Fix: support exposing cloud resource identifier and console url (#2825)
* Fix: support exposing cloud resource identifier and console url

To help users quickly navigate to the instance in the web console, exposing
necessary information in ComponentDefinition and convert them to Configuration

* fix ci

* Check whether wl.FullTemplate.ComponentDefinition is nil before getting annotations
2021-11-28 17:21:12 +08:00
yangsoon
23bceb9f9c Fix: velaql miss query the resources created by the old application version (#2824)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-27 13:57:48 +08:00
qiaozp
b05deeca55 Feat: add addon invisible field (#2820)
* Feat: add addon invisible field

* reviewable
2021-11-27 13:06:45 +08:00
Zheng Xi Zhou
7bdf4c176b Fix: install Terraform and apply the support for a provider in one jump (#2778)
* Fix: install Terraform and apply the support for a provider in one jump

- Fix issue: addon name should not include forward-slash "/" cloud-resource fix addon name should not include forward-slash "/" #2588
- Install terraform and the provider in one jump. Instead of installing terraform
and terraform-xxx in two steps
2021-11-26 23:01:11 +08:00
Tianxin Dong
334ef864da Feat: add alias in workflow step status (#2821)
* Feat: add alias in workflow step status

* fix lint

* add revision
2021-11-26 20:35:04 +08:00
Somefive
f5fc822a3e Fix legacy resourcetracker not garbage collect while previousRT is empty or equals currentRT (#2817) 2021-11-26 17:48:17 +08:00
Somefive
dd84700657 Fix: health check appRev label bug (#2816)
* Fix: healthscope failed since appRevision is not set && rollout controller amend appRevision to workload since compRev does not have this one

* Fix: test
2021-11-26 17:47:43 +08:00
Somefive
782025507c Fix: health check do not check resource in correct namespace while ns is override by envbinding (#2818) 2021-11-26 16:04:44 +08:00
Tianxin Dong
bab241e969 Feat: add more logs in workflow sync (#2806) 2021-11-26 15:34:25 +08:00
Jianbo Sun
27c4dd1bc5 Fix: don't invoke docker command if not exist (#2813)
Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-26 13:54:44 +08:00
Zheng Xi Zhou
41f384e36b Fix: addon name should not add prefix resources (#2808)
* Fix: addon name should not add prefix `resources`

- Adding prefix `resources will hit issues as:
'unable to parse requirement: invalid label value:
"resources-prometheus-server-register-grafana-datasource-5576f7f6b4":
      at key: "controller.oam.dev/component": must be no more than 63 characters'
- This won't avoid the name confliction with other components

* address comments
2021-11-25 21:01:56 +08:00
qiaozp
2be261e3f7 Feat: optimize addon enable experience (#2677)
* Feat: better addon enable experience

* better

* Update references/cli/addon.go

typo

Co-authored-by: yangsoon <yangsoonlx@gmail.com>

Co-authored-by: yangsoon <yangsoonlx@gmail.com>
2021-11-25 14:08:20 +08:00
qiaozp
b279df0451 Fix: add lock to avoid addon concurrency read error (#2803)
* make read func table driven

* add mutex

* fix
2021-11-25 11:50:29 +08:00
Zheng Xi Zhou
bbb1c1767e Fix: remove .cue suffix from the component name of observability (#2796)
If the component name has a suffix `.cue`, it will hit issue of not
match a DNS name
2021-11-25 11:06:08 +08:00
Zheng Xi Zhou
40f100ec27 Fix: support naming a terraform provider (#2794)
* Fix: support naming a terraform provider

Support set the name for a terraform provider.

Fix #2595

* Style: format

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-11-25 10:32:30 +08:00
Tianxin Dong
6f90155ccd Feat: add workflow rollback cli (#2795)
* Feat: add workflow rollback cli

* fix ci
2021-11-24 21:34:44 +08:00
Zheng Xi Zhou
216a95a2dd Fix: the way to renderCUETemplate for terraform provider is wrong (#2798)
Fixed the probelm of renderring cue template for terraform provider
after #2788
2021-11-24 21:34:06 +08:00
Somefive
d1f70def0e Fix: healthscope support envbinding (namespace) (#2783)
* Fix: healthscope support envbinding (namespace)

* Fix: ensure healthscope not patch status when application workflow is still running
2021-11-24 21:26:06 +08:00
yangsoon
65f8614fd8 Feat: vela delete add wait and force option (#2747) 2021-11-24 21:00:03 +08:00
wyike
66e8398ab8 Fix: add back missed commit and add tests (#2781)
* Fix: missed commit

Test: add test

* Fix: add e2e test addon rely on core feature

fix test

Fix: e2e-test

* Fix: create vela-system namespace when cluster join

fix

* Fix: fix comments add args in command
2021-11-24 20:59:08 +08:00
Tianxin Dong
f1eef83809 Feat: add workflow name for frontend (#2787) 2021-11-24 20:18:27 +08:00
barnettZQG
99d473df2a Feat: translate the object type to Group (#2786)
* Feat:  translate the object type to Group

* Fix: fix unit test bug

* Fix: fix workflow do not delete after delete env bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-24 20:17:40 +08:00
Jian.Li
da251f1cb6 Fix: lookupByScript don't support import (#2788)
* fix lookupByScript

* fix lint
2021-11-24 19:57:54 +08:00
Zheng Xi Zhou
14770dff0d Fix: arguments map[string]string doesn't support observability's args (#2790)
* Fix: arguments map[string]string doesn't support observability's args

As there are bool typed arguments, the current arguments type doesn't
support.
2021-11-24 19:52:59 +08:00
Zheng Xi Zhou
4b72954c86 Fix: addon with arguments could not be installed (#2789)
With the fix #2766 to install addon without arguments, fix the issue of
installing addons with arguments.
2021-11-24 19:52:13 +08:00
yangsoon
3d2fcacb5a Feat: built in gc policy to application (#2575) 2021-11-24 15:38:13 +08:00
Zheng Xi Zhou
e5a86ef537 Fix: the first addon should not be example (#2793)
As addon example has been removed, the first addon on should not
be `example`
2021-11-24 13:44:55 +08:00
yangsoon
ec5e2b4660 Fix: clean up the view api (#2779) 2021-11-24 11:09:50 +08:00
barnettZQG
8c276e226b Fix: fix update component and list workflow bug (#2782)
* Fix: fix update component and list workflow bug (#2763)

* Fix: fix update component and list workflow bug

* Fix: change e2e test case

* Fix: change e2e case

Co-authored-by: barnettZQG <yiyun.pro>

* Fix: fix sync controller revision (#2772)

Co-authored-by: Tianxin Dong <dongtianxin.tx@alibaba-inc.com>
Co-authored-by: barnettZQG <yiyun.pro>
2021-11-23 19:30:54 +08:00
Jianbo Sun
8bcffb92bf Merge pull request #2769 from oam-dev/merge
Feat: Merge APIServer Into Master
2021-11-23 10:08:01 +08:00
Zheng Xi Zhou
2e417641cd Revert "Fix: install Terraform and apply the support for a provider in a jump (#2718)" (#2773)
This reverts commit 3bf365322b.
2021-11-22 11:48:49 -05:00
Zheng Xi Zhou
3bf365322b Fix: install Terraform and apply the support for a provider in a jump (#2718) 2021-11-23 00:08:37 +08:00
yangsoon
6dff9ab679 Fix: fix compatibility test 2021-11-22 23:21:17 +08:00
Yin Da
395b594b84 Fix: fix package test 2021-11-22 22:02:49 +08:00
yangsoon
cee66fd03f Fix: remove useless test 2021-11-22 21:46:49 +08:00
Hongchao Deng
5c46aa2f7f fix header 2021-11-22 19:07:13 +08:00
Hongchao Deng
cf4aaf51c8 fix imports 2021-11-22 18:47:47 +08:00
Hongchao Deng
5e9d51997f fix err check 2021-11-22 18:26:26 +08:00
Hongchao Deng
367ed23eea fix gofmt 2021-11-22 18:22:55 +08:00
Yin Da
4f2bf29a65 Fix: upgrade aliyun provider for terraform controller 2021-11-22 17:58:04 +08:00
qiaozp
eece41c03c fix import (#2770)
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-11-22 17:49:26 +08:00
Hongchao Deng
8699346401 Merge branch 'apiserver' into merge 2021-11-22 17:27:40 +08:00
Hongchao Deng
e5aba94cd1 Merge branch 'apiserver' into merge 2021-11-22 17:25:50 +08:00
qiaozp
2b8a89d9fa Fix: get addon omit uiSchema (#2768) 2021-11-22 17:13:05 +08:00
qiaozp
58293dcf20 Feat: check addon dependencies when enable (#2741) 2021-11-22 17:12:55 +08:00
Zheng Xi Zhou
5b7b7138e2 Fix: enable addon without arguments (#2766)
If an addon like `fluxcd` doesn't need arguments to be enabled, we
should not parse the arugments
2021-11-22 16:30:11 +08:00
Tianxin Dong
47a565d00d Fix: controllerrevision can not be updated (#2764) 2021-11-22 10:58:23 +08:00
Jianbo Sun
a67bd24967 Feat: support user defined image registry (#2623)
* Feat: support user defined image registry

* Feat: add test app image repo into values
2021-11-22 10:56:36 +08:00
wyike
4ad27e9bcd Fix: (#2761)
1. load component in arrary, so apply them in order addon's needNamespace will be apply firstly
2. apply application  in controle plane will be first workflowStep
3. bigger application reconcile timeout context get avoid of time out
2021-11-21 21:03:41 +08:00
qiaozp
1ea26865aa Fix: lint apiserver code, fix panic (#2755)
* lint code

* fix error judge
try

* fix multicluster enable panic

* add err log

* fix can not get parameter

* debug

* try ci

* debug

* debug

* debug

* debugo

Co-authored-by: barnettZQG <576501057@qq.com>
2021-11-21 18:09:19 +08:00
朱晓兵
51b6e8b459 Fix: fix envbinding related workflow logic,add unit test (#2758)
* Fix: fix envbinding related workflow logic,add unit test

* Fix: bcode field

* Update envbinding.go

Co-authored-by: zhuxiaobing <zhuxiaobing@lixiang.com>
Co-authored-by: barnettZQG <576501057@qq.com>
2021-11-21 17:27:35 +08:00
barnettZQG
4799cbf6cc Feat: workflow support update (#2760)
* Feat: workflow support update

* Fix: fix recycle bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-21 16:43:10 +08:00
yangsoon
99ffe80eb4 Feat: component-pod-view support filter resource by cluster name and cluster namespace (#2754) 2021-11-21 14:56:01 +08:00
Tianxin Dong
32103f53fc Feat: add list application records api (#2757)
* Feat: add list application records api

* remove workflow checker

* Update envbinding.go

Co-authored-by: barnettZQG <576501057@qq.com>
2021-11-21 10:45:03 +08:00
barnettZQG
8181b4d266 Fix: fix the envbinding can not be deleted bug (#2756)
* Fix: fix the envbinding can not be deleted bug

* Fix: fix target must be interface or implement error

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-21 10:15:15 +08:00
barnettZQG
adcb7bd65e Feat: support update component and query app statistics info (#2746)
* Feat: change swagger config

* Feat: support update component and query app statistics info

* Fix: fix workflow list bug

* Fix: fix test bug

* Fix: fix e2e test bug

* Feat: change workflow api

* Fix: fix app deploy e2e test bug

* Fix: change e2e test

* Fix: fix workflow bug

* Fix: fix deploy bug

* Fix: fix selector bug

* Feat: support recycle env

* Fix: debug e2e

* Fix: fix e2e case bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-20 19:50:36 +08:00
Somefive
34aa74ff48 Feat: envbinding support cloud resource deploy and share (#2734)
* Feat: envbinding support cloud resource deploy and bind

* Fix: change bind-cloud-resource to share-cloud-resource
2021-11-20 13:07:27 +08:00
Tianxin Dong
ff405cd62a Feat: add workflow record actions (#2733)
* Feat: add application revision actions

* refactor workflow record and application revision

* generate doc

* fix rebase

* fix rebase

* delete comment

* fix comment

* delete suspend status

* use apply instead of update

* find latest comlete revision if the revision is not specified

* delete name

* fix primary key
2021-11-20 13:05:52 +08:00
qiaozp
54eb662959 Feat: add definitions to addon detail API, fix addon cache, async download files (#2738)
* add definition to addon detail API

* change little

* tmp

* fix cache

* fix import
2021-11-20 12:24:35 +08:00
qiaozp
b38aa1cdf0 Fix: Align -n command argument (#2719)
* add namespace flag

fix

fix test

fix tests

* try test

* try test

* fix tests
2021-11-19 18:00:03 +08:00
wyike
36f5bbc973 Fix: addon spell issue (#2748)
Fix: small issue
2021-11-19 17:57:50 +08:00
Somefive
1a2c964dac Fix: enhance cluster api (#2742) 2021-11-19 15:39:54 +08:00
dependabot[bot]
aa2a0e94bf Chore(deps): Bump github.com/containerd/containerd from 1.4.11 to 1.4.12 (#2744)
Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.4.11 to 1.4.12.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.4.11...v1.4.12)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-19 11:12:00 +08:00
朱晓兵
ffd25a4cbf Feat: refactor envbinding for adapt policy placement (#2731)
* Feat: refactor envbinding for adapt policy placement

* Fix: refactor envbinding logic

* Fix: fix some bug

* Fix: fix unit test

* Fix: fix unit test

* Fix: fix unit test

* Fix: fix unit test

* Fix: fix unit test ...

* Fix: fix unit test

Co-authored-by: zhuxiaobing <zhuxiaobing@lixiang.com>
2021-11-19 10:37:40 +08:00
Jian.Li
d954bbac00 Fix: applied-resources overflow (#2740)
* fix applied-resources overflow

* add test cases
2021-11-18 20:04:21 +08:00
Hongchao Deng
b6a14e435b Feat: EnableAddon supports runtime cluster (#2739)
* Feat: EnableAddon supports runtime cluster

If use runtime cluster mode, the definitions will be applied to control plane k8s directly, not included in the Application object.

* add owner

* comment
2021-11-18 17:32:14 +08:00
qiaozp
575ecc3136 fix istio (#2691) 2021-11-18 12:50:34 +08:00
qiaozp
bade23cecf Feat: add addon arguments API (#2732)
* temp

* test

* move to status
2021-11-18 12:24:01 +08:00
yangsoon
530f158795 Feat: velaql support query the resources created by helmrelease (#2726)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-18 11:53:38 +08:00
Tianxin Dong
2fc0f1cd2b Feat: add app revision list and detail api (#2722)
* Feat: add app revision list and detail api

* add envName and status filter

* make swagger doc

* revert ui-schema
2021-11-17 15:29:36 +08:00
Somefive
ba4a28fa0d Feat: cherry-pick #2720 into apiserver: support list runtime cluster (#2730)
* Feat: support list runtime cluster (#2720)

* Fix: style
2021-11-17 15:12:06 +08:00
wyike
0555623b3e Feat: add triat alias description time (#2727)
* Feat: add triat alias description time

* Fix: remove modle
2021-11-17 13:06:30 +08:00
Somefive
55070033eb Feat: support list runtime cluster (#2720) 2021-11-17 09:45:03 +08:00
lowkeyrd
b3423116bf add alicloud sls resources (#2701) 2021-11-16 22:50:18 +08:00
yangsoon
0673bc9cd5 Fix: fix workflowstep depends-on-app (#2723)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-16 22:48:26 +08:00
barnettZQG
1465aba177 Fix: fix build bug (#2724)
* Fix: fix build bug

* Fix: change api spec

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-16 21:31:24 +08:00
qiaozp
061c061867 Feat: add redis definition (#2507) 2021-11-16 20:12:22 +08:00
Zheng Xi Zhou
7a0670113f Fix: allow external cloud resources to be kept when Application is deleted (#2698)
* Fix: allow external cloud resources to be kept when Application is deleted

Provide an option for users whether to keep provisioned cloud resources when Terraform-typed Application is deleted.

Fix #2697

* delete file

* upgrade release version of Terraform controller

* fix ci
2021-11-16 19:33:21 +08:00
Tianxin Dong
c42ea7c948 Feat: add record status sync (#2627)
* Feat: add record status sync

* fix typo

* optimize the code

* fix the port

* fix go mod

* fix rebase
2021-11-16 14:47:13 +08:00
barnettZQG
ba1f8e4793 Feat: change the model to support multiple environments (#2721)
* Feat: change swagger config

* Feat: change the model to support multiple environments.

* Feat: support query targets by namespace

* Fix: fix definition unit test case

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-16 14:45:49 +08:00
qiaozp
15795fbe25 Fix: observability installation (#2676)
* fix observability installation

* fix nil pointer

* fix nil pointer

* remove asset, build in trait
2021-11-16 13:56:39 +08:00
wyike
43aa05673e Feat: manage trait (#2702)
* Feat: manage trait

fix test

* fix test
2021-11-15 21:04:03 +08:00
qiaozp
1c7e0c054d Fix: add detail cache, fix uiSchema (#2716)
* add detail cache, fix uischema

* remove
2021-11-15 17:17:07 +08:00
Zheng Xi Zhou
3df47d74f1 Fix: stop installing golangci-lint each time (#2712)
When golangci-lint doesn't locate in $PATH, it will be installed in
$GOBIN every single time.
2021-11-15 15:02:48 +08:00
qiaozp
27490c4bce Refactor: refactor addon for later reusing code in CLI (#2708)
* refactor addon for later reuse code in CLI

* fix import
2021-11-15 12:16:32 +08:00
朱晓兵
4eb9cc114e Feat: add delivery-target API (#2703)
* Feat: add delivery-target API

* Fix: for unit test

Co-authored-by: zhuxiaobing <zhuxiaobing@lixiang.com>
2021-11-15 10:28:41 +08:00
Tianxin Dong
b3014c2f62 Fix: fix backport script (#2699) 2021-11-12 22:34:12 +08:00
Zheng Xi Zhou
b10e4a05a0 Fix: add Alibaba Cloud ASK (#2700)
Added Serverless Kubernetes (ASK) for Alibaba Cloud
2021-11-12 22:33:40 +08:00
barnettZQG
e1c64540f4 Feat: change api spec (#2695)
* Feat: change api spec

* Feat: change DeployEvent to ApplicationRevision

* Fix: fix test bug

* Fix: fix unit test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-12 17:19:34 +08:00
yangsoon
722ed480e9 Feat: add more views (#2689)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-11-12 14:34:26 +08:00
barnettZQG
3e68f8a83b Feat: change model name (#2688)
* Feat: change mode name

* Fix: fix e2e test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-12 11:58:13 +08:00
Jian.Li
0803b45faf Feat: output log with structured tag & add step duration metrics (#2683)
* debug task

* metrics

* trace context

* add step_duration metrics

* add readme docs
2021-11-12 11:48:41 +08:00
wyike
b0577a979a Fix: fix delete a component from application not delete workload (#2680)
lint

Fix: error test

Fix: fix e2e rollout

Fix comment
2021-11-12 11:45:45 +08:00
Zheng Xi Zhou
4e9e88e4a5 Fix: pushing to ACR won't succeed all the way (#2685)
* Fix: pushing to ACR won't succeed all the way

Use action `docker/login-action` instead of `docker/login-action` to
login in ACR

* poc

* manual login

* manual push

* cat

* format

* echo

* dockerfile

* docker build

* v0.9.9

* domain

* poc

* formal

* buildx

* split acr and dockerhub

* finalizer

* fix

* final
2021-11-12 11:45:24 +08:00
Somefive
cee3630ead Feat: upgrade cluster gateway to support remote debug (#2673) 2021-11-12 11:44:18 +08:00
Somefive
6f641caadc Fix: cluster url (#2675) 2021-11-12 11:43:46 +08:00
Zheng Xi Zhou
53d380ff41 Fix: application status.services doesn't include Terraform typed components (#2643)
* Fix: application status.services doesn't include Terraform typed components

Function aggregateHealthStatus() which is used to retrieve components status, was
abandoned. All unit-tests of it was abandoned too. Fixed it and restore all the unit
tests.
2021-11-11 14:07:46 +08:00
yangsoon
8a3b7b6a05 Feat: add query provider and get view template from configmap (#2619) 2021-11-11 13:40:14 +08:00
lowkeyrd
4291e7c7ba Docs: add vpc and vswitch cloud resource templates of alicloud (#2663)
* add vpc and vswitch cloud resources of alicloud

* modified by make reviewable
2021-11-10 16:49:10 +08:00
qiaozp
49ba77c0d3 Feat: add addon registry update API (#2671)
* add addon registry update API

* add detailed cache, fix cache bug

* use PUT

* add Reads

* use UpdateAddonRegistryRequest
2021-11-10 12:41:29 +08:00
Somefive
fd66e6a228 Fix: revision namespace override (#2550) 2021-11-09 23:36:43 +08:00
Somefive
f3899e38ef Feat: multicluster vela status/exec/port-forward (#2662)
* Fix: vela status from app.status.services

* Feat: refine cli and support terraform logs

* Feat: support remote exec

* Feat: port-forward support multicluster

* Fix: vela status+port-forward test

Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-09 19:08:47 +08:00
Maciej Gwizdała
d945eb35df Feat: Add Terraform Azure Storage Account (#2646)
* Feat: Add Terraform Azure Storage Account

* Fix: Added resource group creation for tests

* Feat: Added EOF for tf azure storage account

Co-authored-by: Maciej Gwizdała <maciej.gwizdala-ext@leica-geosystems.com>
2021-11-09 15:15:28 +08:00
Somefive
7103f8ff52 Feat: merge master into apiserver (#2660)
* Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569)

* Feat: fill rolloutBatches if empty

* Fix: fix unit-test

* Test: add more test

Fix: lint

Fix: fix lint

* Update release.yml (#2537)

* Feat: add registry, merge registry and cap center (#2528)

* Feat: add registry command

* Refactor: comp/trait command combine with registry

* Feat: refactor `vela comp/trait`

* Fix: import

* Fix: fix if type is autodetects.core.oam.dev

* Fix: fix list from url

* Fix: test

* Feat: add test

* Fix: remove dup test

* Fix: test

* Fix: test

* Fix: fix label filter

* Fix: reviewable

* Fix test

* fix personal repo in test

* Fix test

* Fix test

* add some boundary check

* reviewable

* Fix: fix nocalhost trait (#2577)

* fix incorrect addon status (#2576)

* Fix(cli): client-side throttling in vela CLI (#2581)

* fix cli throttling

* fix import

* set to a lower value

* remove addon with no defs (#2574)

* Feat: vela logs support multicluster (#2593)

* Feat: add basic multiple cluster logs

* fix context

* Fix select style

* Fix select style

* remove useless env

* fix naming

* Feat: vela cluster support use ocm to join/list/detach cluster (#2599)

* Feat: add render component and apply component remaining (#2587)

* Feat: add render component and apply component remaining

* fix ut

* fix e2e

* allow import package in custom status cue template (#2585)

Co-authored-by: chwetion <chwetion@foxmail.com>

* Fix: abnormal aux name (#2612)

* Feat: store workflow step def properties in cm (#2592)

* Fix: fix notification def

* Feat: store workflow step def properties in cm

* fix ci

* fix data race

* Fix: change Initializer to Application for addon Observability (#2615)

In this doc, updated the Observability implementation from initializer
to Application. I also store definitions as it's not well stored in
vela-templates/addons/observability

* Fix: fix backport param (#2611)

* Fix: add owner reference in workflow context cm (#2573)

* Fix: add owner reference in workflow context cm

* fix ci

* delete useless test case

* Fix: op.delete bugs (#2622)

* Fix: op.delete some bugs

* Fix: app status update error

Fix: make reviewable

* Fix: show reconcile error log (#2626)

* Feat: add reconcile timeout configuration for vela-core (#2630)

* Fix: patch status retry while conflict happens (#2629)

* Fix: allow definition schema cm can be same name in different definition type (#2618)

* Fix: fix definition schema cm name

* fix ut

* fix ut

* fix show

* add switch default case

* Feat: remove envbinding policy into workflow (#2556)

Fix: add more test

* Feat: add vela prob to test cluster (#2635)

* Fix: upgrade stern lib to avoid panic for vela logs (#2650)

* Fix: filter loggable workload in vela logs (#2651)

* Fix: filter loggable workload in vela logs

* reviewable

* Feat: add vela exec for multi cluster (#2299)

fix

support vela exec

* Fix: health check will check for multiclusters (#2645)

* Fix: minor fix for vela cli printing (#2655)

* Fix: minor fix for vela cli printing

* add dockerfile go mod cache

* Feat: support apiserver-related multicluster features (#2625)

* Feat: remove envbinding policy into workflow

Feat: add support for env change (env gc)

Fix: fix rollout timeout setting bug

* Feat: support disable trait and env without workflow

* Fix: add hint for replaced value

Co-authored-by: wyike <wangyike_wyk@163.com>
Co-authored-by: basefas <basefas@hotmail.com>
Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
Co-authored-by: Tianxin Dong <dongtianxin.tx@alibaba-inc.com>
Co-authored-by: yangsoon <yangsoonlx@gmail.com>
Co-authored-by: Chwetion <137953601@qq.com>
Co-authored-by: chwetion <chwetion@foxmail.com>
Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>
Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
Co-authored-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
2021-11-09 13:06:55 +08:00
Hongchao Deng
3505c379d2 Fix: cache IsExpired() (#2669) 2021-11-09 12:39:36 +08:00
wyike
629cc67c6a Fix: load component can set parameter (#2661)
Fix: fix fmt
2021-11-09 10:51:10 +08:00
Zheng Xi Zhou
84315ff0e6 Fix: push docker images to Alibaba Cloud ACR (#2601)
* Fix: push docker images to Alibaba Cloud ACR

Added Github action to push docker images to Alibaba Cloud ACR

* Fix: change acr domain
2021-11-09 10:46:06 +08:00
barnettZQG
738b416ec2 Fix: fix can not create first app env plan bug (#2665)
* Fix: fix can not create first app env plan bug

* Fix: fix test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-09 09:47:41 +08:00
qiaozp
39e8bc0b98 add addon parameter openAPI schema (#2666) 2021-11-08 10:13:04 -05:00
Somefive
64ab932c6d Feat: support apiserver-related multicluster features (#2625)
* Feat: remove envbinding policy into workflow

Feat: add support for env change (env gc)

Fix: fix rollout timeout setting bug

* Feat: support disable trait and env without workflow

* Fix: add hint for replaced value
2021-11-08 10:11:50 -05:00
Hongchao Deng
976da6f35a Feat: add local cache of addons to avoid Github limit (#2558)
* Feat: add local cache of addons to avoid Github limit

comment

* comment
2021-11-08 20:04:08 +08:00
qiaozp
b98cec127e add addon template reading (#2648)
render definition into application

new format

fix cue render

fix one bad registry make all addon unusable
2021-11-08 16:34:03 +08:00
barnettZQG
eb258fae66 Feat: support ui schema (#2647)
* Docs: change swagger api config

* Docs: change swagger api config

* Docs: change swagger api config

* Feat: support ui schema

* Fix: distinguish between structs and arrays

* Feat: support build swagger config

* Feat: support update ui schema

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-08 14:13:22 +08:00
Jianbo Sun
fede2235a9 Fix: minor fix for vela cli printing (#2655)
* Fix: minor fix for vela cli printing

* add dockerfile go mod cache
2021-11-07 17:25:52 +08:00
Jianbo Sun
4ca68f2030 Fix: health check will check for multiclusters (#2645) 2021-11-07 11:50:27 +08:00
Jianbo Sun
e5745bb3f3 Feat: add vela exec for multi cluster (#2299)
fix

support vela exec
2021-11-07 08:54:48 +08:00
qiaozp
3e9b702328 Fix: filter loggable workload in vela logs (#2651)
* Fix: filter loggable workload in vela logs

* reviewable
2021-11-06 17:31:50 +08:00
Jianbo Sun
f7dc9934b1 Fix: upgrade stern lib to avoid panic for vela logs (#2650) 2021-11-06 17:23:37 +08:00
Jianbo Sun
c448ba0956 Feat: add vela prob to test cluster (#2635) 2021-11-06 11:28:11 +08:00
Tianxin Dong
5590c3d7b5 Fix: fix apiserver definition schema struct (#2644)
* Fix: fix apiserver definition schema struct

* use open api schema
2021-11-05 21:54:31 +08:00
Hongchao Deng
c821f2a929 Feat: rewrite Addon API to support new format (#2605)
* Feat: rewrite Addon API to support new format

fix test

fix

fix

add registry query parameter

skip enable test

add Definition meta

fix

fix ext

add cue rendering

return component name

update swagger.json

refactor addon cue/yaml tmpl to addonElementFile

apply app in enable

fix cue parse

comment

swagger

enable test

update

fix bug

fix cue render

fix apply fail, decode object

fix disable addon, todo: fix status api

* avoid to render a whole addon when check status

* fix

* fix

* add label

* remove todo

* fluxcd

* fix args

* add all path to addon component name

* reorder test

* add addon application prefix

* add

* add ns when test

* fix

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-11-05 17:39:31 +08:00
Somefive
bf3a1cddf9 Feat: remove envbinding policy into workflow (#2556)
Fix: add more test
2021-11-05 17:29:05 +08:00
Tianxin Dong
50cfe0c68f Fix: allow definition schema cm can be same name in different definition type (#2618)
* Fix: fix definition schema cm name

* fix ut

* fix ut

* fix show

* add switch default case
2021-11-05 16:07:04 +08:00
Somefive
9e73f5dee6 Fix: patch status retry while conflict happens (#2629) 2021-11-05 15:21:28 +08:00
barnettZQG
df5bc2727e Feat: supports setting environment differences for application plan (#2624)
* Feat: supports setting environment differences for application plan

* Feat: update swagger config

* Feat: CRUD of application env binding plan

* Style: change code style

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-05 10:42:18 +08:00
Tianxin Dong
cd686fbb24 Fix: fix definition schema struct (#2632)
* Fix: fix definition schema struct

* add more fields
2021-11-05 10:32:54 +08:00
Somefive
d2672cea48 Feat: add reconcile timeout configuration for vela-core (#2630) 2021-11-04 20:48:06 +08:00
Jianbo Sun
d8007d823d Fix: show reconcile error log (#2626) 2021-11-04 19:01:22 +08:00
wyike
f5b06f855a Fix: op.delete bugs (#2622)
* Fix: op.delete some bugs

* Fix: app status update error

Fix: make reviewable
2021-11-04 16:40:02 +08:00
Somefive
2337c82c3d Feat: add create ack api (#2596) 2021-11-04 16:39:32 +08:00
Tianxin Dong
e8969e4d17 Feat: add definition API (#2602)
* Feat: add definition API

* fix struct

* fix e2e

* optimize the code

* fix return

* fix const
2021-11-04 16:38:34 +08:00
Tianxin Dong
844479c7b5 Fix: add owner reference in workflow context cm (#2573)
* Fix: add owner reference in workflow context cm

* fix ci

* delete useless test case
2021-11-04 14:19:35 +08:00
Tianxin Dong
1438247aaf Fix: fix backport param (#2611) 2021-11-04 12:51:26 +08:00
Zheng Xi Zhou
356c6240bf Fix: change Initializer to Application for addon Observability (#2615)
In this doc, updated the Observability implementation from initializer
to Application. I also store definitions as it's not well stored in
vela-templates/addons/observability
2021-11-03 17:29:48 +08:00
barnettZQG
8e874bc3a9 Feat: change application to applicationplan (#2616)
* Feat: change application to applicationplan

* Feat: update swagger config

* Feat: change api spec

* Fix : fix e2e test case

Co-authored-by: barnettZQG <yiyun.pro>
2021-11-03 17:25:37 +08:00
Tianxin Dong
117b9937f3 Feat: store workflow step def properties in cm (#2592)
* Fix: fix notification def

* Feat: store workflow step def properties in cm

* fix ci

* fix data race
2021-11-03 15:31:12 +08:00
Jian.Li
a5361b2deb Fix: abnormal aux name (#2612) 2021-11-03 15:19:32 +08:00
Chwetion
df3061f4c1 allow import package in custom status cue template (#2585)
Co-authored-by: chwetion <chwetion@foxmail.com>
2021-11-03 12:14:51 +08:00
Tianxin Dong
637ec6273f Feat: add render component and apply component remaining (#2587)
* Feat: add render component and apply component remaining

* fix ut

* fix e2e
2021-11-02 19:22:27 +08:00
yangsoon
7ba10d6864 Feat: vela cluster support use ocm to join/list/detach cluster (#2599) 2021-11-02 17:20:00 +08:00
qiaozp
aa0190c03d Feat: vela logs support multicluster (#2593)
* Feat: add basic multiple cluster logs

* fix context

* Fix select style

* Fix select style

* remove useless env

* fix naming
2021-11-02 14:45:15 +08:00
Hongchao Deng
5f09faeff0 Fix: delete addon registry (#2594)
* Fix: delete addon registry

* add validate Git should not be empty

* fix token could be nil

* GitSource Repo url is a must
2021-11-02 11:30:30 +08:00
Somefive
90e5fd9ed6 Fix: add fixes to cluster api (#2597) 2021-11-02 09:49:52 +08:00
qiaozp
5d9e3437a3 remove addon with no defs (#2574) 2021-11-01 20:58:09 +08:00
barnettZQG
9519d2443a Feat: add alias field and fix some code bug (#2589)
* Feat: add alias field and fix some code bug

* Fix: fix alias check rule bug

* Fix: fix addon e2e test bug

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-31 18:23:55 +08:00
qiaozp
b904f4fc0e Fix(cli): client-side throttling in vela CLI (#2581)
* fix cli throttling

* fix import

* set to a lower value
2021-10-29 15:07:15 +08:00
Tianxin Dong
6666c3a2bb Feat: add workflow record api (#2567)
* Feat: add workflow record api

* resolve comments

* add count function
2021-10-29 10:39:50 +08:00
qiaozp
68af605e75 fix incorrect addon status (#2576) 2021-10-28 20:41:43 +08:00
Tianxin Dong
1dc7647788 Fix: fix nocalhost trait (#2577) 2021-10-28 20:40:41 +08:00
qiaozp
f7e2123707 Feat: add registry, merge registry and cap center (#2528)
* Feat: add registry command

* Refactor: comp/trait command combine with registry

* Feat: refactor `vela comp/trait`

* Fix: import

* Fix: fix if type is autodetects.core.oam.dev

* Fix: fix list from url

* Fix: test

* Feat: add test

* Fix: remove dup test

* Fix: test

* Fix: test

* Fix: fix label filter

* Fix: reviewable

* Fix test

* fix personal repo in test

* Fix test

* Fix test

* add some boundary check

* reviewable
2021-10-28 20:26:08 +08:00
basefas
a8494d1bee Update release.yml (#2537) 2021-10-28 17:54:51 +08:00
wyike
7647ef9662 Feat(rollout): fill rolloutBatches if empty when scale up/down (#2569)
* Feat: fill rolloutBatches if empty

* Fix: fix unit-test

* Test: add more test

Fix: lint

Fix: fix lint
2021-10-28 17:50:28 +08:00
Jianbo Sun
3edb71891b Merge pull request #2572 from Somefive/apiserver_merge_master
Refactor: merge master
2021-10-28 17:30:54 +08:00
Yin Da
0fedad7cd2 Merge branch 'master' into apiserver 2021-10-28 15:19:03 +08:00
yangsoon
edf42074b9 Feat: add velaql webservice (#2532) 2021-10-28 12:05:12 +08:00
Tianxin Dong
828acd95fa Feat: add email support in webhook notification (#2535)
* Feat: add email support in webhook notification

* Fix: change sender and receiver to from and to

* fix the variable name

* fix wait return
2021-10-28 10:59:17 +08:00
Tianxin Dong
7e5dac7c98 Fix: fix backport command (#2557) 2021-10-27 14:18:37 +08:00
Somefive
9563391952 Fix: add local cluster & fix query parameter default value bug (#2561) 2021-10-27 11:37:47 +08:00
Tianxin Dong
b3f60b4b73 Feat: add cluster in read or apply object (#2551) 2021-10-27 10:05:57 +08:00
wyike
f48da214e3 Feat: health scope controller support check trait-managing workload (#2527)
* Feat: health scope controller support trait manage-workload

* Test: add multi-cluster and health policy e2e-test

Fix: e2e-test

lint

Fix: all e2e-test

Fix: modify port back

middle commit

middle pr

Fix: e2e-rollout-test

make reviewable

defet to rollout apply gvk annotation

fix e2e

* Update test/e2e-multicluster-test/multicluster_rollout_test.go

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-10-26 19:51:53 +08:00
Yu Yicai
4dd18d1fc3 Feat: add nocalhost dev config trait definition (#2545)
* Feat: add nocalhost dev config trait definition

* Feat: add nocalhost dev config trait example

add nocalhost dev config trait example in `docs/examples/nocalhost`

Signed-off-by: yuyicai <yuyicai@hotmail.com>
2021-10-26 19:28:25 +08:00
Hongchao Deng
3ebc94394c Feat: addon service impl (#2515)
* Feat: addon service impl

* get addon from git/configmap

* add ListAddonRegistries

* add GetAddonModel

* add CreateAddonRegistry and bcode/addon.go

* add applyAddonData

* update

* Fix: getAddonFromGit

* Fix: getAddonFromGit, remove trailing .git

* add comment

* add enable/disable/status impl

* add deleteAddonRegistry and check dup addon

* read addon without accessing database

* change to query parameter, add addon detail

* Feat: add addon readme for apiserver

* Make enable/disable/status runnable

* chore: fix bcode

* Fix: refactor parse to util

* Fix: refactor addonutil to pkg

* add addon test for create and delete addon registry

* fix version prefix

* add post func

* add enable/disable test

* add provider aws readme

* done testing

* fix comment and refactor statusAddon

* move enable/disable logic to usecase

* add GITHUB_TOKEN env

* Fix: Add github token support and use it in test

* add license

Co-authored-by: qiaozp <chivalry.pp@gmail.com>
2021-10-26 17:52:34 +08:00
barnettZQG
964a12bb44 Feat: support manage multiple workflows in one application. (#2533)
* Docs: change swagger json

* Feat: support manage multiple workflows in one application.

* Docs: update swagger doc

* Fix: fix code bug

* Update pkg/apiserver/rest/webservice/workflow.go

Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>

Co-authored-by: barnettZQG <yiyun.pro>
Co-authored-by: Tianxin Dong <wuwuglu19@gmail.com>
2021-10-26 17:50:30 +08:00
Tianxin Dong
605fb58a3c Fix: pass on octokit error to make the check consistent (#2549) 2021-10-26 12:09:14 +08:00
Zheng Xi Zhou
7482388c84 Fix: CVE-2021-42836 (#2548)
CVE-2021-42836
GJSON before 1.9.3 allows a ReDoS (regular expression denial of service) attack.
2021-10-26 12:01:20 +08:00
Zheng Xi Zhou
e9ac4bb62f Fix: add another output CLUSTER_ID for Alibaba Cloud ack (#2543)
To support sub-path of a git repo which stores HCLs, also update the dependency
of Terraform controller
2021-10-24 10:02:39 +08:00
Zheng Xi Zhou
17dbf6de7e Fix: enable to allocate public connection string (#2530)
Also expose the connection string
2021-10-24 10:00:42 +08:00
yuyicai
b2fb9fc618 Fix: #2534 can't exit make when error occurs in curl (#2540)
- use `curl -sS` to show error
- use `set -eo pipefail` to exit `make` when error occurs in `curl`
2021-10-24 09:59:24 +08:00
Zheng Xi Zhou
cf039e27e5 Fix: format canary rollout manifests (#2542)
Formated canaray rollout manifests and changed orders for some traits
of a component to make it clear to see the difference between first-deploy.yaml
and rollout-v2.yaml, between rollout-v2.yaml and rollback.yaml
2021-10-24 09:58:32 +08:00
Jian.Li
dfbe65c9c0 Feat: Commit step-generate data without success (#2539)
* Feat: commit without success

* Feat: add test case
2021-10-23 11:25:50 +08:00
Somefive
accf0138f8 Feat: apiserver cluster api (#2526)
* Fix: multicluster api

* Feat: add apiserver cluster api & fix codecov

* Feat: add pod capacity and resourceused stat

* Feat: add cloud cluster manage

* Test: add test for cloud cluster

* Test: pending cloud resource api

* Style: refactor

* Fix: apiserver e2e test

* Fix: fix application usecase policy bug

* Style: add returns for cluster api

* Feat: add provider detail info & add cache & add rollback protection

* Style: refactor

* Style: add error code
2021-10-23 00:29:43 +08:00
barnettZQG
f0b91ef8d6 Feat: added environment binding capabilities to the application creation API. (#2523)
* Feat: add env binding support in app create api

* Feat: add query component types api

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:43 +08:00
barnettZQG
b85dda35f3 Feat: add namesapce create and list api (#2514)
Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:43 +08:00
yangsoon
c7f9cdcbbf Feat: add the oam application api in apiserver (#2492)
* Feat: oam application api in apiserver

* Feat: enable unit-test and e2e-test
2021-10-23 00:29:42 +08:00
barnettZQG
d2dc9a8da7 Feat: application operation API implementation (#2478)
* Feat: application operation API implementation

* Docs: update swagger json

* Docs: update swagger config

* Feat: improve application management API implementation and testing

* Style: change code style

* Style: change some code style

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-23 00:29:42 +08:00
Tianxin Dong
952af10a4b Fix: check pr title instead of commit msg (#2541) 2021-10-23 00:28:59 +08:00
Zheng Xi Zhou
e56a67acf5 Fix: support terraform/provider-aws addon (#2520)
Also added some componentdefinitions for AWS cloud resource
2021-10-22 00:02:35 +08:00
Tianxin Dong
cc292fe666 Feat: add list and delete kube provider (#2531) 2021-10-21 19:50:09 +08:00
Jian.Li
99f1743d25 Not update resource if render hash equal. (#2522)
* Feat: not apply if render hash not change

* Fix: generateRenderHash panic
2021-10-19 20:34:25 +08:00
qiaozp
f62deca440 Feat: add helm type component definition custom status (#2499) 2021-10-19 17:53:54 +08:00
Tianxin Dong
9d33b74278 Fix(cli): use flag instead of env in workflow cli (#2512) 2021-10-19 17:34:30 +08:00
Tianxin Dong
cf055a8331 Docs: update webhook example with url in secret (#2521) 2021-10-19 17:33:52 +08:00
Jian.Li
9fea82fd7b Feat: Record workflow execution state (#2479)
* Feat: workflow status add timestamp

* Feat: add workflow recorder

* Fix: finish state process

* Fix: test cases

* Fix: revert comments history->recorder

* Feat: omitempty execution time

* Fix: workflow_test.go

* Feat: add application test case for record

* Feat: terminate record

* Feat: trigger only by anno

* Feat: remove initializers CRD
2021-10-19 11:43:06 +08:00
Tianxin Dong
dcb677f976 Feat: support secret in webhook notification (#2509) 2021-10-19 10:42:40 +08:00
Zheng Xi Zhou
d1e814e7af Fix: aws/azure Terraform provider are broken (#2513)
Removed built-in aws/azure Terraform providers, and fix azure
mariadb definition issue.

Fix #2475
2021-10-19 10:15:35 +08:00
Tianxin Dong
d82f8e3cc6 Fix: fix the backport label permission to read (#2504) 2021-10-18 11:46:21 +08:00
Tianxin Dong
d8c9105a3a Test: add conversion test (#2497)
* Test: add conversion test

* Fix: make code reviewable
2021-10-18 11:46:01 +08:00
qiaozp
5b7b74c072 Feat: add imagePullPolicy/imagePullSecret to task def (#2503) 2021-10-18 11:13:52 +08:00
yangsoon
efea09db49 Feat: upgrade the image of kube-webhook-certgen (#2495) 2021-10-15 17:38:29 +08:00
Somefive
8336f5ae9c Fix: rework apiserver code coverage (#2489) 2021-10-15 15:37:19 +08:00
Tianxin Dong
e2ce40a551 Feat: add export config and secret def (#2484)
* Feat: add export config and secret def

* Fix: change the def name and optimize the example

* Fix: fix the name in def
2021-10-15 15:25:41 +08:00
Tianxin Dong
13c24e5697 Fix: fix label trigger from startWith to contains (#2496) 2021-10-15 15:24:32 +08:00
Tianxin Dong
17b840f402 Feat: add label backport in github action (#2494) 2021-10-15 13:24:44 +08:00
qiaozp
49bfeee53d Refactor: remove initializer (#2491) 2021-10-15 11:25:26 +08:00
Tianxin Dong
1801471099 Fix: add libgit2 support for gitops (#2477)
* Fix: add libgit2 support for gitops

* Fix: resolve rebase
2021-10-14 20:56:37 +08:00
Kinso
9d1ffd4c4b Fix(application): nil pointer for component properties (#2481)
Co-authored-by: kinsolee <lijingzhao@forchange.tech>
2021-10-14 19:17:50 +08:00
wyike
89eaf502fa Test: add e2e-test for multi-cluster rollout (#2472)
* Test: add e2e-test guarantee multi-cluster rollout

* Fix: install rollout runtime chart

add cluster name in dockerfile

Fix: build image error

enable all test

Fix: add rollout chart

add shebang

fix image repo
2021-10-14 18:27:50 +08:00
Tianxin Dong
56a8b0c002 Feat: add read object step def (#2480) 2021-10-14 18:23:43 +08:00
qiaozp
8c4af1d69c Refactor: addon migrate to application (#2444)
* Refactor: addon migrate to application

* Refactor: change test for addon

* Fix: golint

* Fix: add annotation const

* Refactor: make CLI compatible

* Fix: go-lint
2021-10-14 18:21:49 +08:00
Jianbo Sun
7ef800573a Fix: make nginx class to be default value and allow pvc trait to attach more than once (#2466)
* Fix: make nginx class to be default value

* Fix: allow pvc trait to attach more than once
2021-10-13 17:18:02 +08:00
wyike
4956d0e4e1 Fix: compatibility bug (#2467)
make reivwable
2021-10-13 16:58:41 +08:00
Tianxin Dong
85c887d3e4 Fix: change raw extension to pointer (#2451)
* Fix: change raw extension to pointer

* Test: fix ut
2021-10-13 16:16:53 +08:00
Zheng Xi Zhou
a4a1c39bbb Fix: refine Terraform Azure mariadb ComponentDefinition (#2465)
Added outputs for Azure mariadb and refine the variables
2021-10-13 15:43:52 +08:00
Jianbo Sun
f9ffb9e240 Chore: add example for env patch and fix e2e flaky (#2462) 2021-10-13 15:39:50 +08:00
barnettZQG
c3eaa74ee7 Feat: add BatchAdd function and entity index support (#2454)
Co-authored-by: barnettZQG <yiyun.pro>
2021-10-13 10:01:06 +08:00
Shaw Ho
75ba05f738 Fix: wrong log print format (#2430) 2021-10-12 19:27:11 +08:00
Jian.Li
8935a87c59 Fix: Closure Bug In newValue (#2437)
* Fix: new value bug

* Fix: strategyUnify Bug

* Fix: e2e error
2021-10-12 19:05:03 +08:00
Tianxin Dong
287c895daf Fix: fix unhandled err (#2423)
* Fix: fix unhandled err

refer to https://lift.sonatype.com/result/bhamail/kubevela/01FFT7CSVNCPF6808ZM856V3HN?tab=results

* Test: fix panic err
2021-10-12 14:36:09 +08:00
basefas
96c52ab2fc Chore: add homebrew bump (#2434)
* Chore:  add homebrew bump

* Chore: update token
2021-10-12 12:52:40 +08:00
barnettZQG
0d036e7449 Feat: initialize the Apiserver framework (#2417)
* Feat: add kubeapi and mongodb datastore implementation

* Style: change kubeapi import code style

* Style: change mongodb package import code style

* Style: add some comment

* Style: change databasePrefix to tableNamePrefix

* Chore: install mongodb in unit-test job

* Chore: install mongodb in compatibility-test job

* Feat: add apiserver e2e test case

* Docs: change developer guide doc

* Feat: use common.Scheme

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-12 11:53:24 +08:00
Somefive
2e20f4862f Fix: update ingress class (#2445) 2021-10-11 20:48:39 +08:00
Zheng Xi Zhou
5865a69576 Fix: add Chart icon and url (#2441)
* Fix: add Chart icon and url

Added an icon and url for KubeVela chart

* Fix: remove local logo file and use a web image
2021-10-11 20:27:56 +08:00
wyike
9c76b2f3ac Fix: race condition of cloneset and statefulSet rollout plugin (#2394)
* Fix: clonset and stateful set

* Fix: e2e-test race condition
2021-10-11 15:47:20 +08:00
Somefive
472ed3a146 Feat: add support for envbinding with namespace selector (#2432)
* Feat: add support for envbinding with namespace selector

* Fix: service account kubeconfig e2e-test

* Docs: add comments to explain functions

* Docs: add envbinding example
2021-10-11 14:52:01 +08:00
Tianxin Dong
f06980c5f4 Fix: fix depends on app built-in step (#2429) 2021-10-09 18:48:53 +08:00
barnettZQG
f70133e5e6 Fix: fix apiserver 1.1.3 not available bug (#2425)
* Fix: fix apiserver 1.1.3 not available bug

* Feat: change apiserver image repository

* Fix(helm chart): fix startup args for apiserver

Co-authored-by: barnettZQG <yiyun.pro>
2021-10-09 16:50:02 +08:00
Somefive
bcd7f3e340 Feat: add secure tls for cluster-gateway (#2426) 2021-10-09 15:23:25 +08:00
Tianxin Dong
c049f497fb Feat: add apply raw built in workflow steps (#2420)
* Feat: add apply raw built in workflow steps

* Feat: add apply raw example

* Fix: change the name to apply object

* Fix: example server name
2021-10-09 12:20:32 +08:00
Jianbo Sun
8b98caaa40 Chore(deps): bump github.com/containerd/containerd from 1.4.8 to 1.4.11 (#2419) 2021-10-09 11:10:50 +08:00
Somefive
46e22cc203 Feat: multicluster support ServiceAccountToken (#2356)
* Feat: support serviceaccount in multicluster

* Fix: add compatibility & support sa

* Fix: add multicluster sa test

* Fix: add test for upgrade func

* Style: format
2021-10-08 14:45:04 +08:00
Jianbo Sun
426fe5cc11 Chore: add chaneglog and add backport github action and change the pull request template (#2410) 2021-10-08 13:35:04 +08:00
Somefive
a3f48425be Feat: use #ApplyComponent for EnvBinding (#2382)
* Feat: use #ApplyComponent in EnvBinding

* Fix: application test compRev control by resourcetracker

* Fix: add more detail in error info
2021-10-08 13:11:14 +08:00
qiaozp
a574fc0fbf Refactor(cli): Refactor vela env, deprecate vela config (#2037)
* Refactor(cli): cut env to namespace, use application to save

Signed-off-by: qiaozp <chivalry.pp@gmail.com>

* Fix: test

* Fix: typo
2021-10-08 13:10:47 +08:00
Lei Zhang (Harry)
0396d8d8bf Docs: add CD system README (#2411) 2021-10-08 13:10:22 +08:00
Zheng Xi Zhou
b8894b7a44 Fix: support terraform/provider-azure addon (#2402)
Also added some componentdefinitions for Azure cloud resource
2021-10-08 11:35:52 +08:00
Lei Zhang (Harry)
5767d16169 Docs: use graph to explain vela in README (#2404) 2021-10-02 15:06:58 +08:00
GingoBang
83eec87da6 Refactor: change rollout's json tag (#2314)
* Refactor: set rollout as a pointer reference

see issue #2289 for more details

Closes #2289

* Refactor: set rollout as a pointer reference
see issue #2289 for more details

Closes #2289
2021-10-02 10:19:41 +08:00
Somefive
5704c3b83c Fix: fix multicluster coverage bug (#2401) 2021-10-01 08:25:56 +08:00
Reeta Singh
6647a11c86 Chore: deprecate containerized workload (#2330)
* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Chore: deprecate containerized workload

* Chore: deprecate containerized workload

* Chore: run make reviewable as per review comment

* Chore: fix import

* Chore: merge with master

* Chore: merge with master

* Chore: remove references for containerized workload

* Chore: fix failiing e2e test

* Chore: fix failing e2e test

* Chore: fix failing e2e test

* Chore: fix failing e2e test

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: fix e2e tests

* Chore: merge with upstream

Co-authored-by: Reeta Singh <reetas@twitter.com>
2021-09-30 16:06:29 +08:00
Jian.Li
a865c85d05 Fix: Applied Resources Statistics Error (#2398)
* Fix: isSameObjReference

* Fix: healthScope
2021-09-30 14:24:09 +08:00
Tianxin Dong
ab2d2750f2 Fix: revision GC in workflow mode (#2355)
* Fix: revision GC in workflow mode

* Test: add revision cleanup test

* Fix: e2e test
2021-09-30 14:16:16 +08:00
Zheng Xi Zhou
99411a7f01 Fix: make the name of Terraform credential secret same to component name (#2399)
To make the secret name of Terraform credential more clear and avoid the
impact on the feature of #2336
2021-09-30 13:53:49 +08:00
Tianxin Dong
f9b218919a Feat(workflow): add depends on in workflow (#2387)
* Feat: add depens on in charts

* Feat(workflow): add depends on in workflow
2021-09-30 10:30:44 +08:00
Somefive
83b26349c7 Feat: bootstrap multicluster testing (#2368)
* Feat: bootstrap multicluster testing

* Fix: update action step name in .github/workflows/e2e-multicluster-test:yml

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>

* Fix: update setup-core wait condition

* Fix: add apply envbinding app test & upgrade gomega

* Fix: remove end_e2e duplicate script

Co-authored-by: Jianbo Sun <wonderflow@icloud.com>
2021-09-30 10:19:39 +08:00
wyike
2c64d04417 Feat: pass owner to workload if rollout failed (#2397)
delete useless file
2021-09-30 09:52:20 +08:00
Jian.Li
ef653ebeb4 Feat: add inputs test cases and optimize code (#2388)
* Feat: add test case & optimize code

* Fix: e2e test
2021-09-29 15:08:00 +08:00
Zheng Xi Zhou
305403ff8b Support remote git repo for Terraform configuration (#2337)
* Fix: support remote git repo for Terraform configuration

Besides inline HCL Configuration, supprted remote git repo Configuration

* Fix: add unit-tests

* Fix: update all manifests in vela-minimal
2021-09-29 14:58:27 +08:00
wyike
eebcc6c6ae Fix: use aliyun oss istio chart (#2392) 2021-09-29 14:42:50 +08:00
Jianbo Sun
298ce69593 Chore(deps): bump go.mongodb.org/mongo-driver from 1.3.2 to 1.5.1 (#2391)
Co-authored-by: barnettZQG <yiyun.pro>
2021-09-29 13:14:48 +08:00
Tianxin Dong
1e21a01320 Feat: add vela minimal in make manifests (#2389) 2021-09-29 13:09:57 +08:00
Tianxin Dong
042485124a Fix: fix built in workflow steps (#2378) 2021-09-29 10:05:13 +08:00
Hongchao Deng
49a91ca4c5 Feat: add Addon REST API (#2369) 2021-09-28 18:45:32 +08:00
Jianbo Sun
a2ad91f2f5 Fix: try fix CI unit test (#2376) 2021-09-28 18:44:50 +08:00
Tianxin Dong
5364e53e50 Fix: delete deprecated vela dashboard in e2e setup (#2379)
* Fix: delete deprecated vela dashboard in e2e setup

* Fix: fix helm lint in 3.7.0
2021-09-28 17:01:10 +08:00
whichxjy
811c783a00 Feat: support rollout controller for StatefulSet (#1969)
* Feat: support rollout controller for StatefulSet

* Feat: support one statefulset in rollout

* Feat: add tests for StatefulSet rollout controller

* Fix: correct workload-deleting error

* Feat: remove advanced sts
2021-09-28 11:46:30 +08:00
Jian.Li
22bf2e4c3a Feat: inputs support setting value in array (#2358)
* Feat: input support array

* Feat: add test cases

* Feat: add comment
2021-09-28 09:18:07 +08:00
Somefive
ee0a73b5b7 Fix: dockerfile e2e test command lack environment configuration (#2231) 2021-09-27 20:29:58 +08:00
yangsoon
ddb6285b19 Fix(helm chart): fix startup args for apiserver (#2362) 2021-09-27 14:20:58 +08:00
barnettZQG
3a310f0402 Feat: Initialize api for vela dashboard and CLI (#2339)
* Change the web framework to go-restful.
* Some API specifications are defined.
* Some sample code is provided.
2021-09-26 23:09:23 +08:00
barnettZQG
6771c688dd Docs: add a WeChat QR code (#2351)
* Docs: add wechat QR code

* Update README.md

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: barnettZQG <yiyun.pro>
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-09-26 13:41:20 +08:00
Somefive
61a12b0916 Fix: runc security issue (#2350) 2021-09-24 21:54:12 +08:00
Tianxin Dong
360c19cf2d Feat: add vela minimal chart (#2340)
* Feat: add vela minimal chart

* Feat: add README in minimal chart
2021-09-24 17:02:43 +08:00
wyike
11103b31bb Docs: rollout demo (#2348)
delete useless file
2021-09-24 16:31:39 +08:00
qiaozp
a8adaefc78 Chore: remove e2e-api-test in rollout test to speed up (#2345) 2021-09-24 15:44:59 +08:00
qiaozp
b4c7ed1773 Chore: deprecate 'vela dashboard' apiserver (#2341)
* Chore: deprecate
'vela dashboard' apiserver

* Chore: fix import

* Fix: preparation

* Fix: test
2021-09-24 13:00:07 +08:00
Geir Haugom
2e12ea9bd8 Feat: add revisionHistoryLimit to helm chart (#2343) 2021-09-24 10:42:04 +08:00
Jianbo Sun
0a9518f583 Fix: remove appcontext CRD and controller (#2270) 2021-09-23 15:05:47 +08:00
Tianxin Dong
e6668ac390 Fix: do not override the workload name if its specified (#2336)
* Fix: do not override the workload name if its specified

* Fix: resolve comments
2021-09-23 15:05:25 +08:00
qiaozp
2be5b20c6d Chore(cli): remove useless deploy.yaml (#2335)
* Chore: remove useless deploy.yaml

* Chore: remove useless deploy.yaml
2021-09-23 11:48:14 +08:00
Somefive
4f2ed4f59e Fix: remove ocm addon enable in Makefile (#2327) 2021-09-23 11:38:28 +08:00
Gallardot
2d8c8efe08 Feat: add args for init-contianer and sidecar (#2331) 2021-09-22 15:54:27 +08:00
Somefive
89c697ca87 Fix: fix multicluster template bug (#2333) 2021-09-22 14:56:58 +08:00
Zheng Xi Zhou
4379a46a79 Fix: add comments and adjust helm typed component's spec (#2332)
Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-09-22 10:05:11 +08:00
Zheng Xi Zhou
d933af022c Fix: move charts from github repo to Alibaba Cloud OSS repo (#2324)
* Fix: move charts from github repo to Alibaba Cloud OSS repo

Charts in Github repo is not always avaialable for some users, so
moved them to OSS repo

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

* Update charts/vela-core/templates/addons/observability-asset.yaml

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

* Update vela-templates/addons/observability-asset/definitions/trait-import-grafana-dashboard.yaml

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

* Update vela-templates/addons/auto-gen/observability-asset.yaml

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-09-20 15:52:52 +08:00
yangsoon
60435e42a5 Fix(addon): don't install fluxcd and terraform by default (#2328) 2021-09-19 09:47:02 +08:00
Somefive
55e746cc7a Fix: fix multicluster values bug (#2326) 2021-09-19 09:26:05 +08:00
Jian.Li
48002641b9 Fix: workflow example (#2323) 2021-09-18 14:40:08 +08:00
Somefive
c1e6ded23d Fix: fix cluster-gateway image tag in chart (#2318) 2021-09-18 00:24:50 +08:00
hughXia
cafb55256f Fix: fix typo (#2317)
Co-authored-by: shengmiao.xia <shengmiao.xia@easystack.cn>
2021-09-17 22:09:29 +08:00
Hongchao Deng
b60c16a4be Fix(rollout): improve rollback experience (#2294) 2021-09-17 19:09:41 +08:00
Somefive
8407c0bf4d Style: rename multi-env to deploy2env (#2309) 2021-09-15 15:03:44 +08:00
yangsoon
76527421d7 Fix(helm chart): change initialDelaySeconds of readinessProbe to 30s (#2308) 2021-09-15 14:29:58 +08:00
wyike
a151d17fde Fix: generate service in canary-traffic trait (#2307)
fix ci

Fix: apply remaing bug

fix ci
2021-09-15 14:25:55 +08:00
Jian.Li
4ff4afde51 Feat: Make applicationComponent can be modified in step (#2304)
* Feat: component properties can be modfiled in step

* Fix: op.#ApplyRemaining
2021-09-15 13:25:22 +08:00
Zheng Xi Zhou
fbac93665d Fix: add application logging dashboard (#2301)
Added a Grafana dashboard for application logging
2021-09-15 13:21:38 +08:00
Tianxin Dong
36c7b9ec5b Fix: imagePullSecrets error from cloneset (#2305)
* Fix: imagePullSecrets error from cloneset

* Fix: generate yaml file

Co-authored-by: withlin <withlin@apache.org>
2021-09-15 13:21:17 +08:00
Hongchao Deng
d0e8418c4a Fix: don't increment count in status (#2306) 2021-09-15 13:20:58 +08:00
Somefive
291f9d139e Fix: fix cli logging (#2298) 2021-09-15 13:18:50 +08:00
wyike
9a766467a3 Fix: generate service in canary-traffic trait (#2300)
fix ci
2021-09-15 11:50:40 +08:00
Zheng Xi Zhou
c9b2c99dbf Revert "Fix: fix alibaba cloud rds module (#2293)" (#2302)
This reverts commit c590853f37.
2021-09-15 11:36:08 +08:00
qiaozp
0a3244f590 Feat: allow user specify alibaba provider addon's region (#2297) 2021-09-14 23:05:28 +08:00
Tianxin Dong
12361c133e Feat: add commit msg in kustomize (#2296) 2021-09-14 22:03:56 +08:00
Zheng Xi Zhou
c590853f37 Fix: fix alibaba cloud rds module (#2293)
Enable users to set `db_instance_storage_type`. This can fix the issue
happended since Sept. 14, 2021.
{"Code":"InvalidNetworkTypeClassicWhenCloudStorage","HostId":
"rds.aliyuncs.com","Message":"The Specified InstanceNetworkType
value Classic is not valid when choose cloud storage type."
2021-09-14 21:57:46 +08:00
Tianxin Dong
17c17fcfc6 Fix: fix apply application (#2288)
* Fix: fix apply application

* Fix: fix apply remaining
2021-09-14 21:49:09 +08:00
Jian.Li
0e8ffd717f Fix: apply-component bug (#2292)
* Fix: apply-component bug

* Feat: uniform apply-component input/output format
2021-09-14 21:37:46 +08:00
Jianbo Sun
8d8447ad94 Fix: filter kubectl apply annotation in vela live-diff (#2290) 2021-09-14 20:36:53 +08:00
Somefive
e8d051a532 Support MultiCluster EnvBinding with cluster-gateway (#2247)
* Feat: init multicluster

* Feat: add secret namespace auto-detect

* Style: format

* Style: split gc codes

* Feat: add cluster cli

* Fix: rebase workflow on master

* Feat: add component selector for env binding

* Fix: selector & patch conflict

* Feat: add local cluster support & fix unit test

* Fix: fix omitempty bug

* Feat(health-scope): support multi-cluster's healthcheck

* Fix: resourcetracker gc bug & rename

* Feat: add multicluster to op.Read

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-09-14 20:35:10 +08:00
qiaozp
c1ebe9db24 Feat: alibaba provider addon (#2243)
bump up terraform version

Signed-off-by: qiaozp <chivalry.pp@gmail.com>
2021-09-14 19:35:21 +08:00
wyike
3d29df3a52 Fix: fix in middler of test (#2275)
add test

delete uesless

add comments

fix small issue

fix error

add charts back
2021-09-14 18:05:21 +08:00
yangsoon
324bbe5e57 Fix(helm): enable apiserver by default (#2249)
Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-09-14 14:15:47 +08:00
Tianxin Dong
8e172091f6 Test: fix resource tracker e2e (#2281) 2021-09-14 10:26:57 +08:00
Tianxin Dong
e73655a8b2 Refactor: change field exportKey to valueFrom (#2284) 2021-09-14 10:23:39 +08:00
Hongchao Deng
ce70f9f57f Fix: add exponential backoff wait time for workflow reconciling (#2279) 2021-09-13 22:34:25 +08:00
Hongchao Deng
215c4e0752 Fix: patch any key using retainKeys strategy (#2280) 2021-09-13 20:19:16 +08:00
wyike
d93d8626c0 Feat: istio addon and use case demo (#2276)
fix all error and finish readme

small change

fix CI check

add canary trait back
2021-09-13 20:10:32 +08:00
Jian.Li
b66f2995a5 Fix: Bugs (as follows) (#2278)
* Fix: suspend step id

* Feat: add test cases

* Fix: reslove conflict

* Fix: reduce reconclie duration for test
2021-09-13 20:03:49 +08:00
Jianbo Sun
cad21c5138 Fix: refactor workflow and fix some e2e tests (#2272)
* Fix: add e2e plugin test back

* Fix: e2e rollout test and try change port to 37081

* Fix: add rollout plan test back

* Refactor: change the workflow state machine and add workflow succeed state

* Refactor: refine definition controller and fix e2e of app revision

* Refactor: unlock all the normal cases

* Fix: add helm schematic logic back into workflow
2021-09-13 14:17:12 +08:00
Tianxin Dong
af01349f28 Test: fix rollout e2e test (#2277) 2021-09-13 11:13:03 +08:00
Jian.Li
445db3b276 Fix: E2E Test (#2274)
* Fix: value.lookUpByScript bug

* Fix: apply-component patch trait resource
2021-09-12 22:45:14 +08:00
Yuhui Liu
7ed34b675d Feat: add more options for leader election configuration to avoid pressure on kube-apiserver (#2271) 2021-09-12 18:30:59 +08:00
Jianbo Sun
537f19f06b Fix: remove podspecworkload controller and CRD (#2269) 2021-09-12 10:17:09 +08:00
Jian.Li
6cbdbe84b2 Refactor application code to make it run as Dag workflow (#2236)
* Refactor: remove use of AppConfig in AppRevision

* Refactor: remove insert secret and configmap

* Feat(workflow): upgrade

* Fix(conflict): workflow cherry

* Feat(workflow): support DAG mode

* Feat(workflow): prepare steps in step

* Feat(tools): random string

* Fix(rand): gosec weak random

* Fix(ci): test passing

* Feat(workflow): generate steps

* Fix: fix rebase from master

* Fix: fix workflow ut

* Feat(test): add test cases

* Fix: fix lint and rebase from master

* Refactor: application code

* Fix: fix ci lint

* Fix: make code reviewable

* Fix: workflow_test.go

* Feat: collect services

* Fix(ci): unit tests

* Feat: make one

* Test: application with input/output and workflow

* Fix: trace test

* Fix: update step index falied

* Feat: refactor op.#Load

* Fix: delete dead code

* Refactor: op.xxx

* Fix: patch component

* Test: add generator test

* Fix: add license

* Fix: pending e2e plugin test

* Fix: disable test/e2e-test

* Fix: patch by script

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
Co-authored-by: FogDong <dongtianxin.tx@alibaba-inc.com>
2021-09-12 10:12:46 +08:00
Zheng Xi Zhou
2ba7480a41 Fix: add ComponentDefinition alibaba-eip (#2268)
Added another ComponentDefinition alibaba-eip, which will be applied
with vela-core installation
2021-09-11 18:46:00 +08:00
Zheng Xi Zhou
7d827182e6 Fix: fix the output DB_PASSWORD for rds definition (#2267)
Fixed the output `DB_PASSWORD` for ComponentDefinition alibaba-rds
2021-09-11 18:02:57 +08:00
wyike
da5b32f1a8 Fix: delete useless rollouttrait (#2264) 2021-09-10 22:43:40 +08:00
wyike
8b1ce6937f Fix: remove matchlabels in webservice template (#2255) 2021-09-10 12:44:38 +08:00
Jianbo Sun
a79c96fa46 Fix: pending the flaky rollout test (#2253) 2021-09-09 21:06:03 +08:00
Tianxin Dong
faa445255d Feat: add image auto update for gitops (#2251) 2021-09-09 19:53:01 +08:00
Jianbo Sun
f270c5901b Chore: add backup for code owners (#2252) 2021-09-09 17:56:47 +08:00
Zheng Xi Zhou
19bcfdd8df Fix: bump version of Terraform Controller (#2250)
Bumped the version of Terraform controller to change the filed of
Configuration's status.

Related issue: https://github.com/oam-dev/terraform-controller/pull/104
2021-09-09 17:19:57 +08:00
majian
e0eded58e5 Feat: support code-generator and sync to kubevela-core-api (#2174) 2021-09-09 09:28:31 +08:00
A Ismaili
873a19e9e0 Fix: Updated broken Getting Started links (#2248) 2021-09-08 18:13:27 +08:00
Reeta Singh
579f7427fa Feat: vela show annotations display undefined should be refined (#2244)
* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat: vela show annotations display undefined should be refined

Co-authored-by: Reeta Singh <reetas@twitter.com>
2021-09-08 15:02:50 +08:00
Jianbo Sun
65402bd926 Fix: remove some unused flaky tests (#2242) 2021-09-08 09:30:04 +08:00
wyike
ae724b2a9a Docs: canary rollout demo (rollout part only) (#2177)
Feat: component definition support context.revision
2021-09-07 17:08:56 +08:00
Zheng Xi Zhou
5730d08396 Fix: lower title level to make definition docs generation adapt to kubevela.io (#2240)
Lower two levels of the title of workloads/traits docs to adapt to
Kubevela.io
2021-09-07 16:03:33 +08:00
qiaozp
c451d74cfd Fix: kustomize json patch trait definition (#2239) 2021-09-07 11:30:41 +08:00
Yue Wang
4ed40bebe3 Feat(app): show health status from HealthScope in application status (#2228)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-09-07 11:27:29 +08:00
Reeta Singh
e29f22a7b3 Feat(trait): annotation and labels trait should also affect the workload object along with pod (#2237)
* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

* Feat(trait): annotation and labels trait should also affect the workload object along with pod

Co-authored-by: Reeta Singh <reetas@twitter.com>
2021-09-07 10:57:32 +08:00
Eng Zer Jun
426aa7af34 Refactor: move from io/ioutil to io and os package (#2234)
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.

Signed-off-by: Eng Zer Jun <zerjun@beatchain.co>
2021-09-06 18:33:42 +08:00
yangsoon
f8ac24db27 Feat(workflow): add status check for workflow mutil-env (#2229) 2021-09-06 14:48:34 +08:00
yangsoon
493e255d78 Fix: align the envbind-app name with the original application name (#2232) 2021-09-05 14:45:44 +08:00
Somefive
32b6502e74 Feat: add pressure-test parameter optimize (#2230) 2021-09-03 17:29:54 +08:00
yangsoon
02f79a5cd9 Fix(addons): remove kruise addon (#2226) 2021-09-03 11:44:52 +08:00
Zheng Xi Zhou
ecef32a7f3 Fix: add flag --label to filer components and traits (#2217)
Added flag `--flag` to filter when executing `vela componnets` and
`vela traits`

Fix https://github.com/oam-dev/kubevela.io/pull/222#discussion_r699214816
2021-09-02 20:51:34 +08:00
yangsoon
e59374bb7d Feat(apiserver): add apiserver service to helm chart (#2225) 2021-09-02 17:16:09 +08:00
yangsoon
cec16cc1a4 Fix(webhook): only check the uniqueness of component names under the same namespace (#2222) 2021-09-02 14:09:45 +08:00
Jian.Li
1776859631 Feat(workflow): Add op.#Task action (#2220)
* Feat(workflow): tekton task

* Feat(tools): random string

* Fix(example): defintion fmt

* Fix(rand): gosec weak random
2021-09-02 13:40:10 +08:00
wyike
f5c2c85381 Fix(addon): rename clonset-service to clonse (#2219)
fix test
2021-09-02 12:05:51 +08:00
Jian.Li
7a42c743d7 Feat(workflow): outputs support script notation (#2218)
* Feat(workflow): output support script notation

* Feat(cue): add test case
2021-09-01 19:19:01 +08:00
yangsoon
d4277f644e Fix(app): When only the policy is specified, the resources in the app need to be rendered and created (#2197)
* Fix(app): apply app when policy is specified

* Fix(policy): update env-binding policy

* Test(policy): add test
2021-09-01 17:27:47 +08:00
Yue Wang
f130d1d922 Fix(upgrade): upgrade controller-tools from 0.2 to 0.6.2 (#2215)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-09-01 15:08:24 +08:00
Jian.Li
1a6d2be6d0 Feat(workflow): input.ParameterKey described like paths notation (#2214)
* Feat(workflow): input.ParameterKey path notation

* Feat(workflow): add test case

* Fix(lint): format code
2021-09-01 11:34:16 +08:00
Tianxin Dong
2d1edbb16d Feat(workflow): add apply application workflow step definition (#2186) 2021-08-31 20:21:29 +08:00
Tianxin Dong
7a139b554f Feat(workflow): support dingding and slack in webhook notification (#2213) 2021-08-31 20:20:26 +08:00
Yue Wang
6bf4a2c1f7 Feat(healthscope): add health-scope-binding policy and e2e test for health scope (#2205)
Signed-off-by: roywang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-08-31 15:59:17 +08:00
Jianbo Sun
9f6812414d Fix: modify service-binding with more accurate type (#2209) 2021-08-31 13:47:16 +08:00
Hongchao Deng
7310cc1363 Docs: update environment design (#2199) 2021-08-31 13:43:00 +08:00
Penthaa Patel
161bab7d62 Refactor(#2185): remove unused config options in Makefile (#2200)
Fixes issue #2185
2021-08-31 10:06:21 +08:00
Jianbo Sun
332fd4753e Fix: update help message of ingress trait (#2198) 2021-08-31 08:40:19 +08:00
Zheng Xi Zhou
4e010d7bae Fix: support more Terraform variable types (#2194)
Including null, list(...), map(...) Terraform types
2021-08-30 20:16:24 +08:00
Jianbo Sun
1ce8722e25 Feat: add more registry traits as internal ones (#2184) 2021-08-30 19:47:54 +08:00
arcosx
cd153e8ce5 Fix: error doc link (#2195) 2021-08-30 19:29:13 +08:00
Somefive
2cea51e5e9 Feat: add pprof (#2192) 2021-08-30 17:19:46 +08:00
yangsoon
75a972516d Feat(workflow): add depends-on workflow step definition (#2190) 2021-08-30 17:19:32 +08:00
Somefive
25bc43ae39 Fix: add patchkey to volumes (#2191) 2021-08-30 15:54:43 +08:00
Zheng Xi Zhou
068e9d97c4 Fix: move Terraform defintions charts/vela-core/templates/definitions (#2176)
Make all Terraform definitions to install when vela-core is installing
2021-08-30 14:49:57 +08:00
Jianbo Sun
e9981b6e20 Feat: add vela live-diff , dry-run, cue-packages into vela commands (#2182) 2021-08-30 12:01:24 +08:00
Jianbo Sun
0781937100 Fix: align all CUE template keyword to use parameter (#2181) 2021-08-30 11:43:20 +08:00
Tianxin Dong
75eab7bdde Docs: remove the commit convention doc (#2187) 2021-08-30 11:41:01 +08:00
yangsoon
d24e282e67 Feat(envbinding): add resourceTracker for envBinding (#2179)
* Feat(envbinding): add resourceTracker for envBinding

* Test: add test for envbinding
2021-08-29 13:29:30 +08:00
qiaozp
0c7048b2a0 Feat(addon): add default enable addon (#2172) 2021-08-29 11:24:40 +08:00
Yue Wang
9780ce3bef Feat(cue): support access components artifacts in cue template context (#2161)
Signed-off-by: roywang <seiwy2010@gmail.com>

Co-authored-by: roywang <royyuewang@tencent.com>
2021-08-29 09:11:10 +08:00
Jianbo Sun
cb790bfc13 initilize KubeVela codeowner file (#2178)
* Chore(maintainer): initilize KubeVela codeowner file

* Update .github/CODEOWNERS

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update .github/CODEOWNERS

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

* Update .github/CODEOWNERS

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>

Co-authored-by: Zheng Xi Zhou <zzxwill@gmail.com>
2021-08-28 08:26:41 +08:00
yangsoon
73be37b73b Fix(envbinding): fix the way that envbinding stores resources after configuration (#2175)
* Refactor: replace #op.ApplyEnvBindComponnet with #op.ApplyEnvBindApp

* Fix: fix patch strategy for envbinding
2021-08-27 21:38:57 +08:00
Reeta Singh
950411dbe8 Trait: Add TraitDefinition for PVC (#2158)
* Feat(trait): add trait definition for persistent volume claim

* Feat(trait): add trait definition for persistent volume claim
2021-08-27 18:45:22 +08:00
Zheng Xi Zhou
5fcc2ad9f7 Fix: fix EOF event when describing an application (#2134)
Fixed the issue: When component properties don't meet the parameter
of the ComponentDefinition, it will hit 'EOF' event

Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>

Fix #2132
2021-08-27 18:45:05 +08:00
wyike
cc8a1d3bde Feat: modify apply component cue action to support skipWorkload trait (#2167)
fix lint

fix comments
2021-08-27 13:12:00 +08:00
Zheng Xi Zhou
1f6d4d2345 Fix: add fluxcd dashbaords (#2130)
Added two fluxcd dashboards and also install its dependencies

just keep the ready Dashboard
2021-08-26 20:31:49 +08:00
wyike
6719e8af3a Feat: add health check status (#2166)
check len(status.contitions) not empty
2021-08-26 20:05:01 +08:00
yangsoon
5d17fb3a7f Refactor: change the ownerReference of configMap which store the parameter for each revision to definitionRevision (#2164)
* Refactor: change the ownerReference of cm store the parameter for each revision to defRevision

* Feat: check whether its needed before status update
2021-08-26 19:56:46 +08:00
Zheng Xi Zhou
08f1ff99cf Fix: traitdefinition controller reconcile in a infinite loop (#2157)
Check whether its needed before status update, add log before
each reconcile returns, and also correct Klog.InfoS to klog.ErrorS
when trying to log err information

Fix #2153
2021-08-25 21:35:33 +08:00
Shaowen Chen
44262f03de Docs: fix typo about workflow rollout (#2163)
Signed-off-by: shaowenchen <mail@chenshaowen.com>
2021-08-25 19:32:56 +08:00
Tianxin Dong
2145afe4e1 Feat(ci): add commit lint ci (#2160) 2021-08-25 17:00:50 +08:00
Tianxin Dong
60cd8ef7de Feat(workflow): add workflow CRD (#2098) 2021-08-25 09:55:12 +08:00
Tianxin Dong
8fb64fcb19 Fix(dryrun): add default name and namespace in dry run (#2150) 2021-08-24 17:54:55 +08:00
Tianxin Dong
8fc192bfac Feat(definition): add built-in dingtalk workflow step definition (#2152) 2021-08-23 19:07:07 +08:00
Young-Zen
c4380dbe06 fix helm test failed (#2149)
Co-authored-by: yanghaojia <yanghaojia@coding.net>
2021-08-23 16:48:37 +08:00
wyike
01f7357525 change IncreaseFirst to DecreaseFirst (#2142)
don't merge, only for test

request cpu to 0

revert
2021-08-23 16:24:51 +08:00
Jian.Li
9311c22c16 Feat(workflow): support to send dingDing message (#2141)
* Feat(workflow): send dingding message

* Bug(e2e): upgrade golang version
2021-08-21 07:18:04 +08:00
Tianxin Dong
7254bb67a3 Feat(vela): add vela workflow terminate and restart command (#2131)
* Feat(vela): add vela workflow terminate and restart command

* Fix(restart): fix restart command
2021-08-20 20:45:09 +08:00
wangyuan249
8a334d7e82 Feat: add get and delete method for app and test (#2127) 2021-08-20 20:41:19 +08:00
qiaozp
af04ca37a5 Feat(addon): Add source and patch to kustomize definition (#2138)
* add more source to kustomize

* add patch to kustomize

* fix

* add patch trait

* remove param
2021-08-20 20:40:15 +08:00
Tianxin Dong
37bd10d762 Feat(contributing): add commit message convention (#2140) 2021-08-20 16:08:08 +08:00
Yue Wang
324fc1ac7c add CUE-based health check in HealthScope controller (#1956)
add e2e test

Signed-off-by: Yue Wang <seiwy2010@gmail.com>
2021-08-20 15:55:47 +08:00
yangsoon
850fc704a1 add new parameter type for internal trait expose (#2122)
* expand internal trait expose

* fix(demo) fix resource in workflow-with-ocm

Co-authored-by: yangsoon <songyang.song@alibaba-inc.com>
2021-08-20 15:50:22 +08:00
wyike
4941a3e9c2 fix external revision bug (#2126)
* fix external revision bug

* add test

* try to fix flaky-test
2021-08-20 15:43:50 +08:00
Tianxin Dong
bd91cf762d Fix(workflow): set the namespace to app's ns if it's not specified (#2133)
* Fix(workflow): set the namespace to app's ns if it's not specified

* fix dryrun test
2021-08-20 13:43:04 +08:00
qiaozp
0906d1b602 fix cloneset (#2129) 2021-08-20 10:55:59 +08:00
yangsoon
fa283ee695 fix(cli) fix bug when vela show componetdefinition's workload type is AutoDetectWorkloadDefinition (#2125) 2021-08-19 23:44:31 +08:00
Hongchao Deng
bec6c89389 examples: fix typo (#2128)
* examples: fix typo

* update yaml
2021-08-19 21:19:53 +08:00
Jian.Li
96a8b24a64 Make the WorkflowStepDefinition to be Universal (#2124)
* support script

* add comment
2021-08-19 19:15:41 +08:00
wyike
0c0b9d0774 rollout OCM demo and defer rollout pass owner to handleSucceed (#2121)
* finish test

fix demo

finish test

finish docs

fix rollout template

add more test

add comment

* impove test coverage and wrap error

fix checkdiff

add more time
2021-08-19 15:33:40 +08:00
Jianbo Sun
f033768dd2 fix(CI): use buildkit as docker build engine to avoid 401 unauthorized error (#2120) 2021-08-18 22:36:02 +08:00
qiaozp
65217c0a44 helm add bucket support (#2104)
* helm add bucket support

* fix def

* add bucket support ,support ak/sk

* typo

* bucket -> oss

* bucket -> oss

* repoUrl -> url

* rfc helm param

* rfc helm param

* fix helm type usage

* fix test
2021-08-18 20:10:42 +08:00
Tianxin Dong
8ac5d2276e Fix(workflow): set workload name in configmap if the name is not specified (#2119)
* Fix(workflow): set workload name in configmap if the name is not specified

* fix ut
2021-08-18 20:04:34 +08:00
Concurrensee
9b7c4562ca modified openkruise version to v0.9.0 (#2076)
Co-authored-by: 314785 <wuyida.wuyida@alibaba-inc.com>
2021-08-18 17:37:52 +08:00
Tianxin Dong
a6753737b3 Feat(vela): add vela workflow resume command and ut (#2114)
* Feat(vela): add vela workflow resume command and ut

* fix ut
2021-08-18 17:04:21 +08:00
Jianbo Sun
8e4a0c8306 try fix github action push to image hub (#2115) 2021-08-18 14:35:43 +08:00
Tianxin Dong
601510e43c feat(def): add built-in workflow definitions (#2094)
* use_vela_bin

* Update gen_definitions.sh

add version print

* Update gen_definitions.sh

* Update gen_definitions.sh

* update crossplatform build check

* test

* feat(def): add built-in workflow definitions

* delete pod disruptive in workflow step def

* make cue files reviewable

* fix workflow step definition

* fix ci

* add clean up step

* add build clean up

Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
Co-authored-by: Somefive <Somefive@foxmail.com>
2021-08-18 13:22:57 +08:00
Tianxin Dong
2854c4204c Feat(vela): add vela workflow suspend command (#2108)
* Feat(vela): add vela workflow suspend command

* Feat(vela): add vela workflow suspend ut
2021-08-18 11:37:46 +08:00
Zheng Xi Zhou
09c85191ba Replace gcr.io image in chart kube-metrics-server (#2113)
As it's difficult to pull gcr.io iamge, so replace the image
k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.1.0 to the one
hosted in dockerhub.io
2021-08-18 09:11:38 +08:00
Zheng Xi Zhou
b11d0c69d6 Fix the issue to set the latest nighty build chart name (#2109)
This is a patch for https://github.com/oam-dev/kubevela/pull/2103
2021-08-17 20:40:41 +08:00
Jianbo Sun
cc4b55983f update kubevela helm chart repo (#2110) 2021-08-17 18:56:49 +08:00
Zheng Xi Zhou
a9ab04dfe3 Store OSS bucket and endpoint to Github Action secret (#2111)
Storing OSS bucket and endpoint to Github Action secret will help
a developer to test the function without needing to changing code,
revert code. Instead, he/she just need to configure the secret contect
2021-08-17 18:54:14 +08:00
Zheng Xi Zhou
3ccaf04354 Refine the lastest chart name build on master branch (#2103)
Rename the latest master chart name to x.y.z-nighty-build
2021-08-17 15:13:59 +08:00
qiaozp
050afca7a6 Add obsevability addon (#2091)
* Support Obsevability

- Support displaying and filter logs
- Support metrics and traces

* register datasource

* install prometheus

* install prometheus and register datasource

* Also install and register Prometheus

* remove unneeded file

* register datasource with clusterip

* register prometheus

* Support importing Grafana Dashboard

Added a trait to import Grafana Dashboard on component Grafana

* tmp

* 1. make observability as addon
2. make it more esay to gen addon

* use [[]] as gen addon delim

* url->urls

* add 2 url

* fix template

* fix args

* remove doc

* move url,fix test

* last modify!

* change arg name to grafana-domain

Co-authored-by: zzxwill <zzxwill@gmail.com>
2021-08-17 14:46:07 +08:00
yangsoon
a599a6a88b add more test for envbinding (#2100)
* add test

* fix example
2021-08-17 11:30:52 +08:00
wyike
b6a2ab804e add batch partition (#2097) 2021-08-16 20:30:56 +08:00
Jianbo Sun
309e71a60f add create or update app apiserver (#2087)
* add create or update app

* add apiserver test
2021-08-16 20:28:03 +08:00
yangsoon
d3f264273f enhance envbinding: support apply resources to cluster (#2093)
* enbinding support apply resources directly

* adjust the directory struct

* set placement as an optional field

* support namespace selector
2021-08-16 19:08:18 +08:00
Zhizhen He
1e294b3164 chore: replace github.com/ghodss/yaml with sigs.k8s.io/yaml (#2089) 2021-08-15 10:53:05 +08:00
Somefive
51669f0e41 enable vela def to use import decl (#2084)
* enable vela def to use import decl

* fix def_test

* add comment

* add more test
2021-08-13 18:44:01 +08:00
wangyuan249
11524bf591 update cert image (#2083) 2021-08-13 08:23:48 +08:00
wyike
682385dea9 runtime rollout chart (#2075)
* first commit

WIP

finish all tests

finish github  workflow

only for test

only for test

revert test code

minimize rbac

neats imports

fix tests

* reorg

small change

* rename
2021-08-12 21:33:00 +08:00
Concurrensee
63341e8f6e imagePullJob added with demo (#2069)
Co-authored-by: 314785 <wuyida.wuyida@alibaba-inc.com>
2021-08-12 19:12:53 +08:00
Somefive
d7a31c4cb3 fix configmap patchkey bug (#2080) 2021-08-12 19:10:51 +08:00
Hongchao Deng
223bcd3770 remove k8sutil 2021-08-12 11:13:41 +08:00
wangyuan249
f2868305ff fix ci 2021-08-12 11:13:41 +08:00
wangyuan249
9e2f406ee0 fix ci and refactor common util 2021-08-12 11:13:41 +08:00
Hongchao Deng
3c5fae12b3 fix ci 2021-08-12 11:13:41 +08:00
Hongchao Deng
201c3c466d add test for catalog service 2021-08-12 11:13:41 +08:00
Hongchao Deng
638957a333 leave only catalog code 2021-08-12 11:13:41 +08:00
Hongchao Deng
9620fbbfca add helm chart 2021-08-12 11:13:41 +08:00
Hongchao Deng
bf93bf5004 add apiserver to Dockerfile 2021-08-12 11:13:41 +08:00
wangyuan249
fa57fcf66e Merge velacp to apiserver branch in oam repo (#2039)
* move velacp into vela core as apiserver

* fix lint

* add license

* fix err lint

* fix err

* rm vela install service

* add makefile
2021-08-12 11:13:41 +08:00
yangsoon
8d298ecfdd clean docker image every hour (#2070) 2021-08-11 20:29:20 +08:00
tux
d7c179b91d fix workflow example (#2064) 2021-08-11 16:30:16 +08:00
Tianxin Dong
63cfc2b68a Fix(example): fix workflow example (#2060) 2021-08-11 14:00:30 +08:00
Somefive
873c8299d8 fix definition controller log error cause by openapi schema generation error (#2063)
* fix definition controller log error cause by openapi schema generation failed

* fix definition controller log error cause by openapi schema generation failed

* add test
2021-08-11 13:59:46 +08:00
qiaozp
356db2dc97 Add add-on input go-template implementation (#2049)
* add addon parameter template implementation

* add test

* fix test

* fix helm version parameter
2021-08-11 11:49:44 +08:00
yangsoon
abbec2c36b definitions support specify the revision name (#2044)
* support named defRev

* add test
2021-08-10 20:03:45 +08:00
tux
120e6fcc5c fix metadata.name to lower case (#2059) 2021-08-10 20:03:04 +08:00
Somefive
072e6b0aa7 fix def init bug (#2056) 2021-08-10 12:48:32 +08:00
qiaozp
ea64b1db3b Add cloneset as kruise addon's componentDefinition (#2050)
* add cloneset as kruise addon's componentDefinition

* add SAE demo field

* trim field

* make reviewable
2021-08-10 10:21:49 +08:00
Tianxin Dong
a874aa3f71 Chore(docs): fix typos in design docs (#2053) 2021-08-09 19:59:38 +08:00
Jian.Li
e12a9303eb Li-Auto-Inc (#2042) 2021-08-09 10:27:18 +08:00
LeoLiuYan
a715564147 Feat allow users to specify component revision name (#1929)
* Feat allow users to specify component revision name

* Add unit tests

Signed-off-by: LeoLiuYan <929908264@qq.com>

* Add ExternalRevision field to ComponentManifest

* Add handleComponentRevisionNameUnspecified func

* Add unit tests for webhook

Signed-off-by: LeoLiuYan <929908264@qq.com>

* Add more unit tests

* Feat allow users to specify component revision name

* Add unit tests

Signed-off-by: LeoLiuYan <929908264@qq.com>

* Add ExternalRevision field to ComponentManifest

* Add handleComponentRevisionNameUnspecified func

* Add unit tests for webhook

Signed-off-by: LeoLiuYan <929908264@qq.com>

* Add more unit tests

* Try to fix webhook unit tests

* fix race (#2040)

* fix test bug

* More unit tst

* More unit test and trigger ci

Co-authored-by: yangsoon <yangsoonlx@gmail.com>
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-08-08 12:11:24 +08:00
Jian.Li
94dab9f2a5 workflow support http provider (#2029)
* provider http

* method

* add license header

* test cases

* test cases

* test cases

* test cases

* generate

* lint

* upgrade apply component

* cover

* test install
2021-08-06 19:26:50 +08:00
Somefive
97d2715b87 update klog surpress (#2038) 2021-08-06 19:09:21 +08:00
Somefive
6168537f56 add vela-def design documents (#2041) 2021-08-06 17:55:06 +08:00
yangsoon
d5abd6fd77 fix race (#2040) 2021-08-06 17:13:12 +08:00
Somefive
ee0282af18 [Vela CLI] Vela def enhancement & replace mergedef.sh (#2031)
* draft vela def enhancement

* add format and amend test

* fix generation bugs

* force CI

* work around lifecycle definition in avoid of vela show --web crash

* fix data race in envbinding
2021-08-06 17:10:52 +08:00
Zheng Xi Zhou
116e78e66a Add more properties for trait helm (#2033)
* Add more properties for trait helm

Added `version`, `targetNamespace` and `value` for trait helm

co-authored-by:  qiaozp <47812250+chivalryq@users.noreply.github.com>

* fix make check-diff issue

Co-authored-by: qiaozp <47812250+chivalryq@users.noreply.github.com>
2021-08-06 16:20:37 +08:00
Gesa Stupperich
2ee3256b20 Store component parameters in context (#2030) 2021-08-06 10:48:00 +08:00
yangsoon
0eed21987a add more test for envbinding (#2032) 2021-08-06 10:46:31 +08:00
wyike
3f326f06e4 application skip gc resource and rollout set workload ownerReference (#2024)
* finish main logic and test

* fix import order

* rollout isn't created by applciation

* fix comments

* fix compatility test

* mock error test
2021-08-05 17:15:57 +08:00
wangyuan249
db0b7b6ea3 add userlist (#2025) 2021-08-05 14:42:48 +08:00
Tianxin Dong
c6c03d823b Fix(volume): seperate volume to trait (#2027) 2021-08-05 11:06:13 +08:00
Hongchao Deng
566cd8cbc8 design: add scenarios of ML Platform Building 2021-08-05 10:28:28 +08:00
yangsoon
1a7db89fbd add ocm demo (#1992) 2021-08-04 20:23:56 +08:00
yangsoon
0752244d0b enable policy (#2011) 2021-08-04 18:58:57 +08:00
Jian.Li
5f1d07bfc6 Order Steps by Field Tag (#2022)
* sort by tag

* add test cases for order tag

* parse comments

* fix atrr conflict

* fix bug
2021-08-04 16:30:11 +08:00
junqi.zhai
6405603970 ApplicationContext status patch nothing (#2019)
* applicationcontext_controller.go status deepcopy

* put a space between `//` and comment text

Co-authored-by: 69055 <fuwangZJQ1991>
2021-08-04 15:15:37 +08:00
wyike
13fc4e2b25 rollout controller find sourceRevision (#1989)
* rollout controller use last target as source and add whole process e2e-test

* modify makefile use regex include all rollout related test

* add example

* fix golint

* more wait time

* pending pod may let rollout stock in rollingBatches

* fix docs and tests comments

modify docs example

modify cue and yaml

* less pod in test avoid pod pending
2021-08-03 20:27:11 +08:00
Tianxin Dong
478eb69b31 Fix(lint): fix lint and typo in oam testutil (#2017) 2021-08-03 20:01:43 +08:00
Somefive
2aa31a9f2b [Vela CLI Tool] Add vela def (#1949)
* add vela edit

* vela def group commands

* 1. change scheme of definition cue
2. add vela def tests
3. reformat

* fix render template bugs

* add definition examples (migrated from serverless iac)

* retrigger github ci

Co-authored-by: Yin Da <yinda@B-2943Q05P-1738.local>
2021-08-03 18:00:49 +08:00
Jianbo Sun
e3edde44af disable metrics server port in tests and add log for rollout (#2012) 2021-08-03 14:53:38 +08:00
Shaowen Chen
af1e9dc195 bugfix: workload namespace is empty while sync appdeployment (#2009)
Signed-off-by: shaowenchen <mail@chenshaowen.com>
2021-08-03 13:23:38 +08:00
Jianbo Sun
5ddeabb6af fix resource tracker ownerRef override (#2002) 2021-08-03 12:47:59 +08:00
Jianbo Sun
aa87d3da24 upgrade K8s dependency lib to v0.21 (#1985)
* upgrade K8s dependency to v0.21

* update CRD for new version of controller-runtime

* fix ci component revision create must fill Raw in runtime.RawExtension

* try fix test

* start control plane timeout set to 1min and fix tests

* add timeout for env test start and stop

* longer timeout time for BeforeSuit function

* upgrade kubebuilder and k8s cluster version to match with v1.21.2 in github action

* fix test

* fix resource tracker ownerRef override

* update developer guides
2021-08-03 11:30:02 +08:00
Somefive
7a1f95773d Add timeout context for controllers (#1990) 2021-08-02 19:31:00 +08:00
Shaw Ho
d9cd048d79 Fix addRevisionLabel to selector (#1983)
Signed-off-by: Xiaoxi He <tossmilestone@gmail.com>
2021-08-02 16:36:54 +08:00
Somefive
2c2fe4dc66 Bump github.com/containerd/containerd from 1.3.2 to 1.4.8 (#2001)
* Bump github.com/containerd/containerd from 1.3.2 to 1.4.8

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.3.2 to 1.4.8.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.3.2...v1.4.8)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* adapt to new containerd version

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-08-02 13:05:29 +08:00
yangsoon
66644de597 fix func fixOpenAPISchema (#2003) 2021-08-02 13:04:46 +08:00
Yue Wang
b4ebdac5bb quick fix tests (#1999)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
2021-08-02 10:29:31 +08:00
Jian.Li
9d6aaa6044 Workflow Support op.# ApplyComponent and op.#ApplyRemaining (#1993)
* add cap

* workflow

* add docs

* upgrade op.#ApplyComponent

* lint

* bytes to string
2021-07-31 07:14:00 +08:00
Jianbo Sun
b88ac35779 don't filter not found error in load template to avoid panic (#1994)
* should return error if type not found to avoid panic

* don't filter not found error in load template to avoid panic
2021-07-31 07:11:07 +08:00
Jianbo Sun
0a16175523 fix rollout test (#1996) 2021-07-31 00:12:41 +08:00
Jian.Li
53855019d0 fix workflow bug (#1986)
* fix bug

* add test case
2021-07-30 19:40:25 +08:00
Somefive
4eb8f1a0ee suppress dirty logs during import libraries (#1991)
Co-authored-by: Yin Da <yd219913@alibaba-inc.com>
2021-07-30 18:39:34 +08:00
yangsoon
7161959aca add EnvBinding Controller for Multi cluster deploy and Configuration Management (#1968)
* patch env configuration

* add e2e-test
2021-07-30 10:02:51 +08:00
Jian.Li
4481e7637d Optimize Workflow (#1978)
* open op.#Steps

* export

* fmt code

* fix bug & upgrade workflow doc

* fmt

* upgrade test coverage

* upgrade test coverage
2021-07-29 11:35:22 +08:00
wyike
2b1946ee7b already exist is fine (#1979) 2021-07-29 11:16:40 +08:00
wyike
a8c4d5f01e add filter func and related tests (#1976)
trigger CI
2021-07-28 18:50:13 +08:00
qiaozp
de1b84724c add namespace initializer for fluxcd (#1977) 2021-07-28 18:46:06 +08:00
Jianbo Sun
e71d71c6b7 use corev1.ObjectReference insteadof crossplane-runtime TypedReference (#1974)
* refactor crossplane-runtime TypedReference to ObjectReference and make condtion locally

* fix test
2021-07-28 13:59:13 +08:00
Jian.Li
e7041f913f open op.#Steps (#1975) 2021-07-28 13:58:33 +08:00
wyike
3199fd7577 support context.componentRevName in cue template of traitDefinition (#1973)
* add logic and test for component context replace

* add more test

* add comments

* fix comments

* rename context revision name

* add bad revision name test
2021-07-28 10:28:02 +08:00
Jian.Li
a736b1f7b0 Workflow Support Resource GC (#1970)
* gc

* add test cases

* test case
2021-07-27 19:22:05 +08:00
dependabot[bot]
804024599b Bump github.com/gin-gonic/gin from 1.6.3 to 1.7.0 (#1971)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.6.3 to 1.7.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.6.3...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-27 15:09:45 +08:00
Yue Wang
c0144865d2 fix app finalizer bug (#1962)
Signed-off-by: roy wang <seiwy2010@gmail.com>
2021-07-26 14:20:22 +08:00
wyike
5d6ce83174 mechanism let application skip apply the workload (#1963)
* add manageby trait option

* add comments

* fix comments

* fix dryrun test

* add checkfunc in assemble phase

fix lint
2021-07-25 10:18:33 +08:00
chival
6b804acbf5 Fix Initializer bugs & Enhance addon command (#1955)
* enhance `addon enable` command

* fix: initializer requeue twice
fix: initializer won't update status while checking dependency

* not delete ns while disable addon

* add init delete webhook and test

* use poll func

* fix get init logic

* fix get init logic

* fix CI

* fix CI

* unfocus

* check diff

* CI
2021-07-25 10:16:43 +08:00
Zheng Xi Zhou
e62d5d23e7 Update Terraform typed Componentdefinition (#1938)
As Terraform alicloud provider has upgrade to 1.26.0, some
HCL synatx have to been updated
2021-07-23 14:48:32 +08:00
Jian.Li
9d7d2eb262 docs (#1961) 2021-07-23 11:21:48 +08:00
c508cd45c6 allow create application with empty components (#1936) 2021-07-22 19:47:34 +08:00
Hongchao Deng
ed0039e1ee [Feature] CUE Based Workflow Step (#1935)
* Workflow WIP (#1934)

* interface

* add model value

* walk fields

* provider

* stdlin

* tasks

* add stdlib

* Adjust TaskGenerator

* Unified configmap format

* development completed

* fix import cycle

* demo passing

* upgrade action

* add value test cases

* format

* apis

* add context test cases

* fmt

* fmt

* add context to taskGenerator (#1942)

* fix configmap test

* add workflow integration test

* upgrade code

* initial workflow commit

* interface

* add model value

* walk fields

* provider

* stdlin

* tasks

* add stdlib

* Adjust TaskGenerator

* Unified configmap format

* development completed

* fix import cycle

* demo passing

* upgrade action

* add value test cases

* format

* apis

* add context test cases

* fmt

* fmt

* add context to taskGenerator (#1942)

* fix configmap test

* add workflow integration test

* lint code

* improve pkg[value、context] testing coverage

* Improve testing coverage(#1957)

* add license

* add test cases

Co-authored-by: Jian.Li <74582607+leejanee@users.noreply.github.com>
Co-authored-by: Jian.Li <lj176172@alibaba-inc.com>
2021-07-22 18:53:30 +08:00
chival
0b46895211 support helm repo secret (#1943) 2021-07-21 14:52:43 +08:00
yangsoon
5e064219e7 Enhance Initializer: export the phase of Initializer and help install build-in Initializer (#1932)
* add phase for initilaizer

* help install build-in initializer

* add test
2021-07-20 20:40:01 +08:00
wyike
ff6fcd9f10 support component revision based rollout (#1919)
* WIP almost finish main logic

WIP make reviewable

finish manual test

fix rollout plan related test

WIP refactro some logic

WIP finish e2e-test

* fix failed e2e-test

* fix failed interagtion test

* move rollout to trait packege

* modify e2e-test testdata change apiVersion

* add v1alpha1 to scheme in test

* more wait time

* fix comment

* split rollout test

fix makefile

* rename test name

delete equal quata

try to fix

fix

* add more test
2021-07-20 16:53:39 +08:00
Yue Wang
10073df98a fix legacy resource tracker issue (#1931)
Signed-off-by: Yue Wang <seiwy2010@gmail.com>
2021-07-20 14:07:08 +08:00
wangyuan249
d77969b52e Help developer install build-in necessary definitions. (#1907)
* fix

* add install def shell

* change to make command

* fix shell

* fix bak
2021-07-20 14:05:39 +08:00
chival
21cde39c50 Add helm release component definition as part of fluxcd Intializer (#1928)
* 1. change all init namespace to vela-system(make sure depend ref)
2. move componentDef into init
3. remove ns object in auto-gen file
4. remove componentDef from autogen file(already in init)

validate helm chart as componentDef

temp

* rfc: keda/prometheus/terraform-controller using helm-release comp

* fix name style

* rename

* check diff
2021-07-19 17:04:15 +08:00
yangsoon
40a09e5468 skip pkg discover when workload type is autodetect (#1930) 2021-07-19 13:14:23 +08:00
yangsoon
644cafe0a1 fix bug: application can not create component which contains namespace resource (#1920)
* align initializer's namespace to vela-system

* fix makefile

* fix terraform namespace

* add test
2021-07-15 19:53:41 +08:00
Hongchao Deng
ead859b717 design: update workflow implementation details (#1917) 2021-07-14 18:08:56 +08:00
Jian.Li
fcecd0cc8d patchKey support x.y (#1916) 2021-07-14 17:03:50 +08:00
chival
e91deaa4cc Add Prometheus/KEDA as addon (#1915)
* add keda addon

* add promethus addon

* rebase

* add generate namespace.
add prometheus as addon
add keda as addon

* rebase
2021-07-14 16:48:11 +08:00
whichxjy
40171f08bb Support scale controller for StatefulSet (#1901) 2021-07-14 15:45:07 +08:00
chival
07ebca4376 Add open-kruise as addon (#1910)
* verify git repo as source

* Add open-kruise as addon
2021-07-14 15:44:14 +08:00
chival
38cf4c8195 Add terraform controller as built-in addon (#1905)
* add terraform controller as addon

* change addon name to terraform

* fix init controller depends logic

* rebase

* fix CI

* unfocus
2021-07-14 14:38:32 +08:00
wangyuan249
7d711c2f39 self-assign (#1911) 2021-07-13 21:02:55 +08:00
whichxjy
1d76964ca0 Fix the way to ignore errors in shell script (#1902) 2021-07-13 17:15:31 +08:00
yangsoon
af50f32826 add ocm-hub (#1906) 2021-07-13 16:58:46 +08:00
Jian.Li
e972535e49 upgrade workflow design (#1900)
* upgrade workflow design

* Revert "upgrade workflow design"

This reverts commit 95937c94dd.

* revert & upgrade Diagram
2021-07-13 16:55:17 +08:00
chival
87576cc67e Implement addon mechanism (#1867)
* - add: list/enable/disable an addon.

- add: test addon

- add: full flux addon

- fix: flaky test

* try again

* 1. add readme
2. gen demo file

* fix ci

* change name

* try again
2021-07-13 13:03:25 +08:00
Lei Zhang (Harry)
d7950063c3 Align with doc (#1899) 2021-07-12 17:21:14 +08:00
LeoLiuYan
5b6f248152 Feat: no need create appRevision if it already presents in histories (#1896)
* Feat no need create appRevision if it already presents

Signed-off-by: LeoLiuYan <929908264@qq.com>

* Remove some logic

* Fix golint

* Feat add unit test and fix e2e

* Fix unit-test

Signed-off-by: LeoLiuYan <929908264@qq.com>
2021-07-08 23:03:29 +08:00
Chwetion
3016fd1e91 add add observedGeneration field in status of Application to perceive the version difference between status and spec (#1878)
Co-authored-by: chwetion <chwetion@foxmail.com>
2021-07-08 22:31:45 +08:00
wyike
9a3c63a843 override initial replicas of workload in first scale operation (#1891)
* clean up some logic

rebase and reorder phase

add log and modify e2e-test

fix reviwable

fix comment

* fix condition relate comments

finish test func

fix formate error
2021-07-08 19:45:18 +08:00
Hongchao Deng
9e1189c4df Add back workflow design diagram and update doc (#1894)
* update workflow design

* add back diagram

* separate folder

* rebase
2021-07-08 16:42:01 +08:00
Jianbo Sun
e72f5b8d2a fix error links (#1893) 2021-07-08 16:07:21 +08:00
yangsoon
0611c0a79a fix bug: failed to aggregate status if application use a kube/helm type component (#1866)
* fix aggregate status

* add test
2021-07-08 15:16:55 +08:00
LeoLiuYan
3c05232de8 Feat change appHandler scope to package (#1892)
Signed-off-by: LeoLiuYan <929908264@qq.com>
2021-07-08 14:30:52 +08:00
yangsoon
572f7b47bd add image pull policy and pull secrets for worker and webservice (#1887)
* add image pull policy and pull secrets

* fix test
2021-07-08 13:08:54 +08:00
Lei Zhang (Harry)
3d464b6461 Update with workflow inforamtion (#1890) 2021-07-08 10:22:26 +08:00
wyike
14a2f8a7bd dont't template source in rollout and rollout first component (#1888)
* fix rollout and only rollout the first component

* determine rollout component before render

* let other resources apply when target worklaod not ready

* immutable resource only update ownerRef

* add annotation

* fix unit test

add handle sourceWorkload

add anotation

add comment

add more e2e-test

Co-authored-by: 天元 <jianbo.sjb@alibaba-inc.com>
2021-07-06 23:45:52 +08:00
chival
d489cc4b37 fix-logo (#1883) 2021-07-06 20:39:50 +08:00
wangyuan249
cd1fdc8ade Bot add assign ability (#1876)
* add vela robot for issue triage

* fix url for document redirect

* assign description
2021-07-06 20:31:19 +08:00
chival
016becf2be add more test error info (#1886)
fix kustomize registry yaml, fix testdata yaml
2021-07-06 18:58:29 +08:00
Yue Wang
fba53cfbf3 handle ending reconcile with conditions (#1859)
Signed-off-by: roywang <seiwy2010@gmail.com>
2021-07-06 13:54:23 +08:00
Jianbo Sun
4930c2c71f add ingress trait for the new ingress API (#1882) 2021-07-06 13:54:00 +08:00
Jianbo Sun
700b1aa951 remove docs and refer to kubevela.io for docs (#1877)
* remove docs and refer to kubevela.io for docs

* update contirbute docs

* remove unneed github action workflow
2021-07-05 23:36:09 +08:00
Hongchao Deng
fb1eb51e92 Merge pull request #1875 from hongchaodeng/wf-design
workflow design update: CUE based workflow task
2021-07-05 14:56:19 +08:00
Hongchao Deng
071476a04f workflow design update: CUE based workflow task 2021-07-05 14:44:16 +08:00
yangsoon
01ed9a647c TraitDefinition support use insertSecretTo in template to consumer cloud resource (#1849)
* traitdef support insertSecretTo

* add test
2021-07-04 21:40:43 +08:00
Yue Wang
9adf269869 support helm repo secret (#1872)
Signed-off-by: roywang <seiwy2010@gmail.com>
2021-07-04 21:39:48 +08:00
Hongchao Deng
227052f51e Merge pull request #1870 from wonderflow/workflow
improve workflow docs and update API for flexible
2021-07-02 07:45:36 -07:00
天元
facd56fd4f improve workflow docs and update workflow API 2021-07-02 18:06:37 +08:00
yangsoon
c53cebef0a add Fluxcd addon (#1863)
* add fluxcd addon

* fix apiserver
2021-07-02 17:34:02 +08:00
wyike
6d446e13f6 add revision listmit (#1871) 2021-07-02 16:05:00 +08:00
wangyuan249
fc5043c543 add vela robot for issue triage (#1840) 2021-07-02 15:14:51 +08:00
Jianbo Sun
bd41d49311 allow component to defer insert secret and config (#1869) 2021-07-02 15:09:45 +08:00
wyike
4eb33e9239 split out oam-spec v0.2 charts (#1842)
* WIP disable oam related controller and webhok

change velue

fix spell error

change namespace

add e2e for oam-runtime

fix charts hack

fix e2e definition namespace

fix diasble contains list

fix e2e-test

* disable components handler

* fix flaky ac test

add every definition in oam-runtime-system namespace

* upload ac e2e-test

replace files

fix upload reports

* more wait time
2021-07-01 16:32:01 +08:00
Jianbo Sun
75bbd63f9e delete vela restful API (#1864) 2021-07-01 10:16:01 +08:00
whichxjy
be0563a8ea Add deploymentController struct (#1845)
* Init deployment controller

* Support deployment-claiming

* Nitpicking

* Support deployment-scaling

* Support deployment-releasing

* Handle scale errors

* Fix lint

* Log target size

* Fix texts
2021-06-30 21:11:11 +08:00
wyike
9c70edeb77 delet rollout (#1856) 2021-06-30 17:45:32 +08:00
yangsoon
aec9913557 fix invalid metadata.labels error when specify the version of the trait in the app (#1855)
* fix trait name

* add test
2021-06-29 15:53:57 +08:00
chival
22d014d91a Align vela cli and kubectl vela client tools (#1827)
* allow vela CLI to specify NS

* vela up support application yaml

* fix

* add default cap center to vela CLI

* add alias for `vela components`(`vela comp`,or `vela component`) and `vela traits`(`vela trait`)

* fix cap ls STATUS fields are always "uninstalled"

* fix vela up process

* Revert "allow vela CLI to specify NS"

This reverts commit 33f27362

will refactor to use Initializer

* add --discover for vela CLI

* * rfc capcenter to reuse registry type
* change default cap center to oss

* judge if application file in advance

* fix CI

* try CI

* fix error check
2021-06-29 15:52:43 +08:00
chival
2b4d12fbdd Machanism for filter annotation&label passed from Application to workload and trait (#1843)
* Add two filter

* only filter in app->ac and ac->other

* move filter logic to assemble phase

* simplify, add indication

* simplify trim

* add unit test

* clean up testdata
2021-06-28 15:12:03 +08:00
veraicon
b2adf5b472 Create a guide of test level maintainance (#1852)
* Create testcode-guidance.md

* Update contribute/testcode-guidance.md

* Update testcode-guidance.md

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
2021-06-28 15:07:16 +08:00
Anycodes
88933d07d6 Update README.md (#1850) 2021-06-28 13:52:38 +08:00
yangsoon
e176fcfc56 Add the basic ability to initialize a single-cluster environment for the initializer (#1829)
* init Initializer

* update spec

* add status check

* add e2e-test

* fix Initializer version
2021-06-25 18:54:26 +08:00
wyike
93234e8290 fix flaky test (#1841) 2021-06-25 10:32:47 +08:00
Chwetion
b582ccc060 add application component name duplication check in webhook (#1811)
* add application component name duplication check in webhook

* Helm test will not clean up the test data, and the application test of the component with the same name created failed during e2e.

* fix the problems encountered during the test:

* ignore the parsing failure caused by the existing application without definition when checking;

* after the addition is successful, the resources left by the helm test are automatically cleaned up;

Co-authored-by: chwetion <chwetion@foxmail.com>
2021-06-24 16:47:17 +08:00
Yue Wang
5a778b4732 add API v1beta1.ComponentManifest (#1814)
rfc appfile pkg: remove appConfig&component

fix unit test

rfc vela cli dryrun & livediff

fix unit test & e2e test

rfc app controller: remove appConfig&component

fix unit test & e2e test

fix rollout and webhook

fix use AppRevision as others' owner

move ComponentManifest to oam.types

add a util to make conversion between AppConfig and ComponentManifest

complete Component revision mechanism in app controller

add test for component revision

rename

fix unit tests

add clean up for component revision

fix unit test

Signed-off-by: roywang <seiwy2010@gmail.com>
2021-06-24 15:06:58 +08:00
Scaat Feng
8bc63a431f Fix incorrect pod disruptive annotation traits (#1838)
* [FIX]incorrect pod-disruptive defalut configuration in label of traits

* [FIX]incorrect pod-disruptive defalut configuration in annotation of traits

* [FIX]incorrect pod-disruptive defalut configuration in annotation of traits
2021-06-23 19:17:12 +08:00
Scaat Feng
4b120546f0 [FIX]incorrect pod-disruptive defalut configuration in sidecar of traits (#1839) 2021-06-23 18:02:05 +08:00
Scaat Feng
94bc87d03e [FIX]incorrect pod-disruptive defalut configuration in label of traits (#1837) 2021-06-23 18:01:37 +08:00
whichxjy
20ceca4c99 Rename deployment-rollout-controller constructor (#1800)
* Rename deployment-rollout-controller constructor

* Polish test descriptions
2021-06-23 14:03:40 +08:00
Lei Zhang (Harry)
e07c95fa26 Update arch pic (#1828) 2021-06-22 17:38:36 +08:00
Hongchao Deng
c1b5203009 Merge pull request #1824 from wonderflow/prt
add PULL_REQUEST_TEMPLATE.md
2021-06-21 23:11:44 -07:00
wyike
4040c8e67c fix rt flaky test (#1825) 2021-06-22 12:13:35 +08:00
Zheng Xi Zhou
d2a2a9ac07 Bump k8s.io/client-go to v0.18.12 (#1826)
Due to the vulnerability of CVE-2019-11250, bumping version of
client-go to fix it.
2021-06-22 10:59:25 +08:00
天元
5cb5491bc8 add PULL_REQUEST_TEMPLATE.md 2021-06-21 17:12:22 +08:00
chival
f94cf51543 fix some yaml in registry and link to file (#1823)
* fix some yaml in registry and link to file

* try e2e
2021-06-21 14:53:41 +08:00
yangsoon
61d7aff01c fix release website (#1819) 2021-06-19 14:01:01 +08:00
yangsoon
e217e9e0df add autoGenWorkloadDefinition option (#1804)
add autoGenWorkloadDefinition option to choose whether to create workloaddef via webhook
2021-06-18 23:40:12 +08:00
Hongchao Deng
5b332c24d8 add initializer design (#1794)
* add environment design

* update

* update

* update

* add environment impl plan

* rename env -> initializer

* add finalizer logic

* update
2021-06-18 19:11:07 +08:00
wyike
b752511e74 skip finalizer validation (#1815)
add some time to check cloneset replicas

fix flaky test
2021-06-18 14:36:40 +08:00
wyike
70eeec4c89 support restart scale operation by modify targetSize of AppRollout (#1812)
* WIP first commit

fix

* more wait time

* fix flaky test
2021-06-17 22:30:07 +08:00
wyike
d7e1d90585 add specify for rollout and add scale demo (#1813)
fix-formate

fix small issue

small fix

samll fix

small fix
2021-06-17 16:14:44 +08:00
cuiyeshuai
003ab91f51 fix several typos (#1808) 2021-06-16 21:02:37 +08:00
Jianbo Sun
046376aa1a refine our contributing guides (#1807)
* refine our contribute guides

* Update CONTRIBUTING.md

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>

Co-authored-by: Hongchao Deng <hongchaodeng1@gmail.com>
2021-06-16 20:56:19 +08:00
wyike
649e0376cc fix status completed bug (#1802)
refactor to helper and add unit-test

neat imports
2021-06-16 17:24:18 +08:00
Mason Kwok
ed4844d518 remove implementation of vela install (#1798) 2021-06-16 10:03:20 +08:00
wyike
8970c95875 fix missed logic (#1799) 2021-06-15 18:52:37 +08:00
wyike
72bdb04f94 fix deployment example (#1797) 2021-06-15 16:27:39 +08:00
2521 changed files with 315175 additions and 135013 deletions

35
.github/CODEOWNERS vendored Normal file
View File

@@ -0,0 +1,35 @@
# This file is a github code protect rule follow the codeowners https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners#example-of-a-codeowners-file
* @barnettZQG @wonderflow @leejanee @Somefive @jefree-cat @FogDong @wangyikewxgm @chivalryq @anoop2811 @briankane @jguionnet
design/ @barnettZQG @leejanee @wonderflow @Somefive @jefree-cat @FogDong @anoop2811 @briankane @jguionnet
# Owner of Core Controllers
pkg/controller/core.oam.dev @Somefive @FogDong @barnettZQG @wonderflow @wangyikewxgm @chivalryq @anoop2811 @briankane @jguionnet
# Owner of Standard Controllers
pkg/controller/standard.oam.dev @wangyikewxgm @barnettZQG @wonderflow @Somefive @anoop2811 @FogDong @briankane @jguionnet
# Owner of CUE
pkg/cue @leejanee @FogDong @Somefive @anoop2811 @briankane @jguionnet
pkg/stdlib @leejanee @FogDong @Somefive @anoop2811 @briankane @jguionnet
# Owner of Workflow
pkg/workflow @leejanee @FogDong @Somefive @wangyikewxgm @chivalryq @anoop2811 @briankane @jguionnet
# Owner of vela templates
vela-templates/ @Somefive @barnettZQG @wonderflow @FogDong @wangyikewxgm @chivalryq @anoop2811 @briankane @jguionnet
# Owner of vela CLI
references/cli/ @Somefive @StevenLeiZhang @charlie0129 @wangyikewxgm @chivalryq @anoop2811 @FogDong @briankane @jguionnet
# Owner of vela addon framework
pkg/addon/ @wangyikewxgm @wonderflow @charlie0129 @anoop2811 @FogDong @briankane @jguionnet
# Owner of resource keeper and tracker
pkg/resourcekeeper @Somefive @FogDong @chivalryq @anoop2811 @briankane @jguionnet
pkg/resourcetracker @Somefive @FogDong @chivalryq @anoop2811 @briankane @jguionnet
.github/ @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @briankane @jguionnet
makefiles @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @briankane @jguionnet
go.* @chivalryq @wonderflow @Somefive @FogDong @wangyikewxgm @anoop2811 @briankane @jguionnet

View File

@@ -15,9 +15,9 @@ A clear and concise description of what the bug is.
**To Reproduce**
<!--
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
1. The YAML files of Component/Trait I used.
2. The YAML file of Application I applied.
3. Other operations I have done.
4. See error
-->
@@ -31,6 +31,12 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.
-->
**KubeVela Version**
<!--
Describe your KubeVela controller or CLI version information.
-->
**Cluster information**
<!--
Describe your kubernetes cluster information.

39
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,39 @@
### Description of your changes
copilot:all
<!--
Briefly describe what this pull request does. We love pull requests that resolve an open KubeVela issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":
-->
Fixes #
I have:
- [ ] Read and followed KubeVela's [contribution process](https://github.com/kubevela/kubevela/blob/master/contribute/create-pull-request.md).
- [ ] [Related Docs](https://github.com/kubevela/kubevela.io) updated properly. In a new feature or configuration option, an update to the documentation is necessary.
- [ ] Run `make reviewable` to ensure this PR is ready for review.
- [ ] Added `backport release-x.y` labels to auto-backport this PR if necessary.
### How has this code been tested
<!--
Before reviewers can be confident in the correctness of this pull request, it
needs to tested and shown to be correct. Briefly describe the testing that has
already been done or which is planned for this change.
-->
### Special notes for your reviewer
<!--
Be sure to direct your reviewers'
attention to anything that needs special consideration.
-->

View File

@@ -0,0 +1,35 @@
# Deploy Current Branch Action
This GitHub composite action builds a Docker image from the current branch commit and deploys it to a KubeVela cluster for development testing.
## What it does
- Generates a unique image tag from the latest commit hash
- Builds and loads the Docker image into a KinD cluster
- Applies KubeVela CRDs for upgrade safety
- Upgrades the KubeVela Helm release to use the local development image
- Verifies deployment status and the running image version
## Usage
```yaml
- name: Deploy Current Branch
uses: ./path/to/this/action
```
## Requirements
- Docker, Helm, kubectl, and KinD must be available in your runner environment
- Kubernetes cluster access
- `charts/vela-core/crds` directory with CRDs
- Valid Helm chart at `charts/vela-core`
## Steps performed
1. **Generate commit hash for image tag**
2. **Build & load Docker image into KinD**
3. **Pre-apply chart CRDs**
4. **Upgrade KubeVela using local image**
5. **Verify deployment and image version**
---

View File

@@ -0,0 +1,89 @@
name: 'Deploy Current Branch'
description: 'Builds Docker image from current branch commit and deploys it to KubeVela cluster for development testing'
runs:
using: "composite"
steps:
# ========================================================================
# Git Commit Hash Generation
# Generate unique image tag from current branch's latest commit
# ========================================================================
- name: Get commit hash
id: commit_hash
shell: bash
run: |
COMMIT_HASH="git-$(git rev-parse --short HEAD)"
echo "Using commit hash: $COMMIT_HASH"
echo "COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
# ========================================================================
# Docker Image Build and Cluster Loading
# Build development image from current code and load into KinD cluster
# ========================================================================
- name: Build and load Docker image
shell: bash
run: |
echo "Building development image: vela-core-test:${{ env.COMMIT_HASH }}"
mkdir -p $HOME/tmp/
docker build --no-cache \
-t vela-core-test:${{ env.COMMIT_HASH }} \
-f Dockerfile .
echo "Loading image into KinD cluster..."
TMPDIR=$HOME/tmp/ kind load docker-image vela-core-test:${{ env.COMMIT_HASH }}
# ========================================================================
# Custom Resource Definitions Application
# Pre-apply CRDs to ensure upgrade compatibility and prevent conflicts
# ========================================================================
- name: Pre-apply CRDs from target chart (upgrade-safe)
shell: bash
run: |
CRD_DIR="charts/vela-core/crds"
echo "Applying CRDs idempotently..."
kubectl apply -f "${CRD_DIR}"
# ========================================================================
# KubeVela Helm Chart Upgrade
# Upgrade existing installation to use locally built development image
# ========================================================================
- name: Upgrade KubeVela to development image
shell: bash
run: |
echo "Upgrading KubeVela to development version..."
helm upgrade kubevela ./charts/vela-core \
--namespace vela-system \
--set image.repository=vela-core-test \
--set image.tag=${{ env.COMMIT_HASH }} \
--set image.pullPolicy=IfNotPresent \
--timeout 5m \
--wait \
--debug
# ========================================================================
# Deployment Status Verification
# Verify successful upgrade and confirm correct image deployment
# ========================================================================
- name: Verify deployment status
shell: bash
run: |
echo "=== DEPLOYMENT VERIFICATION ==="
echo "Verifying upgrade to local development image..."
echo "--- Pod Status ---"
kubectl get pods -n vela-system
echo "--- Deployment Rollout ---"
kubectl rollout status deployment/kubevela-vela-core \
-n vela-system \
--timeout=300s
echo "--- Deployed Image Version ---"
kubectl get deployment kubevela-vela-core \
-n vela-system \
-o yaml | grep "image:" | head -1
echo "Deployment verification completed successfully!"

View File

@@ -0,0 +1,32 @@
# Install Latest KubeVela Release Action
This GitHub composite action installs the latest stable KubeVela release from the official Helm repository and verifies its deployment status.
## What it does
- Discovers the latest stable KubeVela release tag from GitHub
- Adds and updates the official KubeVela Helm chart repository
- Installs KubeVela into the `vela-system` namespace (using Helm)
- Verifies pod status and deployment rollout for successful installation
## Usage
```yaml
- name: Install Latest KubeVela Release
uses: ./path/to/this/action
```
## Requirements
- Helm, kubectl, jq, and curl must be available in your runner environment
- Kubernetes cluster access
## Steps performed
1. **Release Tag Discovery:** Fetches latest stable tag (without `v` prefix)
2. **Helm Repo Setup:** Adds/updates KubeVela Helm chart repo
3. **Install KubeVela:** Installs latest release in the `vela-system` namespace
4. **Status Verification:** Checks pod status and rollout for readiness
---

View File

@@ -0,0 +1,68 @@
name: 'Install Latest KubeVela Release'
description: 'Installs the latest stable KubeVela release from official Helm repository with status verification'
runs:
using: "composite"
steps:
# ========================================================================
# Latest Release Tag Discovery
# Fetch current stable release version from GitHub API
# ========================================================================
- name: Get latest KubeVela release tag (no v prefix)
id: get_latest_tag
shell: bash
run: |
TAG=$(curl -s https://api.github.com/repos/kubevela/kubevela/releases/latest | \
jq -r ".tag_name" | \
awk '{sub(/^v/, ""); print}')
echo "LATEST_TAG=$TAG" >> $GITHUB_ENV
echo "Discovered latest release: $TAG"
# ========================================================================
# Helm Repository Configuration
# Add and update official KubeVela chart repository
# ========================================================================
- name: Add KubeVela Helm repo
shell: bash
run: |
echo "Adding KubeVela Helm repository..."
helm repo add kubevela https://kubevela.github.io/charts
helm repo update
echo "Helm repository configuration completed"
# ========================================================================
# KubeVela Stable Release Installation
# Deploy latest stable version to vela-system namespace
# ========================================================================
- name: Install KubeVela ${{ env.LATEST_TAG }}
shell: bash
run: |
echo "Installing KubeVela version: ${{ env.LATEST_TAG }}"
helm install \
--create-namespace \
-n vela-system \
kubevela kubevela/vela-core \
--version ${{ env.LATEST_TAG }} \
--timeout 10m \
--wait
echo "KubeVela installation completed"
# ========================================================================
# Installation Status Verification
# Verify successful deployment and readiness of KubeVela components
# ========================================================================
- name: Post-install status
shell: bash
run: |
echo "=== INSTALLATION VERIFICATION ==="
echo "Verifying KubeVela deployment status..."
echo "--- Pod Status ---"
kubectl get pods -n vela-system
echo "--- Deployment Rollout ---"
kubectl rollout status deployment/kubevela-vela-core \
-n vela-system \
--timeout=300s
echo "KubeVela installation verification completed successfully!"

51
.github/actions/e2e-test/README.md vendored Normal file
View File

@@ -0,0 +1,51 @@
# Kubevela K8s Upgrade E2E Test Action
A comprehensive GitHub composite action for running KubeVela Kubernetes upgrade end-to-end (E2E) tests with complete environment setup, multiple test suites, and failure diagnostics.
> **Note**: This action requires the `GO_VERSION` environment variable to be set in your workflow.
## Quick Start
### Basic Usage
```yaml
name: E2E Tests
on: [push, pull_request]
jobs:
e2e-tests:
runs-on: ubuntu-latest
env:
GO_VERSION: '1.23.8'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run KubeVela E2E Tests
uses: ./.github/actions/upgrade-e2e-test
```
## Test Flow Diagram
```
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Environment │ │ E2E Environment │ │ Test Execution │
│ Setup │───▶│ Preparation │───▶│ (3 Suites) │
│ │ │ │ │ │
│ • Install tools │ │ • Cleanup │ │ • API tests │
│ • Setup Go │ │ • Core setup │ │ • Addon tests │
│ • Dependencies │ │ • Helm tests │ │ • General tests │
│ • Build project │ │ │ │ │
└─────────────────┘ └──────────────────┘ └─────────────────┘
┌─────────────────┐
│ Diagnostics │
│ (On Failure) │
│ │
│ • Cluster logs │
│ • System events │
│ • Test artifacts│
└─────────────────┘
```

100
.github/actions/e2e-test/action.yaml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: 'Kubevela K8s Upgrade e2e Test'
description: 'Runs Kubevela K8s upgrade e2e tests, uploads coverage, and collects diagnostics on failure.'
inputs:
codecov-token:
description: 'Codecov token for uploading coverage reports'
required: false
default: ''
codecov-enable:
description: 'Enable codecov coverage upload'
required: false
default: 'false'
runs:
using: "composite"
steps:
# ========================================================================
# Environment Setup
# ========================================================================
- name: Configure environment setup
uses: ./.github/actions/env-setup
with:
install-ginkgo: 'true'
install-setup-envtest: 'false'
install-kustomize: 'false'
- name: Build project
shell: bash
run: make
# ========================================================================
# E2E Test Environment Preparation
# ========================================================================
- name: Prepare e2e environment
shell: bash
run: |
echo "Preparing e2e test environment..."
make e2e-cleanup
make e2e-setup-core
echo "Running Helm tests..."
helm test -n vela-system kubevela --timeout 5m
# ========================================================================
# E2E Test Execution
# ========================================================================
- name: Run API e2e tests
shell: bash
run: |
echo "Running API e2e tests..."
make e2e-api-test
- name: Run addon e2e tests
shell: bash
run: |
echo "Running addon e2e tests..."
make e2e-addon-test
- name: Run general e2e tests
shell: bash
run: |
echo "Running general e2e tests..."
make e2e-test
- name: Upload coverage report
if: ${{ inputs.codecov-enable == 'true' }}
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
with:
token: ${{ inputs.codecov-token }}
files: ./coverage.txt
flags: core-unittests
name: codecov-umbrella
fail_ci_if_error: false
# ========================================================================
# Failure Diagnostics
# ========================================================================
- name: Collect failure diagnostics
if: failure()
shell: bash
run: |
echo "=== FAILURE DIAGNOSTICS ==="
echo "Collecting diagnostic information for debugging..."
echo "--- Cluster Status ---"
kubectl get nodes -o wide || true
kubectl get pods -A || true
echo "--- KubeVela System Logs ---"
kubectl logs -n vela-system -l app.kubernetes.io/name=vela-core --tail=100 || true
echo "--- Recent Events ---"
kubectl get events -A --sort-by='.lastTimestamp' --field-selector type!=Normal || true
echo "--- Helm Release Status ---"
helm list -A || true
helm status kubevela -n vela-system || true
echo "--- Test Artifacts ---"
find . -name "*.log" -type f -exec echo "=== {} ===" \; -exec cat {} \; || true

67
.github/actions/env-setup/README.md vendored Normal file
View File

@@ -0,0 +1,67 @@
# Kubevela Test Environment Setup Action
A GitHub Actions composite action that sets up a complete testing environment for Kubevela projects with Go, Kubernetes tools, and the Ginkgo testing framework.
## Features
- 🛠️ **System Dependencies**: Installs essential build tools (make, gcc, jq, curl, etc.)
- ☸️ **Kubernetes Tools**: Sets up kubectl and Helm for cluster operations
- 🐹 **Go Environment**: Configurable Go version with module caching
- 📦 **Dependency Management**: Downloads and verifies Go module dependencies
- 🧪 **Testing Framework**: Installs Ginkgo v2 for BDD-style testing
## Usage
```yaml
- name: Setup Kubevela Test Environment
uses: ./path/to/this/action
with:
go-version: '1.23.8' # Optional: Go version (default: 1.23.8)
```
### Example Workflow
```yaml
name: Kubevela Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Test Environment
uses: ./path/to/this/action
with:
go-version: '1.21'
- name: Run Tests
run: |
ginkgo -r ./tests/e2e/
```
## Inputs
| Input | Description | Required | Default | Usage |
|-------|-------------|----------|---------|-------|
| `go-version` | Go version to install and use | No | `1.23.8` | Specify Go version for your project |
## What This Action Installs
### System Tools
- **make**: Build automation tool
- **gcc**: GNU Compiler Collection
- **jq**: JSON processor for shell scripts
- **ca-certificates**: SSL/TLS certificates
- **curl**: HTTP client for downloads
- **gnupg**: GNU Privacy Guard for security
### Kubernetes Ecosystem
- **kubectl**: Kubernetes command-line tool (latest stable)
- **helm**: Kubernetes package manager (latest stable)
### Go Development
- **Go Runtime**: Specified version with module caching enabled
- **Go Modules**: Downloaded and verified dependencies
- **Ginkgo v2.14.0**: BDD testing framework for Go

120
.github/actions/env-setup/action.yaml vendored Normal file
View File

@@ -0,0 +1,120 @@
name: 'Kubevela Test Environment Setup'
description: 'Sets up complete testing environment for Kubevela with Go, Kubernetes tools, and testing frameworks.'
inputs:
go-version:
description: 'Go version to use for testing'
required: false
default: '1.23.8'
install-ginkgo:
description: 'Install Ginkgo testing framework'
required: false
default: 'true'
install-setup-envtest:
description: 'Install setup-envtest for integration testing'
required: false
default: 'false'
install-kustomize:
description: 'Install kustomize for manifest management'
required: false
default: 'false'
kustomize-version:
description: 'Kustomize version to install'
required: false
default: '4.5.4'
runs:
using: 'composite'
steps:
# ========================================================================
# Environment Setup
# ========================================================================
- name: Install system dependencies
shell: bash
run: |
# Update package manager and install essential tools
sudo apt-get update
sudo apt-get install -y \
make \
gcc \
jq \
ca-certificates \
curl \
gnupg
- name: Install kubectl and helm
shell: bash
run: |
# Detect architecture
ARCH=$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')
# Install kubectl using a known stable version to avoid network issues
# The dl.k8s.io/release/stable.txt endpoint can return garbage due to CDN issues
KUBECTL_VERSION="v1.31.0"
echo "Installing kubectl version: $KUBECTL_VERSION for architecture: $ARCH"
curl -LO --retry 3 --fail "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
# Install helm using the official script
echo "Installing Helm using official script..."
curl -fsSL --retry 3 -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
rm get_helm.sh
# Verify installations
echo "Verifying installations..."
kubectl version --client
helm version
- name: Setup Go environment
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32
with:
go-version: ${{ inputs.go-version }}
cache: true
- name: Download Go dependencies
shell: bash
run: |
# Download and cache Go module dependencies
go mod download
go mod verify
- name: Install Ginkgo testing framework
if: ${{ inputs.install-ginkgo == 'true' }}
shell: bash
run: |
echo "Installing Ginkgo testing framework..."
go install github.com/onsi/ginkgo/v2/ginkgo@v2.14.0
echo "Ginkgo installed successfully"
- name: Install setup-envtest
if: ${{ inputs.install-setup-envtest == 'true' }}
shell: bash
run: |
echo "Installing setup-envtest for integration testing..."
mkdir -p ./bin
GOBIN=$(pwd)/bin go install sigs.k8s.io/controller-runtime/tools/setup-envtest@v0.0.0-20240522175850-2e9781e9fc60
echo "setup-envtest installed successfully at ./bin/setup-envtest"
ls -la ./bin/setup-envtest
# Download and cache the Kubernetes binaries for envtest
echo "Downloading Kubernetes binaries for envtest..."
KUBEBUILDER_ASSETS=$(./bin/setup-envtest use 1.31.0 --bin-dir ./bin -p path)
echo "Kubernetes binaries downloaded successfully"
echo "KUBEBUILDER_ASSETS=${KUBEBUILDER_ASSETS}"
# Export for subsequent steps
echo "KUBEBUILDER_ASSETS=${KUBEBUILDER_ASSETS}" >> $GITHUB_ENV
- name: Install kustomize
if: ${{ inputs.install-kustomize == 'true' }}
shell: bash
run: |
echo "Installing kustomize version ${{ inputs.kustomize-version }}..."
mkdir -p ./bin
curl -sS https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh | bash -s ${{ inputs.kustomize-version }} $(pwd)/bin
echo "kustomize installed successfully at ./bin/kustomize"
./bin/kustomize version

View File

@@ -0,0 +1,35 @@
# Kubevela K8s Upgrade Multicluster E2E Test Action
A comprehensive GitHub Actions composite action for running Kubevela Kubernetes upgrade multicluster end-to-end tests with automated coverage reporting and failure diagnostics.
## Usage
```yaml
name: Kubevela Multicluster E2E Tests
on:
push:
branches: [main, develop]
pull_request:
branches: [main]
jobs:
multicluster-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Multicluster E2E Tests
uses: ./.github/actions/multicluster-test
with:
codecov-enable: 'true'
codecov-token: ${{ secrets.CODECOV_TOKEN }}
```
## Inputs
| Input | Description | Required | Default | Type |
|-------|-------------|----------|---------|------|
| `codecov-token` | Codecov token for uploading coverage reports | No | `''` | string |
| `codecov-enable` | Enable codecov coverage upload | No | `'false'` | string |

View File

@@ -0,0 +1,80 @@
name: 'Kubevela K8s Upgrade Multicluster E2E Test'
description: 'Runs Kubevela Kubernetes upgrade multicluster end-to-end tests, uploads coverage, and collects diagnostics on failure.'
author: 'viskumar_gwre'
inputs:
codecov-token:
description: 'Codecov token for uploading coverage reports'
required: false
default: ''
codecov-enable:
description: 'Enable codecov coverage upload'
required: false
default: 'false'
runs:
using: 'composite'
steps:
# ========================================================================
# Environment Setup
# ========================================================================
- name: Configure environment setup
uses: ./.github/actions/env-setup
with:
install-ginkgo: 'true'
install-setup-envtest: 'false'
install-kustomize: 'false'
# ========================================================================
# E2E Test Execution
# ========================================================================
- name: Prepare e2e test environment
shell: bash
run: |
# Build CLI tools and prepare test environment
echo "Building KubeVela CLI..."
make vela-cli
echo "Cleaning up previous test artifacts..."
make e2e-cleanup
echo "Setting up core authentication for e2e tests..."
make e2e-setup-core-auth
- name: Execute multicluster upgrade e2e tests
shell: bash
run: |
# Add built CLI to PATH and run multicluster tests
export PATH=$(pwd)/bin:$PATH
echo "Running e2e multicluster upgrade tests..."
make e2e-multicluster-test
- name: Upload coverage report
if: ${{ inputs.codecov-enable == 'true' }}
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
with:
token: ${{ inputs.codecov-token }}
files: /tmp/e2e-profile.out,/tmp/e2e_multicluster_test.out
flags: e2e-multicluster-test
name: codecov-umbrella
# ========================================================================
# Failure Diagnostics
# ========================================================================
- name: Collect failure diagnostics
if: failure()
shell: bash
run: |
echo "=== FAILURE DIAGNOSTICS ==="
echo "Collecting diagnostic information for debugging..."
echo "--- Cluster Status ---"
kubectl get nodes -o wide || true
kubectl get pods -A || true
echo "--- KubeVela System Logs ---"
kubectl logs -n vela-system -l app.kubernetes.io/name=vela-core --tail=100 || true
echo "--- Recent Events ---"
kubectl get events -A --sort-by='.lastTimestamp' --field-selector type!=Normal || true

View File

@@ -0,0 +1,78 @@
# Setup Kind Cluster Action
A GitHub Action that sets up a Kubernetes testing environment using Kind (Kubernetes in Docker) for E2E testing.
## Inputs
| Input | Description | Required | Default |
|-------|-------------|----------|---------|
| `k8s-version` | Kubernetes version for the kind cluster | No | `v1.31.9` |
## Quick Start
```yaml
name: E2E Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Setup Kind Cluster
uses: ./.github/actions/setup-kind-cluster
with:
k8s-version: 'v1.31.9'
- name: Run tests
run: |
kubectl cluster-info
make test-e2e
```
## What it does
1. **Installs Kind CLI** - Downloads Kind v0.29.0 using Go
2. **Cleans up** - Removes any existing Kind clusters
3. **Creates cluster** - Spins up Kubernetes v1.31.9 cluster
4. **Sets up environment** - Configures KUBECONFIG for kubectl access
5. **Loads images** - Builds and loads Docker images using `make image-load`
## File Structure
Save as `.github/actions/setup-kind-cluster/action.yaml`:
```yaml
name: 'SetUp kind cluster'
description: 'Sets up complete testing environment for Kubevela with Go, Kubernetes tools, and Ginkgo framework for E2E testing.'
inputs:
k8s-version:
description: 'Kubernetes version for the kind cluster'
required: false
default: 'v1.31.9'
runs:
using: 'composite'
steps:
# ========================================================================
# Kind cluster Setup
# ========================================================================
- name: Setup KinD
run: |
go install sigs.k8s.io/kind@v0.29.0
kind delete cluster || true
kind create cluster --image=kindest/node:${{ inputs.k8s-version }}
shell: bash
- name: Load image
run: |
mkdir -p $HOME/tmp/
TMPDIR=$HOME/tmp/ make image-load
shell: bash
```

View File

@@ -0,0 +1,36 @@
name: 'SetUp kind cluster'
description: 'Sets up a KinD (Kubernetes in Docker) cluster with configurable Kubernetes version and optional cluster naming for testing and development workflows.'
inputs:
k8s-version:
description: 'Kubernetes version for the kind cluster'
required: false
default: 'v1.31.9'
name:
description: 'Name of the kind cluster'
required: false
runs:
using: 'composite'
steps:
# ========================================================================
# Kind cluster Setup
# ========================================================================
- name: Setup KinD
run: |
go install sigs.k8s.io/kind@v0.29.0
if [ -n "${{ inputs.name }}" ]; then
kind delete cluster --name="${{ inputs.name }}" || true
kind create cluster --name="${{ inputs.name }}" --image=kindest/node:${{ inputs.k8s-version }}
kind export kubeconfig --internal --name="${{ inputs.name }}" --kubeconfig /tmp/${{ inputs.name }}.kubeconfig
else
kind delete cluster || true
kind create cluster --image=kindest/node:${{ inputs.k8s-version }}
fi
shell: bash
- name: Load image
run: |
if [ -z "${{ inputs.name }}" ]; then
mkdir -p $HOME/tmp/
TMPDIR=$HOME/tmp/ make image-load
fi
shell: bash

34
.github/actions/unit-test/README.md vendored Normal file
View File

@@ -0,0 +1,34 @@
# Kubevela K8s Upgrade Unit Test Action
A comprehensive GitHub composite action for running KubeVela Kubernetes upgrade unit tests with coverage reporting and failure diagnostics.
## Inputs
| Input | Description | Required | Default |
|-------|-------------|----------|---------|
| `codecov-token` | Codecov token for uploading coverage reports | ❌ | `''` |
| `codecov-enable` | Enable Codecov coverage upload (`'true'` or `'false'`) | ❌ | `'false'` |
| `go-version` | Go version to use for testing | ❌ | `'1.23.8'` |
## Quick Start
### Basic Usage
```yaml
name: Unit Tests with Coverage
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run KubeVela Unit Tests
uses: viskumar_gwre/kubevela-k8s-upgrade-unit-test-action@v1
with:
codecov-enable: 'true'
codecov-token: ${{ secrets.CODECOV_TOKEN }}
go-version: '1.23.8'
```

71
.github/actions/unit-test/action.yaml vendored Normal file
View File

@@ -0,0 +1,71 @@
name: 'Kubevela K8s Upgrade Unit Test'
description: 'Runs Kubevela K8s upgrade unit tests, uploads coverage, and collects diagnostics on failure.'
inputs:
codecov-token:
description: 'Codecov token for uploading coverage reports'
required: false
default: ''
codecov-enable:
description: 'Enable codecov coverage upload'
required: false
default: 'false'
runs:
using: "composite"
steps:
# ========================================================================
# Environment Setup
# ========================================================================
- name: Configure environment setup
uses: ./.github/actions/env-setup
with:
install-ginkgo: 'true'
install-setup-envtest: 'true'
install-kustomize: 'true'
# ========================================================================
# Unit Test Execution
# ========================================================================
- name: Run unit tests
shell: bash
run: |
echo "Running unit tests..."
make test
- name: Upload coverage report
if: ${{ inputs.codecov-enable == 'true' }}
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24
with:
token: ${{ inputs.codecov-token }}
files: ./coverage.txt
flags: core-unittests
name: codecov-umbrella
fail_ci_if_error: false
# ========================================================================
# Failure Diagnostics
# ========================================================================
- name: Collect failure diagnostics
if: failure()
shell: bash
run: |
echo "=== FAILURE DIAGNOSTICS ==="
echo "Collecting diagnostic information for debugging..."
echo "--- Go Environment ---"
go version || true
go env || true
echo "--- Cluster Status ---"
kubectl get nodes -o wide || true
kubectl get pods -A || true
echo "--- KubeVela System Logs ---"
kubectl logs -n vela-system -l app.kubernetes.io/name=vela-core --tail=100 || true
echo "--- Recent Events ---"
kubectl get events -A --sort-by='.lastTimestamp' --field-selector type!=Normal || true
echo "--- Test Artifacts ---"
find . -name "*.log" -o -name "*test*.xml" -o -name "coverage.*" | head -20 || true

31
.github/bot.md vendored Normal file
View File

@@ -0,0 +1,31 @@
### GitHub & kubevela automation
The bot is configured via [issue-commands.json](https://github.com/kubevela/kubevela/blob/master/.github/issue-commands.json)
and some other GitHub [workflows](https://github.com/kubevela/kubevela/blob/master/.github/workflows).
By default, users with write access to the repo is allowed to use the comments,
the [userlist](https://github.com/kubevela/kubevela/blob/master/.github/comment.userlist)
file is for adding additional members who do not have access and want to contribute to the issue triage.
Comment commands:
* Write the word `/needsInvestigation` in a comment, and the bot will add the corresponding label.
* Write the word `/needsMoreInfo` in a comment, and the bot will add the correct label and standard message.
* Write the word `/duplicate #<number>` to have `type/duplicate` label, the issue number is required for remind where is the other issue.
* Write the word `/type/*` in a comment, and the bot will add the corresponding label `/type/*`.
* Write the word `/area/*` in a comment, and the bot will add the corresponding label `/area/*`.
* Write the word `/priority/*` in a comment, and the bot will add the corresponding label `/priority/*`.
The `*` mention above represent a specific word. Please read the details about label category in [ISSUE_TRIAGE.md](https://github.com/kubevela/kubevela/blob/master/ISSUE_TRIAGE.md)
Label commands:
* Add label `bot/question` the bot will close with standard question message and add label `type/question`
* Add label `bot/needs more info` for bot to request more info (or use comment command mentioned above)
* Add label `bot/no new info` for bot to close an issue where we asked for more info but has not received any updates in at least 14 days.
* Add label `bot/duplicate` to have `type/duplicate` label & the bot will close issue with an appropriate message.
* Add label `bot/close feature request` for bot to close a feature request with standard message.
Assign:
When you participating in an issue area, and you want to assign to others
to distribute this task or self-assign to give a solution. You can use the comment bellow.
* Write the word `/assign githubname` in a comment, the robot will automatically assign to the corresponding person.
* Specially, write the word `/assign` in a comment, you can assgin this task to yourself.

17
.github/comment.userlist vendored Normal file
View File

@@ -0,0 +1,17 @@
resouer
wonderflow
hongchaodeng
zzxwill
ryanzhang-oss
captainroy-hy
wangyikewxgm
BinaryHB0916
yangsoon
wangyuan249
chivalryq
FogDong
leejanee
barnettZQG
anoop2811
briankane
jguionnet

23
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "gomod" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
commit-message:
prefix: "Chore: "
include: "scope"
ignore:
- dependency-name: k8s.io/*
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "Chore: "
include: "scope"

153
.github/issue-commands.json vendored Normal file
View File

@@ -0,0 +1,153 @@
[
{
"type": "comment",
"name": "needsMoreInfo",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "needs more info"
},
{
"type": "comment",
"name": "needsInvestigation",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "needs investigation"
},
{
"type": "comment",
"name": "assign",
"allowUsers": ["*"]
},
{
"type": "comment",
"name": "type/bug",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "type/bug"
},
{
"type": "comment",
"name": "type/docs",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "type/docs"
},
{
"type": "comment",
"name": "type/enhancement",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "type/enhancement"
},
{
"type": "comment",
"name": "priority/critical",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "priority/critical"
},
{
"type": "comment",
"name": "priority/important-soon",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "priority/important-soon"
},
{
"type": "comment",
"name": "priority/important-longterm",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "priority/important-longterm"
},
{
"type": "comment",
"name": "priority/nice-to-have",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "priority/nice-to-have"
},
{
"type": "comment",
"name": "priority/awaiting-more-evidence",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "priority/awaiting-more-evidence"
},
{
"type": "comment",
"name": "priority/unscheduled",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "priority/unscheduled"
},
{
"type": "comment",
"name": "area/appconfig",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "area/appconfig"
},
{
"type": "comment",
"name": "area/application",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "area/application"
},
{
"type": "comment",
"name": "area/component",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "area/component"
},
{
"type": "comment",
"name": "area/controller",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "area/controller"
},
{
"type": "comment",
"name": "area/cue",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "area/cue"
},
{
"type": "comment",
"name": "area/trait",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "area/trait"
},
{
"type": "comment",
"name": "duplicate",
"allowUsers": [],
"action": "updateLabels",
"addLabel": "type/duplicate"
},
{
"type": "label",
"name": "bot/duplicate",
"addLabel": "type/duplicate",
"removeLabel": "bot/duplicate",
"action": "close",
"comment": "Thanks for creating this issue! It looks like this has already been reported by another user. Weve closed this in favor of the existing one. Please consider adding any details you think is missing to that issue.\n\nTo avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
},
{
"type": "label",
"name": "bot/no new info",
"action": "close",
"comment": "We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/oam-dev/kubevela/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
},
{
"type": "label",
"name": "bot/close feature request",
"action": "close",
"comment": "This feature request has been open for a long time with few received upvotes or comments, so we are closing it. We're trying to limit open GitHub issues in order to better track planned work and features. \r\n\r\nThis doesn't mean that we'll never ever implement it or that we will never accept a PR for it. A closed issue can still attract upvotes and act as a ticket to track feature demand\/interest. \r\n\r\nThank You to you for taking the time to create this issue!"
}
]

10
.github/pr-title-checker-config.json vendored Normal file
View File

@@ -0,0 +1,10 @@
{
"LABEL": {
"name": "title-needs-formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": ["Fix: ", "Feat: ", "Docs: ", "Test: ", "Chore: ", "CI: ", "Perf: ", "Refactor: ", "Revert: ", "Style: ", "Test: ",
"Fix(", "Feat(", "Docs(", "Test(", "Chore(", "CI(", "Perf(", "Refactor(", "Revert(", "Style(", "Test(", "[Backport"]
}
}

28
.github/workflows/back-port.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Backport
on:
pull_request_target:
types:
- closed
permissions:
contents: read
jobs:
# align with crossplane's choice https://github.com/crossplane/crossplane/blob/master/.github/workflows/backport.yml
open-pr:
runs-on: ubuntu-22.04
if: github.event.pull_request.merged
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@0193454f0c5947491d348f33a275c119f30eb736
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}

67
.github/workflows/chart.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
name: Publish Chart
on:
push:
tags:
- "v*"
workflow_dispatch: { }
permissions:
contents: read
jobs:
publish-charts:
env:
HELM_CHARTS_DIR: charts
HELM_CHART: charts/vela-core
HELM_CHART_NAME: vela-core
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Get git revision
id: vars
shell: bash
run: |
echo "git_revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Install Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78
with:
version: v3.4.0
- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: '14'
- name: Generate helm doc
run: |
make helm-doc-gen
- name: Get the version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Tag helm chart image
run: |
image_tag=${{ steps.get_version.outputs.VERSION }}
chart_version=${{ steps.get_version.outputs.VERSION }}
sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
chart_smever=${chart_version#"v"}
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
- uses: jnwng/github-app-installation-token-action@c54add4c02866dc41e106745ac6dcf5cdd6339e5 # v2
id: get_app_token
with:
appId: 340472
installationId: 38064967
privateKey: ${{ secrets.GH_KUBEVELA_APP_PRIVATE_KEY }}
- name: Sync Chart Repo
run: |
git config --global user.email "135009839+kubevela[bot]@users.noreply.github.com"
git config --global user.name "kubevela[bot]"
git clone https://x-access-token:${{ steps.get_app_token.outputs.token }}@github.com/kubevela/charts.git kubevela-charts
helm package $HELM_CHART --destination ./kubevela-charts/docs/
helm repo index --url https://kubevela.github.io/charts ./kubevela-charts/docs/
cd kubevela-charts/
git add docs/
chart_version=${{ steps.get_version.outputs.VERSION }}
git commit -m "update vela-core chart ${chart_version}"
git push https://x-access-token:${{ steps.get_app_token.outputs.token }}@github.com/kubevela/charts.git

View File

@@ -1,26 +0,0 @@
name: check-docs
on:
pull_request:
paths:
- 'docs/**'
branches:
- master
- release-*
jobs:
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Clean md files
run: python ./hack/website/clean-md.py ./docs/en
- name: Test Build
env:
VERSION: ${{ github.ref }}
run: |
bash ./hack/website/test-build.sh

View File

@@ -4,10 +4,17 @@ on:
push:
branches: [ master, release-* ]
permissions:
contents: read
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
actions: read # for github/codeql-action/init to get workflow details
security-events: write # for github/codeql-action/autobuild to send a status report
strategy:
fail-fast: false
@@ -15,16 +22,16 @@ jobs:
language: [ 'go' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Autobuild
uses: github/codeql-action/autobuild@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5

22
.github/workflows/commit-lint.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: PR Title Checker
on:
pull_request:
types:
- opened
- edited
- synchronize
- labeled
- unlabeled
permissions:
pull-requests: read
jobs:
check:
runs-on: ubuntu-22.04
steps:
- uses: thehanimo/pr-title-checker@5652588c80c479af803eabfbdb5a3895a77c1388 # v1.4.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: true
configuration_path: ".github/pr-title-checker-config.json"

40
.github/workflows/core-api-test.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: core-api-test
on:
pull_request:
paths:
- 'apis/**'
- 'pkg/oam/**'
- "hack/apis/**"
branches:
- master
- release-*
permissions:
contents: read
jobs:
core-api-test:
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.23.8
uses: actions/setup-go@v5
env:
GO_VERSION: '1.23.8'
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Test build kubevela-core-api
env:
VERSION: ${{ steps.get_version.outputs.VERSION }}
COMMIT_ID: ${{ github.sha }}
run: |
bash ./hack/apis/clientgen.sh
bash ./hack/apis/sync.sh test

46
.github/workflows/definition-lint.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Definition-Lint
on:
push:
branches:
- master
- release-*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
permissions:
contents: read
env:
# Common versions
GO_VERSION: '1.23.8'
jobs:
definition-doc:
runs-on: ubuntu-22.04
steps:
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Setup KinD
uses: ./.github/actions/setup-kind-cluster
with:
name: linter
- name: Definition Doc generate check
run: |
go build -o docgen hack/docgen/def/gen.go
./docgen --type=comp --force-example-doc --path=./comp-def-check.md
./docgen --type=trait --force-example-doc --path=./trait-def-check.md
./docgen --type=wf --force-example-doc --path=./wf-def-check.md --def-dir=./vela-templates/definitions/internal/workflowstep/
./docgen --type=policy --force-example-doc --path=./policy-def-check.md

View File

@@ -0,0 +1,86 @@
name: E2E MultiCluster Test
on:
push:
branches:
- master
- release-*
tags:
- v*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
permissions:
contents: read
env:
# Common versions
GO_VERSION: '1.23.8'
jobs:
detect-noop:
permissions:
actions: write
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
continue-on-error: true
e2e-multi-cluster-tests:
runs-on: ubuntu-22.04
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.31.9"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Setup worker cluster kinD
uses: ./.github/actions/setup-kind-cluster
with:
name: worker
k8s-version: ${{ matrix.k8s-version }}
- name: Setup master cluster kinD
uses: ./.github/actions/setup-kind-cluster
with:
k8s-version: ${{ matrix.k8s-version }}
- name: Run upgrade multicluster tests
uses: ./.github/actions/multicluster-test
with:
codecov-enable: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}
- name: Clean e2e profile
run: |
if [ -f /tmp/e2e-profile.out ]; then
rm /tmp/e2e-profile.out
echo "E2E profile cleaned"
else
echo "E2E profile not found, skipping cleanup"
fi
- name: Cleanup image
if: ${{ always() }}
run: |
make image-cleanup
docker image prune -f --filter "until=24h"

View File

@@ -5,105 +5,77 @@ on:
branches:
- master
- release-*
tags:
- v*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
permissions:
contents: read
env:
# Common versions
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
GO_VERSION: '1.23.8'
jobs:
detect-noop:
runs-on: ubuntu-20.04
permissions:
actions: write
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
continue-on-error: true
e2e-tests:
runs-on: aliyun
needs: detect-noop
runs-on: ubuntu-22.04
needs: [ detect-noop ]
if: needs.detect-noop.outputs.noop != 'true'
strategy:
matrix:
k8s-version: ["v1.31"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Setup Go
uses: actions/setup-go@v2
- name: Setup KinD
uses: ./.github/actions/setup-kind-cluster
# ========================================================================
# E2E Test Execution
# ========================================================================
- name: Run upgrade e2e tests
uses: ./.github/actions/e2e-test
with:
go-version: ${{ env.GO_VERSION }}
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}
skipClusterCreation: true
- name: Setup Kind Cluster
run: |
kind delete cluster
kind create cluster --image kindest/node:v1.18.15@sha256:5c1b980c4d0e0e8e7eb9f36f7df525d079a96169c8a8f20d8bd108c0d0889cc4
kubectl version
kubectl cluster-info
- name: Load Image to kind cluster
run: make kind-load
- name: Run Make
run: make
- name: Run Make Manager
run: make manager
- name: Prepare for e2e tests
run: |
make e2e-cleanup
make e2e-setup
helm lint ./charts/vela-core
helm test -n vela-system kubevela --timeout 5m
- name: Wait for e2e preparation ready
run: |
timeout 60 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:38081/api/components)" != "200" ]]; do sleep 5; done' || false
- name: Run api e2e tests
run: make e2e-api-test
- name: Run e2e tests
run: make e2e-test
- name: Stop kubevela, get profile
run: make end-e2e
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: /tmp/e2e-profile.out
flags: e2etests
name: codecov-umbrella
codecov-enable: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}
- name: Clean e2e profile
run: rm /tmp/e2e-profile.out
run: |
if [ -f /tmp/e2e-profile.out ]; then
rm /tmp/e2e-profile.out
echo "E2E profile cleaned"
else
echo "E2E profile not found, skipping cleanup"
fi
- name: Cleanup image
if: ${{ always() }}
run: make image-cleanup
run: |
make image-cleanup
docker image prune -f --filter "until=24h"

View File

@@ -11,174 +11,214 @@ on:
- master
- release-*
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
env:
# Common versions
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
GO_VERSION: "1.23.8"
GOLANGCI_VERSION: "v1.60.1"
jobs:
detect-noop:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
permissions:
actions: write
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
compatibility-test:
runs-on: ubuntu-20.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Install ginkgo
run: |
sudo apt-get install -y golang-ginkgo-dev
- name: Setup Kind Cluster
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}
- name: install Kubebuilder
uses: wonderflow/kubebuilder-action@v1.1
- name: Run Make compatibility-test
run: make compatibility-test
- name: Clean up testdata
run: make compatibility-testdata-cleanup
continue-on-error: true
staticcheck:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Install StaticCheck
run: GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck
- name: Static Check
run: staticcheck ./...
run: make staticcheck
- name: License Header Check
run: make check-license-header
lint:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
steps:
- name: Setup Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
# This action uses its own setup-go, which always seems to use the latest
# stable version of Go. We could run 'make lint' to ensure our desired Go
# version, but we prefer this action because it leaves 'annotations' (i.e.
# it comments on PRs to point out linter violations).
- name: Lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v6
with:
version: ${{ env.GOLANGCI_VERSION }}
check-diff:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Free Disk Space
run: |
echo "Disk space before cleanup:"
df -h
# Remove unnecessary software to free up disk space
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
echo "Disk space after cleanup:"
df -h
- name: Setup Env
uses: ./.github/actions/env-setup
- name: Setup node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: "14"
- name: Setup kinD
uses: ./.github/actions/setup-kind-cluster
- name: Run cross-build
run: make cross-build
- name: Free Disk Space After Cross-Build
run: |
echo "Disk space before cleanup:"
df -h
# Remove cross-build artifacts to free up space
# (make build will rebuild binaries for current platform)
rm -rf _bin
# Clean Go build cache and test cache
go clean -cache -testcache
# Remove Docker build cache
sudo docker builder prune --all --force || true
echo "Disk space after cleanup:"
df -h
- name: Check Diff
run: |
export PATH=$(pwd)/bin/:$PATH
make check-diff
- name: Cleanup binary
run: make build-cleanup
check-windows:
runs-on: windows-latest
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Setup Go
uses: actions/setup-go@v2
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
with:
go-version: ${{ env.GO_VERSION }}
- name: Cache Go Dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Check code formatting
run: go install golang.org/x/tools/cmd/goimports && make fmt
- name: Run Build CLI
run: make vela-cli
- name: Check Diff
run: make check-diff
- name: Run CLI for version
shell: cmd
run: |
move .\bin\vela .\bin\vela.exe
.\bin\vela.exe version
build-cli:
runs-on: ubuntu-latest
check-core-image-build:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go 1.16
uses: actions/setup-go@v2
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Run cross-build
run: make cross-build
- name: Run compress binary
run: make compress
- name: Run make reviewable
run: make reviewable
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
- name: Build Test for vela core
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
check-cli-image-build:
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Set up QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435
- name: Build Test for CLI
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83
with:
context: .
file: Dockerfile.cli

143
.github/workflows/issue-commands.yml vendored Normal file
View File

@@ -0,0 +1,143 @@
name: Run commands for issues and pull requests
on:
issues:
types: [labeled, opened]
issue_comment:
types: [created]
permissions:
contents: read
issues: write
jobs:
bot:
runs-on: ubuntu-22.04
permissions:
pull-requests: write
issues: write
steps:
- name: Checkout Actions
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
repository: "oam-dev/kubevela-github-actions"
path: ./actions
ref: v0.4.2
- name: Setup Node.js
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b
with:
node-version: "14"
cache: "npm"
cache-dependency-path: ./actions/package-lock.json
- name: Install Dependencies
run: npm ci --production --prefix ./actions
- name: Run Commands
uses: ./actions/commands
with:
token: ${{ secrets.GH_KUBEVELA_COMMAND_WORKFLOW }}
configPath: issue-commands
backport:
runs-on: ubuntu-22.04
if: github.event.issue.pull_request && contains(github.event.comment.body, '/backport')
permissions:
contents: write
pull-requests: write
issues: write
steps:
- name: Extract Command
id: command
uses: xt0rted/slash-command-action@bf51f8f5f4ea3d58abc7eca58f77104182b23e88
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
command: backport
reaction: "true"
reaction-type: "eyes"
allow-edits: "false"
permission-level: read
- name: Handle Command
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
VERSION: ${{ steps.command.outputs.command-arguments }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const version = process.env.VERSION
let label = "backport release-" + version
if (version.includes("release")) {
label = "backport " + version
}
// Add our backport label.
github.rest.issues.addLabels({
// Every pull request is an issue, but not every issue is a pull request.
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: [label]
})
console.log("Added '" + label + "' label.")
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
fetch-depth: 0
- name: Open Backport PR
uses: zeebe-io/backport-action@0193454f0c5947491d348f33a275c119f30eb736
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_workspace: ${{ github.workspace }}
retest:
runs-on: ubuntu-22.04
if: github.event.issue.pull_request && contains(github.event.comment.body, '/retest')
permissions:
actions: write
pull-requests: write
issues: write
steps:
- name: Retest the current pull request
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
env:
PULL_REQUEST_ID: ${{ github.event.issue.number }}
COMMENT_ID: ${{ github.event.comment.id }}
COMMENT_BODY: ${{ github.event.comment.body }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pull_request_id = process.env.PULL_REQUEST_ID
const comment_id = process.env.COMMENT_ID
const comment_body = process.env.COMMENT_BODY
console.log("retest pr: #" + pull_request_id + " comment: " + comment_body)
const {data: pr} = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pull_request_id,
})
console.log("pr: " + JSON.stringify(pr))
const action = comment_body.split(" ")[0]
let workflow_ids = comment_body.split(" ").slice(1).filter(line => line.length > 0).map(line => line + ".yml")
if (workflow_ids.length == 0) workflow_ids = ["go.yml", "unit-test.yml", "e2e-test.yml", "e2e-multicluster-test.yml"]
for (let i = 0; i < workflow_ids.length; i++) {
const workflow_id = workflow_ids[i]
const {data: runs} = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: workflow_id,
head_sha: pr.head.sha,
})
console.log("runs for " + workflow_id + ": ", JSON.stringify(runs))
runs.workflow_runs.forEach((workflow_run) => {
if (workflow_run.status === "in_progress") return
let handler = github.rest.actions.reRunWorkflow
if (action === "/retest-failed") handler = github.rest.actions.reRunWorkflowFailedJobs
handler({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: workflow_run.id
})
})
}
github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: comment_id,
content: "eyes",
});

View File

@@ -9,15 +9,17 @@ on:
branches:
- master
- release-*
permissions:
contents: read
jobs:
license_check:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
name: Check for unapproved licenses
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Set up Ruby
uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@a6e6f86333f0a2523ece813039b8b4be04560854 # v1.190.0
with:
ruby-version: 2.6
- name: Install dependencies

View File

@@ -1,57 +1,87 @@
name: Registry
on:
push:
branches:
- master
tags:
- "v*"
- 'v*'
workflow_dispatch: {}
env:
BUCKET: kubevelacharts
ENDPOINT: oss-cn-hangzhou.aliyuncs.com
ACCESS_KEY: ${{ secrets.OSS_ACCESS_KEY }}
ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
ARTIFACT_HUB_REPOSITORY_ID: ${{ secrets.ARTIFACT_HUB_REPOSITORY_ID }}
permissions:
contents: read
jobs:
publish-images:
runs-on: ubuntu-latest
publish-vela-images:
name: Build and Push Vela Images
permissions:
packages: write
id-token: write
attestations: write
contents: write
runs-on: ubuntu-22.04
outputs:
vela_core_image: ${{ steps.meta-vela-core.outputs.image }}
vela_core_digest: ${{ steps.meta-vela-core.outputs.digest }}
vela_core_dockerhub_image: ${{ steps.meta-vela-core.outputs.dockerhub_image }}
vela_cli_image: ${{ steps.meta-vela-cli.outputs.image }}
vela_cli_digest: ${{ steps.meta-vela-cli.outputs.digest }}
vela_cli_dockerhub_image: ${{ steps.meta-vela-cli.outputs.dockerhub_image }}
steps:
- uses: actions/checkout@master
- name: Get the version
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.1
- name: Install Crane
uses: imjasonh/setup-crane@00c9e93efa4e1138c9a7a5c594acd6c75a2fbf0c # v0.1
- name: Install Cosign
uses: sigstore/cosign-installer@d58896d6a1865668819e1d91763c7751a165e159 # main
with:
cosign-release: 'v2.5.0'
- name: Get the image version
id: get_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then
VERSION=latest
fi
echo ::set-output name=VERSION::${VERSION}
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Get git revision
id: vars
shell: bash
run: |
echo "::set-output name=git_revision::$(git rev-parse --short HEAD)"
- name: Login ghcr.io
uses: docker/login-action@v1
echo "git_revision=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Login to GHCR
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login docker.io
uses: docker/login-action@v1
- name: Login to DockerHub
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
with:
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
name: Build & Pushing
- name: Setup QEMU
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
with:
driver-opts: image=moby/buildkit:master
- name: Build & Push Vela Core for Dockerhub, GHCR
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
file: Dockerfile
labels: |-
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
platforms: linux/amd64,linux/arm64
@@ -59,91 +89,158 @@ jobs:
build-args: |
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
VERSION=${{ steps.get_version.outputs.VERSION }}
tags: |-
ghcr.io/${{ github.repository }}/vela-core:${{ steps.get_version.outputs.VERSION }}
GOPROXY=https://proxy.golang.org
tags: |
docker.io/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
ghcr.io/${{ github.repository_owner }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
publish-charts:
env:
HELM_CHARTS_DIR: charts
HELM_CHART: charts/vela-core
LEGACY_HELM_CHART: legacy/charts/vela-core-legacy
LOCAL_OSS_DIRECTORY: .oss/
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Get git revision
id: vars
shell: bash
- name: Get Vela Core Image Digest
id: meta-vela-core
run: |
echo "::set-output name=git_revision::$(git rev-parse --short HEAD)"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0
- name: Prepare legacy chart
run: |
rsync -r $LEGACY_HELM_CHART $HELM_CHARTS_DIR
rsync -r $HELM_CHART/* $LEGACY_HELM_CHART --exclude=Chart.yaml --exclude=crds
- uses: oprypin/find-latest-tag@v1
with:
repository: oam-dev/kubevela
releases-only: true
id: latest_tag
- name: Tag helm chart image
run: |
latest_repo_tag=${{ steps.latest_tag.outputs.tag }}
sub="."
major="$(cut -d"$sub" -f1 <<<"$latest_repo_tag")"
minor="$(cut -d"$sub" -f2 <<<"$latest_repo_tag")"
patch="0"
next_repo_tag="$major.$(($minor + 1)).$patch"
image_tag=${GITHUB_REF#refs/tags/}
chart_version=$latest_repo_tag
if [[ ${GITHUB_REF} == "refs/heads/master" ]]; then
image_tag=latest
chart_version=${next_repo_tag}-rc-master
fi
sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
sed -i "s/latest/image_tag/g" $LEGACY_HELM_CHART/values.yaml
chart_smever=${chart_version#"v"}
sed -i "s/0.1.0/$chart_smever/g" $HELM_CHART/Chart.yaml
sed -i "s/0.1.0/$chart_smever/g" $LEGACY_HELM_CHART/Chart.yaml
- name: Install ossutil
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
- name: Configure Alibaba Cloud OSSUTIL
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${ENDPOINT} -c .ossutilconfig
- name: sync cloud to local
run: ./ossutil --config-file .ossutilconfig sync oss://$BUCKET/core $LOCAL_OSS_DIRECTORY
- name: add artifacthub stuff to the repo
run: |
rsync README.md $HELM_CHART/README.md
rsync README.md $LEGACY_HELM_CHART/README.md
sed -i "s/ARTIFACT_HUB_REPOSITORY_ID/$ARTIFACT_HUB_REPOSITORY_ID/g" hack/artifacthub/artifacthub-repo.yml
rsync hack/artifacthub/artifacthub-repo.yml $LOCAL_OSS_DIRECTORY
- name: Package helm charts
run: |
helm package $HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm package $LEGACY_HELM_CHART --destination $LOCAL_OSS_DIRECTORY
helm repo index --url https://$BUCKET.$ENDPOINT/core $LOCAL_OSS_DIRECTORY
- name: sync local to cloud
run: ./ossutil --config-file .ossutilconfig sync $LOCAL_OSS_DIRECTORY oss://$BUCKET/core -f
GHCR_IMAGE=ghcr.io/${{ github.repository_owner }}/oamdev/vela-core
DOCKER_IMAGE=docker.io/oamdev/vela-core
TAG=${{ steps.get_version.outputs.VERSION }}
publish-capabilities:
env:
CAPABILITY_BUCKET: kubevela-registry
CAPABILITY_DIR: capabilities
CAPABILITY_ENDPOINT: oss-cn-beijing.aliyuncs.com
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@master
- name: Install ossutil
run: wget http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 && chmod +x ossutil64 && mv ossutil64 ossutil
- name: Configure Alibaba Cloud OSSUTIL
run: ./ossutil --config-file .ossutilconfig config -i ${ACCESS_KEY} -k ${ACCESS_KEY_SECRET} -e ${CAPABILITY_ENDPOINT} -c .ossutilconfig
- name: sync capabilities bucket to local
run: ./ossutil --config-file .ossutilconfig sync oss://$CAPABILITY_BUCKET $CAPABILITY_DIR
- name: rsync all capabilites
run: rsync vela-templates/registry/auto-gen/* $CAPABILITY_DIR
- name: sync local to cloud
run: ./ossutil --config-file .ossutilconfig sync $CAPABILITY_DIR oss://$CAPABILITY_BUCKET -f
DIGEST=$(crane digest $GHCR_IMAGE:$TAG)
echo "image=$GHCR_IMAGE" >> $GITHUB_OUTPUT
echo "dockerhub_image=$DOCKER_IMAGE" >> $GITHUB_OUTPUT
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
- name: Generate SBOM for Vela Core Image
id: generate_vela_core_sbom
uses: anchore/sbom-action@v0.17.0
with:
image: ghcr.io/${{ github.repository_owner }}/oamdev/vela-core:${{ steps.get_version.outputs.VERSION }}
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
format: spdx-json
artifact-name: sbom-vela-core.spdx.json
output-file: ${{ github.workspace }}/sbom-vela-core.spdx.json
- name: Sign Vela Core Image and Attest SBOM
env:
COSIGN_EXPERIMENTAL: 'true'
run: |
echo "signing vela core images..."
cosign sign --yes ghcr.io/${{ github.repository_owner }}/oamdev/vela-core@${{ steps.meta-vela-core.outputs.digest }}
cosign sign --yes docker.io/oamdev/vela-core@${{ steps.meta-vela-core.outputs.digest }}
echo "attesting SBOM against the vela core image..."
cosign attest --yes --predicate ${{ github.workspace }}/sbom-vela-core.spdx.json --type spdx \
ghcr.io/${{ github.repository_owner }}/oamdev/vela-core@${{ steps.meta-vela-core.outputs.digest }}
cosign attest --yes --predicate ${{ github.workspace }}/sbom-vela-core.spdx.json --type spdx \
docker.io/oamdev/vela-core@${{ steps.meta-vela-core.outputs.digest }}
- name: Build & Push Vela CLI for Dockerhub, GHCR
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4 # v6.15.0
with:
context: .
file: Dockerfile.cli
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
build-args: |
GITVERSION=git-${{ steps.vars.outputs.git_revision }}
VERSION=${{ steps.get_version.outputs.VERSION }}
GOPROXY=https://proxy.golang.org
tags: |
docker.io/oamdev/vela-cli:${{ steps.get_version.outputs.VERSION }}
ghcr.io/${{ github.repository_owner }}/oamdev/vela-cli:${{ steps.get_version.outputs.VERSION }}
- name: Get Vela CLI Image Digest
id: meta-vela-cli
run: |
GHCR_IMAGE=ghcr.io/${{ github.repository_owner }}/oamdev/vela-cli
DOCKER_IMAGE=docker.io/oamdev/vela-cli
TAG=${{ steps.get_version.outputs.VERSION }}
DIGEST=$(crane digest $GHCR_IMAGE:$TAG)
echo "image=$GHCR_IMAGE" >> $GITHUB_OUTPUT
echo "dockerhub_image=$DOCKER_IMAGE" >> $GITHUB_OUTPUT
echo "digest=$DIGEST" >> $GITHUB_OUTPUT
- name: Generate SBOM for Vela CLI Image
id: generate_sbom
uses: anchore/sbom-action@v0.17.0
with:
image: ghcr.io/${{ github.repository_owner }}/oamdev/vela-cli:${{ steps.get_version.outputs.VERSION }}
registry-username: ${{ github.actor }}
registry-password: ${{ secrets.GITHUB_TOKEN }}
format: spdx-json
artifact-name: sbom-vela-cli.spdx.json
output-file: ${{ github.workspace }}/sbom-vela-cli.spdx.json
- name: Sign Vela CLI Image and Attest SBOM
env:
COSIGN_EXPERIMENTAL: 'true'
run: |
echo "signing vela CLI images..."
cosign sign --yes ghcr.io/${{ github.repository_owner }}/oamdev/vela-cli@${{ steps.meta-vela-cli.outputs.digest }}
cosign sign --yes docker.io/oamdev/vela-cli@${{ steps.meta-vela-cli.outputs.digest }}
echo "attesting SBOM against the vela cli image..."
cosign attest --yes --predicate ${{ github.workspace }}/sbom-vela-cli.spdx.json --type spdx \
ghcr.io/${{ github.repository_owner }}/oamdev/vela-cli@${{ steps.meta-vela-cli.outputs.digest }}
cosign attest --yes --predicate ${{ github.workspace }}/sbom-vela-cli.spdx.json --type spdx \
docker.io/oamdev/vela-cli@${{ steps.meta-vela-cli.outputs.digest }}
- name: Publish SBOMs as release artifacts
uses: anchore/sbom-action/publish-sbom@v0.17.0
provenance-ghcr:
name: Generate and Push Provenance to GCHR
needs: publish-vela-images
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
include:
- name: 'Vela Core Image'
image: ${{ needs.publish-vela-images.outputs.vela_core_image }}
digest: ${{ needs.publish-vela-images.outputs.vela_core_digest }}
- name: 'Vela CLI Image'
image: ${{ needs.publish-vela-images.outputs.vela_cli_image }}
digest: ${{ needs.publish-vela-images.outputs.vela_cli_digest }}
permissions:
id-token: write
contents: write
actions: read
packages: write
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0 # has to be sem var
with:
image: ${{ matrix.image }}
digest: ${{ matrix.digest }}
registry-username: ${{ github.actor }}
secrets:
registry-password: ${{ secrets.GITHUB_TOKEN }}
provenance-dockerhub:
name: Generate and Push Provenance to DockerHub
needs: publish-vela-images
if: startsWith(github.ref, 'refs/tags/')
strategy:
matrix:
include:
- name: 'Vela Core Image'
image: ${{ needs.publish-vela-images.outputs.vela_core_dockerhub_image }}
digest: ${{ needs.publish-vela-images.outputs.vela_core_digest }}
- name: 'Vela CLI Image'
image: ${{ needs.publish-vela-images.outputs.vela_cli_dockerhub_image }}
digest: ${{ needs.publish-vela-images.outputs.vela_cli_digest }}
permissions:
id-token: write
contents: write
packages: write
actions: read
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v2.1.0
with:
image: ${{ matrix.image }}
digest: ${{ matrix.digest }}
secrets:
registry-username: ${{ secrets.DOCKER_USERNAME }}
registry-password: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -1,28 +0,0 @@
name: docs
on:
push:
paths:
- 'docs/**'
branches:
- master
- release-*
jobs:
release-website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '12.x'
- uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Clean md files
run: python ./hack/website/clean-md.py ./docs/en
- name: Sync to kubevela.io Repo
env:
SSH_DEPLOY_KEY: ${{ secrets.GH_PAGES_DEPLOY }}
VERSION: ${{ github.ref }}
COMMIT_ID: ${{ github.sha }}
run: |
bash ./hack/website/release.sh

View File

@@ -6,139 +6,124 @@ on:
- "v*"
workflow_dispatch: {}
permissions:
contents: read
jobs:
publish-cli:
runs-on: ubuntu-latest
env:
VELA_VERSION: ${{ github.ref }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
goreleaser:
name: goreleaser
runs-on: ubuntu-22.04
permissions:
contents: write
actions: read
checks: write
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
id-token: write
outputs:
hashes: ${{ steps.hash.outputs.hashes }}
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.16
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Tag helm chart image
run: |
sed -i 's/latest/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/values.yaml
sed -i 's/0.1.0/${{ steps.get_version.outputs.VERSION }}/g' charts/vela-core/Chart.yaml
- name: Run cross-build
run: make cross-build
- name: Run compress binary
run: make compress
- name: Get release
id: get_release
uses: bruceadams/get-release@v1.2.2
- name: Upload Vela Linux amd64 tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/vela/vela-linux-amd64.tar.gz
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Vela Linux amd64 zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/vela/vela-linux-amd64.zip
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Vela MacOS tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/vela/vela-darwin-amd64.tar.gz
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Vela MacOS zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/vela/vela-darwin-amd64.zip
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Vela Windows tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/vela/vela-windows-amd64.tar.gz
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Vela Windows zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/vela/vela-windows-amd64.zip
asset_name: vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Kubectl-Vela Linux amd64 tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-linux-amd64.tar.gz
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Kubectl-Vela Linux amd64 zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-linux-amd64.zip
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-linux-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Kubectl-Vela MacOS tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-darwin-amd64.tar.gz
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Kubectl-Vela MacOS zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-darwin-amd64.zip
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-darwin-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Kubectl-Vela Windows tar.gz
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-windows-amd64.tar.gz
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.tar.gz
asset_content_type: binary/octet-stream
- name: Upload Kubectl-Vela Windows zip
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/kubectl-vela/kubectl-vela-windows-amd64.zip
asset_name: kubectl-vela-${{ steps.get_version.outputs.VERSION }}-windows-amd64.zip
asset_content_type: binary/octet-stream
- name: Upload Checksums
uses: actions/upload-release-asset@v1.0.2
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: ./_bin/sha256sums.txt
asset_name: sha256sums.txt
asset_content_type: text/plain
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Clean md files
run: python ./hack/website/clean-md.py ./docs/en
- name: Sync release to kubevela.io Repo
env:
SSH_DEPLOY_KEY: ${{ secrets.GH_PAGES_DEPLOY }}
VERSION: ${{ steps.get_version.outputs.VERSION }}
COMMIT_ID: ${{ github.sha }}
- name: Check disk (before)
run: |
bash ./hack/website/release.sh
df -h
sudo du -sh /usr/local/lib/android /usr/share/dotnet /opt/ghc || true
- name: Free Disk Space (Ubuntu)
uses: insightsengineering/disk-space-reclaimer@v1
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tools-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
docker-images: true
# Extra prune in case your job builds/pulls images
- name: Deep Docker prune
run: |
docker system prune -af || true
docker builder prune -af || true
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
fetch-depth: 0
- name: Get Git tags
run: git fetch --force --tags
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
with:
go-version: 1.23.8
cache: true
- name: Install Cosign
uses: sigstore/cosign-installer@main
with:
cosign-release: "v2.5.0"
- name: Install syft
uses: anchore/sbom-action/download-syft@f325610c9f50a54015d37c8d16cb3b0e2c8f4de0 # v0.18.0
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
with:
distribution: goreleaser
version: 1.14.1
args: release --rm-dist --timeout 60m
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate hashes
id: hash
if: startsWith(github.ref, 'refs/tags/')
run: |
set -euo pipefail
HASHES=$(find dist -type f -exec sha256sum {} \; | base64 -w0)
echo "hashes=$HASHES" >> "$GITHUB_OUTPUT"
- name: Check disk (after)
run: df -h
upload-plugin-homebrew:
name: upload-sha256sums
needs: goreleaser
runs-on: ubuntu-22.04
if: ${{ !contains(github.ref, 'alpha') && !contains(github.ref, 'beta') && !contains(github.ref, 'rc') }}
permissions:
contents: write
actions: read
checks: write
issues: read
packages: write
pull-requests: read
repository-projects: read
statuses: read
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Update kubectl plugin version in krew-index
uses: rajatjindal/krew-release-bot@v0.0.38
uses: rajatjindal/krew-release-bot@df3eb197549e3568be8b4767eec31c5e8e8e6ad8 # v0.0.46
provenance-vela-bins:
name: generate provenance for binaries
needs: [goreleaser]
if: startsWith(github.ref, 'refs/tags/')
permissions:
id-token: write
contents: write
actions: read
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.1.0 # has to be sem var
with:
base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
upload-assets: true

60
.github/workflows/scorecards.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Scorecards supply-chain security
on:
schedule:
# Weekly on Saturdays.
- cron: '30 1 * * 6'
push:
branches: [ master ]
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-22.04
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
# Used to receive a badge. (Upcoming feature)
id-token: write
actions: read
contents: read
steps:
- name: "Checkout code"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # tag=v2.4.1
with:
results_file: results.sarif
results_format: sarif
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
# - you want to enable the Branch-Protection check on a *public* repository, or
# - you are installing Scorecards on a *private* repository
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@134dcf33c0b9454c4b17a936843d7e21dccdc335 # v4.3.6
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
with:
sarif_file: results.sarif

49
.github/workflows/sdk-test.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: SDK Test
on:
push:
tags:
- v*
workflow_dispatch: {}
pull_request:
paths:
- "vela-templates/definitions/**"
- "pkg/definition/gen_sdk/**"
branches:
- master
- release-*
permissions:
contents: read
jobs:
sdk-tests:
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Setup Env
uses: ./.github/actions/env-setup
- name: Install Go tools
run: |
make goimports
make golangci
- name: Setup KinD
uses: ./.github/actions/setup-kind-cluster
with:
name: sdk-test
- name: Build CLI
run: make vela-cli
- name: Build SDK
run: bin/vela def gen-api -f vela-templates/definitions/internal/ -o ./kubevela-go-sdk --package=github.com/kubevela-contrib/kubevela-go-sdk --init
- name: Validate SDK
run: |
cd kubevela-go-sdk
go mod tidy
golangci-lint run --timeout 5m -e "exported:" -e "dot-imports" ./...

View File

@@ -7,25 +7,22 @@ on:
tags:
- "v*"
permissions:
contents: read
jobs:
sync-core-api:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
env:
GO_VERSION: '1.14'
GOLANGCI_VERSION: 'v1.38'
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Setup Env
uses: ./.github/actions/env-setup
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Sync to kubevela-core-api Repo
env:
@@ -33,4 +30,5 @@ jobs:
VERSION: ${{ steps.get_version.outputs.VERSION }}
COMMIT_ID: ${{ github.sha }}
run: |
bash ./hack/apis/sync.sh
bash ./hack/apis/clientgen.sh
bash ./hack/apis/sync.sh sync

49
.github/workflows/sync-sdk.yaml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: Sync SDK
on:
push:
paths:
- vela-templates/definitions/internal/**
- pkg/definition/gen_sdk/**
- .github/workflows/sync-sdk.yaml
tags:
- "v*"
branches:
- master
- release-*
permissions:
contents: read
jobs:
sync_sdk:
runs-on: ubuntu-22.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Env setup
uses: ./.github/actions/env-setup
- name: Install Go tools
run: |
make goimports
- name: Build CLI
run: make vela-cli
- name: Setup KinD
uses: ./.github/actions/setup-kind-cluster
with:
name: sync-sdk
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF}" >> $GITHUB_OUTPUT
- name: Sync SDK to kubevela/kubevela-go-sdk
run: bash ./hack/sdk/sync.sh
env:
SSH_DEPLOY_KEY: ${{ secrets.GO_SDK_DEPLOY_KEY }}
VERSION: ${{ steps.get_version.outputs.VERSION }}
COMMIT_ID: ${{ github.sha }}

View File

@@ -1,10 +0,0 @@
name: Timed Task
on:
schedule:
- cron: '0 16 * * *'
jobs:
clean-image:
runs-on: aliyun
steps:
- name: Cleanup image
run: docker image prune -f

33
.github/workflows/trivy-scan.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: "Trivy Scan"
on:
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
images:
name: Image Scan
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
- name: Build Vela Core image from Dockerfile
run: |
docker build --build-arg GOPROXY=https://proxy.golang.org -t docker.io/oamdev/vela-core:${{ github.sha }} .
- name: Run Trivy vulnerability scanner for vela core
uses: aquasecurity/trivy-action@d9cd5b1c23aaf8cb31bb09141028215828364bbb # master
with:
image-ref: 'docker.io/oamdev/vela-core:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@51f77329afa6477de8c49fc9c7046c15b9a4e79d # v3.29.5
if: always()
with:
sarif_file: 'trivy-results.sarif'

View File

@@ -11,71 +11,45 @@ on:
- master
- release-*
env:
# Common versions
GO_VERSION: '1.16'
GOLANGCI_VERSION: 'v1.38'
KIND_VERSION: 'v0.7.0'
permissions:
contents: read
jobs:
detect-noop:
runs-on: ubuntu-20.04
permissions:
actions: write # for fkirc/skip-duplicate-actions to skip or stop workflow runs
runs-on: ubuntu-22.04
outputs:
noop: ${{ steps.noop.outputs.should_skip }}
steps:
- name: Detect No-op Changes
id: noop
uses: fkirc/skip-duplicate-actions@v3.3.0
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
do_not_skip: '["workflow_dispatch", "schedule", "push"]'
concurrent_skipping: false
continue-on-error: true
unit-tests:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
needs: detect-noop
if: needs.detect-noop.outputs.noop != 'true'
steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: ${{ env.GO_VERSION }}
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
submodules: true
- name: Cache Go Dependencies
uses: actions/cache@v2
- name: Setup Env
uses: ./.github/actions/env-setup
- name: Setup KinD with Kubernetes
uses: ./.github/actions/setup-kind-cluster
- name: Run unit tests
uses: ./.github/actions/unit-test
with:
path: .work/pkg
key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-pkg-
- name: Install ginkgo
run: |
sudo apt-get install -y golang-ginkgo-dev
- name: Setup Kind Cluster
uses: engineerd/setup-kind@v0.5.0
with:
version: ${{ env.KIND_VERSION }}
- name: install Kubebuilder
uses: wonderflow/kubebuilder-action@v1.1
- name: Run Make test
run: make test
- name: Upload coverage report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
name: codecov-umbrella
codecov-enable: true
codecov-token: ${{ secrets.CODECOV_TOKEN }}

View File

@@ -0,0 +1,98 @@
# =============================================================================
# E2E Upgrade Multicluster Test Workflow
# =============================================================================
# This workflow performs end-to-end testing for KubeVela multicluster upgrades.
# It tests the upgrade path from the latest released version to the current
# development branch across multiple Kubernetes versions.
#
# Test Flow:
# 1. Install latest KubeVela release
# 2. Build and upgrade to current development version
# 3. Run multicluster e2e tests to verify functionality
# =============================================================================
name: E2E Upgrade Multicluster Test
# =============================================================================
# Trigger Configuration
# =============================================================================
on:
# Trigger on pull requests targeting main branches
pull_request:
branches:
- master
- release-*
# Allow manual workflow execution
workflow_dispatch: {}
# =============================================================================
# Security Configuration
# =============================================================================
permissions:
contents: read # Read-only access to repository contents
# =============================================================================
# Global Environment Variables
# =============================================================================
env:
GO_VERSION: '1.23.8' # Go version for building and testing
# =============================================================================
# Job Definitions
# =============================================================================
jobs:
upgrade-multicluster-tests:
name: Upgrade Multicluster Tests
runs-on: ubuntu-22.04
if: startsWith(github.head_ref, 'chore/upgrade-k8s-')
timeout-minutes: 60 # Prevent hanging jobs
# ==========================================================================
# Matrix Strategy - Test against multiple Kubernetes versions
# ==========================================================================
strategy:
fail-fast: false # Continue testing other versions if one fails
matrix:
k8s-version: ['v1.31.9']
# ==========================================================================
# Concurrency Control - Prevent overlapping runs
# ==========================================================================
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
# ========================================================================
# Environment Setup
# ========================================================================
- name: Check out repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# ========================================================================
# Kubernetes Cluster Setup
# ========================================================================
- name: Setup worker cluster kinD
uses: ./.github/actions/setup-kind-cluster
with:
name: worker
- name: Setup KinD master clusters for multicluster testing
uses: ./.github/actions/setup-kind-cluster
with:
k8s-version: ${{ matrix.k8s-version }}
- name: Deploy latest release
uses: ./.github/actions/deploy-latest-release
- name: Upgrade from current branch
uses: ./.github/actions/deploy-current-branch
- name: Run upgarde multicluster tests
uses: ./.github/actions/multicluster-test
with:
codecov-enable: false
codecov-token: ''

102
.github/workflows/upgrade-e2e-test.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
# =============================================================================
# Upgrade E2E Test Workflow
# =============================================================================
# This workflow performs comprehensive end-to-end testing for KubeVela upgrades.
# It validates the upgrade path from the latest stable release to the current
# development version by running multiple test suites including API, addon,
# and general e2e tests.
#
# Test Flow:
# 1. Install latest KubeVela release
# 2. Build and upgrade to current development version
# 3. Run comprehensive e2e test suites (API, addon, general)
# 4. Validate upgrade functionality and compatibility
# =============================================================================
name: Upgrade E2E Test
# =============================================================================
# Trigger Configuration
# =============================================================================
on:
# Trigger on pull requests targeting main branches
pull_request:
branches:
- master
- release-*
# Allow manual workflow execution
workflow_dispatch: {}
# =============================================================================
# Environment Variables
# =============================================================================
env:
GO_VERSION: '1.23.8'
# =============================================================================
# Security Configuration
# =============================================================================
permissions:
contents: read # Read-only access to repository contents
# =============================================================================
# Job Definitions
# =============================================================================
jobs:
upgrade-tests:
name: Upgrade E2E Tests
runs-on: ubuntu-22.04
if: startsWith(github.head_ref, 'chore/upgrade-k8s-')
timeout-minutes: 90 # Extended timeout for comprehensive e2e testing
# ==========================================================================
# Matrix Strategy - Test against multiple Kubernetes versions
# ==========================================================================
strategy:
fail-fast: false # Continue testing other versions if one fails
matrix:
k8s-version: ['v1.31.9']
# ==========================================================================
# Concurrency Control - Prevent overlapping runs
# ==========================================================================
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
# ========================================================================
# Repository Setup
# ========================================================================
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# ========================================================================
# Kubernetes Cluster Setup
# ========================================================================
- name: Setup KinD with Kubernetes ${{ matrix.k8s-version }}
uses: ./.github/actions/setup-kind-cluster
with:
k8s-version: ${{ matrix.k8s-version }}
- name: Build vela CLI
run: make vela-cli
- name: Build kubectl-vela plugin
run: make kubectl-vela
- name: Install kustomize
run: make kustomize
- name: Deploy latest release
uses: ./.github/actions/deploy-latest-release
- name: Upgrade from current branch
uses: ./.github/actions/deploy-current-branch
# ========================================================================
# E2E Test Execution
# ========================================================================
- name: Run upgrade e2e tests
uses: ./.github/actions/e2e-test

83
.github/workflows/upgrade-unit-test.yml vendored Normal file
View File

@@ -0,0 +1,83 @@
# =============================================================================
# Upgrade Unit Test Workflow
# =============================================================================
# This workflow performs unit testing for KubeVela upgrades by:
# 1. Installing the latest stable KubeVela release
# 2. Building and upgrading to the current development version
# 3. Running unit tests to validate the upgrade functionality
# =============================================================================
name: Upgrade Unit Test
# =============================================================================
# Trigger Configuration
# =============================================================================
on:
# Trigger on pull requests targeting main and release branches
pull_request:
branches:
- master
- release-*
# Allow manual workflow execution
workflow_dispatch: {}
# =============================================================================
# Security Configuration
# =============================================================================
permissions:
contents: read # Read-only access to repository contents
# =============================================================================
# Job Definitions
# =============================================================================
jobs:
upgrade-tests:
name: Upgrade Unit Tests
runs-on: ubuntu-22.04
if: startsWith(github.head_ref, 'chore/upgrade-k8s-')
timeout-minutes: 45 # Prevent hanging jobs
# ==========================================================================
# Matrix Strategy - Test against multiple Kubernetes versions
# ==========================================================================
strategy:
fail-fast: false # Continue testing other versions if one fails
matrix:
k8s-version: ['v1.31.9']
# ==========================================================================
# Concurrency Control - Prevent overlapping runs
# ==========================================================================
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
cancel-in-progress: true
steps:
# ========================================================================
# Environment Setup
# ========================================================================
- name: Check out code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
# ========================================================================
# Kubernetes Cluster Setup
# ========================================================================
- name: Setup KinD with Kubernetes ${{ matrix.k8s-version }}
uses: ./.github/actions/setup-kind-cluster
with:
k8s-version: ${{ matrix.k8s-version }}
- name: Deploy latest release
uses: ./.github/actions/deploy-latest-release
- name: Upgrade from current branch
uses: ./.github/actions/deploy-current-branch
- name: Run unit tests
uses: ./.github/actions/unit-test
with:
codecov-enable: false
codecov-token: ''

View File

@@ -0,0 +1,165 @@
name: Webhook Upgrade Validation
on:
push:
branches:
- master
- release-*
tags:
- v*
workflow_dispatch: {}
pull_request:
branches:
- master
- release-*
permissions:
contents: read
env:
GO_VERSION: '1.23.8'
jobs:
webhook-upgrade-check:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Setup Env
uses: ./.github/actions/env-setup
- name: Setup KinD
run: |
go install sigs.k8s.io/kind@v0.29.0
kind delete cluster || true
kind create cluster --image=kindest/node:v1.31.9
- name: Install KubeVela CLI
run: curl -fsSL https://kubevela.io/script/install.sh | bash
- name: Install KubeVela baseline
run: |
vela install --set featureGates.enableCueValidation=true
kubectl wait --namespace vela-system --for=condition=Available deployment/kubevela-vela-core --timeout=300s
- name: Prepare failing chart changes
run: |
cat <<'CHART' > charts/vela-core/templates/defwithtemplate/resource.yaml
# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/resource.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
annotations:
definition.oam.dev/description: Add resource requests and limits on K8s pod for your workload which follows the pod spec in path 'spec.template.'
name: resource
namespace: {{ include "systemDefinitionNamespace" . }}
spec:
appliesToWorkloads:
- deployments.apps
- statefulsets.apps
- daemonsets.apps
- jobs.batch
- cronjobs.batch
podDisruptive: true
schematic:
cue:
template: |2
let resourceContent = {
resources: {
if parameter.cpu != _|_ if parameter.memory != _|_ if parameter.requests == _|_ if parameter.limits == _|_ {
// +patchStrategy=retainKeys
requests: {
cpu: parameter.cpu
memory: parameter.memory
}
// +patchStrategy=retainKeys
limits: {
cpu: parameter.cpu
memory: parameter.memory
}
}
if parameter.requests != _|_ {
// +patchStrategy=retainKeys
requests: {
cpu: parameter.requests.cpu
memory: parameter.requests.memory
}
}
if parameter.limits != _|_ {
// +patchStrategy=retainKeys
limits: {
cpu: parameter.limits.cpu
memory: parameter.limits.memory
}
}
}
}
if context.output.spec != _|_ if context.output.spec.template != _|_ {
patch: spec: template: spec: {
// +patchKey=name
containers: [resourceContent]
}
}
if context.output.spec != _|_ if context.output.spec.jobTemplate != _|_ {
patch: spec: jobTemplate: spec: template: spec: {
// +patchKey=name
containers: [resourceContent]
}
}
parameter: {
// +usage=Specify the amount of cpu for requests and limits
cpu?: *1 | number | string
// +usage=Specify the amount of memory for requests and limits
memory?: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
// +usage=Specify the resources in requests
requests?: {
// +usage=Specify the amount of cpu for requests
cpu: *1 | number | string
// +usage=Specify the amount of memory for requests
memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
}
// +usage=Specify the resources in limits
limits?: {
// +usage=Specify the amount of cpu for limits
cpu: *1 | number | string
// +usage=Specify the amount of memory for limits
memory: *"2048Mi" | =~"^([1-9][0-9]{0,63})(E|P|T|G|M|K|Ei|Pi|Ti|Gi|Mi|Ki)$"
}
}
- name: Load image
run: |
mkdir -p $HOME/tmp/
TMPDIR=$HOME/tmp/ make image-load
- name: Run Helm upgrade (expected to fail)
run: |
set +e
helm upgrade \
--set image.repository=vela-core-test \
--set image.tag=$(git rev-parse --short HEAD) \
--set featureGates.enableCueValidation=true \
--wait kubevela ./charts/vela-core --debug -n vela-system
status=$?
echo "Helm upgrade exit code: ${status}"
if [ $status -eq 0 ]; then
echo "Expected helm upgrade to fail" >&2
exit 1
fi
echo "Helm upgrade failed as expected"
- name: Dump webhook configurations
if: ${{ always() }}
run: |
kubectl get mutatingwebhookconfiguration kubevela-vela-core-admission -o yaml
kubectl get validatingwebhookconfiguration kubevela-vela-core-admission -o yaml
- name: Verify webhook validation remains active
run: ginkgo -v --focus-file requiredparam_validation_test.go ./test/e2e-test
- name: Cleanup kind cluster
if: ${{ always() }}
run: kind delete cluster --name kind

32
.gitignore vendored
View File

@@ -1,4 +1,4 @@
# Binaries for programs and plugins
# Binaries for programs and docgen
*.exe
*.exe~
*.dll
@@ -7,6 +7,7 @@
bin
_bin
e2e/vela
vela
# Test binary, build with `go test -c`
*.test
@@ -32,6 +33,15 @@ vendor/
# Vscode files
.vscode
.history
# Debug binaries generated by VS Code/Delve
__debug_bin*
*/__debug_bin*
# Webhook certificates generated at runtime
k8s-webhook-server/
options.go.bak
pkg/test/vela
config/crd/bases
@@ -39,22 +49,16 @@ _tmp/
references/cmd/cli/fake/source.go
references/cmd/cli/fake/chart_source.go
references/vela-sdk-gen/*
charts/vela-core/crds/_.yaml
.test_vela
tmp/
.vela/
# Dashboard
node_modules/
.eslintcache
references/dashboard/dist/
references/dashboard/package-lock.json
references/dashboard/src/.umi/
package-lock.json
references/dashboard/src/.umi-production/
# Swagger: generate Restful API
references/apiserver/docs/index.html
# check docs
git-page/
git-page/
vela.json
dist/

View File

@@ -1,18 +1,6 @@
run:
timeout: 10m
skip-files:
- "zz_generated\\..+\\.go$"
- ".*_test.go$"
skip-dirs:
- "hack"
- "e2e"
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
linters-settings:
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
@@ -23,24 +11,12 @@ linters-settings:
# default is false: such cases aren't reported by default.
check-blank: false
# [deprecated] comma-separated list of pairs of the form pkg:regex
# the regex is used to ignore names within pkg. (default "fmt:.*").
# see https://github.com/kisielk/errcheck#the-deprecated-method for details
ignore: fmt:.*,io/ioutil:^Read.*
exhaustive:
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: true
govet:
# report about shadowed variables
check-shadowing: false
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0.8
gofmt:
# simplify code: gofmt with `-s` option, true by default
@@ -53,11 +29,8 @@ linters-settings:
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 30
min-complexity: 35
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
dupl:
# tokens count to trigger issue, 150 by default
@@ -73,13 +46,6 @@ linters-settings:
# tab width in spaces. Default to 1.
tab-width: 1
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
@@ -107,20 +73,32 @@ linters-settings:
# Allow only slices initialized with a length of zero. Default is false.
always: false
revive:
rules:
- name: unused-parameter
disabled: true
linters:
enable:
- megacheck
- govet
- gocyclo
- gocritic
- goconst
- goimports
- gofmt # We enable this as well as goimports for its simplify mode.
- golint
- revive
- unconvert
- misspell
- nakedret
- exportloopref
- unused
- gosimple
- staticcheck
disable:
- rowserrcheck
- sqlclosecheck
- errchkjson
- contextcheck
presets:
- bugs
- unused
@@ -128,8 +106,28 @@ linters:
issues:
exclude-files:
- "zz_generated\\..+\\.go$"
- ".*_test.go$"
exclude-dirs:
- "hack"
- "e2e"
# Excluding configuration per-path and per-linter
exclude-rules:
- path: .*\.go
linters:
- errcheck
text: "fmt\\."
# Ignore unchecked errors from io/ioutil functions starting with Read
- path: .*\.go
linters:
- errcheck
text: "io/ioutil.*Read"
# Exclude some linters from running on tests files.
- path: _test(ing)?\.go
linters:
@@ -137,7 +135,7 @@ issues:
- errcheck
- dupl
- gosec
- scopelint
- exportloopref
- unparam
# Ease some gocritic warnings on test files.
@@ -146,6 +144,21 @@ issues:
linters:
- gocritic
# The preferFprint suggestion (sb.WriteString(fmt.Sprintf(...)) -> fmt.Fprintf(sb, ...))
# is a micro-optimization. The defkit package generates CUE code infrequently,
# so the performance difference is negligible and the current style is more readable.
- path: pkg/definition/defkit/
text: "preferFprint"
linters:
- gocritic
# Gosmopolitan complains of internationalization issues on the file that actually defines
# the translation.
- path: i18n\.go
text: "Han"
linters:
- gosmopolitan
# These are performance optimisations rather than style issues per se.
# They warn when function arguments or range values copy a lot of memory
# rather than using a pointer.
@@ -186,7 +199,15 @@ issues:
- text: "don't use an underscore"
linters:
- golint
- revive
- text: "package-comments: should have a package comment"
linters:
- revive
- text: "error-strings: error strings should not be capitalized or end with punctuation or a newline"
linters:
- revive
# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
@@ -203,7 +224,7 @@ issues:
new: false
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-per-linter: 0
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
max-same-issues: 0

98
.goreleaser.yaml Normal file
View File

@@ -0,0 +1,98 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
builds:
- id: vela-cli
binary: vela
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./references/cmd/cli/main.go
ldflags:
- -s -w -X github.com/oam-dev/kubevela/version.VelaVersion={{ .Version }} -X github.com/oam-dev/kubevela/version.GitRevision=git-{{.ShortCommit}}
env:
- CGO_ENABLED=0
- id: kubectl-vela
binary: kubectl-vela
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
main: ./cmd/plugin/main.go
ldflags:
- -s -w -X github.com/oam-dev/kubevela/version.VelaVersion={{ .Version }} -X github.com/oam-dev/kubevela/version.GitRevision=git-{{.ShortCommit}}
sboms:
- id: kubevela-binaries-sboms
artifacts: binary
documents:
- "${artifact}-{{ .Version }}-{{ .Os }}-{{ .Arch }}.spdx.sbom.json"
signs:
- id: kubevela-cosign-keyless
artifacts: checksum # sign the checksum file over individual artifacts
signature: "${artifact}-keyless.sig"
certificate: "${artifact}-keyless.pem"
cmd: cosign
args:
- "sign-blob"
- "--yes"
- "--output-signature"
- "${artifact}-keyless.sig"
- "--output-certificate"
- "${artifact}-keyless.pem"
- "${artifact}"
output: true
archives:
- format: tar.gz
id: vela-cli-tgz
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
builds:
- vela-cli
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
- format: zip
id: vela-cli-zip
builds:
- vela-cli
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
- format: tar.gz
id: plugin-tgz
builds:
- kubectl-vela
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
- format: zip
id: plugin-zip
builds:
- kubectl-vela
wrap_in_directory: '{{ .Os }}-{{ .Arch }}'
name_template: '{{ trimsuffix .ArtifactName ".exe" }}-{{ .Tag }}-{{ .Os }}-{{ .Arch }}'
files: [ LICENSE, README.md ]
checksum:
name_template: 'sha256sums.txt'
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

260
CHANGELOG/CHANGELOG-1.0.md Normal file
View File

@@ -0,0 +1,260 @@
# v1.0.7
This is a minor fix for release-1.0, please refer to release-1.1.x for the latest feature.
1. Fix podDisruptive field for inner traits #1844
# v1.0.6
1. fix bug: When the Component contains multiple traits of the same type, the status of the trait in the Application is reported incorrectly (#1731) (#1743)
2. Fix terraform component can't work normally, generate OpenAPI JSON schema for Terraform Component (#1738) (#1753)
3. Improve the logging system #1735 #1758
4. add ConcurrentReconciles for setting the concurrent reconcile number of the controller #1775
# v1.0.5
1. Fix Terraform application status issue (#1611)
2. application supports specifying different versions of Definition (#1597)
3. Enable Dynamic Admission Control for Application (#1619)
4. Update inner samples for "vela show xxx --web" (#1616)
5. fix empty rolloutBatch will panic whole controller bug (#1646)
6. Use stricter syntax check for CUE (#1643)
7. make ResourceTracker to own cluster-scope resource (#1634)
8. update docs
# v1.0.4
## Upgrade to this release
**Please update Application CRD to upgrade from v1.0.3 to this release**
```
kubectl apply -f https://raw.githubusercontent.com/kubevela/kubevela/master/charts/vela-core/crds/core.oam.dev_applications.yaml
```
**Check the upgrade docs to upgrade from other release: https://kubevela.io/docs/advanced-install#upgrade**
## Changelog
1. add more PVC volume traits and docs (#1524)
2. automatically sync vela api code to the repo([kubevela-core-api](https://github.com/oam-dev/kubevela-core-api)) on release, you can use this repo as import package for kubevela integration (#1523)
3. fix cue template of worker and ingress with more accurate error info (#1532)
4. add critical path k8s event for Application (#1463)
5. support K8s Deployment for AppRollout #1539 #1557
6. vela cli: enable "vela show" to support namespaced capability (#1521)
7. Add scpoe reference in Application object `status.Service` (#1540)
8. vela cli: `vela show` support list the parameter of ComponentDefinition created by helm charts (#1543)
9. Add revision mechanism for Component/Trait Definition and default revision histroy will keep 20 revisions #1531
10. fix CRD for legacy K8s cluser(<=1.14) (#1531)
11. fix duplate key in kubevela chart webhook yaml (#1571)
12. Check whether parameter.cmd is nill for `sidecar` trait (#1575)
13. add e2e-test into test coverage report (#1553)
14. support krew install for kubectl vela plugin #1582
15. fix controller cannot start due to the format error of the third-party CRD (#1584)
16. use accelerate domain for helm chart repo to speed up for global users (#1585)
17. embed rollout in an application, now you can use rolloutPlan in Application (#1568)
18. Support server-side Terraform as cloud resource provider #1519
# v1.0.3
More end user guide was added in `Application Deployment` section.
1. add helm test to verify the chart of KubeVela have been installed successfully (#1415)
2. fix bug which Component/TraitDefinition won't work when contains “`_|_`” in value (#1450)
3. add volumes definition in worker/webservice (#1459)
4. Remove local kind binary dependency #1458
5. ignore error not found when deleting resourceTracker (#1462)
6. add context.appRevisionNum as runtime context (#1466)
7. implement cli `vela system live-diff` to check diff before upgrade (#1419)
8. add webhook validation on CUE template outputs name (#1460)
9. Fix helm chart about wrong webhook policy (#1483)
10. Remove trait-injector from controller options (#1490)
12. add app name as label for AppRevision (#1488)
13. Introduce vela as a kubectl plugin (#1485)
14. update status of appContext by patch to avoid resourceVersion conflict error (#1500)
15. add workloadDefinitionRef to application status.services (#1471)
16. Add garbage collection mechanism for AppRevision, it will only keep 10 revisions by default (#1501)
17. Remove AGE in definition crd print columns (#1509)
# v1.0.2
1. remove no used ingress notes in KubeVela charts (#1405)
2. fix import inner package in the format of third party package path and add docs (#1412 #1417)
3. vela cli support use "vela system cue-packages" to list cue-package (#1417)
4. Fix bug that the registered k8s built-in gvk does not exist in third party package path (#1414)
5. Fix bug that patchKey not work when strategyUnify function not work with close call (#1430)
6. add podDisruptive to traitdefinition to notify wether a trait update will cause restart of pod or not (#1192)
7. Add a new cloneset scale controller (#1301)
8. Support garbage collection for across-namespace workloads and traits (#1421)
9. Add short name for crds && Remove redundant and ambiguous short names #1434
10. Refresh built-in packages when component/trait definition are registered (#1402)
**You should upgrade following CRDs to upgrade from v1.0.1, all CRDs changes are backward compatible**:
```
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_resourcetrackers.yaml
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/standard.oam.dev_rollouttraits.yaml
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_traitdefinitions.yaml
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_applications.yaml
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_approllouts.yaml
kubectl apply -f https://raw.githubusercontent.com/oam-dev/kubevela/master/charts/vela-core/crds/core.oam.dev_applicationrevisions.yaml
```
# v1.0.1
There are some fixes contained for release v1.0.0:
1. add initial finalizer and abandon support for app rollout, you can revert quickly now(#1362)
2. fix vela show fail to get component definition (#1366)
3. fix application context controller should not own application object (#1370)
4. fix: "system-definition-namespace" chart args not work in vela chart (#1371)
5. fix resources created in different namespace can not be updated (#1374)
6. fix automatically generate schema for helm values fail in array list value (#1375)
7. upgrade API version of mutate/validate webhook to v1 (#1383)
8. fix webhook not work by helm install kubevela without cert-manager #1267
7. remove create cert-manager issuer in vela CLI env command (#1267)
8. refine CRD print results: add additional print column and short Name for CRD (#1377)
Many other docs improvements.
Thanks for all the contributors!
# v1.0.0
We're excited to announce the release of KubeVela 1.0.0! 🎉🎉🎉🎉
Thanks to all the new and existing contributors who helped make this release happen!
You may already noticed the awesome community has shipped a brand new KubeVela website https://kubevela.io ! 🎉🎉
If you're new to KubeVela, feel free to start with its [getting started page](https://kubevela.io/docs/quick-start) and learning about [its core concepts](https://kubevela.io/docs/concepts). The full feature of vela is explained in [platform builder guide](https://kubevela.io/docs/platform-engineers/overview).
For existing adopters, please follow the [installing](https://kubevela.io/docs/install) or [upgrading](https://kubevela.io/docs/install#upgrade) KubeVela to version 1.0.0.
## Acknowledgements ❤️
Thanks to everyone who made this release possible!
@captainroy-hy @sunny0826 @leejanee @yangsoon @wangyikewxgm @hongchaodeng @zzxwill @ryanzhang-oss @resouer @wonderflow @hprotzek @vnzongzna @majian159 @Cweiping @mengjiao-liu @kushthedude @unknwon @Ghostbaby @mosesyou @dylandee @wangkai1994 @LeoLiuYan @just-do1 @hoopoe61 @Incubator4th @TomorJM @hahchenchen @zeed-w-beez @allenhaozi @mason1kwok @kinsolee @shikanon @96RadhikaJadhav
# What's New
## API version upgraded to `v1beta1`
All user facing APIs have been upgraded to `v1beta1`, you could learn more details in the [API Changes](#API-Changes) section below.
## `ComponentDefinition`
The [`ComponentDefinition`](https://kubevela.io/docs/platform-engineers/definition-and-templates) now takes the responsibility of defining encapsulation and abstraction for your app components. And you are free to choose to use Helm chart or CUE to define them. This leaves `WorkloadDefinition` focusing on declaring workload characteristic such as `replicable`, `childResource` etc, so the `spec.schematic` field in `WorkloadDefinition` could be deprecated in next few releases.
## Application Versioning and Progressive Rollout
* A rolling style upgrade was supported by the object called [`AppRollout`](https://kubevela.io/docs/rollout/rollout/). It can help you to upgrade an Application from source revision to the target and support Blue/Green, Canary and A/B testing rollout strategy.
* Multi-Version, Multi-Cluster Application Deployment was supported by the object called [`AppDeployment`](https://kubevela.io/docs/rollout/appdeploy). It can help you to deploy multiple revision apps to multiple clusters with leverage of Service Mesh.
## Visualization Enhancement
KubeVela now automatically generates Open-API-v3 Schema for all the definition abstractions including CUE, Helm and raw Kubernetes resource templates. You can integrate KubeVela with your own dashboard and [generate forms from definitions](https://kubevela.io/docs/platform-engineers/openapi-v3-json-schema) at ease!
## Application Abstraction
There're several major updates on the `Application` abstraction itself:
* [Helm based abstraction](https://kubevela.io/docs/helm/component) was supported with few [limitations](https://kubevela.io/docs/helm/known-issues). In other words, you can now declare any existing Helm chart as an app component in KubeVela. The most exciting part is the trait system of KubeVela works seamlessly with the Helm based components, yes, just [attach trait](https://kubevela.io/docs/helm/trait) to it!
* [Raw Kubernetes resource templates](https://kubevela.io/docs/kube/component) was still supported, that's simpler but less powerful comparing to [the CUE way](https://kubevela.io/docs/cue/component). Of course, the trait system also [works seamless](https://kubevela.io/docs/kube/trait) with it.
## CUE Template Enhancement
* [Runtime information context](https://kubevela.io/docs/cue/component#full-available-information-in-cue-context) was supported, you could use this information to render the resources in CUE template.
* [Data passing](https://kubevela.io/docs/cue/advanced#data-passing) was supported during CUE rendering. Specifically, the `context.output` contains the rendered workload API resource and the `context.outputs.<xx>` contains all the other rendered API resources.
* [K8s API resources are now built-in packages](https://kubevela.io/docs/cue/basic#import-kube-package): the K8s built-in API including CRD will be discovered by KubeVela and automatically built as CUE packages, you can use it in your CUE template. This is very helpful in validation especially on writing new CUE templates.
* [Dry-run Application](https://kubevela.io/docs/platform-engineers/debug-test-cue) was supported along with a debug and test guide for building CUE template. You can create CUE based definitions with confidence now!
* [Deploy resources in different namespaces](https://kubevela.io/docs/cue/cross-namespace-resource/) was supported now, you can specify namespace in your CUE template.
## Declare and Consume Cloud Resources
* [Declare and consume cloud resources](https://kubevela.io/docs/platform-engineers/cloud-services/) were supported now in KubeVela, you can easily register cloud resources by `ComponentDefinition` and bind the service into the applications.
## A brand new website
We have upgraded our website [kubevela.io](https://github.com/oam-dev/kubevela.io) based on "Docusaurus". All docs is automatically generated from [KubeVela](https://github.com/oam-dev/kubevela/tree/master/docs) while the blogs are on [kubevela.io/blogs](https://github.com/oam-dev/kubevela.io/tree/main/blog).
# Changes
## API Changes
1. Change definition from cluster scope to namespace scope #1085 the cluster scope CRD was still compatible.
2. Application Spec changes.
- `spec.components[x].settings` in v1alpha2 was changed to `spec.components[x].properties` in v1beta1
- `spec.components[x].traits[x].name` in v1alpha2 was changed to `spec.components[x].traits[x].type` in v1beta1
Example of the v1alpha2 Spec:
```
apiVersion: core.oam.dev/v1alpha2
kind: Application
metadata:
name: first-vela-app
spec:
components:
- name: express-server
type: webservice
settings:
...
traits:
- name: ingress
properties:
...
```
Example of the v1beta1 Spec:
```
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-app
spec:
components:
- name: express-server
type: webservice
properties:
...
traits:
- type: ingress
properties:
...
```
## Deprecation
1. route/autoscaler/metrics these three traits and their controllers were moved out from the vela core. #1172 You could still find and use them from https://github.com/oam-dev/catalog.
2. the dashboard was deprecated in KubeVela and we will merge these features and create a new in [velacp](https://github.com/oam-dev/velacp) soon.
3. vela CLI will only support run/modify an app from appfile by using `vela up`, so some other commands related were deprecated, such as `vela svc deploy`, `vela <trait> ...`
## Other Notable changes
1. `prometheus` and `certmanager` CRD are not required in installation #1005
2. Parent overrides child when annotation/labels conflicts && one revision will apply once only in force mode && AC.status CRD updated #1109
3. `ApplicationRevision` CRD Object was introduced as revision of Application #1214
4. KubeVela chart image pull policy was changed to `Always` from `IfNotPresent` #1228
5.` Application` Controller will use `AppContext` to manage the resources generation #1245, in other word, you can run KubeVela `Application Controller` without any `v1apha2 Object`.
6. The regular time for all events automatically sync changed from 5min to 1 hour #1285
7. `vela system dry-run` will print raw K8s resources in a better format #1246
# Known Issues
1. Built-in CUE package was not supported now for K8s Cluster v1.20, we will support in the next release. #1313
2. Resources created in different namespace from application will only be garbage collected (GC) when the application deleted, an update will not trigger GC for now, we will fix it in the next release. #1339
Thanks again to all the contributors!

243
CHANGELOG/CHANGELOG-1.1.md Normal file
View File

@@ -0,0 +1,243 @@
# v1.1.3
## What's Changed
* Fix: remove ocm addon enable in Makefile by @Somefive in https://github.com/oam-dev/kubevela/pull/2327
* Chore(cli): remove useless deploy.yaml by @chivalryq in https://github.com/oam-dev/kubevela/pull/2335
* Fix: do not override the workload name if its specified by @FogDong in https://github.com/oam-dev/kubevela/pull/2336
* Fix: remove appcontext CRD and controller by @wonderflow in https://github.com/oam-dev/kubevela/pull/2270
* Feat: add revisionHistoryLimit to helm chart by @haugom in https://github.com/oam-dev/kubevela/pull/2343
* Chore: deprecate 'vela dashboard' apiserver by @chivalryq in https://github.com/oam-dev/kubevela/pull/2341
* Chore: remove e2e-api-test in rollout test to speed up by @chivalryq in https://github.com/oam-dev/kubevela/pull/2345
* Docs: rollout demo by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2348
* Feat: add vela minimal chart by @FogDong in https://github.com/oam-dev/kubevela/pull/2340
* Fix: runc security issue by @Somefive in https://github.com/oam-dev/kubevela/pull/2350
* Docs: add a WeChat QR code by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2351
* Feat: Initialize api for vela dashboard and CLI by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2339
* Fix(helm chart): fix startup args for apiserver by @yangsoon in https://github.com/oam-dev/kubevela/pull/2362
* Fix: dockerfile e2e test command lack environment configuration by @Somefive in https://github.com/oam-dev/kubevela/pull/2231
* Feat: inputs support setting value in array by @leejanee in https://github.com/oam-dev/kubevela/pull/2358
* Feat: support rollout controller for StatefulSet by @whichxjy in https://github.com/oam-dev/kubevela/pull/1969
* Fix: delete deprecated vela dashboard in e2e setup by @FogDong in https://github.com/oam-dev/kubevela/pull/2379
* Fix: try fix CI unit test by @wonderflow in https://github.com/oam-dev/kubevela/pull/2376
* Feat: Addon REST API by @hongchaodeng in https://github.com/oam-dev/kubevela/pull/2369
* Fix: fix built in workflow steps by @FogDong in https://github.com/oam-dev/kubevela/pull/2378
* Feat: add vela minimal in make manifests by @FogDong in https://github.com/oam-dev/kubevela/pull/2389
* Chore(deps): bump go.mongodb.org/mongo-driver from 1.3.2 to 1.5.1 by @wonderflow in https://github.com/oam-dev/kubevela/pull/2391
* Fix: use aliyun oss istio chart by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2392
* Support remote git repo for Terraform configuration by @zzxwill in https://github.com/oam-dev/kubevela/pull/2337
* Feat: add inputs test cases and optimize code by @leejanee in https://github.com/oam-dev/kubevela/pull/2388
* Fix: pass owner to workload if rollout failed by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2397
* Feat: bootstrap multicluster testing by @Somefive in https://github.com/oam-dev/kubevela/pull/2368
* Feat(workflow): add depends on in workflow by @FogDong in https://github.com/oam-dev/kubevela/pull/2387
* Fix: make the name of Terraform credential secret same to component name by @zzxwill in https://github.com/oam-dev/kubevela/pull/2399
* Fix: revision GC in workflow mode by @FogDong in https://github.com/oam-dev/kubevela/pull/2355
* Fix: Applied Resources Statistics Error by @leejanee in https://github.com/oam-dev/kubevela/pull/2398
# v1.1.2
This is a bug fix release.
Since the big v1.1.1 release, many users had given it try for our new features. We sincerely appreciate your enthusiasm and amazing feedback.
There are some small issues found by our users and we have fixed them. Most notably:
- The Charts of addons (prometheus, etc.) are moved to OSS to provide better accessibility and network speed.
- The FluxCD and Terraform addons are not enabled by default. Users can install them via `vela addon enable ...`.
We have located more small issues around templates as well and fixed them, and decided a bug fix release ASAP.
Users are highly recommended to use the v1.1.2 release instead. We want to thank all of our users sincerely! ❤️ ❤️ ❤️
## What's Changed
* Fix(rollout): improve rollback experience by @hongchaodeng in https://github.com/oam-dev/kubevela/pull/2294
* Fix: fix typo by @hughxia in https://github.com/oam-dev/kubevela/pull/2317
* Fix: fix cluster-gateway image tag in chart by @Somefive in https://github.com/oam-dev/kubevela/pull/2318
* Fix: workflow example by @leejanee in https://github.com/oam-dev/kubevela/pull/2323
* Fix: fix multicluster values bug by @Somefive in https://github.com/oam-dev/kubevela/pull/2326
* Fix(helm): Do not install fluxcd and terraform by default by @yangsoon in https://github.com/oam-dev/kubevela/pull/2328
* Fix: move charts from github repo to Alibaba Cloud OSS repo by @zzxwill in https://github.com/oam-dev/kubevela/pull/2324
* Fix: add comments and adjust helm typed component's spec by @zzxwill in https://github.com/oam-dev/kubevela/pull/2332
* Fix: fix multicluster template bug by @Somefive in https://github.com/oam-dev/kubevela/pull/2333
* Feat: add args for init-contianer and sidecar by @Gallardot in https://github.com/oam-dev/kubevela/pull/2331
# v1.1.1
Users are highly recommended to use the v1.1.2 release instead.
# Changes since v1.1.0
1. rollout trait change IncreaseFirst to DecreaseFirst (#2142)
2. Feat(definition): add built-in dingtalk workflow step definition (#2152)
3. Fix(dryrun): add default name and namespace in dry run (#2150)
4. Docs: fix typo about workflow rollout (#2163)
5. Fix: traitdefinition controller reconcile in a infinite loop (#2157)
6. Refactor: change the ownerReference of configMap which store the parameter for each revision to definitionRevision (#2164)
7. Fix: add fluxcd dashbaords (#2130)
8. Feat: modify apply component cue action to support skipWorkload trait (#2167)
9. Trait: Add TraitDefinition for PVC (#2158)
10. initilize KubeVela codeowner file (#2178)
11. Feat(cue): support access components artifacts in cue template context (#2161)
12. Feat(addon): add default enable addon (#2172)
13. Feat(envbinding): add resourceTracker for envBinding (#2179)
14. Fix: align all CUE template keyword to use parameter (#2181)
15. Feat: add vela live-diff , dry-run, cue-packages into vela commands (#2182)
16. Fix: move Terraform defintions charts/vela-core/templates/definitions (#2176)
17. Fix: add patchkey to volumes (#2191)
18. Feat(workflow): add depends-on workflow step definition (#2190)
19. Feat: add pprof (#2192)
20. Feat: add more registry traits as internal ones (#2184)
21. Fix: support more Terraform variable types (#2194)
22. Fix: update help message of ingress trait (#2198)
23. Refactor(#2185): remove unused config options in Makefile (#2200)
24. Docs: update environment design (#2199)
25. Fix: modify service-binding with more accurate type (#2209)
26. Feat(healthscope): add health-scope-binding policy and e2e test for health scope (#2205)
27. Feat(workflow): support dingding and slack in webhook notification (#2213)
28. Feat(workflow): add apply application workflow step definition (#2186)
29. Feat(workflow): input.ParameterKey described like paths notation (#2214)
30. Fix(upgrade): upgrade controller-tools from 0.2 to 0.6.2 (#2215)
31. Fix(app): When only the policy is specified, the resources in the app need to be rendered and created (#2197)
32. Feat(workflow): outputs support script notation (#2218)
33. Fix(addon): rename clonset-service to clonse (#2219)
34. Feat(workflow): Add op.#Task action (#2220)
35. Fix(webhook): only check the uniqueness of component names under the same namespace (#2222)
36. Feat(apiserver): add apiserver service to helm chart (#2225)
37. Fix: add flag --label to filer components and traits (#2217)
38. Fix(addons): remove kruise addon (#2226)
39. Feat: add pressure-test parameter optimize (#2230)
40. Fix: align the envbind-app name with the original application name (#2232)
41. Feat(workflow): add status check for workflow mutil-env deploy (#2229)
42. Refactor: move from io/ioutil to io and os package (#2234)
43. Feat(trait): annotation and labels trait should also affect the workload object along with pod (#2237)
44. Feat(app): show health status from HealthScope in application (#2228)
45. Fix: kustomize json patch trait definition (#2239)
46. Docs: canary rollout demo (rollout part only) (#2177)
47. Feat: vela show annotations display undefined should be refined (#2244)
48. Feat: support code-generator and sync to kubevela-core-api (#2174)
49. Feat: add image auto update for gitops (#2251)
50. Fix: fix the output DB_PASSWORD for rds definition (#2267)
51. Fix: add alibaba eip cloud resource (#2268)
52. Refactor application code to make it run as Dag workflow (#2236)
53. Fix: remove podspecworkload controller and CRD (#2269)
54. Feat: add more options for leader election configuration to avoid pressure on apiserver
55. Feat: istio addon and use case demo (#2276)
56. Fix: patch any key using retainKeys strategy (#2280)
57. Fix: add exponential backoff wait time for workflow reconciling (#2279)
58. Refactor: change field exportKey to valueFrom (#2284)
59. Fix(helm): enable apiserver by default (#2249)
60. Feat: alibaba provider addon (#2243)
61. Support MultiCluster EnvBinding with cluster-gateway (#2247)
62. Fix: fix apply application workflow step (#2288)
63. Fix: fix alibaba cloud rds module (#2293)
64. Feat: add commit msg in kustomize (#2296)
65. Feat: allow user specify alibaba provider addon's region (#2297)
66. Fix: generate service in canary-traffic trait (#2300)
67. Fix: imagePullSecrets error from cloneset (#2305)
68. Fix: add application logging dashboard (#2301)
69. Feat: Make applicationComponent can be modified in step (#2304)
70. Fix: generate service in canary-traffic trait (#2307)
# v1.1.0
Note: the documents (https://kubevela.io/) for v1.1.0 is still WIP, so we mark it as pre-release. The ETA for documents is next 2 weeks.
We would like to extend our thanks to all [the new and existing contributors](https://github.com/oam-dev/kubevela/graphs/contributors) who helped make this release happen.
Please follow the guide to [install](https://kubevela.io/docs/next/getting-started/quick-install) or [upgrade](https://kubevela.io/docs/next/platform-engineers/advanced-install/) KubeVela to version v1.1.0.
## What's New
- **Hybrid Environment App Delivery Control plane**
- In the new release, we have fully upgraded KubeVela to a multi-cluster/hybrid-cloud/multi-cloud app delivery control plane with leverage of OAM as the consistent app delivery model across clouds and infrastructures.
- **Workflow**
- KubeVela has added a Workflow mechanism that empowers users to glue any operational tasks to customize the control logic to build more complex operations. Workflow is modular by design and each module is mainly composed in CUE -- so you can define complex operations in a declarative, data-driven manner.
- **Environment**
- KubeVela added an Initializer which allow users to define what constructs the environment. The environment Initialized by the Initilizer could contain different kinds of resources include K8s cluster, system components, policies and almost everything. Of course, you can destry an environment very easily with the help of Initializer.
- **Out of Box Addons**
- With the help of Initilizer, KubeVela has support lots of out of box addons. You can list/enable/disable them by `vela addon` command. Each addon is an Initializer that deloy the CRD Controllers and other resources related.
- **Cloud Resources Support**
- We also support terraform to provision almost every cloud resources and pass through to other components defined in KubeVela application.
- **Tools to edit and manage X-Definition**
- We also provide the `vela def` tool sets to provide unified CUE based capability to manage X-Definition.
- **Others**
- Allow specify name for component revision auto-generated by Application. Allow specify name for auto generated Definition revision.
- Controller runtime dependency upgrade that can compatible with Kubernetes v1.21 . KubeVela support Kubernetes v1.18~v1.21.
- Other details you could read changelog in the release history.
## Change log since v1.1-rc2
1. fix configmap patchkey bug (#2080)
2. Merge velacp to apiserver branch in oam repo (#2039) (#2127) (#2087)
3. support rollout controller seprated and install as helm chart in runtime cluster (#2075)
4. fix bug that KubeVela can not be installed in specified namespace (#2083)
5. enable vela def to use import decl (#2084)
6. enhance envbinding: support apply resources to cluster (#2093)
7. Add obsevability addon (#2091)
8. Feat(vela): add vela workflow suspend command (#2108)
9. feat(def): add built-in workflow definitions (#2094)
10. Feat(vela): add vela workflow resume command (#2114)
11. upgrade openkruise version to v0.9.0 (#2076)
12. Fix(workflow): set workload name in configmap if the name is not specified (#2119)
13. helm component support OSS bucket (#2104)
14. add rollout demo with Workflow (#2121)
15. Support script as parameter and make the WorkflowStepDefinition more universal (#2124)
16. fix(cli) fix bug when vela show componetdefinition's workload type is AutoDetectWorkloadDefinition (#2125)
17. Fix(workflow): set the namespace to app's ns if it's not specified (#2133)
18. fix specify external revision bug (#2126)
19. add CUE-based health check in HealthScope controller (#1956)
20. Feat(addon): Add source and patch to kustomize definition (#2138)
21. Feat(vela): add vela workflow terminate and restart command (#2131)
# v1.1.0-rc.2
1. Allow users to specify component revision name in Application (#1929) the new field `externalRevision` can specify the revision name.
```
kind: Application
spec:
components:
- name: mycomp
type: webservice
externalRevision: my-revision-v1
properties:
...
```
2. Add more workflow demo and fix some demos #2042 #2059 #2060 #2064
3. Add cloneset ComponentDefinition into kruise addon (#2050)
4. definitions support specify the revision name (#2044), you can specify the name by adding an annotation `definitionrevision.oam.dev/name`
```
apiVersion: core.oam.dev/v1beta1
kind: ComponentDefinition
metadata:
name: worker
annotations:
# you can specify the revision name in annotations
definitionrevision.oam.dev/name: "1.1.3"
spec:
...
```
5. fix definition controller log error cause by openapi schema generation error (#2063)
6. Add add-on input go-template implementation (#2049)
# v1.1.0-rc.1
1. Workflow support specify Order Steps by Field Tag (#2022)
2. support application policy (#2011)
3. add OCM multi cluster demo (#1992)
4. Fix(volume): separate volume to trait (#2027)
5. allow application skip gc resource and leave workload ownerReference controlled by rollout(#2024)
6. Store component parameters in context (#2030)
7. Allow specify chart values for helm trait(#2033)
8. workflow support http provider (#2029)
9. Use vela def commands to replace mergedef.sh for internal definition generation (#2031)
# Other release histories
Refer to https://github.com/oam-dev/kubevela/releases

205
CHANGELOG/CHANGELOG-1.2.md Normal file
View File

@@ -0,0 +1,205 @@
# v1.2.2
## What's Changed
* Feat: add JFrog webhook trigger by @chwetion in https://github.com/oam-dev/kubevela/pull/3104
* Fix: trait/comp command output without a new line by @chivalryq in https://github.com/oam-dev/kubevela/pull/3112
* Feat: support wild match for env patch by @Somefive in https://github.com/oam-dev/kubevela/pull/3111
* Fix: fix revision will change when add new trait with skiprevisionaffect to application by @chwetion in https://github.com/oam-dev/kubevela/pull/3032
* Fix: add app samples for Terraform definition by @zzxwill in https://github.com/oam-dev/kubevela/pull/3118
* Feat: add port name in webservice by @FogDong in https://github.com/oam-dev/kubevela/pull/3110
* Fix: add imagePullSecrets for helm templates to support private docker registry by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3122
* Fix: workflow skip executing all steps occasionally by @leejanee in https://github.com/oam-dev/kubevela/pull/3025
* Fix: support generate Terraform ComponentDefinition from local HCL file by @zzxwill in https://github.com/oam-dev/kubevela/pull/3132
* Fix: prioritize namespace flag for `vela up` by @devholic in https://github.com/oam-dev/kubevela/pull/3135
* Fix: handle workflow cache reconcile by @FogDong in https://github.com/oam-dev/kubevela/pull/3128
* Feat: extend gateway trait to set class in spec by @devholic in https://github.com/oam-dev/kubevela/pull/3138
* Fix: add providerRef in generated ComponentDefinition by @zzxwill in https://github.com/oam-dev/kubevela/pull/3142
* Fix: retrieve Terraform variables from variables.tf by @zzxwill in https://github.com/oam-dev/kubevela/pull/3149
* Feat: addon parameter support ui-shcema by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3154
* Fix: vela addnon enable cannot support '=' by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3156
* Fix: add context parameters into the error message by @zeed-w-beez in https://github.com/oam-dev/kubevela/pull/3145
* Feat: support vela show for workflow step definition by @FogDong in https://github.com/oam-dev/kubevela/pull/3140
## New Contributors
* @devholic made their first contribution in https://github.com/oam-dev/kubevela/pull/3135
**Full Changelog**: https://github.com/oam-dev/kubevela/compare/v1.2.1...v1.2.2
# v1.2.1
## What's Changed
* Fix: can't query data from the MongoDB by @barnettZQG in https://github.com/oam-dev/kubevela/pull/3095
* Fix: use personal token of vela-bot instead of github token for homebrew update by @wonderflow in https://github.com/oam-dev/kubevela/pull/3096
* Fix: acr image no version by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/3100
* Fix: support generate cloud resource docs in Chinese by @zzxwill in https://github.com/oam-dev/kubevela/pull/3079
* Fix: clear old data in mongodb unit test case by @barnettZQG in https://github.com/oam-dev/kubevela/pull/3103
* Feat: support external revision in patch component by @Somefive in https://github.com/oam-dev/kubevela/pull/3106
* Fix: file under the path of github addon registry is not ignored by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3099
* Fix: Vela is crashed, when disabling addon, which needs namespace vela-system by @StevenLeiZhang in https://github.com/oam-dev/kubevela/pull/3109
* Fix: rollout workload namespace not aligned with rollout by @Somefive in https://github.com/oam-dev/kubevela/pull/3107
## New Contributors
* @StevenLeiZhang made their first contribution in https://github.com/oam-dev/kubevela/pull/3099
**Full Changelog**: https://github.com/oam-dev/kubevela/compare/v1.2.0...v1.2.1
# v1.2.0
❤️ KubeVela v1.2.0 released ! ❤️
Docs have been updated about the release at https://kubevela.io/docs/next/ .
**Changelog Between v1.2.0-rc.2~v1.2.0**: https://github.com/oam-dev/kubevela/compare/v1.2.0-rc.2...v1.2.0
## What's New
### UI Console Supported
Check how to use the GUI by this [how-to document](https://kubevela.io/docs/next/how-to/dashboard/application/create-application).
**GUI frontend code repo is here: https://github.com/oam-dev/velaux**
**API Server Code is here: https://github.com/oam-dev/kubevela/tree/master/pkg/apiserver**
We also add a [VelaQL](https://kubevela.io/docs/next/platform-engineers/system-operation/velaql) feature that could allow apiserver to interact with K8s Object in an extended way.
### Addon System
We add a new addon system in v1.2, this helps KubeVela install it's extension including more than X-Definition files.
The community has already supported some built-in addons herehttps://github.com/oam-dev/catalog/tree/master/addons , there're also some experimental addons here https://github.com/oam-dev/catalog/tree/master/experimental/addons
You can learn how to use it [from docs](https://kubevela.io/docs/next/how-to/cli/addon/addon).
You can [build and contribute](https://kubevela.io/docs/next/platform-engineers/addon/intro) your own addons.
### CI/CD Integration
You can use triggers to integrate with different CI and image registry systems on VelaUX.
* Feat: add ACR webhook trigger for CI/CD (#3044)
* Feat: add Harbor image registry webhook trigger for CI/CD (#3065)
* Feat: add DockerHub webhook trigger for CI/CD (#3081)
### Cloud Resources Enhancement
* Feature: support terraform/provider-azure addon by @zzxwill in https://github.com/oam-dev/kubevela/pull/2402
* Fix: aws/azure Terraform provider are broken by @zzxwill in https://github.com/oam-dev/kubevela/pull/2513 , https://github.com/oam-dev/kubevela/pull/2520 , https://github.com/oam-dev/kubevela/pull/2465
* Feat: Add Terraform Azure Storage Account by @maciejgwizdala in https://github.com/oam-dev/kubevela/pull/2646
* Docs: add vpc and vswitch cloud resource templates of alicloud by @lowkeyrd in https://github.com/oam-dev/kubevela/pull/2663
* Fix: allow external cloud resources to be kept when Application is deleted by @zzxwill in https://github.com/oam-dev/kubevela/pull/2698
* Feat: add alibaba cloud redis definition by @chivalryq in https://github.com/oam-dev/kubevela/pull/2507
* Feat: envbinding support cloud resource deploy and share by @Somefive in https://github.com/oam-dev/kubevela/pull/2734
* Fix: support naming a terraform provider by @zzxwill in https://github.com/oam-dev/kubevela/pull/2794
### Multi-Cluster Enhancement
* Feat: multicluster support ServiceAccountToken by @Somefive in https://github.com/oam-dev/kubevela/pull/2356
* Feat: add secure tls for cluster-gateway by @Somefive in https://github.com/oam-dev/kubevela/pull/2426
* Feat: add support for envbinding with namespace selector by @Somefive in https://github.com/oam-dev/kubevela/pull/2432
* Feat: upgrade cluster gateway to support remote debug by @Somefive in https://github.com/oam-dev/kubevela/pull/2673
* Feat: set multicluster enabled by default by @Somefive in #2930
### Workflow Enhancement
* Feat: add apply raw built in workflow steps by @FogDong in https://github.com/oam-dev/kubevela/pull/2420
* Feat: add read object step def by @FogDong in https://github.com/oam-dev/kubevela/pull/2480
* Feat: add export config and secret def for workflow by @FogDong in https://github.com/oam-dev/kubevela/pull/2484
* Feat: support secret in webhook notification by @FogDong in https://github.com/oam-dev/kubevela/pull/2509
* Feat: Record workflow execution state by @leejanee in https://github.com/oam-dev/kubevela/pull/2479
* Fix(cli): use flag instead of env in workflow cli by @FogDong in https://github.com/oam-dev/kubevela/pull/2512
* Not update resource if render hash equal. by @leejanee in https://github.com/oam-dev/kubevela/pull/2522
* Feat: add email support in webhook notification by @FogDong in https://github.com/oam-dev/kubevela/pull/2535
* Feat: add render component and apply component remaining by @FogDong in https://github.com/oam-dev/kubevela/pull/2587
* Feat: add list application records api by @FogDong in https://github.com/oam-dev/kubevela/pull/2757
* Feat: component-pod-view support filter resource by cluster name and cluster namespace by @yangsoon in https://github.com/oam-dev/kubevela/pull/2754
* Feat: workflow support update by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2760
* Feat: add workflow reconciling backoff time and failed limit times by @FogDong in #2881
### Component/Trait Enhancement
* Feat: add health check and custom status for helm type component by @chivalryq in https://github.com/oam-dev/kubevela/pull/2499
* Feat: add nocalhost dev config trait definition by @yuyicai in https://github.com/oam-dev/kubevela/pull/2545
* Feat(rollout): fill rolloutBatches if empty when scale up/down by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2569
* Feat: allow import package in custom status cue template by @Chwetion in https://github.com/oam-dev/kubevela/pull/2585
* Feat: add trait service-account by @yangsoon in https://github.com/oam-dev/kubevela/pull/2878
* Fix: add ingress class as arguments by @Somefive in https://github.com/oam-dev/kubevela/pull/2445
* Fix: add libgit2 support for gitops by @FogDong in https://github.com/oam-dev/kubevela/pull/2477
* Fix: make nginx class to be default value and allow pvc trait to attach more than once by @wonderflow in https://github.com/oam-dev/kubevela/pull/2466
* Feat: add imagePullPolicy/imagePullSecret to task def by @chivalryq in https://github.com/oam-dev/kubevela/pull/2503
### Vela CLI Enhancement
* Feat: add vela prob to test cluster by @wonderflow in https://github.com/oam-dev/kubevela/pull/2635
* Feat: vela logs support multicluster by @chivalryq in https://github.com/oam-dev/kubevela/pull/2593
* Feat: vela-cli support use ocm to join/list/detach cluster by @yangsoon in https://github.com/oam-dev/kubevela/pull/2599
* Feat: add vela exec for multi cluster by @wonderflow in https://github.com/oam-dev/kubevela/pull/2299
* Feat: multicluster vela status/exec/port-forward by @Somefive in https://github.com/oam-dev/kubevela/pull/2662
* Fix: support `-n` flag for all commands to specify namespace by @chivalryq in https://github.com/oam-dev/kubevela/pull/2719
* Feat: vela delete add wait and force options by @yangsoon in https://github.com/oam-dev/kubevela/pull/2747
* Feat: add workflow rollback cli by @FogDong in https://github.com/oam-dev/kubevela/pull/2795
* Refactor: refine cli commands && align kubectl-vela with vela && use getnamespaceAndEnv for all by @wonderflow in #3048
### Overall Enhancements
* Feat: ResourceTracker new architecture by @Somefive in https://github.com/oam-dev/kubevela/pull/2849
* New Resource Management Model: Garbage Collection and Resource State Keeper [Desigin Doc](https://github.com/oam-dev/kubevela/blob/master/design/vela-core/resourcetracker_design.md)
* Feat: output log with structured tag & add step duration metrics by @leejanee in https://github.com/oam-dev/kubevela/pull/2683
* Feat: support user defined image registry that allows private installation by @wonderflow in https://github.com/oam-dev/kubevela/pull/2623
* Feat: add a built in garbage-collect policy to application by @yangsoon in https://github.com/oam-dev/kubevela/pull/2575
* Feat: health scope controller support check trait-managing workload by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2527
* Chore: add homebrew bump to support `brew install kubevela` by @basefas in https://github.com/oam-dev/kubevela/pull/2434
* Chore: Update release action to support build binaries for more platform by @basefas in https://github.com/oam-dev/kubevela/pull/2537
* Feat: add reconcile timeout configuration for vela-core by @Somefive in https://github.com/oam-dev/kubevela/pull/2630
* Chore: push docker images to Alibaba Cloud ACR by @zzxwill in https://github.com/oam-dev/kubevela/pull/2601
## What's Changed/Deprecated
* Deprecated: containerized workload by @reetasingh in https://github.com/oam-dev/kubevela/pull/2330
* Deprecated: initializer CRD controller by @chivalryq in https://github.com/oam-dev/kubevela/pull/2491
* Deprecated: remove envbinding controller, use #ApplyComponent for EnvBinding by @Somefive in https://github.com/oam-dev/kubevela/pull/2556 , https://github.com/oam-dev/kubevela/pull/2382
* Deprecated(cli): CLI vela config by @chivalryq in https://github.com/oam-dev/kubevela/pull/2037
* Deprecated: remove addon with no definitions by @chivalryq in https://github.com/oam-dev/kubevela/pull/2574
* Refactor: remove apiserver component from the chart, users should use velaux addon instead by @barnettZQG in https://github.com/oam-dev/kubevela/pull/2838
* Refactor: all addons are migrated from initializer to application objects by @chivalryq in https://github.com/oam-dev/kubevela/pull/2444
* Refactor: change rollout's json tag so the status of rollout will be optional by @GingoBang in https://github.com/oam-dev/kubevela/pull/2314
* Deprecated: deprecate CRD discovery for CUE import in Definition to prevent memory leak and OOM crash (#2925)
* Deprecated: delete approllout related code #3040
* Deprecate: delete appDeployment related logic #3050
## Bugfix
* Feat: rework resource tracker to solve bugs by @Somefive in https://github.com/oam-dev/kubevela/pull/2797
* Fix: change raw extension to pointer by @FogDong in https://github.com/oam-dev/kubevela/pull/2451
* Fix: show reconcile error log by @wonderflow in https://github.com/oam-dev/kubevela/pull/2626
* Fix: Closure Bug In newValue by @leejanee in https://github.com/oam-dev/kubevela/pull/2437
* Fix: resourceTracker compatibility bug by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2467
* Fix(application): nil pointer for component properties by @kinsolee in https://github.com/oam-dev/kubevela/pull/2481
* Fix: Commit step-generate data without success by @leejanee in https://github.com/oam-dev/kubevela/pull/2539
* Fix(cli): client-side throttling in vela CLI by @chivalryq in https://github.com/oam-dev/kubevela/pull/2581
* Fix: fix delete a component from application not delete workload by @wangyikewxgm in https://github.com/oam-dev/kubevela/pull/2680
* Fix: lookupByScript don't support `import` by @leejanee in https://github.com/oam-dev/kubevela/pull/2788
* Fix: resourcetracker do not garbage collect legacyRTs correctly by @Somefive in https://github.com/oam-dev/kubevela/pull/2817
* Fix: application conditions confusion. by @leejanee in https://github.com/oam-dev/kubevela/pull/2834
## New Contributors
* @GingoBang made their first contribution in https://github.com/oam-dev/kubevela/pull/2314
* @basefas made their first contribution in https://github.com/oam-dev/kubevela/pull/2434
* @yuyicai made their first contribution in https://github.com/oam-dev/kubevela/pull/2540
* @maciejgwizdala made their first contribution in https://github.com/oam-dev/kubevela/pull/2646
* @lowkeyrd made their first contribution in https://github.com/oam-dev/kubevela/pull/2663
* @zxbyoyoyo made their first contribution in https://github.com/oam-dev/kubevela/pull/2703
* @yue9944882 made their first contribution in https://github.com/oam-dev/kubevela/pull/2751
* @snyk-bot made their first contribution in https://github.com/oam-dev/kubevela/pull/2857
* @yunjianzhong made their first contribution in https://github.com/oam-dev/kubevela/pull/3005
* @songminglong made their first contribution in https://github.com/oam-dev/kubevela/pull/3064
* @basuotian made their first contribution in https://github.com/oam-dev/kubevela/pull/3059
* @K1ngram4 made their first contribution in https://github.com/oam-dev/kubevela/pull/3065
**Full Changelog**: https://github.com/oam-dev/kubevela/compare/v1.1.3...v1.2.0

13
CHANGELOG/README.md Normal file
View File

@@ -0,0 +1,13 @@
# CHANGELOGs
## Development release
- [CHANGELOG-1.2.md](./CHANGELOG-1.2.md)
## Current release
- [CHANGELOG-1.1.md](./CHANGELOG-1.1.md)
## Older releases
- [CHANGELOG-1.0.md](./CHANGELOG-1.0.md)

View File

@@ -1,208 +1,3 @@
# CONTRIBUTING Guide
## About KubeVela
KubeVela project is initialized and maintained by the cloud native community since day 0 with [bootstrapping contributors from 8+ different organizations](https://github.com/oam-dev/kubevela/graphs/contributors).
We intend for KubeVela to have an open governance since the very beginning and donate the project to neutral foundation as soon as it's released.
This doc explains how to set up a development environment, so you can get started
contributing to `kubevela` or build a PoC (Proof of Concept).
## Development
### Prerequisites
1. Golang version 1.16+
2. Kubernetes version v1.16+ with `~/.kube/config` configured.
3. ginkgo 1.14.0+ (just for [E2E test](./CONTRIBUTING.md#e2e-test))
4. golangci-lint 1.31.0+, it will install automatically if you run `make`, you can [install it manually](https://golangci-lint.run/usage/install/#local-installation) if the installation is too slow.
5. kubebuilder v2.3.0+
<details>
<summary>Install Kubebuilder manually</summary>
linux:
```
wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_linux_amd64.tar.gz
tar -zxvf kubebuilder_2.3.1_linux_amd64.tar.gz
mkdir -p /usr/local/kubebuilder/bin
sudo mv kubebuilder_2.3.1_linux_amd64/bin/* /usr/local/kubebuilder/bin
```
macOS:
```
wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_darwin_amd64.tar.gz
tar -zxvf kubebuilder_2.3.1_darwin_amd64.tar.gz
mkdir -p /usr/local/kubebuilder/bin
sudo mv kubebuilder_2.3.1_darwin_amd64/bin/* /usr/local/kubebuilder/bin
```
</details>
We also recommend you to learn about KubeVela's [design](https://kubevela.io/docs/concepts) before diving into its code.
### Build
* Clone this project
```shell script
git clone git@github.com:oam-dev/kubevela.git
```
KubeVela includes two parts, `vela core` and `vela cli`.
- The `vela core` is actually a K8s controller, it will watch OAM Spec CRD and deploy resources.
- The `vela cli` is a command line tool that can build, run apps(with the help of `vela core`).
For local development, we probably need to build both of them.
* Build Vela CLI
```shell script
make
```
After the vela cli built successfully, `make` command will create `vela` binary to `bin/` under the project.
* Configure `vela` binary to System PATH
```shell script
export PATH=$PATH:/your/path/to/project/kubevela/bin
```
Then you can use `vela` command directly.
* Build Vela Core
```shell script
make manager
```
* Run Vela Core
Firstly make sure your cluster has CRDs, below is the command that can help install all CRDs.
```shell script
make core-install
```
Run locally:
```shell script
make core-run
```
This command will run controller locally, it will use your local KubeConfig which means you need to have a k8s cluster
locally. If you don't have a one, we suggest that you could setup up a cluster with [kind](https://kind.sigs.k8s.io/).
When you're developing `vela-core`, make sure the controller installed by helm chart is not running.
Otherwise, it will conflict with your local running controller.
You can check and uninstall it by using helm.
```shell script
helm list -A
helm uninstall -n vela-system kubevela
```
### Use
You can try use your local built binaries follow [the documentation](https://kubevela.io/docs/quick-start).
## Testing
### Unit test
```shell script
make test
```
### E2E test
**Before e2e test start, make sure you have vela-core running.**
```shell script
make core-run
```
Start to test.
```
make e2e-test
```
## Logging Conventions
### Structured logging
We recommend using `klog.InfoS` to structure the log. The `msg` argument need start from a capital letter.
and name arguments should always use lowerCamelCase.
```golang
// func InfoS(msg string, keysAndValues ...interface{})
klog.InfoS("Reconcile traitDefinition", "traitDefinition", klog.KRef(req.Namespace, req.Name))
// output:
// I0605 10:10:57.308074 22276 traitdefinition_controller.go:59] "Reconcile traitDefinition" traitDefinition="vela-system/expose"
```
### Use `klog.KObj` and `klog.KRef` for Kubernetes objects
`klog.KObj` and `klog.KRef` can unify the output of kubernetes object.
```golang
// KObj is used to create ObjectRef when logging information about Kubernetes objects
klog.InfoS("Start to reconcile", "appDeployment", klog.KObj(appDeployment))
// KRef is used to create ObjectRef when logging information about Kubernetes objects without access to metav1.Object
klog.InfoS("Reconcile application", "application", klog.KRef(req.Namespace, req.Name))
```
### Logging Level
[This file](https://github.com/oam-dev/kubevela/blob/master/pkg/controller/common/logs.go) contains KubeVela's log level,
you can set the log level by `klog.V(level)`.
```golang
// you can use klog.V(common.LogDebug) to print debug log
klog.V(common.LogDebug).InfoS("Successfully applied components", "workloads", len(workloads))
```
more detail in [Structured Logging Guide](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/migration-to-structured-logging.md#structured-logging-in-kubernetes).
## Contribute Docs
Please read [the documentation](https://github.com/oam-dev/kubevela/tree/master/docs/README.md) before contributing to the docs.
- Build docs
```shell script
make docs-build
```
- Local development and preview
```shell script
make docs-start
```
## Make a pull request
Remember to write unit-test and e2e-test after you have finished your code.
Run following checks before making a pull request.
```shell script
make reviewable
```
The command will do some lint checks and clean code.
After that, check in all changes and send a pull request.
## Merge Regulations
Before merging, the pull request should obey the following rules:
- The commit title and message should be clear about what this PR does.
- All test CI should pass green.
- The `codecov/project` should pass. This means the coverage should not drop. See [Codecov commit status](https://docs.codecov.io/docs/commit-status#project-status).
Please refer to https://kubevela.io/docs/contributor/overview for details.

View File

@@ -1,19 +1,26 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.16-alpine as builder
FROM golang:1.23.8-alpine@sha256:b7486658b87d34ecf95125e5b97e8dfe86c21f712aa36fc0c702e5dc41dc63e1 AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# It's a proxy for CN developer, please unblock it if you have network issue
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://proxy.golang.org}
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY cmd/core/main.go main.go
# Copy the go source for building core
COPY cmd/core/ cmd/core/
COPY apis/ apis/
COPY pkg/ pkg/
COPY version/ version/
COPY references/ references/
# Build
ARG TARGETARCH
@@ -21,16 +28,15 @@ ARG VERSION
ARG GITVERSION
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o manager-${TARGETARCH} main.go
-o manager-${TARGETARCH} cmd/core/main.go
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
ARG BASE_IMAGE
FROM ${BASE_IMAGE:-alpine:latest}
# This is required by daemon connnecting with cri
RUN apk add --no-cache ca-certificates bash
FROM ${BASE_IMAGE:-alpine:3.18}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /

43
Dockerfile.cli Normal file
View File

@@ -0,0 +1,43 @@
ARG BASE_IMAGE
# Build the cli binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23.8-alpine@sha256:b7486658b87d34ecf95125e5b97e8dfe86c21f712aa36fc0c702e5dc41dc63e1 AS builder
ARG GOPROXY
ENV GOPROXY=${GOPROXY:-https://proxy.golang.org}
WORKDIR /workspace
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN go mod download
# Copy the go source
COPY apis/ apis/
COPY pkg/ pkg/
COPY version/ version/
COPY references/ references/
# Build
ARG TARGETARCH
ARG VERSION
ARG GITVERSION
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH:-amd64} \
go build -a -ldflags "-s -w -X github.com/oam-dev/kubevela/version.VelaVersion=${VERSION:-undefined} -X github.com/oam-dev/kubevela/version.GitRevision=${GITVERSION:-undefined}" \
-o vela-${TARGETARCH} ./references/cmd/cli/main.go
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
FROM ${BASE_IMAGE:-alpine:3.15@sha256:cf34c62ee8eb3fe8aa24c1fab45d7e9d12768d945c3f5a6fd6a63d901e898479}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /
ARG TARGETARCH
COPY --from=builder /workspace/vela-${TARGETARCH} /bin/vela
ENTRYPOINT ["/bin/vela"]

View File

@@ -1,5 +1,6 @@
ARG BASE_IMAGE
# Build the manager binary
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.14-alpine as builder
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.23.8-alpine@sha256:b7486658b87d34ecf95125e5b97e8dfe86c21f712aa36fc0c702e5dc41dc63e1 AS builder
WORKDIR /workspace
# Copy the Go Modules manifests
@@ -16,6 +17,7 @@ COPY cmd/ cmd/
COPY apis/ apis/
COPY pkg/ pkg/
COPY version/ version/
COPY references/ references/
# Build
ARG TARGETARCH
@@ -23,16 +25,17 @@ ARG VERSION
ARG GITVERSION
RUN apk add gcc musl-dev libc-dev ;\
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
GO111MODULE=on CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} \
go test -c -o manager-${TARGETARCH} -cover -covermode=atomic -coverpkg ./... .
# Use alpine as base image due to the discussion in issue #1448
# You can replace distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
# Overwrite `BASE_IMAGE` by passing `--build-arg=BASE_IMAGE=gcr.io/distroless/static:nonroot`
ARG BASE_IMAGE
FROM ${BASE_IMAGE:-alpine:latest}
# This is required by daemon connnecting with cri
RUN apk add --no-cache ca-certificates bash
FROM ${BASE_IMAGE:-alpine:3.15@sha256:cf34c62ee8eb3fe8aa24c1fab45d7e9d12768d945c3f5a6fd6a63d901e898479}
# This is required by daemon connecting with cri
RUN apk add --no-cache ca-certificates bash expat
WORKDIR /

1
GOVERNANCE.md Normal file
View File

@@ -0,0 +1 @@
Refer to https://github.com/kubevela/community/blob/main/GOVERNANCE.md

323
ISSUE_TRIAGE.md Normal file
View File

@@ -0,0 +1,323 @@
# Triage issues
The main goal of issue triage is to categorize all incoming KubeVela issues and make sure each issue has all basic
information needed for anyone else to understand and be able to start working on it.
> **Note:** This information is for OAM/KubeVela project Maintainers, Owners, and Admins.
> If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
The core maintainers of the OAM/KubeVela project are responsible for categorizing all incoming issues and delegating
any critical or important issue to other maintainers. Currently one maintainer each week is responsible.
Besides that part, triage provides an important way to contribute to an open source project.
Triage helps ensure issues resolve quickly by:
- Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for
an issue to explain how an end user experiences a problem and what actions they took.
- Giving a contributor the information they need before they commit to resolving an issue.
- Lowering the issue count by preventing duplicate issues.
- Streamlining the development process by preventing duplicate discussions.
If you don't have the knowledge or time to code, consider helping with triage.
The community will thank you for saving them time by spending some of yours.
## Simplified flowchart diagram of the issue triage process
<!-- https://textik.com/#908a27a44c590528 -->
```
+-----------------------------+
| |
| New Issues Opened |
+-----------------+ |
| | Or More information needed |
| | |
| +--------------+--------------+
| Ask for more info |
| |
| +--------------+------------+
| | | Yes
| | All informatio needed |
| +-----------+ to categorize the issue +---------------+
| | No | | |
| | +---------------------------+ |
| | +-----------+-----------+ +---------------------------+
+------------+-----+-----+ | | Yes | |
| | | Needs investigation +---------+ label: needs investigation|
| label: needs more info | | | | |
| | +----------+------------+ +-------------+-------------+
+------------------------+ | |
| No |
| |
+----------+----------+ investigate |
| label: type/* | |
| label: area/* +--------------------------+
| |
+--|-------------|----+
| | Yes
| +-------|-------------+ +-------------------+
| | needs priority +----+ label: priority/* |
| +-------|-------------+ +----------|--------+
| | No |
| | |
+----- ------|---+ +--|----- --+ |
| close issue + ---- + done +---------------------+
+----------------+ +-----------+
```
## 1. Find uncategorized issues
To get started with issue triage and finding issues that haven't been triaged you have two alternatives.
### Browse unlabeled issues
The easiest and straight forward way of getting started and finding issues that haven't been triaged is to browse
[unlabeled issues](https://github.com/kubevela/kubevela/issues?q=is%3Aopen+is%3Aissue+no%3Alabel) and starting from
the bottom and working yourself to the top.
### Subscribe to all notifications
The more advanced, but recommended way is to subscribe to all notifications from this repository which means that
all new issues, pull requests, comments and important status changes are sent to your configured email address.
Read this [guide](https://help.github.com/en/articles/watching-and-unwatching-repositories#watching-a-single-repository)
for help with setting this up.
It's highly recommended that you setup filters to automatically remove emails from the inbox and label/categorize
them accordingly to make it easy for you to understand when you need to act upon a notification or where to look for
finding issues that haven't been triaged etc.
## 2. Ensure the issue contains basic information
Before triaging an issue very far, make sure that the issue's author provided the standard issue information.
This will help you make an educated recommendation on how to categorize the issue.
The KubeVela project utilizes [GitHub issue templates](https://help.github.com/en/articles/creating-issue-templates-for-your-repository)
to guide contributors to provide standard information that must be included for each type of template or type of issue.
### Standard issue information that must be included
Given a certain [issue template]([template](https://github.com/kubevela/kubevela/issues/new/choose)) have been used
by the issue author or depending how the issue is perceived by the issue triage responsible, the following should
help you understand what standard issue information that must be included.
#### Bug reports
Should explain what happened, what was expected and how to reproduce it together with any additional information that
may help giving a complete picture of what happened such as screenshots, application related YAMLs, and any environment
related information that's applicable and/or maybe related to the reported problem:
- KubeVela version
- K8s cluster version KubeVela is installed on
- Which other K8s CRD controllers used
- Development environment like Go versions, if applicable
#### Enhancement requests
Should explain what enhancement or feature that the author wants to be added and why that is needed.
### Good practices
To make it easier for everyone to understand and find issues they're searching for it's suggested as a general rule of thumbs to:
- Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information.
- Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
- Do your best effort to change title and description or request suggested changes by adding a comment.
> **Note:** Above rules is applicable to both new and existing issues of the KubeVela project.
### Do you have all the information needed to categorize an issue?
Depending on the issue, you might not feel all this information is needed. Use your best judgement.
If you cannot triage an issue using what its author provided, explain kindly to the author that they must provide the
above information to clarify the problem. Label issue with `needs more info` and add any related `area/*` or `type/*` labels.
If the author provides the standard information but you are still unable to triage the issue, request additional information.
Do this kindly and politely because you are asking for more of the author's time.
If the author does not respond to the requested information within the timespan of a week,
close the issue with a kind note stating that the author can request for the issue to be reopened when the necessary information is provided.
When you feel you have all the information needed you're ready to [categorizing the issue](#3-categorizing-an-issue).
If you receive a notification with additional information provided but you are not anymore on issue triage and
you feel you do not have time to handle it, you should delegate it to the current person on issue triage.
## 3. Categorizing an issue
An issue can have multiple of the following labels. Typically, a properly categorized issue should at least have:
- One label identifying its type (`type/*`).
- One or multiple labels identifying the functional areas of interest or component (`area/*`), if applicable.
| Label | Description |
| ------------------------ | ------------------------------------------------------------------------- |
| `type/bug` | A feature isn't working as expected given design or documentation. |
| `type/enhancement` | Request for a new feature or enhancement. |
| `type/docs` | Documentation problem or enhancement. |
| `type/question` | Issue is a question or is perceived as such. |
| `type/duplicate` | An existing issue of the same subject/request have already been reported. |
| `type/wontfix` | A reported bug works as intended/by design. |
| `type/invalid` | A reported bug with invalid usage. |
| `area/*` | Subject is related to a functional area of interest or component. |
### Duplicate issues
Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description.
If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help.
If you identify that the issue is a duplicate of an existing issue:
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
2. The KubeVela bot will do the rest, adding the correct label and closing comment
3. Optionally add any related `area/*` labels.
### Bug reports
If it's not perfectly clear that it's an actual bug, quickly try to reproduce it.
**It's a bug/it can be reproduced:**
1. Add a comment describing detailed steps for how to reproduce it, if applicable.
2. Label the issue `type/bug` and at least one `area/*` label.
3. If you know that maintainers won't be able to put any resources into it for some time then label the issue
with `help wanted` and optionally `good first issue` together with pointers on which code to update to fix the bug.
This should signal to the community that we would appreciate any help we can get to resolve this.
4. Move on to [prioritizing the issue](#4-prioritization-of-issues).
**It can't be reproduced:**
1. Either [ask for more information](#2-ensure-the-issue-contains-basic-information) needed to investigate it more thoroughly.
2. Either [delegate further investigations](#investigation-of-issues) to someone else.
**It works as intended/by design:**
1. Kindly and politely add a comment explaining briefly why we think it works as intended and close the issue.
2. Label the issue `type/wontfix`.
### Enhancement/feature?
1. Label the issue `type/enhancement` and at least one `area/*` label.
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
### Documentation issue?
First, evaluate if the documentation makes sense to be included in the KubeVela project:
- Is this something we want/can maintain as a project?
- Is this referring to usage of some specific integration/tool and in that case is that a popular use case in combination with KubeVela?
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments)
to identify that lots of other users want/need this.
Second, label the issue `type/docs` and at least one `area/*` label.
**Minor typo/error/lack of information:**
There's a minor typo/error/lack of information that adds a lot of confusion for users and given the amount of work is a big win to make sure fixing it:
1. Either update the documentation yourself and open a pull request.
2. Either delegate the work to someone else by assigning that person to the issue and add the issue to next major/minor milestone.
**Major error/lack of information:**
1. Label the issue with `help wanted` and `good first issue`, if applicable, to signal that we find this important to
fix and we would appreciate any help we can get from the community.
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
### Support requests and questions
1. Kindly and politely direct the issue author to the [github discussion](https://github.com/kubevela/kubevela/discussions)
and explain that issue is mainly used for tracking bugs and feature requests.
If possible, it's usually a good idea to add some pointers to the issue author's question.
2. Close the issue and label it with `type/question`.
## 4. Prioritization of issues
In general bugs and enhancement issues should be labeled with a priority.
This is the most difficult thing with triaging issues since it requires a lot of knowledge, context and experience
before being able to think of and start feel comfortable adding a certain priority label.
The key here is asking for help and discuss issues to understand how more experienced project members think and reason.
By doing that you learn more and eventually be more and more comfortable with prioritizing issues.
In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help.
| Label | Description |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `priority/critical` | Highest priority. Must be actively worked on as someone's top priority right now. |
| `priority/important-soon` | Must be staffed and worked on either currently, or very soon, ideally in time for the next release. |
| `priority/important-longterm` | Important over the long term, but may not be staffed and/or may need multiple releases to complete. |
| `priority/nice-to-have` | It's a good idea, but not scheduled for any release. |
| `priority/awaiting-more-evidence` | Lowest priority. Possibly useful, but not yet enough interest in it. |
| `priority/unscheduled` | Something to look into before and to be discussed during the planning of the next (upcoming) major/minor stable release. |
**Critical bugs**
1. If a bug has been categorized and any of the following criteria apply, the bug should be labeled as critical and
must be actively worked on as someone's top priority right now.
- Results in any crash or data loss.
- Critical security or performance issues
- Problem that makes a feature unusable
- Multiple users experience a severe problem affecting their business, users etc.
2. Label the issue `priority/critical`.
3. Add the issue to the next upcoming patch release milestone. Create a new milestone if there are none.
4. Escalate the problem to the maintainers.
5. Assign or ask a maintainer for help assigning someone to make this issue their top priority right now.
**Important short-term**
1. Label the issue `priority/important-soon`.
2. Add the issue to the next upcoming patch or major/minor stable release milestone. Ask maintainers for help if unsure if it's a patch or not.
Create a new milestone if there are none.
3. Make sure to add the issue to a suitable backlog of a GitHub project and prioritize it or assign someone to work on it now or very soon.
4. Consider requesting [help from the community](#5-requesting-help-from-the-community), even though it may be problematic given a short amount of time until it should be released.
**Important long-term**
1. Label the issue `priority/important-longterm`.
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
**Nice to have**
1. Label the issue `priority/nice-to-have`.
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
**Not critical, but unsure?**
1. Label the issue `priority/unscheduled`.
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
## 5. Requesting help from the community
Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community
is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement.
In general, requesting help from the community means that a contribution has a good chance of getting accepted and merged.
1. Kindly and politely add a comment to signal to users subscribed to updates of the issue.
- Explain that the issue would be nice to get resolved, but it isn't prioritized to work on by maintainers for an unforeseen future.
- If possible or applicable, try to help contributors getting starting by adding pointers and references to
what code/files need to be changed and/or ideas of a good way to solve/implement the issue.
2. Label the issue with `help wanted`.
3. If applicable, label the issue with `good first issue` to denote that the issue is suitable for a beginner to work on.
4. If possible, try to estimate the amount of work by adding `effort/small`, `effort/medium` or `effort/large`.
## Investigation of issues
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported
problem at a first glance, the issue is labeled [Needs investigation](https://github.com/oam-dev/kubevela/labels/needs%20investigation).
Depending on the perceived severity and/or number of [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments),
the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor)
picks it up and eventually starts investigating it.
Investigating issues can be a very time consuming task, especially for the maintainers, provide as much related info will
make it easier for maintainers to investigate.
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments)
the issue if you happen to have the same problem. If you have further details that may help investigating the issue
please provide as much information as possible.
## Automation
We have some automation that triggers on comments or labels being added to issues.
Many of these automated behaviors are defined in [issue-commands.json](https://github.com/oam-dev/kubevela/blob/master/.github/issue-commands.json).
* Add comment `/duplicate #<number>` to have `type/duplicate` label, the issue number is required for remind where is the other issue.
* Add label `bot/no new info` for bot to close an issue where we asked for more info but has not received any updates in at least 14 days.
Read more bot actions on [bot.md](https://github.com/oam-dev/kubevela/blob/master/.github/bot.md)

359
Makefile
View File

@@ -1,321 +1,144 @@
# Vela version
VELA_VERSION ?= master
# Repo info
GIT_COMMIT ?= git-$(shell git rev-parse --short HEAD)
GIT_COMMIT_LONG ?= $(shell git rev-parse HEAD)
VELA_VERSION_KEY := github.com/oam-dev/kubevela/version.VelaVersion
VELA_GITVERSION_KEY := github.com/oam-dev/kubevela/version.GitRevision
LDFLAGS ?= "-s -w -X $(VELA_VERSION_KEY)=$(VELA_VERSION) -X $(VELA_GITVERSION_KEY)=$(GIT_COMMIT)"
GOBUILD_ENV = GO111MODULE=on CGO_ENABLED=0
GOX = go run github.com/mitchellh/gox
TARGETS := darwin/amd64 linux/amd64 windows/amd64
DIST_DIRS := find * -type d -exec
TIME_LONG = `date +%Y-%m-%d' '%H:%M:%S`
TIME_SHORT = `date +%H:%M:%S`
TIME = $(TIME_SHORT)
BLUE := $(shell printf "\033[34m")
YELLOW := $(shell printf "\033[33m")
RED := $(shell printf "\033[31m")
GREEN := $(shell printf "\033[32m")
CNone := $(shell printf "\033[0m")
INFO = echo ${TIME} ${BLUE}[ .. ]${CNone}
WARN = echo ${TIME} ${YELLOW}[WARN]${CNone}
ERR = echo ${TIME} ${RED}[FAIL]${CNone}
OK = echo ${TIME} ${GREEN}[ OK ]${CNone}
FAIL = (echo ${TIME} ${RED}[FAIL]${CNone} && false)
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif
# Image URL to use all building/pushing image targets
VELA_CORE_IMAGE ?= vela-core:latest
VELA_CORE_TEST_IMAGE ?= vela-core-test:$(GIT_COMMIT)
include makefiles/const.mk
include makefiles/dependency.mk
include makefiles/release.mk
include makefiles/develop.mk
include makefiles/build.mk
include makefiles/e2e.mk
.DEFAULT_GOAL := all
all: build
# Run tests
test: vet lint staticcheck
go test -race -coverprofile=coverage.txt -covermode=atomic ./pkg/... ./cmd/...
go test -race -covermode=atomic ./references/apiserver/... ./references/appfile/... ./references/cli/... ./references/common/... ./references/plugins/...
# ==============================================================================
# Targets
## test: Run tests
test: envtest unit-test-core test-cli-gen
@$(OK) unit-tests pass
# Build vela cli binary
build: fmt vet lint staticcheck vela-cli kubectl-vela
## test-cli-gen: Run the unit tests for cli gen
test-cli-gen:
@mkdir -p ./bin/doc
@go run ./hack/docgen/cli/gen.go ./bin/doc
## unit-test-core: Run the unit tests for core
unit-test-core:
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test -coverprofile=coverage.txt $(shell go list ./pkg/... ./cmd/... ./apis/... | grep -v apiserver | grep -v applicationconfiguration)
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test $(shell go list ./references/... | grep -v apiserver)
## build: Build vela cli binary
build: vela-cli kubectl-vela
@$(OK) build succeed
vela-cli:
go run hack/chart/generate.go
$(GOBUILD_ENV) go build -o bin/vela -a -ldflags $(LDFLAGS) ./references/cmd/cli/main.go
git checkout references/cmd/cli/fake/chart_source.go
## build-cli: Clean build
build-cleanup:
@echo "===========> Cleaning all build output"
@rm -rf _bin
kubectl-vela:
$(GOBUILD_ENV) go build -o bin/kubectl-vela -a -ldflags $(LDFLAGS) ./cmd/plugin/main.go
dashboard-build:
cd references/dashboard && npm install && cd ..
doc-gen:
rm -r docs/en/cli/*
go run hack/docgen/gen.go
PWD := $(shell pwd)
docs-build:
docker run -it -v $(PWD)/docs/sidebars.js:/workspace/kubevela.io/sidebars.js \
-v $(PWD)/docs/en:/workspace/kubevela.io/docs \
oamdev/vela-webtool:v1 -t build
docs-start:
docker run -it -p 3000:3000 -v $(PWD)/docs/sidebars.js:/workspace/kubevela.io/sidebars.js \
-v $(PWD)/docs/en:/workspace/kubevela.io/docs \
oamdev/vela-webtool:v1 -t start
api-gen:
swag init -g references/apiserver/route.go --output references/apiserver/docs
swagger-codegen generate -l html2 -i references/apiserver/docs/swagger.yaml -o references/apiserver/docs
mv references/apiserver/docs/index.html docs/en/developers/references/restful-api/
generate-source:
go run hack/frontend/source.go
cross-build:
rm -rf _bin
go get github.com/mitchellh/gox@v0.4.0
go run hack/chart/generate.go
$(GOBUILD_ENV) $(GOX) -ldflags $(LDFLAGS) -parallel=2 -output="_bin/vela/{{.OS}}-{{.Arch}}/vela" -osarch='$(TARGETS)' ./references/cmd/cli
$(GOBUILD_ENV) $(GOX) -ldflags $(LDFLAGS) -parallel=2 -output="_bin/kubectl-vela/{{.OS}}-{{.Arch}}/kubectl-vela" -osarch='$(TARGETS)' ./cmd/plugin
git checkout references/cmd/cli/fake/chart_source.go
compress:
( \
echo "\n## Release Info\nVERSION: $(VELA_VERSION)" >> README.md && \
echo "GIT_COMMIT: $(GIT_COMMIT_LONG)\n" >> README.md && \
cd _bin/vela && \
$(DIST_DIRS) cp ../../LICENSE {} \; && \
$(DIST_DIRS) cp ../../README.md {} \; && \
$(DIST_DIRS) tar -zcf vela-{}.tar.gz {} \; && \
$(DIST_DIRS) zip -r vela-{}.zip {} \; && \
cd ../kubectl-vela && \
$(DIST_DIRS) cp ../../LICENSE {} \; && \
$(DIST_DIRS) cp ../../README.md {} \; && \
$(DIST_DIRS) tar -zcf kubectl-vela-{}.tar.gz {} \; && \
$(DIST_DIRS) zip -r kubectl-vela-{}.zip {} \; && \
cd .. && \
sha256sum vela/vela-* kubectl-vela/kubectl-vela-* > sha256sums.txt \
)
# Run against the configured Kubernetes cluster in ~/.kube/config
run: fmt vet
go run ./cmd/core/main.go
# Run go fmt against code
## fmt: Run go fmt against code
fmt: goimports installcue
go fmt ./...
$(GOIMPORTS) -local github.com/oam-dev/kubevela -w $$(go list -f {{.Dir}} ./...)
$(CUE) fmt ./vela-templates/internal/cue/*
$(CUE) fmt ./vela-templates/registry/cue/*
$(CUE) fmt ./vela-templates/definitions/internal/*
$(CUE) fmt ./vela-templates/definitions/deprecated/*
$(CUE) fmt ./vela-templates/definitions/registry/*
$(CUE) fmt ./pkg/workflow/template/static/*
$(CUE) fmt ./pkg/workflow/providers/...
# Run go vet against code
## sdk_fmt: Run go fmt against code
sdk_fmt:
./hack/sdk/reviewable.sh
## vet: Run go vet against code
vet:
go vet ./...
@$(INFO) go vet
@go vet $(shell go list ./...|grep -v scaffold)
## staticcheck: Run the staticcheck
staticcheck: staticchecktool
$(STATICCHECK) ./...
@$(INFO) staticcheck
@$(STATICCHECK) $(shell go list ./...|grep -v scaffold)
## lint: Run the golangci-lint
lint: golangci
$(GOLANGCILINT) run ./...
@$(INFO) lint
@GOLANGCILINT=$(GOLANGCILINT) ./hack/utils/golangci-lint-wrapper.sh
reviewable: manifests fmt vet lint staticcheck
go mod tidy
## reviewable: Run the reviewable
## Run make build to compile vela binary before running this target to ensure all generated definitions are up to date.
reviewable: build manifests fmt vet lint staticcheck helm-doc-gen sdk_fmt
# Execute auto-gen code commands and ensure branch is clean.
# check-diff: Execute auto-gen code commands and ensure branch is clean.
check-diff: reviewable
git --no-pager diff
git diff --quiet || ($(ERR) please run 'make reviewable' to include all changes && false)
@$(OK) branch is clean
# Build the docker image
docker-build:
docker build --build-arg=VERSION=$(VELA_VERSION) --build-arg=GITVERSION=$(GIT_COMMIT) -t $(VELA_CORE_IMAGE) .
# Push the docker image
## docker-push: Push the docker image
docker-push:
docker push $(VELA_CORE_IMAGE)
e2e-setup:
helm install --create-namespace -n flux-system helm-flux http://oam.dev/catalog/helm-flux2-0.1.0.tgz
helm install kruise https://github.com/openkruise/kruise/releases/download/v0.7.0/kruise-chart.tgz
sh ./hack/e2e/modify_charts.sh
helm upgrade --install --create-namespace --namespace vela-system --set image.pullPolicy=IfNotPresent --set image.repository=vela-core-test --set applicationRevisionLimit=5 --set dependCheckWait=10s --set image.tag=$(GIT_COMMIT) --wait kubevela ./charts/vela-core
ginkgo version
ginkgo -v -r e2e/setup
kubectl wait --for=condition=Ready pod -l app.kubernetes.io/name=vela-core,app.kubernetes.io/instance=kubevela -n vela-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=source-controller -n flux-system --timeout=600s
kubectl wait --for=condition=Ready pod -l app=helm-controller -n flux-system --timeout=600s
bin/vela dashboard &
e2e-api-test:
# Run e2e test
ginkgo -v -skipPackage capability,setup,apiserver,application -r e2e
ginkgo -v -r e2e/apiserver
ginkgo -v -r e2e/application
e2e-test:
# Run e2e test
ginkgo -v ./test/e2e-test
@$(OK) tests pass
compatibility-test: vet lint staticcheck generate-compatibility-testdata
# Run compatibility test with old crd
COMPATIBILITY_TEST=TRUE go test -race ./pkg/...
@$(OK) compatibility-test pass
generate-compatibility-testdata:
mkdir -p ./test/compatibility-test/testdata
go run ./test/compatibility-test/convert/main.go ./charts/vela-core/crds ./test/compatibility-test/testdata
compatibility-testdata-cleanup:
rm -f ./test/compatibility-test/testdata/*
e2e-cleanup:
# Clean up
rm -rf ~/.vela
@echo "===========> Pushing docker image"
@docker push $(VELA_CORE_IMAGE)
## image-cleanup: Delete Docker images
image-cleanup:
# Delete Docker image
ifneq (, $(shell which docker))
# Delete Docker images
ifneq ($(shell docker images -q $(VELA_CORE_TEST_IMAGE)),)
docker rmi -f $(VELA_CORE_TEST_IMAGE)
endif
end-e2e:
sh ./hack/e2e/end_e2e.sh
endif
# load docker image to the kind cluster
kind-load:
## image-load: load docker image to the kind cluster
image-load:
docker build -t $(VELA_CORE_TEST_IMAGE) -f Dockerfile.e2e .
kind load docker-image $(VELA_CORE_TEST_IMAGE) || { echo >&2 "kind not installed or error loading image: $(VELA_CORE_TEST_IMAGE)"; exit 1; }
# Run tests
core-test: fmt vet manifests
## core-test: Run tests
core-test:
go test ./pkg/... -coverprofile cover.out
# Build vela core manager binary
manager: fmt vet lint manifests
## manager: Build vela core manager binary
manager:
$(GOBUILD_ENV) go build -o bin/manager -a -ldflags $(LDFLAGS) ./cmd/core/main.go
# Run against the configured Kubernetes cluster in ~/.kube/config
core-run: fmt vet manifests
go run ./cmd/core/main.go
# Run against the configured Kubernetes cluster in ~/.kube/config with debug logs
core-debug-run: fmt vet manifests
go run ./cmd/core/main.go --log-debug=true
# Install CRDs and Definitions of Vela Core into a cluster, this is for develop convenient.
core-install: manifests
kubectl apply -f hack/namespace.yaml
kubectl apply -f charts/vela-core/crds/
@$(OK) install succeed
# Uninstall CRDs and Definitions of Vela Core from a cluster, this is for develop convenient.
core-uninstall: manifests
kubectl delete -f charts/vela-core/crds/
# Generate manifests e.g. CRD, RBAC etc.
manifests: installcue kustomize
## manifests: Generate manifests e.g. CRD, RBAC etc.
manifests: tidy installcue kustomize sync-crds
go generate $(foreach t,pkg apis,./$(t)/...)
# TODO(yangsoon): kustomize will merge all CRD into a whole file, it may not work if we want patch more than one CRD in this way
$(KUSTOMIZE) build config/crd -o config/crd/base/core.oam.dev_applications.yaml
mv config/crd/base/* charts/vela-core/crds
go run ./hack/crd/dispatch/dispatch.go config/crd/base charts/vela-core/crds
rm -f config/crd/base/*
./vela-templates/gen_definitions.sh
./hack/crd/cleanup.sh
GOLANGCILINT_VERSION ?= v1.31.0
HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]')
HOSTARCH := $(shell uname -m)
ifeq ($(HOSTARCH),x86_64)
HOSTARCH := amd64
endif
golangci:
ifeq (, $(shell which golangci-lint))
@{ \
set -e ;\
echo 'installing golangci-lint-$(GOLANGCILINT_VERSION)' ;\
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) $(GOLANGCILINT_VERSION) ;\
echo 'Install succeed' ;\
}
GOLANGCILINT=$(GOBIN)/golangci-lint
else
GOLANGCILINT=$(shell which golangci-lint)
endif
.PHONY: staticchecktool
staticchecktool:
ifeq (, $(shell which staticcheck))
@{ \
set -e ;\
echo 'installing honnef.co/go/tools/cmd/staticcheck ' ;\
GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck ;\
}
STATICCHECK=$(GOBIN)/staticcheck
else
STATICCHECK=$(shell which staticcheck)
endif
.PHONY: goimports
goimports:
ifeq (, $(shell which goimports))
@{ \
set -e ;\
GO111MODULE=off go get -u golang.org/x/tools/cmd/goimports ;\
}
GOIMPORTS=$(GOBIN)/goimports
else
GOIMPORTS=$(shell which goimports)
endif
.PHONY: installcue
installcue:
ifeq (, $(shell which cue))
@{ \
set -e ;\
GO111MODULE=off go get -u cuelang.org/go/cmd/cue ;\
}
CUE=$(GOBIN)/cue
else
CUE=$(shell which cue)
endif
KUSTOMIZE_VERSION ?= 3.8.2
.PHONY: kustomize
kustomize:
ifeq (, $(shell kustomize version | grep $(KUSTOMIZE_VERSION)))
@{ \
set -e ;\
echo 'installing kustomize-v$(KUSTOMIZE_VERSION) into $(GOBIN)' ;\
curl -s https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh | bash -s $(KUSTOMIZE_VERSION) $(GOBIN);\
echo 'Install succeed' ;\
}
KUSTOMIZE=$(GOBIN)/kustomize
else
KUSTOMIZE=$(shell which kustomize)
endif
start-dashboard:
go run references/cmd/apiserver/main.go &
cd references/dashboard && npm install && npm start && cd ..
swagger-gen:
$(GOBIN)/swag init -g apiserver/route.go -d pkg/ -o references/apiserver/docs/
## check-license-header: Check license header
check-license-header:
./hack/licence/header-check.sh
## def-gen: Install definitions
def-install:
./hack/utils/installdefinition.sh
## helm-doc-gen: Generate helm chart README.md
helm-doc-gen: helmdoc
readme-generator -v charts/vela-core/values.yaml -r charts/vela-core/README.md
## help: Display help information
help: Makefile
@echo ""
@echo "Usage:"
@echo ""
@echo " make [target]"
@echo ""
@echo "Targets:"
@echo ""
@awk -F ':|##' '/^[^\.%\t][^\t]*:.*##/{printf " \033[36m%-20s\033[0m %s\n", $$1, $$NF}' $(MAKEFILE_LIST) | sort
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'

12
OWNERS
View File

@@ -1,12 +0,0 @@
approvers:
- kubevela-controller
- kubevela-devex
- kubevela-dashboard-approver
reviewers:
- kubevela-controller
- oam-spec
- kubevela-dashboard-reviewer
members:
- community-collaborators

View File

@@ -1,44 +1 @@
aliases:
kubevela-devex:
- hongchaodeng
- wonderflow
kubevela-dashboard-approver:
- zzxwill
- hongchaodeng
kubevela-dashboard-reviewer:
- sunny0826
- hanxie-crypto
kubevela-controller:
- resouer
- wonderflow
- hongchaodeng
- zzxwill
- ryanzhang-oss
- captainroy-hy
oam-spec: # inherit from https://github.com/oam-dev/spec/blob/master/OWNERS.md
- hongchaodeng
- resouer
community-collaborators:
- Fei-Guo
- szihai
bootstrap-contributors: # thank you for bootstrapping KubeVela at the very early stage!
- xiaoyuaiheshui
- Ghostbaby
- wenxinnnnn
- silenceper
- erdun
- sunny0826
- mosesyou
- artursouza
- wonderflow
- hongchaodeng
- ryanzhang-oss
- woshilanren11
- hanxie-crypto
- zzxwill
The owner file has been migrated to the community repo, please refer to https://github.com/kubevela/community/blob/main/OWNERS.md

112
README.md
View File

@@ -1,60 +1,118 @@
![Build status](https://github.com/oam-dev/kubevela/workflows/E2E/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/oam-dev/kubevela)](https://goreportcard.com/report/github.com/oam-dev/kubevela)
<div style="text-align: center">
<p align="center">
<img src="https://raw.githubusercontent.com/kubevela/kubevela.io/main/docs/resources/KubeVela-03.png">
<br><br>
<i>Make shipping applications more enjoyable.</i>
</p>
</div>
![Build status](https://github.com/kubevela/kubevela/workflows/Go/badge.svg)
[![Go Report Card](https://goreportcard.com/badge/github.com/kubevela/kubevela)](https://goreportcard.com/report/github.com/kubevela/kubevela)
![Docker Pulls](https://img.shields.io/docker/pulls/oamdev/vela-core)
[![codecov](https://codecov.io/gh/oam-dev/kubevela/branch/master/graph/badge.svg)](https://codecov.io/gh/oam-dev/kubevela)
[![LICENSE](https://img.shields.io/github/license/oam-dev/kubevela.svg?style=flat-square)](/LICENSE)
[![Releases](https://img.shields.io/github/release/oam-dev/kubevela/all.svg?style=flat-square)](https://github.com/oam-dev/kubevela/releases)
[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=github.com/oam-dev/kubevela)](https://www.tickgit.com/browse?repo=github.com/oam-dev/kubevela)
[![codecov](https://codecov.io/gh/kubevela/kubevela/branch/master/graph/badge.svg)](https://codecov.io/gh/kubevela/kubevela)
[![LICENSE](https://img.shields.io/github/license/kubevela/kubevela.svg?style=flat-square)](/LICENSE)
[![Releases](https://img.shields.io/github/release/kubevela/kubevela/all.svg?style=flat-square)](https://github.com/kubevela/kubevela/releases)
[![TODOs](https://img.shields.io/endpoint?url=https://api.tickgit.com/badge?repo=github.com/kubevela/kubevela)](https://www.tickgit.com/browse?repo=github.com/kubevela/kubevela)
[![Twitter](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Foam_dev)](https://twitter.com/oam_dev)
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kubevela)](https://artifacthub.io/packages/search?repo=kubevela)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4602/badge)](https://bestpractices.coreinfrastructure.org/projects/4602)
![E2E status](https://github.com/kubevela/kubevela/workflows/E2E%20Test/badge.svg)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/kubevela/kubevela/badge)](https://scorecard.dev/viewer/?uri=github.com/kubevela/kubevela)
[![](https://img.shields.io/badge/KubeVela-Check%20Your%20Contribution-orange)](https://opensource.alibaba.com/contribution_leaderboard/details?projectValue=kubevela)
![alt](docs/en/resources/KubeVela-03.png)
## Introduction
*Make shipping applications more enjoyable.*
KubeVela is a modern application delivery platform that makes deploying and operating applications across today's hybrid, multi-cloud environments easier, faster and more reliable.
# KubeVela
![kubevela](docs/resources/what-is-kubevela.png)
KubeVela is a modern application platform that makes deploying and managing applications across today's hybrid, multi-cloud environments easier and faster.
## Highlights
## Features
KubeVela practices the "render, orchestrate, deploy" workflow with below highlighted values added to existing ecosystem:
**Application Centric** - Leveraging Open Application Model (OAM), KubeVela introduces consistent yet higher level API to capture a full deployment of microservices on top of hybrid environments. Placement strategy and patch, traffic shifting and rolling update are all declared at application level. No infrastructure level concern, simply deploy.
#### **Deployment as Code**
**Natively Extensible** - KubeVela uses [CUE](https://github.com/cuelang/cue) as super glue to assemble capabilities (e.g. workload types, operational behaviors, and cloud services) provided by runtime infrastructures and expose them to users via application-centric APIs. When users' needs grow, these APIs can naturally expand in programmable approach. No restriction, fully flexible.
Declare your deployment plan as workflow, run it automatically with any CI/CD or GitOps system, extend or re-program the workflow steps with [CUE](https://cuelang.org/).
No ad-hoc scripts, no dirty glue code, just deploy. The deployment workflow in KubeVela is powered by [Open Application Model](https://oam.dev/).
**Runtime Agnostic** - KubeVela is built with Kubernetes as control plane but adaptable to any runtime as data-plane. It can deploy (and manage) diverse workload types such as container, cloud functions, databases, or even EC2 instances across hybrid environments. Also, this means KubeVela seamlessly works with any Kubernetes compatible CI/CD or GitOps tools via declarative API.
#### **Built-in observability, multi-tenancy and security support**
Choose from the wide range of LDAP integrations we provided out-of-box, enjoy enhanced [multi-tenancy and multi-cluster authorization and authentication](https://kubevela.net/docs/platform-engineers/auth/advance),
pick and apply fine-grained RBAC modules and customize them as per your own supply chain requirements.
All delivery process has fully [automated observability dashboards](https://kubevela.net/docs/platform-engineers/operations/observability).
#### **Multi-cloud/hybrid-environments app delivery as first-class citizen**
Natively supports multi-cluster/hybrid-cloud scenarios such as progressive rollout across test/staging/production environments,
automatic canary, blue-green and continuous verification, rich placement strategy across clusters and clouds,
along with automated cloud environments provision.
#### **Lightweight but highly extensible architecture**
Minimize your control plane deployment with only one pod and 0.5c1g resources to handle thousands of application delivery.
Glue and orchestrate all your infrastructure capabilities as reusable modules with a highly extensible architecture
and share the large growing community [addons](https://kubevela.net/docs/reference/addons/overview).
## Getting Started
- [Introduction](https://kubevela.io/docs)
- [Installation](https://kubevela.io/docs/install)
- [Deploy an Application](https://kubevela.io/docs/application)
* [Introduction](https://kubevela.io/docs)
* [Installation](https://kubevela.io/docs/install)
* [Deploy Your Application](https://kubevela.io/docs/quick-start)
### Get Your Own Demo with Alibaba Cloud
- install KubeVela on a Serverless K8S cluster in 3 minutes, try:
<a href="https://acs.console.aliyun.com/quick-deploy?repo=kubevela/kubevela&branch=master" target="_blank">
<img src="https://img.alicdn.com/imgextra/i1/O1CN01aiPSuA1Wiz7wkgF5u_!!6000000002823-55-tps-399-70.svg" width="200" alt="Deploy on Alibaba Cloud">
</a>
## Documentation
Full documentation is available on the [KubeVela website](https://kubevela.io/).
## Blog
Official blog is available on [KubeVela blog](https://kubevela.io/blog).
## Community
- Slack: [CNCF Slack](https://slack.cncf.io/) #kubevela channel (*English*)
- Gitter: [oam-dev](https://gitter.im/oam-dev/community) (*English*)
We want your contributions and suggestions!
One of the easiest ways to contribute is to participate in discussions on the Github Issues/Discussion, chat on IM or the bi-weekly community calls.
For more information on the community engagement, developer and contributing guidelines and more, head over to the [KubeVela community repo](https://github.com/kubevela/community).
### Contact Us
Reach out with any questions you may have and we'll make sure to answer them as soon as possible!
- Slack: [CNCF Slack kubevela channel](https://cloud-native.slack.com/archives/C01BLQ3HTJA) (*English*)
- [DingTalk Group](https://page.dingtalk.com/wow/dingtalk/act/en-home): `23310022` (*Chinese*)
- Bi-weekly Community Call: [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs)
- Wechat Group (*Chinese*): Broker wechat to add you into the user group.
<img src="https://static.kubevela.net/images/barnett-wechat.jpg" width="200" />
### Community Call
Every two weeks we host a community call to showcase new features, review upcoming milestones, and engage in a Q&A. All are welcome!
- Bi-weekly Community Call:
- [Meeting Notes](https://docs.google.com/document/d/1nqdFEyULekyksFHtFvgvFAYE-0AMHKoS3RMnaKsarjs).
- [Video Records](https://www.youtube.com/channel/UCSCTHhGI5XJ0SEhDHVakPAA/videos).
- Bi-weekly Chinese Community Call:
- [Video Records](https://space.bilibili.com/180074935/channel/seriesdetail?sid=1842207).
## Talks and Conferences
| Engagement | Link |
|:-----------|:------------|
| 🎤 Talks | - [KubeVela - The Modern App Delivery System in Alibaba](https://docs.google.com/presentation/d/1CWCLcsKpDQB3bBDTfdv2BZ8ilGGJv2E8L-iOA5HMrV0/edit?usp=sharing) <br> - [Cloud-Native Apps With Open Application Model (OAM) And KubeVela](https://www.youtube.com/watch?v=2CBu6sOTtwk) |
| 🌎 KubeCon | - [ [NA 2020] Standardizing Cloud Native Application Delivery Across Different Clouds](https://www.youtube.com/watch?v=0yhVuBIbHcI) <br> - [ [EU 2021] Zero Pain Microservice Development and Deployment with Dapr and KubeVela](https://sched.co/iE4S) |
| 📺 Conferences | - [Dapr, Rudr, OAM: Mark Russinovich presents next gen app development & deployment](https://www.youtube.com/watch?v=eJCu6a-x9uo) <br> - [Mark Russinovich presents "The Future of Cloud Native Applications with OAM and Dapr"](https://myignite.techcommunity.microsoft.com/sessions/82059)|
Check out [KubeVela videos](https://kubevela.io/videos/talks/en/oam-dapr) for these talks and conferences.
## Contributing
Check out [CONTRIBUTING](./CONTRIBUTING.md) to see how to develop with KubeVela.
Check out [CONTRIBUTING](https://kubevela.io/docs/contributor/overview) to see how to develop with KubeVela
## Report Vulnerability
Security is a first priority thing for us at KubeVela. If you come across a related issue, please send email to security@mail.kubevela.io .
## Code of Conduct
KubeVela adopts [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).
KubeVela adopts [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

View File

@@ -0,0 +1,22 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package common
const (
// Group api group name
Group = "core.oam.dev"
)

View File

@@ -17,22 +17,22 @@ limitations under the License.
package common
import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
"encoding/json"
"errors"
types "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
wfTypesv1alpha1 "github.com/kubevela/pkg/apis/oam/v1alpha1"
workflowv1alpha1 "github.com/kubevela/workflow/api/v1alpha1"
"github.com/oam-dev/kubevela/apis/core.oam.dev/condition"
"github.com/oam-dev/kubevela/pkg/oam"
)
// Kube defines the encapsulation in raw Kubernetes resource format
type Kube struct {
// Template defines the raw Kubernetes resource
// +kubebuilder:pruning:PreserveUnknownFields
Template runtime.RawExtension `json:"template"`
// Parameters defines configurable parameters
Parameters []KubeParameter `json:"parameters,omitempty"`
}
// ParameterValueType refers to a data type of parameter
type ParameterValueType string
@@ -43,31 +43,6 @@ const (
BooleanType ParameterValueType = "boolean"
)
// A KubeParameter defines a configurable parameter of a component.
type KubeParameter struct {
// Name of this parameter
Name string `json:"name"`
// +kubebuilder:validation:Enum:=string;number;boolean
// ValueType indicates the type of the parameter value, and
// only supports basic data types: string, number, boolean.
ValueType ParameterValueType `json:"type"`
// FieldPaths specifies an array of fields within this workload that will be
// overwritten by the value of this parameter. All fields must be of the
// same type. Fields are specified as JSON field paths without a leading
// dot, for example 'spec.replicas'.
FieldPaths []string `json:"fieldPaths"`
// +kubebuilder:default:=false
// Required specifies whether or not a value for this parameter must be
// supplied when authoring an Application.
Required *bool `json:"required,omitempty"`
// Description of this parameter.
Description *string `json:"description,omitempty"`
}
// CUE defines the encapsulation in CUE format
type CUE struct {
// Template defines the abstraction template data of the capability, it will replace the old CUE template in extension field.
@@ -78,26 +53,11 @@ type CUE struct {
// Schematic defines the encapsulation of this capability(workload/trait/scope),
// the encapsulation can be defined in different ways, e.g. CUE/HCL(terraform)/KUBE(K8s Object)/HELM, etc...
type Schematic struct {
KUBE *Kube `json:"kube,omitempty"`
CUE *CUE `json:"cue,omitempty"`
HELM *Helm `json:"helm,omitempty"`
Terraform *Terraform `json:"terraform,omitempty"`
}
// A Helm represents resources used by a Helm module
type Helm struct {
// Release records a Helm release used by a Helm module workload.
// +kubebuilder:pruning:PreserveUnknownFields
Release runtime.RawExtension `json:"release"`
// HelmRelease records a Helm repository used by a Helm module workload.
// +kubebuilder:pruning:PreserveUnknownFields
Repository runtime.RawExtension `json:"repository"`
}
// Terraform is the struct to describe cloud resources managed by Hashicorp Terraform
type Terraform struct {
// Configuration is Terraform Configuration
@@ -105,8 +65,31 @@ type Terraform struct {
// Type specifies which Terraform configuration it is, HCL or JSON syntax
// +kubebuilder:default:=hcl
// +kubebuilder:validation:Enum:=hcl;json
// +kubebuilder:validation:Enum:=hcl;json;remote
Type string `json:"type,omitempty"`
// Path is the sub-directory of remote git repository. It's valid when remote is set
Path string `json:"path,omitempty"`
// WriteConnectionSecretToReference specifies the namespace and name of a
// Secret to which any connection details for this managed resource should
// be written. Connection details frequently include the endpoint, username,
// and password required to connect to the managed resource.
// +optional
WriteConnectionSecretToReference *types.SecretReference `json:"writeConnectionSecretToRef,omitempty"`
// ProviderReference specifies the reference to Provider
ProviderReference *types.Reference `json:"providerRef,omitempty"`
// DeleteResource will determine whether provisioned cloud resources will be deleted when CR is deleted
// +kubebuilder:default:=true
DeleteResource bool `json:"deleteResource,omitempty"`
// Region is cloud provider's region. It will override the region in the region field of ProviderReference
Region string `json:"customRegion,omitempty"`
// GitCredentialsSecretReference specifies the reference to the secret containing the git credentials
GitCredentialsSecretReference *corev1.SecretReference `json:"gitCredentialsSecretReference,omitempty"`
}
// A WorkloadTypeDescriptor refer to a Workload Type
@@ -153,40 +136,68 @@ type Status struct {
// HealthPolicy defines the health check policy for the abstraction
// +optional
HealthPolicy string `json:"healthPolicy,omitempty"`
// Details stores a string representation of a CUE status map to be evaluated at runtime for display
// +optional
Details string `json:"details,omitempty"`
}
// ApplicationPhase is a label for the condition of a application at the current time
// ApplicationPhase is a label for the condition of an application at the current time
type ApplicationPhase string
const (
// ApplicationRollingOut means the app is in the middle of rolling out
ApplicationRollingOut ApplicationPhase = "rollingOut"
// ApplicationStarting means the app is preparing for reconcile
ApplicationStarting ApplicationPhase = "starting"
// ApplicationRendering means the app is rendering
ApplicationRendering ApplicationPhase = "rendering"
// ApplicationPolicyGenerating means the app is generating policies
ApplicationPolicyGenerating ApplicationPhase = "generatingPolicy"
// ApplicationRunningWorkflow means the app is running workflow
ApplicationRunningWorkflow ApplicationPhase = "runningWorkflow"
// ApplicationWorkflowSuspending means the app's workflow is suspending
ApplicationWorkflowSuspending ApplicationPhase = "workflowSuspending"
// ApplicationWorkflowTerminated means the app's workflow is terminated
ApplicationWorkflowTerminated ApplicationPhase = "workflowTerminated"
// ApplicationWorkflowFailed means the app's workflow is failed
ApplicationWorkflowFailed ApplicationPhase = "workflowFailed"
// ApplicationRunning means the app finished rendering and applied result to the cluster
ApplicationRunning ApplicationPhase = "running"
// ApplicationHealthChecking means the app finished rendering and applied result to the cluster, but still unhealthy
ApplicationHealthChecking ApplicationPhase = "healthChecking"
// ApplicationUnhealthy means the app finished rendering and applied result to the cluster, but still unhealthy
ApplicationUnhealthy ApplicationPhase = "unhealthy"
// ApplicationDeleting means application is being deleted
ApplicationDeleting ApplicationPhase = "deleting"
)
// ApplicationComponentStatus record the health status of App component
type ApplicationComponentStatus struct {
Name string `json:"name"`
Name string `json:"name"`
Namespace string `json:"namespace,omitempty"`
Cluster string `json:"cluster,omitempty"`
Env string `json:"env,omitempty"`
// WorkloadDefinition is the definition of a WorkloadDefinition, such as deployments/apps.v1
WorkloadDefinition WorkloadGVK `json:"workloadDefinition,omitempty"`
Healthy bool `json:"healthy"`
Message string `json:"message,omitempty"`
Traits []ApplicationTraitStatus `json:"traits,omitempty"`
Scopes []runtimev1alpha1.TypedReference `json:"scopes,omitempty"`
WorkloadDefinition WorkloadGVK `json:"workloadDefinition,omitempty"`
Healthy bool `json:"healthy"`
// WorkloadHealthy indicates the workload health without considering trait health.
// +optional
WorkloadHealthy bool `json:"workloadHealthy,omitempty"`
Details map[string]string `json:"details,omitempty"`
Message string `json:"message,omitempty"`
Traits []ApplicationTraitStatus `json:"traits,omitempty"`
Scopes []corev1.ObjectReference `json:"scopes,omitempty"`
}
// Equal check if two ApplicationComponentStatus are equal
func (in ApplicationComponentStatus) Equal(r ApplicationComponentStatus) bool {
return in.Name == r.Name && in.Namespace == r.Namespace &&
in.Cluster == r.Cluster && in.Env == r.Env
}
// ApplicationTraitStatus records the trait health status
type ApplicationTraitStatus struct {
Type string `json:"type"`
Healthy bool `json:"healthy"`
Message string `json:"message,omitempty"`
Type string `json:"type"`
Healthy bool `json:"healthy"`
Pending bool `json:"pending,omitempty"`
Details map[string]string `json:"details,omitempty"`
Message string `json:"message,omitempty"`
}
// Revision has name and revision number
@@ -198,61 +209,74 @@ type Revision struct {
RevisionHash string `json:"revisionHash,omitempty"`
}
// RawComponent record raw component
type RawComponent struct {
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
Raw runtime.RawExtension `json:"raw"`
}
// WorkflowStepStatus record the status of a workflow step
type WorkflowStepStatus struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Phase WorkflowStepPhase `json:"phase,omitempty"`
ResourceRef runtimev1alpha1.TypedReference `json:"resourceRef,omitempty"`
}
// AppStatus defines the observed state of Application
type AppStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
runtimev1alpha1.ConditionedStatus `json:",inline"`
condition.ConditionedStatus `json:",inline"`
Rollout AppRolloutStatus `json:"rollout,omitempty"`
// The generation observed by the application controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Phase ApplicationPhase `json:"status,omitempty"`
// Components record the related Components created by Application Controller
Components []runtimev1alpha1.TypedReference `json:"components,omitempty"`
Components []corev1.ObjectReference `json:"components,omitempty"`
// Services record the status of the application services
Services []ApplicationComponentStatus `json:"services,omitempty"`
// ResourceTracker record the status of the ResourceTracker
ResourceTracker *runtimev1alpha1.TypedReference `json:"resourceTracker,omitempty"`
// Workflow record the status of workflow
Workflow *WorkflowStatus `json:"workflow,omitempty"`
// Workflow record the status of workflow steps
Workflow []WorkflowStepStatus `json:"workflow,omitempty"`
// WorkflowRestartScheduledAt schedules a workflow restart at the specified time.
// This field is automatically set when the app.oam.dev/restart-workflow annotation is present,
// and is cleared after the restart is triggered. Use RFC3339 format or set to current time for immediate restart.
// +optional
WorkflowRestartScheduledAt *metav1.Time `json:"workflowRestartScheduledAt,omitempty"`
// LatestRevision of the application configuration it generates
// +optional
LatestRevision *Revision `json:"latestRevision,omitempty"`
// AppliedResources record the resources that the workflow step apply.
AppliedResources []ClusterObjectReference `json:"appliedResources,omitempty"`
// PolicyStatus records the status of policy
// Deprecated This field is only used by EnvBinding Policy which is deprecated.
PolicyStatus []PolicyStatus `json:"policy,omitempty"`
}
// WorkflowStepPhase describes the phase of a workflow step.
type WorkflowStepPhase string
// PolicyStatus records the status of policy
// Deprecated
type PolicyStatus struct {
Name string `json:"name"`
Type string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Status *runtime.RawExtension `json:"status,omitempty"`
}
const (
// WorkflowStepPhaseSucceeded will make the controller run the next step.
WorkflowStepPhaseSucceeded WorkflowStepPhase = "succeeded"
// WorkflowStepPhaseFailed will make the controller stop the workflow and report error in `message`.
WorkflowStepPhaseFailed WorkflowStepPhase = "failed"
// WorkflowStepPhaseStopped will make the controller stop the workflow.
WorkflowStepPhaseStopped WorkflowStepPhase = "stopped"
// WorkflowStepPhaseRunning will make the controller continue the workflow.
WorkflowStepPhaseRunning WorkflowStepPhase = "running"
)
// WorkflowStatus record the status of workflow
type WorkflowStatus struct {
AppRevision string `json:"appRevision,omitempty"`
Mode string `json:"mode"`
Phase workflowv1alpha1.WorkflowRunPhase `json:"status,omitempty"`
Message string `json:"message,omitempty"`
Suspend bool `json:"suspend"`
SuspendState string `json:"suspendState,omitempty"`
Terminated bool `json:"terminated"`
Finished bool `json:"finished"`
ContextBackend *corev1.ObjectReference `json:"contextBackend,omitempty"`
Steps []workflowv1alpha1.WorkflowStepStatus `json:"steps,omitempty"`
StartTime metav1.Time `json:"startTime,omitempty"`
// +nullable
EndTime metav1.Time `json:"endTime,omitempty"`
}
// DefinitionType describes the type of DefinitionRevision.
// +kubebuilder:validation:Enum=Component;Trait;Policy;WorkflowStep
@@ -272,15 +296,209 @@ const (
WorkflowStepType DefinitionType = "WorkflowStep"
)
// AppRolloutStatus defines the observed state of AppRollout
type AppRolloutStatus struct {
v1alpha1.RolloutStatus `json:",inline"`
// LastUpgradedTargetAppRevision contains the name of the app that we upgraded to
// We will restart the rollout if this is not the same as the spec
LastUpgradedTargetAppRevision string `json:"lastTargetAppRevision"`
// LastSourceAppRevision contains the name of the app that we need to upgrade from.
// We will restart the rollout if this is not the same as the spec
LastSourceAppRevision string `json:"LastSourceAppRevision,omitempty"`
// ApplicationTrait defines the trait of application
type ApplicationTrait struct {
Type string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties *runtime.RawExtension `json:"properties,omitempty"`
}
// ApplicationComponent describe the component of application
type ApplicationComponent struct {
Name string `json:"name"`
Type string `json:"type"`
// ExternalRevision specified the component revisionName
ExternalRevision string `json:"externalRevision,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties *runtime.RawExtension `json:"properties,omitempty"`
DependsOn []string `json:"dependsOn,omitempty"`
Inputs wfTypesv1alpha1.StepInputs `json:"inputs,omitempty"`
Outputs wfTypesv1alpha1.StepOutputs `json:"outputs,omitempty"`
// Traits define the trait of one component, the type must be array to keep the order.
Traits []ApplicationTrait `json:"traits,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
// scopes in ApplicationComponent defines the component-level scopes
// the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
Scopes map[string]string `json:"scopes,omitempty"`
// ReplicaKey is not empty means the component is replicated. This field is designed so that it can't be specified in application directly.
// So we set the json tag as "-". Instead, this will be filled when using replication policy.
ReplicaKey string `json:"-"`
}
// ClusterSelector defines the rules to select a Cluster resource.
// Either name or labels is needed.
type ClusterSelector struct {
// Name is the name of the cluster.
Name string `json:"name,omitempty"`
// Labels defines the label selector to select the cluster.
Labels map[string]string `json:"labels,omitempty"`
}
const (
// PolicyResourceCreator create the policy resource.
PolicyResourceCreator string = "policy"
// WorkflowResourceCreator create the resource in workflow.
WorkflowResourceCreator string = "workflow"
)
// OAMObjectReference defines the object reference for an oam resource
type OAMObjectReference struct {
Component string `json:"component,omitempty"`
Trait string `json:"trait,omitempty"`
}
// Equal check if two references are equal
func (in OAMObjectReference) Equal(r OAMObjectReference) bool {
return in.Component == r.Component && in.Trait == r.Trait
}
// AddLabelsToObject add labels to object if properties are not empty
func (in OAMObjectReference) AddLabelsToObject(obj client.Object) {
labels := obj.GetLabels()
if labels == nil {
labels = map[string]string{}
}
if in.Component != "" {
labels[oam.LabelAppComponent] = in.Component
}
if in.Trait != "" {
labels[oam.TraitTypeLabel] = in.Trait
}
obj.SetLabels(labels)
}
// NewOAMObjectReferenceFromObject create OAMObjectReference from object
func NewOAMObjectReferenceFromObject(obj client.Object) OAMObjectReference {
if labels := obj.GetLabels(); labels != nil {
return OAMObjectReference{
Component: labels[oam.LabelAppComponent],
Trait: labels[oam.TraitTypeLabel],
}
}
return OAMObjectReference{}
}
// ClusterObjectReference defines the object reference with cluster.
type ClusterObjectReference struct {
Cluster string `json:"cluster,omitempty"`
Creator string `json:"creator,omitempty"`
corev1.ObjectReference `json:",inline"`
}
// Equal check if two references are equal
func (in ClusterObjectReference) Equal(r ClusterObjectReference) bool {
return in.APIVersion == r.APIVersion && in.Kind == r.Kind && in.Name == r.Name && in.Namespace == r.Namespace && in.UID == r.UID && in.Creator == r.Creator && in.Cluster == r.Cluster
}
// RawExtensionPointer is the pointer of raw extension
type RawExtensionPointer struct {
RawExtension *runtime.RawExtension
}
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
func (re RawExtensionPointer) MarshalJSON() ([]byte, error) {
if re.RawExtension == nil {
return nil, nil
}
if re.RawExtension.Raw == nil {
// TODO: this is to support legacy behavior of JSONPrinter and YAMLPrinter, which
// expect to call json.Marshal on arbitrary versioned objects (even those not in
// the scheme). pkg/kubectl/resource#AsVersionedObjects and its interaction with
// kubectl get on objects not in the scheme needs to be updated to ensure that the
// objects that are not part of the scheme are correctly put into the right form.
if re.RawExtension.Object != nil {
return json.Marshal(re.RawExtension.Object)
}
return []byte("null"), nil
}
// TODO: Check whether ContentType is actually JSON before returning it.
return re.RawExtension.Raw, nil
}
// ApplicationConditionType is a valid value for ApplicationCondition.Type
type ApplicationConditionType int
const (
// ParsedCondition indicates whether the parsing is successful.
ParsedCondition ApplicationConditionType = iota
// RevisionCondition indicates whether the generated revision is successful.
RevisionCondition
// PolicyCondition indicates whether policy processing is successful.
PolicyCondition
// RenderCondition indicates whether render processing is successful.
RenderCondition
// WorkflowCondition indicates whether workflow processing is successful.
WorkflowCondition
// ReadyCondition indicates whether whole application processing is successful.
ReadyCondition
)
var conditions = map[ApplicationConditionType]string{
ParsedCondition: "Parsed",
RevisionCondition: "Revision",
PolicyCondition: "Policy",
RenderCondition: "Render",
WorkflowCondition: "Workflow",
ReadyCondition: "Ready",
}
// String returns the string corresponding to the condition type.
func (ct ApplicationConditionType) String() string {
return conditions[ct]
}
// ParseApplicationConditionType parse ApplicationCondition Type.
func ParseApplicationConditionType(s string) (ApplicationConditionType, error) {
for k, v := range conditions {
if v == s {
return k, nil
}
}
return -1, errors.New("unknown condition type")
}
// ReferredObject the referred Kubernetes object
type ReferredObject struct {
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
runtime.RawExtension `json:",inline"`
}
// ReferredObjectList a list of referred Kubernetes objects
type ReferredObjectList struct {
// Objects a list of Kubernetes objects.
// +optional
Objects []ReferredObject `json:"objects,omitempty"`
}
// ContainerState defines the state of a container
type ContainerState string
const (
// ContainerRunning indicates the container is running
ContainerRunning ContainerState = "Running"
// ContainerWaiting indicates the container is waiting
ContainerWaiting ContainerState = "Waiting"
// ContainerTerminated indicates the container is terminated
ContainerTerminated ContainerState = "Terminated"
)
// ContainerStateToString convert the container state to string
func ContainerStateToString(state corev1.ContainerState) string {
switch {
case state.Running != nil:
return "Running"
case state.Waiting != nil:
return "Waiting"
case state.Terminated != nil:
return "Terminated"
default:
return "Unknown"
}
}

View File

@@ -0,0 +1,73 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package common
import (
"testing"
"github.com/stretchr/testify/require"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
func TestOAMObjectReference(t *testing.T) {
r := require.New(t)
o1 := OAMObjectReference{
Component: "component",
Trait: "trait",
}
obj := &unstructured.Unstructured{}
o2 := NewOAMObjectReferenceFromObject(obj)
r.False(o2.Equal(o1))
o1.AddLabelsToObject(obj)
r.Equal(2, len(obj.GetLabels()))
o3 := NewOAMObjectReferenceFromObject(obj)
r.True(o1.Equal(o3))
o3.Component = "comp"
r.False(o3.Equal(o1))
r.True(o1.Equal(*o1.DeepCopy()))
o4 := OAMObjectReference{}
o1.DeepCopyInto(&o4)
r.True(o4.Equal(o1))
}
func TestClusterObjectReference(t *testing.T) {
r := require.New(t)
o1 := ClusterObjectReference{
Cluster: "cluster",
ObjectReference: v1.ObjectReference{Kind: "kind"},
}
o2 := *o1.DeepCopy()
r.True(o1.Equal(o2))
o2.Cluster = "c"
r.False(o2.Equal(o1))
}
func TestContainerStateToString(t *testing.T) {
r := require.New(t)
r.Equal("Waiting", ContainerStateToString(v1.ContainerState{
Waiting: &v1.ContainerStateWaiting{},
}))
r.Equal("Running", ContainerStateToString(v1.ContainerState{
Running: &v1.ContainerStateRunning{},
}))
r.Equal("Terminated", ContainerStateToString(v1.ContainerState{
Terminated: &v1.ContainerStateTerminated{},
}))
r.Equal("Unknown", ContainerStateToString(v1.ContainerState{}))
}

View File

@@ -1,7 +1,7 @@
// +build !ignore_autogenerated
//go:build !ignore_autogenerated
/*
Copyright 2021 The KubeVela Authors.
Copyright 2023 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -21,33 +21,20 @@ limitations under the License.
package common
import (
"github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
oamv1alpha1 "github.com/kubevela/pkg/apis/oam/v1alpha1"
"github.com/kubevela/workflow/api/v1alpha1"
crossplane_runtime "github.com/oam-dev/terraform-controller/api/types/crossplane-runtime"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/runtime"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AppRolloutStatus) DeepCopyInto(out *AppRolloutStatus) {
*out = *in
in.RolloutStatus.DeepCopyInto(&out.RolloutStatus)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppRolloutStatus.
func (in *AppRolloutStatus) DeepCopy() *AppRolloutStatus {
if in == nil {
return nil
}
out := new(AppRolloutStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *AppStatus) DeepCopyInto(out *AppStatus) {
*out = *in
in.ConditionedStatus.DeepCopyInto(&out.ConditionedStatus)
in.Rollout.DeepCopyInto(&out.Rollout)
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]v1alpha1.TypedReference, len(*in))
*out = make([]v1.ObjectReference, len(*in))
copy(*out, *in)
}
if in.Services != nil {
@@ -57,21 +44,32 @@ func (in *AppStatus) DeepCopyInto(out *AppStatus) {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.ResourceTracker != nil {
in, out := &in.ResourceTracker, &out.ResourceTracker
*out = new(v1alpha1.TypedReference)
**out = **in
}
if in.Workflow != nil {
in, out := &in.Workflow, &out.Workflow
*out = make([]WorkflowStepStatus, len(*in))
copy(*out, *in)
*out = new(WorkflowStatus)
(*in).DeepCopyInto(*out)
}
if in.WorkflowRestartScheduledAt != nil {
in, out := &in.WorkflowRestartScheduledAt, &out.WorkflowRestartScheduledAt
*out = (*in).DeepCopy()
}
if in.LatestRevision != nil {
in, out := &in.LatestRevision, &out.LatestRevision
*out = new(Revision)
**out = **in
}
if in.AppliedResources != nil {
in, out := &in.AppliedResources, &out.AppliedResources
*out = make([]ClusterObjectReference, len(*in))
copy(*out, *in)
}
if in.PolicyStatus != nil {
in, out := &in.PolicyStatus, &out.PolicyStatus
*out = make([]PolicyStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppStatus.
@@ -85,17 +83,75 @@ func (in *AppStatus) DeepCopy() *AppStatus {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationComponentStatus) DeepCopyInto(out *ApplicationComponentStatus) {
func (in *ApplicationComponent) DeepCopyInto(out *ApplicationComponent) {
*out = *in
out.WorkloadDefinition = in.WorkloadDefinition
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
if in.DependsOn != nil {
in, out := &in.DependsOn, &out.DependsOn
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Inputs != nil {
in, out := &in.Inputs, &out.Inputs
*out = make(oamv1alpha1.StepInputs, len(*in))
copy(*out, *in)
}
if in.Outputs != nil {
in, out := &in.Outputs, &out.Outputs
*out = make(oamv1alpha1.StepOutputs, len(*in))
copy(*out, *in)
}
if in.Traits != nil {
in, out := &in.Traits, &out.Traits
*out = make([]ApplicationTraitStatus, len(*in))
copy(*out, *in)
*out = make([]ApplicationTrait, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Scopes != nil {
in, out := &in.Scopes, &out.Scopes
*out = make([]v1alpha1.TypedReference, len(*in))
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationComponent.
func (in *ApplicationComponent) DeepCopy() *ApplicationComponent {
if in == nil {
return nil
}
out := new(ApplicationComponent)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationComponentStatus) DeepCopyInto(out *ApplicationComponentStatus) {
*out = *in
out.WorkloadDefinition = in.WorkloadDefinition
if in.Details != nil {
in, out := &in.Details, &out.Details
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.Traits != nil {
in, out := &in.Traits, &out.Traits
*out = make([]ApplicationTraitStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Scopes != nil {
in, out := &in.Scopes, &out.Scopes
*out = make([]v1.ObjectReference, len(*in))
copy(*out, *in)
}
}
@@ -110,9 +166,36 @@ func (in *ApplicationComponentStatus) DeepCopy() *ApplicationComponentStatus {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationTrait) DeepCopyInto(out *ApplicationTrait) {
*out = *in
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTrait.
func (in *ApplicationTrait) DeepCopy() *ApplicationTrait {
if in == nil {
return nil
}
out := new(ApplicationTrait)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplicationTraitStatus) DeepCopyInto(out *ApplicationTraitStatus) {
*out = *in
if in.Details != nil {
in, out := &in.Details, &out.Details
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationTraitStatus.
@@ -162,6 +245,44 @@ func (in *ChildResourceKind) DeepCopy() *ChildResourceKind {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterObjectReference) DeepCopyInto(out *ClusterObjectReference) {
*out = *in
out.ObjectReference = in.ObjectReference
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterObjectReference.
func (in *ClusterObjectReference) DeepCopy() *ClusterObjectReference {
if in == nil {
return nil
}
out := new(ClusterObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterSelector) DeepCopyInto(out *ClusterSelector) {
*out = *in
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSelector.
func (in *ClusterSelector) DeepCopy() *ClusterSelector {
if in == nil {
return nil
}
out := new(ClusterSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *DefinitionReference) DeepCopyInto(out *DefinitionReference) {
*out = *in
@@ -178,87 +299,94 @@ func (in *DefinitionReference) DeepCopy() *DefinitionReference {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Helm) DeepCopyInto(out *Helm) {
func (in *OAMObjectReference) DeepCopyInto(out *OAMObjectReference) {
*out = *in
in.Release.DeepCopyInto(&out.Release)
in.Repository.DeepCopyInto(&out.Repository)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Helm.
func (in *Helm) DeepCopy() *Helm {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAMObjectReference.
func (in *OAMObjectReference) DeepCopy() *OAMObjectReference {
if in == nil {
return nil
}
out := new(Helm)
out := new(OAMObjectReference)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Kube) DeepCopyInto(out *Kube) {
func (in *PolicyStatus) DeepCopyInto(out *PolicyStatus) {
*out = *in
in.Template.DeepCopyInto(&out.Template)
if in.Parameters != nil {
in, out := &in.Parameters, &out.Parameters
*out = make([]KubeParameter, len(*in))
if in.Status != nil {
in, out := &in.Status, &out.Status
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyStatus.
func (in *PolicyStatus) DeepCopy() *PolicyStatus {
if in == nil {
return nil
}
out := new(PolicyStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RawExtensionPointer) DeepCopyInto(out *RawExtensionPointer) {
*out = *in
if in.RawExtension != nil {
in, out := &in.RawExtension, &out.RawExtension
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawExtensionPointer.
func (in *RawExtensionPointer) DeepCopy() *RawExtensionPointer {
if in == nil {
return nil
}
out := new(RawExtensionPointer)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReferredObject) DeepCopyInto(out *ReferredObject) {
*out = *in
in.RawExtension.DeepCopyInto(&out.RawExtension)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReferredObject.
func (in *ReferredObject) DeepCopy() *ReferredObject {
if in == nil {
return nil
}
out := new(ReferredObject)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReferredObjectList) DeepCopyInto(out *ReferredObjectList) {
*out = *in
if in.Objects != nil {
in, out := &in.Objects, &out.Objects
*out = make([]ReferredObject, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Kube.
func (in *Kube) DeepCopy() *Kube {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReferredObjectList.
func (in *ReferredObjectList) DeepCopy() *ReferredObjectList {
if in == nil {
return nil
}
out := new(Kube)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *KubeParameter) DeepCopyInto(out *KubeParameter) {
*out = *in
if in.FieldPaths != nil {
in, out := &in.FieldPaths, &out.FieldPaths
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Required != nil {
in, out := &in.Required, &out.Required
*out = new(bool)
**out = **in
}
if in.Description != nil {
in, out := &in.Description, &out.Description
*out = new(string)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeParameter.
func (in *KubeParameter) DeepCopy() *KubeParameter {
if in == nil {
return nil
}
out := new(KubeParameter)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RawComponent) DeepCopyInto(out *RawComponent) {
*out = *in
in.Raw.DeepCopyInto(&out.Raw)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RawComponent.
func (in *RawComponent) DeepCopy() *RawComponent {
if in == nil {
return nil
}
out := new(RawComponent)
out := new(ReferredObjectList)
in.DeepCopyInto(out)
return out
}
@@ -281,25 +409,15 @@ func (in *Revision) DeepCopy() *Revision {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Schematic) DeepCopyInto(out *Schematic) {
*out = *in
if in.KUBE != nil {
in, out := &in.KUBE, &out.KUBE
*out = new(Kube)
(*in).DeepCopyInto(*out)
}
if in.CUE != nil {
in, out := &in.CUE, &out.CUE
*out = new(CUE)
**out = **in
}
if in.HELM != nil {
in, out := &in.HELM, &out.HELM
*out = new(Helm)
(*in).DeepCopyInto(*out)
}
if in.Terraform != nil {
in, out := &in.Terraform, &out.Terraform
*out = new(Terraform)
**out = **in
(*in).DeepCopyInto(*out)
}
}
@@ -331,6 +449,21 @@ func (in *Status) DeepCopy() *Status {
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Terraform) DeepCopyInto(out *Terraform) {
*out = *in
if in.WriteConnectionSecretToReference != nil {
in, out := &in.WriteConnectionSecretToReference, &out.WriteConnectionSecretToReference
*out = new(crossplane_runtime.SecretReference)
**out = **in
}
if in.ProviderReference != nil {
in, out := &in.ProviderReference, &out.ProviderReference
*out = new(crossplane_runtime.Reference)
**out = **in
}
if in.GitCredentialsSecretReference != nil {
in, out := &in.GitCredentialsSecretReference, &out.GitCredentialsSecretReference
*out = new(v1.SecretReference)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Terraform.
@@ -344,17 +477,30 @@ func (in *Terraform) DeepCopy() *Terraform {
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *WorkflowStepStatus) DeepCopyInto(out *WorkflowStepStatus) {
func (in *WorkflowStatus) DeepCopyInto(out *WorkflowStatus) {
*out = *in
out.ResourceRef = in.ResourceRef
if in.ContextBackend != nil {
in, out := &in.ContextBackend, &out.ContextBackend
*out = new(v1.ObjectReference)
**out = **in
}
if in.Steps != nil {
in, out := &in.Steps, &out.Steps
*out = make([]v1alpha1.WorkflowStepStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
in.StartTime.DeepCopyInto(&out.StartTime)
in.EndTime.DeepCopyInto(&out.EndTime)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStepStatus.
func (in *WorkflowStepStatus) DeepCopy() *WorkflowStepStatus {
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkflowStatus.
func (in *WorkflowStatus) DeepCopy() *WorkflowStatus {
if in == nil {
return nil
}
out := new(WorkflowStepStatus)
out := new(WorkflowStatus)
in.DeepCopyInto(out)
return out
}

View File

@@ -0,0 +1,282 @@
/*
// This file is originally from https://github.com/crossplane/crossplane-runtime/blob/master/apis/common/v1/condition.go
// We copy it here to reduce dependency and add more
Copyright 2021 The KubeVela Authors.
Copyright 2019 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package condition
import (
"sort"
"time"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// A ConditionType represents a condition a resource could be in.
// nolint
type ConditionType string
// Condition types.
const (
// TypeReady resources are believed to be ready to handle work.
TypeReady ConditionType = "Ready"
// TypeSynced resources are believed to be in sync with the
// Kubernetes resources that manage their lifecycle.
TypeSynced ConditionType = "Synced"
)
// A ConditionReason represents the reason a resource is in a condition.
// nolint
type ConditionReason string
// Reasons a resource is or is not ready.
const (
ReasonAvailable ConditionReason = "Available"
ReasonUnavailable ConditionReason = "Unavailable"
ReasonCreating ConditionReason = "Creating"
ReasonDeleting ConditionReason = "Deleting"
)
// Reasons a resource is or is not synced.
const (
ReasonReconcileSuccess ConditionReason = "ReconcileSuccess"
ReasonReconcileError ConditionReason = "ReconcileError"
)
// A Condition that may apply to a resource.
type Condition struct {
// Type of this condition. At most one of each condition type may apply to
// a resource at any point in time.
Type ConditionType `json:"type"`
// Status of this condition; is it currently True, False, or Unknown?
Status corev1.ConditionStatus `json:"status"`
// LastTransitionTime is the last time this condition transitioned from one
// status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime"`
// A Reason for this condition's last transition from one status to another.
Reason ConditionReason `json:"reason"`
// A Message containing details about this condition's last transition from
// one status to another, if any.
// +optional
Message string `json:"message,omitempty"`
}
// Equal returns true if the condition is identical to the supplied condition,
// ignoring the LastTransitionTime.
func (c Condition) Equal(other Condition) bool {
return c.Type == other.Type &&
c.Status == other.Status &&
c.Reason == other.Reason &&
c.Message == other.Message
}
// WithMessage returns a condition by adding the provided message to existing
// condition.
func (c Condition) WithMessage(msg string) Condition {
c.Message = msg
return c
}
// NOTE(negz): Conditions are implemented as a slice rather than a map to comply
// with Kubernetes API conventions. Ideally we'd comply by using a map that
// marshalled to a JSON array, but doing so confuses the CRD schema generator.
// https://github.com/kubernetes/community/blob/9bf8cd/contributors/devel/sig-architecture/api-conventions.md#lists-of-named-subobjects-preferred-over-maps
// NOTE(negz): Do not manipulate Conditions directly. Use the Set method.
// A ConditionedStatus reflects the observed status of a resource. Only
// one condition of each type may exist.
type ConditionedStatus struct {
// Conditions of the resource.
// +optional
Conditions []Condition `json:"conditions,omitempty"`
}
// NewConditionedStatus returns a stat with the supplied conditions set.
func NewConditionedStatus(c ...Condition) *ConditionedStatus {
s := &ConditionedStatus{}
s.SetConditions(c...)
return s
}
// GetCondition returns the condition for the given ConditionType if exists,
// otherwise returns nil
func (s *ConditionedStatus) GetCondition(ct ConditionType) Condition {
for _, c := range s.Conditions {
if c.Type == ct {
return c
}
}
return Condition{Type: ct, Status: corev1.ConditionUnknown}
}
// SetConditions sets the supplied conditions, replacing any existing conditions
// of the same type. This is a no-op if all supplied conditions are identical,
// ignoring the last transition time, to those already set.
func (s *ConditionedStatus) SetConditions(c ...Condition) {
for _, new := range c {
exists := false
for i, existing := range s.Conditions {
if existing.Type != new.Type {
continue
}
if existing.Equal(new) {
exists = true
continue
}
s.Conditions[i] = new
exists = true
}
if !exists {
s.Conditions = append(s.Conditions, new)
}
}
}
// Equal returns true if the status is identical to the supplied status,
// ignoring the LastTransitionTimes and order of statuses.
func (s *ConditionedStatus) Equal(other *ConditionedStatus) bool {
if s == nil || other == nil {
return s == nil && other == nil
}
if len(other.Conditions) != len(s.Conditions) {
return false
}
sc := make([]Condition, len(s.Conditions))
copy(sc, s.Conditions)
oc := make([]Condition, len(other.Conditions))
copy(oc, other.Conditions)
// We should not have more than one condition of each type.
sort.Slice(sc, func(i, j int) bool { return sc[i].Type < sc[j].Type })
sort.Slice(oc, func(i, j int) bool { return oc[i].Type < oc[j].Type })
for i := range sc {
if !sc[i].Equal(oc[i]) {
return false
}
}
return true
}
// Creating returns a condition that indicates the resource is currently
// being created.
func Creating() Condition {
return Condition{
Type: TypeReady,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: ReasonCreating,
}
}
// Deleting returns a condition that indicates the resource is currently
// being deleted.
func Deleting() Condition {
return Condition{
Type: TypeReady,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: ReasonDeleting,
}
}
// Available returns a condition that indicates the resource is
// currently observed to be available for use.
func Available() Condition {
return Condition{
Type: TypeReady,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.Now(),
Reason: ReasonAvailable,
}
}
// Unavailable returns a condition that indicates the resource is not
// currently available for use. Unavailable should be set only when Crossplane
// expects the resource to be available but knows it is not, for example
// because its API reports it is unhealthy.
func Unavailable() Condition {
return Condition{
Type: TypeReady,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: ReasonUnavailable,
}
}
// ReconcileSuccess returns a condition indicating that Crossplane successfully
// completed the most recent reconciliation of the resource.
func ReconcileSuccess() Condition {
return Condition{
Type: TypeSynced,
Status: corev1.ConditionTrue,
LastTransitionTime: metav1.Now(),
Reason: ReasonReconcileSuccess,
}
}
// ReconcileError returns a condition indicating that Crossplane encountered an
// error while reconciling the resource. This could mean Crossplane was
// unable to update the resource to reflect its desired state, or that
// Crossplane was unable to determine the current actual state of the resource.
func ReconcileError(err error) Condition {
return Condition{
Type: TypeSynced,
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.Now(),
Reason: ReasonReconcileError,
Message: err.Error(),
}
}
// ReadyCondition generate ready condition for conditionType
func ReadyCondition(tpy string) Condition {
return Condition{
Type: ConditionType(tpy),
Status: corev1.ConditionTrue,
Reason: ReasonAvailable,
LastTransitionTime: metav1.NewTime(time.Now()),
}
}
// ErrorCondition generate error condition for conditionType and error
func ErrorCondition(tpy string, err error) Condition {
return Condition{
Type: ConditionType(tpy),
Status: corev1.ConditionFalse,
LastTransitionTime: metav1.NewTime(time.Now()),
Reason: ReasonReconcileError,
Message: err.Error(),
}
}

View File

@@ -0,0 +1,221 @@
// This file is originally from https://github.com/crossplane/crossplane-runtime/blob/master/apis/common/v1/condition_test.go
// We copy it here to reduce dependency
/*
Copyright 2019 The Crossplane Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package condition
import (
"testing"
"github.com/google/go-cmp/cmp"
"github.com/pkg/errors"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
func TestConditionEqual(t *testing.T) {
cases := map[string]struct {
a Condition
b Condition
want bool
}{
"IdenticalIgnoringTimestamp": {
a: Condition{Type: TypeReady, LastTransitionTime: metav1.Now()},
b: Condition{Type: TypeReady, LastTransitionTime: metav1.Now()},
want: true,
},
"DifferentType": {
a: Condition{Type: TypeReady},
b: Condition{Type: TypeSynced},
want: false,
},
"DifferentStatus": {
a: Condition{Status: corev1.ConditionTrue},
b: Condition{Status: corev1.ConditionFalse},
want: false,
},
"DifferentReason": {
a: Condition{Reason: ReasonCreating},
b: Condition{Reason: ReasonDeleting},
want: false,
},
"DifferentMessage": {
a: Condition{Message: "cool"},
b: Condition{Message: "uncool"},
want: false,
},
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
got := tc.a.Equal(tc.b)
if diff := cmp.Diff(tc.want, got); diff != "" {
t.Errorf("a.Equal(b): -want, +got:\n%s", diff)
}
})
}
}
func TestConditionedStatusEqual(t *testing.T) {
cases := map[string]struct {
a *ConditionedStatus
b *ConditionedStatus
want bool
}{
"Identical": {
a: NewConditionedStatus(Available(), ReconcileSuccess()),
b: NewConditionedStatus(Available(), ReconcileSuccess()),
want: true,
},
"IdenticalExceptOrder": {
a: NewConditionedStatus(Unavailable(), ReconcileSuccess()),
b: NewConditionedStatus(ReconcileSuccess(), Unavailable()),
want: true,
},
"DifferentLength": {
a: NewConditionedStatus(Available(), ReconcileSuccess()),
b: NewConditionedStatus(ReconcileSuccess()),
want: false,
},
"DifferentCondition": {
a: NewConditionedStatus(Creating(), ReconcileSuccess()),
b: NewConditionedStatus(Creating(), ReconcileError(errors.New("boom"))),
want: false,
},
"AIsNil": {
a: nil,
b: NewConditionedStatus(Deleting(), ReconcileSuccess()),
want: false,
},
"BIsNil": {
a: NewConditionedStatus(Available(), ReconcileSuccess()),
b: nil,
want: false,
},
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
got := tc.a.Equal(tc.b)
if diff := cmp.Diff(tc.want, got); diff != "" {
t.Errorf("a.Equal(b): -want, +got:\n%s", diff)
}
})
}
}
func TestSetConditions(t *testing.T) {
cases := map[string]struct {
cs *ConditionedStatus
c []Condition
want *ConditionedStatus
}{
"TypeIsIdentical": {
cs: NewConditionedStatus(Available()),
c: []Condition{Available()},
want: NewConditionedStatus(Available()),
},
"TypeIsDifferent": {
cs: NewConditionedStatus(Creating()),
c: []Condition{Available()},
want: NewConditionedStatus(Available()),
},
"TypeDoesNotExist": {
cs: NewConditionedStatus(ReconcileSuccess()),
c: []Condition{Available()},
want: NewConditionedStatus(ReconcileSuccess(), Available()),
},
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
tc.cs.SetConditions(tc.c...)
got := tc.cs
if diff := cmp.Diff(tc.want, got); diff != "" {
t.Errorf("tc.cs.SetConditions(...): -want, +got:\n%s", diff)
}
})
}
}
func TestGetCondition(t *testing.T) {
cases := map[string]struct {
cs *ConditionedStatus
t ConditionType
want Condition
}{
"ConditionExists": {
cs: NewConditionedStatus(Available()),
t: TypeReady,
want: Available(),
},
"ConditionDoesNotExist": {
cs: NewConditionedStatus(Available()),
t: TypeSynced,
want: Condition{
Type: TypeSynced,
Status: corev1.ConditionUnknown,
},
},
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
got := tc.cs.GetCondition(tc.t)
if diff := cmp.Diff(tc.want, got); diff != "" {
t.Errorf("tc.cs.GetConditions(...): -want, +got:\n%s", diff)
}
})
}
}
func TestConditionWithMessage(t *testing.T) {
testMsg := "Something went wrong on cloud side"
cases := map[string]struct {
c Condition
msg string
want Condition
}{
"MessageAdded": {
c: Condition{Type: TypeReady, Reason: ReasonUnavailable},
msg: testMsg,
want: Condition{Type: TypeReady, Reason: ReasonUnavailable, Message: testMsg},
},
"MessageChanged": {
c: Condition{Type: TypeReady, Reason: ReasonUnavailable, Message: "Some other message"},
msg: testMsg,
want: Condition{Type: TypeReady, Reason: ReasonUnavailable, Message: testMsg},
},
"MessageCleared": {
c: Condition{Type: TypeReady, Reason: ReasonUnavailable, Message: testMsg},
msg: "",
want: Condition{Type: TypeReady, Reason: ReasonUnavailable},
},
}
for name, tc := range cases {
t.Run(name, func(t *testing.T) {
got := tc.c.WithMessage(tc.msg)
if diff := cmp.Diff(tc.want, got); diff != "" {
t.Errorf("a.Equal(b): -want, +got:\n%s", diff)
}
})
}
}

View File

@@ -0,0 +1,19 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package condition contains condition types
// +kubebuilder:object:generate=true
package condition

View File

@@ -0,0 +1,59 @@
//go:build !ignore_autogenerated
/*
Copyright 2023 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by controller-gen. DO NOT EDIT.
package condition
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Condition) DeepCopyInto(out *Condition) {
*out = *in
in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (in *Condition) DeepCopy() *Condition {
if in == nil {
return nil
}
out := new(Condition)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ConditionedStatus) DeepCopyInto(out *ConditionedStatus) {
*out = *in
if in.Conditions != nil {
in, out := &in.Conditions, &out.Conditions
*out = make([]Condition, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConditionedStatus.
func (in *ConditionedStatus) DeepCopy() *ConditionedStatus {
if in == nil {
return nil
}
out := new(ConditionedStatus)
in.DeepCopyInto(out)
return out
}

View File

@@ -20,13 +20,13 @@ package core_oam_dev
import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha2"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1alpha1"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
)
func init() {
// Register the types with the Scheme so the resources can map objects to GroupVersionKinds and back
AddToSchemes = append(AddToSchemes, v1alpha2.SchemeBuilder.AddToScheme, v1beta1.SchemeBuilder.AddToScheme)
AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, v1beta1.SchemeBuilder.AddToScheme)
}
// AddToSchemes may be used to add all resources defined in the project to a Scheme

View File

@@ -0,0 +1,78 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
const (
// ApplyOncePolicyType refers to the type of configuration drift policy
ApplyOncePolicyType = "apply-once"
// ApplyOnceStrategyOnAppUpdate policy takes effect on application updating
ApplyOnceStrategyOnAppUpdate ApplyOnceAffectStrategy = "onUpdate"
// ApplyOnceStrategyOnAppStateKeep policy takes effect on application state keep
ApplyOnceStrategyOnAppStateKeep ApplyOnceAffectStrategy = "onStateKeep"
// ApplyOnceStrategyAlways policy takes effect always
ApplyOnceStrategyAlways ApplyOnceAffectStrategy = "always"
)
// ApplyOnceAffectStrategy is a string that mark the policy effective stage
type ApplyOnceAffectStrategy string
// ApplyOncePolicySpec defines the spec of preventing configuration drift
type ApplyOncePolicySpec struct {
Enable bool `json:"enable"`
// +optional
Rules []ApplyOncePolicyRule `json:"rules,omitempty"`
}
// ApplyOncePolicyRule defines a single apply-once policy rule
type ApplyOncePolicyRule struct {
// +optional
Selector ResourcePolicyRuleSelector `json:"selector,omitempty"`
// +optional
Strategy *ApplyOnceStrategy `json:"strategy,omitempty"`
}
// ApplyOnceStrategy the strategy for resource path to allow configuration drift
type ApplyOnceStrategy struct {
// Path the specified path that allow configuration drift
// like 'spec.template.spec.containers[0].resources' and '*' means the whole target allow configuration drift
Path []string `json:"path"`
// ApplyOnceAffectStrategy Decide when the strategy will take effect
// like affect:onUpdate/onStateKeep/always
ApplyOnceAffectStrategy ApplyOnceAffectStrategy `json:"affect"`
}
// Type the type name of the policy
func (in *ApplyOncePolicySpec) Type() string {
return ApplyOncePolicyType
}
// FindStrategy find apply-once strategy for target resource
func (in *ApplyOncePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ApplyOnceStrategy {
if !in.Enable {
return nil
}
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return rule.Strategy
}
}
return nil
}

View File

@@ -0,0 +1,76 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
const (
// RefObjectsComponentType refers to the type of ref-objects
RefObjectsComponentType = "ref-objects"
)
// RefObjectsComponentSpec defines the spec of ref-objects component
type RefObjectsComponentSpec struct {
// Objects the referrers to the Kubernetes objects
Objects []ObjectReferrer `json:"objects,omitempty"`
// URLs are the links that stores the referred objects
URLs []string `json:"urls,omitempty"`
}
// ObjectReferrer selects Kubernetes objects
type ObjectReferrer struct {
// ObjectTypeIdentifier identifies the type of referred objects
ObjectTypeIdentifier `json:",inline"`
// ObjectSelector select object by name or labelSelector
ObjectSelector `json:",inline"`
}
// ObjectTypeIdentifier identifies the scheme of Kubernetes object
type ObjectTypeIdentifier struct {
// Resource is the resource name of the Kubernetes object.
Resource string `json:"resource"`
// Group is the API Group of the Kubernetes object.
Group string `json:"group"`
// LegacyObjectTypeIdentifier is the legacy identifier
// Deprecated: use resource/group instead
LegacyObjectTypeIdentifier `json:",inline"`
}
// LegacyObjectTypeIdentifier legacy object type identifier
type LegacyObjectTypeIdentifier struct {
// APIVersion is the APIVersion of the Kubernetes object.
APIVersion string `json:"apiVersion"`
// APIVersion is the Kind of the Kubernetes object.
Kind string `json:"kind"`
}
// ObjectSelector selector for Kubernetes object
type ObjectSelector struct {
// Name is the name of the Kubernetes object.
// If empty, it will inherit the application component's name.
Name string `json:"name,omitempty"`
// Namespace is the namespace for selecting Kubernetes objects.
// If empty, it will inherit the application's namespace.
Namespace string `json:"namespace,omitempty"`
// Cluster is the cluster for selecting Kubernetes objects.
// If empty, it will use the local cluster
Cluster string `json:"cluster,omitempty"`
// LabelSelector selects Kubernetes objects by labels
// Exclusive to "name"
LabelSelector map[string]string `json:"labelSelector,omitempty"`
// DeprecatedLabelSelector a deprecated alias to LabelSelector
// Deprecated: use labelSelector instead.
DeprecatedLabelSelector map[string]string `json:"selector,omitempty"`
}

View File

@@ -0,0 +1,22 @@
/*
Copyright 2021. The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Package v1alpha1 contains resources relating to the Open Application Model.
// See https://github.com/oam-dev/spec for more details.
// +kubebuilder:object:generate=true
// +groupName=core.oam.dev
// +versionName=v1alpha1
package v1alpha1

View File

@@ -0,0 +1,147 @@
/*
Copyright 2021. The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
)
const (
// EnvBindingPolicyType refers to the type of EnvBinding
EnvBindingPolicyType = "env-binding"
)
// EnvTraitPatch is the patch to trait
type EnvTraitPatch struct {
Type string `json:"type"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
Disable bool `json:"disable,omitempty"`
}
// ToApplicationTrait convert EnvTraitPatch into ApplicationTrait
func (in *EnvTraitPatch) ToApplicationTrait() *common.ApplicationTrait {
out := &common.ApplicationTrait{Type: in.Type}
if in.Properties != nil {
out.Properties = in.Properties.DeepCopy()
}
return out
}
// EnvComponentPatch is the patch to component
type EnvComponentPatch struct {
Name string `json:"name"`
Type string `json:"type"`
Properties *runtime.RawExtension `json:"properties,omitempty"`
Traits []EnvTraitPatch `json:"traits,omitempty"`
ExternalRevision string `json:"externalRevision,omitempty"`
}
// ToApplicationComponent convert EnvComponentPatch into ApplicationComponent
func (in *EnvComponentPatch) ToApplicationComponent() *common.ApplicationComponent {
out := &common.ApplicationComponent{
Name: in.Name,
Type: in.Type,
}
if in.Properties != nil {
out.Properties = in.Properties.DeepCopy()
}
if in.Traits != nil {
for _, trait := range in.Traits {
if !trait.Disable {
out.Traits = append(out.Traits, *trait.ToApplicationTrait())
}
}
}
return out
}
// EnvPatch specify the parameter configuration for different environments
type EnvPatch struct {
Components []EnvComponentPatch `json:"components,omitempty"`
}
// NamespaceSelector defines the rules to select a Namespace resource.
// Either name or labels is needed.
type NamespaceSelector struct {
// Name is the name of the namespace.
Name string `json:"name,omitempty"`
// Labels defines the label selector to select the namespace.
Labels map[string]string `json:"labels,omitempty"`
}
// EnvPlacement defines the placement rules for an app.
type EnvPlacement struct {
ClusterSelector *common.ClusterSelector `json:"clusterSelector,omitempty"`
NamespaceSelector *NamespaceSelector `json:"namespaceSelector,omitempty"`
}
// EnvSelector defines which components should this env contains
type EnvSelector struct {
Components []string `json:"components,omitempty"`
}
// EnvConfig is the configuration for different environments.
// Deprecated
type EnvConfig struct {
Name string `json:"name"`
Placement EnvPlacement `json:"placement,omitempty"`
Selector *EnvSelector `json:"selector,omitempty"`
Patch EnvPatch `json:"patch,omitempty"`
}
// EnvBindingSpec defines a list of envs
// Deprecated This spec is deprecated and replaced by Topology/Override Policy
type EnvBindingSpec struct {
Envs []EnvConfig `json:"envs"`
}
// PlacementDecision describes the placement of one application instance
type PlacementDecision struct {
Cluster string `json:"cluster"`
Namespace string `json:"namespace"`
}
// String encode placement decision
func (in PlacementDecision) String() string {
if in.Namespace == "" {
return in.Cluster
}
return in.Cluster + "/" + in.Namespace
}
// EnvStatus records the status of one env
// Deprecated
type EnvStatus struct {
Env string `json:"env"`
Placements []PlacementDecision `json:"placements"`
}
// ClusterConnection records the connection with clusters and the last active app revision when they are active (still be used)
// Deprecated
type ClusterConnection struct {
ClusterName string `json:"clusterName"`
LastActiveRevision string `json:"lastActiveRevision"`
}
// EnvBindingStatus records the status of all env
// Deprecated
type EnvBindingStatus struct {
Envs []EnvStatus `json:"envs"`
ClusterConnections []ClusterConnection `json:"clusterConnections"`
}

View File

@@ -0,0 +1,49 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
// +kubebuilder:object:root=true
// Policy is the Schema for the policy API
// +kubebuilder:storageversion
// +kubebuilder:resource:categories={oam}
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.type`
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type Policy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Type string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties *runtime.RawExtension `json:"properties,omitempty"`
}
// +kubebuilder:object:root=true
// PolicyList contains a list of Policy
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type PolicyList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Policy `json:"items"`
}

View File

@@ -0,0 +1,117 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"sigs.k8s.io/controller-runtime/pkg/client"
)
const (
// GarbageCollectPolicyType refers to the type of garbage-collect
GarbageCollectPolicyType = "garbage-collect"
)
// GarbageCollectPolicySpec defines the spec of configuration drift
type GarbageCollectPolicySpec struct {
// ApplicationRevisionLimit if set, this application will use this number for application revision instead of
// the global configuration
ApplicationRevisionLimit *int `json:"applicationRevisionLimit,omitempty"`
// KeepLegacyResource if is set, outdated versioned resourcetracker will not be recycled automatically
// outdated resources will be kept until resourcetracker be deleted manually
KeepLegacyResource bool `json:"keepLegacyResource,omitempty"`
// ContinueOnFailure if is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds
ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
// Order defines the order of garbage collect
Order GarbageCollectOrder `json:"order,omitempty"`
// Rules defines list of rules to control gc strategy at resource level
// if one resource is controlled by multiple rules, first rule will be used
Rules []GarbageCollectPolicyRule `json:"rules,omitempty"`
}
// GarbageCollectOrder is the order of garbage collect
type GarbageCollectOrder string
const (
// OrderDependency is the order of dependency
OrderDependency GarbageCollectOrder = "dependency"
)
// GarbageCollectPolicyRule defines a single garbage-collect policy rule
type GarbageCollectPolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
Strategy GarbageCollectStrategy `json:"strategy"`
Propagation *GarbageCollectPropagation `json:"propagation"`
}
// GarbageCollectStrategy the strategy for target resource to recycle
type GarbageCollectStrategy string
const (
// GarbageCollectStrategyNever do not recycle target resource, leave it
GarbageCollectStrategyNever GarbageCollectStrategy = "never"
// GarbageCollectStrategyOnAppDelete do not recycle target resource until application is deleted
// this means the resource will be kept even it is not used in the latest version
GarbageCollectStrategyOnAppDelete GarbageCollectStrategy = "onAppDelete"
// GarbageCollectStrategyOnAppUpdate recycle target resource when it is not inUse
GarbageCollectStrategyOnAppUpdate GarbageCollectStrategy = "onAppUpdate"
)
// GarbageCollectPropagation the deletion propagation setting similar to metav1.DeletionPropagation
type GarbageCollectPropagation string
const (
// GarbageCollectPropagationOrphan orphan child resources while deleting target resources
GarbageCollectPropagationOrphan = "orphan"
// GarbageCollectPropagationCascading delete child resources in background while deleting target resources
GarbageCollectPropagationCascading = "cascading"
)
// Type the type name of the policy
func (in *GarbageCollectPolicySpec) Type() string {
return GarbageCollectPolicyType
}
// FindStrategy find gc strategy for target resource
func (in *GarbageCollectPolicySpec) FindStrategy(manifest *unstructured.Unstructured) *GarbageCollectStrategy {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return &rule.Strategy
}
}
return nil
}
// FindDeleteOption find delete option for target resource
func (in *GarbageCollectPolicySpec) FindDeleteOption(manifest *unstructured.Unstructured) (bool, []client.DeleteOption) {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) && rule.Propagation != nil {
switch *rule.Propagation {
case GarbageCollectPropagationOrphan:
return true, []client.DeleteOption{client.PropagationPolicy(metav1.DeletePropagationOrphan)}
case GarbageCollectPropagationCascading:
return false, []client.DeleteOption{client.PropagationPolicy(metav1.DeletePropagationBackground)}
}
}
}
return false, nil
}

View File

@@ -0,0 +1,137 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"testing"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"github.com/oam-dev/kubevela/pkg/oam"
)
func TestGarbageCollectPolicySpec_FindStrategy(t *testing.T) {
testCases := map[string]struct {
rules []GarbageCollectPolicyRule
input *unstructured.Unstructured
notFound bool
expectStrategy GarbageCollectStrategy
}{
"trait type rule match": {
rules: []GarbageCollectPolicyRule{{
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
Strategy: GarbageCollectStrategyNever,
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"labels": map[string]interface{}{oam.TraitTypeLabel: "a"},
},
}},
expectStrategy: GarbageCollectStrategyNever,
},
"trait type rule mismatch": {
rules: []GarbageCollectPolicyRule{{
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
Strategy: GarbageCollectStrategyNever,
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{}},
notFound: true,
},
"trait type rule multiple match": {
rules: []GarbageCollectPolicyRule{{
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
Strategy: GarbageCollectStrategyOnAppDelete,
}, {
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"a"}},
Strategy: GarbageCollectStrategyNever,
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"labels": map[string]interface{}{oam.TraitTypeLabel: "a"},
},
}},
expectStrategy: GarbageCollectStrategyOnAppDelete,
},
"component type rule match": {
rules: []GarbageCollectPolicyRule{{
Selector: ResourcePolicyRuleSelector{CompTypes: []string{"comp"}},
Strategy: GarbageCollectStrategyNever,
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"labels": map[string]interface{}{oam.WorkloadTypeLabel: "comp"},
},
}},
expectStrategy: GarbageCollectStrategyNever,
},
"rule match both component type and trait type, component type first": {
rules: []GarbageCollectPolicyRule{
{
Selector: ResourcePolicyRuleSelector{CompTypes: []string{"comp"}},
Strategy: GarbageCollectStrategyNever,
},
{
Selector: ResourcePolicyRuleSelector{TraitTypes: []string{"trait"}},
Strategy: GarbageCollectStrategyOnAppDelete,
},
},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"labels": map[string]interface{}{oam.WorkloadTypeLabel: "comp", oam.TraitTypeLabel: "trait"},
},
}},
expectStrategy: GarbageCollectStrategyNever,
},
"component name rule match": {
rules: []GarbageCollectPolicyRule{{
Selector: ResourcePolicyRuleSelector{CompNames: []string{"comp-name"}},
Strategy: GarbageCollectStrategyNever,
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"labels": map[string]interface{}{oam.LabelAppComponent: "comp-name"},
},
}},
expectStrategy: GarbageCollectStrategyNever,
},
"resource type rule match": {
rules: []GarbageCollectPolicyRule{{
Selector: ResourcePolicyRuleSelector{OAMResourceTypes: []string{"TRAIT"}},
Strategy: GarbageCollectStrategyNever,
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"labels": map[string]interface{}{oam.LabelOAMResourceType: "TRAIT"},
},
}},
expectStrategy: GarbageCollectStrategyNever,
},
}
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
r := require.New(t)
spec := GarbageCollectPolicySpec{Rules: tc.rules}
strategy := spec.FindStrategy(tc.input)
if tc.notFound {
r.Nil(strategy)
} else {
r.Equal(tc.expectStrategy, *strategy)
}
})
}
}

View File

@@ -0,0 +1,69 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
const (
// TopologyPolicyType refers to the type of topology policy
TopologyPolicyType = "topology"
// OverridePolicyType refers to the type of override policy
OverridePolicyType = "override"
// DebugPolicyType refers to the type of debug policy
DebugPolicyType = "debug"
// ReplicationPolicyType refers to the type of replication policy
ReplicationPolicyType = "replication"
)
// TopologyPolicySpec defines the spec of topology policy
type TopologyPolicySpec struct {
// Placement embeds the selectors for choosing cluster
Placement `json:",inline"`
// Namespace is the target namespace to deploy in the selected clusters.
// +optional
Namespace string `json:"namespace,omitempty"`
}
// Placement describes which clusters to be selected in this topology
type Placement struct {
// Clusters is the names of the clusters to select.
Clusters []string `json:"clusters,omitempty"`
// ClusterLabelSelector is the label selector for clusters.
// Exclusive to "clusters"
ClusterLabelSelector map[string]string `json:"clusterLabelSelector,omitempty"`
// AllowEmpty ignore empty cluster error when no cluster returned for label
// selector
AllowEmpty bool `json:"allowEmpty,omitempty"`
// DeprecatedClusterSelector is a depreciated alias for ClusterLabelSelector.
// Deprecated: Use clusterLabelSelector instead.
DeprecatedClusterSelector map[string]string `json:"clusterSelector,omitempty"`
}
// OverridePolicySpec defines the spec of override policy
type OverridePolicySpec struct {
Components []EnvComponentPatch `json:"components,omitempty"`
Selector []string `json:"selector,omitempty"`
}
// ReplicationPolicySpec defines the spec of replication policy
// Override policy should be used together with replication policy to select the deployment target components
type ReplicationPolicySpec struct {
Keys []string `json:"keys,omitempty"`
// Selector is the subset of selected components which will be replicated.
Selector []string `json:"selector,omitempty"`
}

View File

@@ -0,0 +1,49 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
const (
// ReadOnlyPolicyType refers to the type of read-only policy
ReadOnlyPolicyType = "read-only"
)
// ReadOnlyPolicySpec defines the spec of read-only policy
type ReadOnlyPolicySpec struct {
Rules []ReadOnlyPolicyRule `json:"rules"`
}
// Type the type name of the policy
func (in *ReadOnlyPolicySpec) Type() string {
return ReadOnlyPolicyType
}
// ReadOnlyPolicyRule defines the rule for read-only resources
type ReadOnlyPolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
}
// FindStrategy return if the target resource is read-only
func (in *ReadOnlyPolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return true
}
}
return false
}

View File

@@ -0,0 +1,67 @@
/*
Copyright 2021. The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime/schema"
k8sscheme "k8s.io/client-go/kubernetes/scheme"
"sigs.k8s.io/controller-runtime/pkg/scheme"
wfTypesv1alpha1 "github.com/kubevela/pkg/apis/oam/v1alpha1"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
)
// Package type metadata.
const (
Group = common.Group
Version = "v1alpha1"
)
var (
// SchemeGroupVersion is group version used to register these objects
SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version}
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
// AddToScheme is a global function that registers this API group & version to a scheme
AddToScheme = SchemeBuilder.AddToScheme
)
// Policy meta
var (
PolicyKind = "Policy"
PolicyGroupVersionKind = SchemeGroupVersion.WithKind(PolicyKind)
)
// Workflow meta
var (
WorkflowKind = "Workflow"
WorkflowGroupVersionKind = SchemeGroupVersion.WithKind(WorkflowKind)
)
func init() {
SchemeBuilder.Register(&Policy{}, &PolicyList{})
SchemeBuilder.Register(&wfTypesv1alpha1.Workflow{}, &wfTypesv1alpha1.WorkflowList{})
_ = SchemeBuilder.AddToScheme(k8sscheme.Scheme)
}
// Resource takes an unqualified resource and returns a Group qualified GroupResource
func Resource(resource string) schema.GroupResource {
return SchemeGroupVersion.WithResource(resource).GroupResource()
}

View File

@@ -0,0 +1,78 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/utils/ptr"
stringslices "k8s.io/utils/strings/slices"
"github.com/oam-dev/kubevela/pkg/oam"
)
// ResourcePolicyRuleSelector select the targets of the rule
// if multiple conditions are specified, combination logic is AND
type ResourcePolicyRuleSelector struct {
CompNames []string `json:"componentNames,omitempty"`
CompTypes []string `json:"componentTypes,omitempty"`
OAMResourceTypes []string `json:"oamTypes,omitempty"`
TraitTypes []string `json:"traitTypes,omitempty"`
ResourceTypes []string `json:"resourceTypes,omitempty"`
ResourceNames []string `json:"resourceNames,omitempty"`
}
// Match check if current rule selector match the target resource
// If at least one condition is matched and no other condition failed (could be empty), return true
// Otherwise, return false
func (in *ResourcePolicyRuleSelector) Match(manifest *unstructured.Unstructured) bool {
var compName, compType, oamType, traitType, resourceType, resourceName string
if labels := manifest.GetLabels(); labels != nil {
compName = labels[oam.LabelAppComponent]
compType = labels[oam.WorkloadTypeLabel]
oamType = labels[oam.LabelOAMResourceType]
traitType = labels[oam.TraitTypeLabel]
}
resourceType = manifest.GetKind()
resourceName = manifest.GetName()
match := func(src []string, val string) (found *bool) {
if len(src) == 0 {
return nil
}
return ptr.To(val != "" && stringslices.Contains(src, val))
}
conditions := []*bool{
match(in.CompNames, compName),
match(in.CompTypes, compType),
match(in.OAMResourceTypes, oamType),
match(in.TraitTypes, traitType),
match(in.ResourceTypes, resourceType),
match(in.ResourceNames, resourceName),
}
hasMatched := false
for _, cond := range conditions {
// if any non-empty condition failed, return false
if cond != nil && !*cond {
return false
}
// if condition succeed, record it
if cond != nil && *cond {
hasMatched = true
}
}
// if at least one condition is met, return true
return hasMatched
}

View File

@@ -0,0 +1,70 @@
/*
Copyright 2023 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
const (
// ResourceUpdatePolicyType refers to the type of resource-update policy
ResourceUpdatePolicyType = "resource-update"
)
// ResourceUpdatePolicySpec defines the spec of resource-update policy
type ResourceUpdatePolicySpec struct {
Rules []ResourceUpdatePolicyRule `json:"rules"`
}
// Type the type name of the policy
func (in *ResourceUpdatePolicySpec) Type() string {
return ResourceUpdatePolicyType
}
// ResourceUpdatePolicyRule defines the rule for resource-update resources
type ResourceUpdatePolicyRule struct {
// Selector picks which resources should be affected
Selector ResourcePolicyRuleSelector `json:"selector"`
// Strategy the strategy for updating resources
Strategy ResourceUpdateStrategy `json:"strategy,omitempty"`
}
// ResourceUpdateStrategy the update strategy for resource
type ResourceUpdateStrategy struct {
// Op the update op for selected resources
Op ResourceUpdateOp `json:"op,omitempty"`
// RecreateFields the field path which will trigger recreate if changed
RecreateFields []string `json:"recreateFields,omitempty"`
}
// ResourceUpdateOp update op for resource
type ResourceUpdateOp string
const (
// ResourceUpdateStrategyPatch patch the target resource (three-way patch)
ResourceUpdateStrategyPatch ResourceUpdateOp = "patch"
// ResourceUpdateStrategyReplace update the target resource
ResourceUpdateStrategyReplace ResourceUpdateOp = "replace"
)
// FindStrategy return if the target resource is read-only
func (in *ResourceUpdatePolicySpec) FindStrategy(manifest *unstructured.Unstructured) *ResourceUpdateStrategy {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return &rule.Strategy
}
}
return nil
}

View File

@@ -0,0 +1,49 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
const (
// SharedResourcePolicyType refers to the type of shared resource policy
SharedResourcePolicyType = "shared-resource"
)
// SharedResourcePolicySpec defines the spec of shared-resource policy
type SharedResourcePolicySpec struct {
Rules []SharedResourcePolicyRule `json:"rules"`
}
// Type the type name of the policy
func (in *SharedResourcePolicySpec) Type() string {
return SharedResourcePolicyType
}
// SharedResourcePolicyRule defines the rule for sharing resources
type SharedResourcePolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
}
// FindStrategy return if the target resource should be shared
func (in *SharedResourcePolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return true
}
}
return false
}

View File

@@ -0,0 +1,69 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import (
"testing"
"github.com/stretchr/testify/require"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
)
func TestSharedResourcePolicySpec_FindStrategy(t *testing.T) {
testCases := map[string]struct {
rules []SharedResourcePolicyRule
input *unstructured.Unstructured
matched bool
}{
"shared resource rule resourceName match": {
rules: []SharedResourcePolicyRule{{
Selector: ResourcePolicyRuleSelector{ResourceNames: []string{"example"}},
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"metadata": map[string]interface{}{
"name": "example",
},
}},
matched: true,
},
"shared resource rule resourceType match": {
rules: []SharedResourcePolicyRule{{
Selector: ResourcePolicyRuleSelector{ResourceTypes: []string{"ConfigMap", "Namespace"}},
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"kind": "Namespace",
}},
matched: true,
},
"shared resource rule mismatch": {
rules: []SharedResourcePolicyRule{{
Selector: ResourcePolicyRuleSelector{ResourceNames: []string{"mismatch"}},
}},
input: &unstructured.Unstructured{Object: map[string]interface{}{
"kind": "Namespace",
}},
matched: false,
},
}
for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
r := require.New(t)
spec := SharedResourcePolicySpec{Rules: tc.rules}
r.Equal(tc.matched, spec.FindStrategy(tc.input))
})
}
}

View File

@@ -0,0 +1,49 @@
/*
Copyright 2022 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha1
import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
const (
// TakeOverPolicyType refers to the type of take-over policy
TakeOverPolicyType = "take-over"
)
// TakeOverPolicySpec defines the spec of take-over policy
type TakeOverPolicySpec struct {
Rules []TakeOverPolicyRule `json:"rules"`
}
// Type the type name of the policy
func (in *TakeOverPolicySpec) Type() string {
return TakeOverPolicyType
}
// TakeOverPolicyRule defines the rule for taking over resources
type TakeOverPolicyRule struct {
Selector ResourcePolicyRuleSelector `json:"selector"`
}
// FindStrategy return if the target resource should be taken over
func (in *TakeOverPolicySpec) FindStrategy(manifest *unstructured.Unstructured) bool {
for _, rule := range in.Rules {
if rule.Selector.Match(manifest) {
return true
}
}
return false
}

View File

@@ -0,0 +1,881 @@
//go:build !ignore_autogenerated
/*
Copyright 2023 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by controller-gen. DO NOT EDIT.
package v1alpha1
import (
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplyOncePolicyRule) DeepCopyInto(out *ApplyOncePolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
if in.Strategy != nil {
in, out := &in.Strategy, &out.Strategy
*out = new(ApplyOnceStrategy)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOncePolicyRule.
func (in *ApplyOncePolicyRule) DeepCopy() *ApplyOncePolicyRule {
if in == nil {
return nil
}
out := new(ApplyOncePolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplyOncePolicySpec) DeepCopyInto(out *ApplyOncePolicySpec) {
*out = *in
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]ApplyOncePolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOncePolicySpec.
func (in *ApplyOncePolicySpec) DeepCopy() *ApplyOncePolicySpec {
if in == nil {
return nil
}
out := new(ApplyOncePolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ApplyOnceStrategy) DeepCopyInto(out *ApplyOnceStrategy) {
*out = *in
if in.Path != nil {
in, out := &in.Path, &out.Path
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplyOnceStrategy.
func (in *ApplyOnceStrategy) DeepCopy() *ApplyOnceStrategy {
if in == nil {
return nil
}
out := new(ApplyOnceStrategy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ClusterConnection) DeepCopyInto(out *ClusterConnection) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterConnection.
func (in *ClusterConnection) DeepCopy() *ClusterConnection {
if in == nil {
return nil
}
out := new(ClusterConnection)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvBindingSpec) DeepCopyInto(out *EnvBindingSpec) {
*out = *in
if in.Envs != nil {
in, out := &in.Envs, &out.Envs
*out = make([]EnvConfig, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingSpec.
func (in *EnvBindingSpec) DeepCopy() *EnvBindingSpec {
if in == nil {
return nil
}
out := new(EnvBindingSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvBindingStatus) DeepCopyInto(out *EnvBindingStatus) {
*out = *in
if in.Envs != nil {
in, out := &in.Envs, &out.Envs
*out = make([]EnvStatus, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.ClusterConnections != nil {
in, out := &in.ClusterConnections, &out.ClusterConnections
*out = make([]ClusterConnection, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvBindingStatus.
func (in *EnvBindingStatus) DeepCopy() *EnvBindingStatus {
if in == nil {
return nil
}
out := new(EnvBindingStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvComponentPatch) DeepCopyInto(out *EnvComponentPatch) {
*out = *in
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
if in.Traits != nil {
in, out := &in.Traits, &out.Traits
*out = make([]EnvTraitPatch, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvComponentPatch.
func (in *EnvComponentPatch) DeepCopy() *EnvComponentPatch {
if in == nil {
return nil
}
out := new(EnvComponentPatch)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvConfig) DeepCopyInto(out *EnvConfig) {
*out = *in
in.Placement.DeepCopyInto(&out.Placement)
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = new(EnvSelector)
(*in).DeepCopyInto(*out)
}
in.Patch.DeepCopyInto(&out.Patch)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvConfig.
func (in *EnvConfig) DeepCopy() *EnvConfig {
if in == nil {
return nil
}
out := new(EnvConfig)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvPatch) DeepCopyInto(out *EnvPatch) {
*out = *in
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]EnvComponentPatch, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvPatch.
func (in *EnvPatch) DeepCopy() *EnvPatch {
if in == nil {
return nil
}
out := new(EnvPatch)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvPlacement) DeepCopyInto(out *EnvPlacement) {
*out = *in
if in.ClusterSelector != nil {
in, out := &in.ClusterSelector, &out.ClusterSelector
*out = new(common.ClusterSelector)
(*in).DeepCopyInto(*out)
}
if in.NamespaceSelector != nil {
in, out := &in.NamespaceSelector, &out.NamespaceSelector
*out = new(NamespaceSelector)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvPlacement.
func (in *EnvPlacement) DeepCopy() *EnvPlacement {
if in == nil {
return nil
}
out := new(EnvPlacement)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvSelector) DeepCopyInto(out *EnvSelector) {
*out = *in
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvSelector.
func (in *EnvSelector) DeepCopy() *EnvSelector {
if in == nil {
return nil
}
out := new(EnvSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvStatus) DeepCopyInto(out *EnvStatus) {
*out = *in
if in.Placements != nil {
in, out := &in.Placements, &out.Placements
*out = make([]PlacementDecision, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvStatus.
func (in *EnvStatus) DeepCopy() *EnvStatus {
if in == nil {
return nil
}
out := new(EnvStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *EnvTraitPatch) DeepCopyInto(out *EnvTraitPatch) {
*out = *in
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvTraitPatch.
func (in *EnvTraitPatch) DeepCopy() *EnvTraitPatch {
if in == nil {
return nil
}
out := new(EnvTraitPatch)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GarbageCollectPolicyRule) DeepCopyInto(out *GarbageCollectPolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
if in.Propagation != nil {
in, out := &in.Propagation, &out.Propagation
*out = new(GarbageCollectPropagation)
**out = **in
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GarbageCollectPolicyRule.
func (in *GarbageCollectPolicyRule) DeepCopy() *GarbageCollectPolicyRule {
if in == nil {
return nil
}
out := new(GarbageCollectPolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *GarbageCollectPolicySpec) DeepCopyInto(out *GarbageCollectPolicySpec) {
*out = *in
if in.ApplicationRevisionLimit != nil {
in, out := &in.ApplicationRevisionLimit, &out.ApplicationRevisionLimit
*out = new(int)
**out = **in
}
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]GarbageCollectPolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GarbageCollectPolicySpec.
func (in *GarbageCollectPolicySpec) DeepCopy() *GarbageCollectPolicySpec {
if in == nil {
return nil
}
out := new(GarbageCollectPolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *LegacyObjectTypeIdentifier) DeepCopyInto(out *LegacyObjectTypeIdentifier) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LegacyObjectTypeIdentifier.
func (in *LegacyObjectTypeIdentifier) DeepCopy() *LegacyObjectTypeIdentifier {
if in == nil {
return nil
}
out := new(LegacyObjectTypeIdentifier)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector) {
*out = *in
if in.Labels != nil {
in, out := &in.Labels, &out.Labels
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector {
if in == nil {
return nil
}
out := new(NamespaceSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ObjectReferrer) DeepCopyInto(out *ObjectReferrer) {
*out = *in
out.ObjectTypeIdentifier = in.ObjectTypeIdentifier
in.ObjectSelector.DeepCopyInto(&out.ObjectSelector)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReferrer.
func (in *ObjectReferrer) DeepCopy() *ObjectReferrer {
if in == nil {
return nil
}
out := new(ObjectReferrer)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ObjectSelector) DeepCopyInto(out *ObjectSelector) {
*out = *in
if in.LabelSelector != nil {
in, out := &in.LabelSelector, &out.LabelSelector
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.DeprecatedLabelSelector != nil {
in, out := &in.DeprecatedLabelSelector, &out.DeprecatedLabelSelector
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSelector.
func (in *ObjectSelector) DeepCopy() *ObjectSelector {
if in == nil {
return nil
}
out := new(ObjectSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ObjectTypeIdentifier) DeepCopyInto(out *ObjectTypeIdentifier) {
*out = *in
out.LegacyObjectTypeIdentifier = in.LegacyObjectTypeIdentifier
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectTypeIdentifier.
func (in *ObjectTypeIdentifier) DeepCopy() *ObjectTypeIdentifier {
if in == nil {
return nil
}
out := new(ObjectTypeIdentifier)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *OverridePolicySpec) DeepCopyInto(out *OverridePolicySpec) {
*out = *in
if in.Components != nil {
in, out := &in.Components, &out.Components
*out = make([]EnvComponentPatch, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OverridePolicySpec.
func (in *OverridePolicySpec) DeepCopy() *OverridePolicySpec {
if in == nil {
return nil
}
out := new(OverridePolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Placement) DeepCopyInto(out *Placement) {
*out = *in
if in.Clusters != nil {
in, out := &in.Clusters, &out.Clusters
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ClusterLabelSelector != nil {
in, out := &in.ClusterLabelSelector, &out.ClusterLabelSelector
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
if in.DeprecatedClusterSelector != nil {
in, out := &in.DeprecatedClusterSelector, &out.DeprecatedClusterSelector
*out = make(map[string]string, len(*in))
for key, val := range *in {
(*out)[key] = val
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement.
func (in *Placement) DeepCopy() *Placement {
if in == nil {
return nil
}
out := new(Placement)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PlacementDecision) DeepCopyInto(out *PlacementDecision) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PlacementDecision.
func (in *PlacementDecision) DeepCopy() *PlacementDecision {
if in == nil {
return nil
}
out := new(PlacementDecision)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Policy) DeepCopyInto(out *Policy) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
if in.Properties != nil {
in, out := &in.Properties, &out.Properties
*out = new(runtime.RawExtension)
(*in).DeepCopyInto(*out)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Policy.
func (in *Policy) DeepCopy() *Policy {
if in == nil {
return nil
}
out := new(Policy)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *Policy) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *PolicyList) DeepCopyInto(out *PolicyList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]Policy, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyList.
func (in *PolicyList) DeepCopy() *PolicyList {
if in == nil {
return nil
}
out := new(PolicyList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *PolicyList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReadOnlyPolicyRule) DeepCopyInto(out *ReadOnlyPolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadOnlyPolicyRule.
func (in *ReadOnlyPolicyRule) DeepCopy() *ReadOnlyPolicyRule {
if in == nil {
return nil
}
out := new(ReadOnlyPolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReadOnlyPolicySpec) DeepCopyInto(out *ReadOnlyPolicySpec) {
*out = *in
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]ReadOnlyPolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReadOnlyPolicySpec.
func (in *ReadOnlyPolicySpec) DeepCopy() *ReadOnlyPolicySpec {
if in == nil {
return nil
}
out := new(ReadOnlyPolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *RefObjectsComponentSpec) DeepCopyInto(out *RefObjectsComponentSpec) {
*out = *in
if in.Objects != nil {
in, out := &in.Objects, &out.Objects
*out = make([]ObjectReferrer, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
if in.URLs != nil {
in, out := &in.URLs, &out.URLs
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RefObjectsComponentSpec.
func (in *RefObjectsComponentSpec) DeepCopy() *RefObjectsComponentSpec {
if in == nil {
return nil
}
out := new(RefObjectsComponentSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ReplicationPolicySpec) DeepCopyInto(out *ReplicationPolicySpec) {
*out = *in
if in.Keys != nil {
in, out := &in.Keys, &out.Keys
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.Selector != nil {
in, out := &in.Selector, &out.Selector
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationPolicySpec.
func (in *ReplicationPolicySpec) DeepCopy() *ReplicationPolicySpec {
if in == nil {
return nil
}
out := new(ReplicationPolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourcePolicyRuleSelector) DeepCopyInto(out *ResourcePolicyRuleSelector) {
*out = *in
if in.CompNames != nil {
in, out := &in.CompNames, &out.CompNames
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.CompTypes != nil {
in, out := &in.CompTypes, &out.CompTypes
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.OAMResourceTypes != nil {
in, out := &in.OAMResourceTypes, &out.OAMResourceTypes
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.TraitTypes != nil {
in, out := &in.TraitTypes, &out.TraitTypes
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ResourceTypes != nil {
in, out := &in.ResourceTypes, &out.ResourceTypes
*out = make([]string, len(*in))
copy(*out, *in)
}
if in.ResourceNames != nil {
in, out := &in.ResourceNames, &out.ResourceNames
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourcePolicyRuleSelector.
func (in *ResourcePolicyRuleSelector) DeepCopy() *ResourcePolicyRuleSelector {
if in == nil {
return nil
}
out := new(ResourcePolicyRuleSelector)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceUpdatePolicyRule) DeepCopyInto(out *ResourceUpdatePolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
in.Strategy.DeepCopyInto(&out.Strategy)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUpdatePolicyRule.
func (in *ResourceUpdatePolicyRule) DeepCopy() *ResourceUpdatePolicyRule {
if in == nil {
return nil
}
out := new(ResourceUpdatePolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceUpdatePolicySpec) DeepCopyInto(out *ResourceUpdatePolicySpec) {
*out = *in
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]ResourceUpdatePolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUpdatePolicySpec.
func (in *ResourceUpdatePolicySpec) DeepCopy() *ResourceUpdatePolicySpec {
if in == nil {
return nil
}
out := new(ResourceUpdatePolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *ResourceUpdateStrategy) DeepCopyInto(out *ResourceUpdateStrategy) {
*out = *in
if in.RecreateFields != nil {
in, out := &in.RecreateFields, &out.RecreateFields
*out = make([]string, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceUpdateStrategy.
func (in *ResourceUpdateStrategy) DeepCopy() *ResourceUpdateStrategy {
if in == nil {
return nil
}
out := new(ResourceUpdateStrategy)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SharedResourcePolicyRule) DeepCopyInto(out *SharedResourcePolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicyRule.
func (in *SharedResourcePolicyRule) DeepCopy() *SharedResourcePolicyRule {
if in == nil {
return nil
}
out := new(SharedResourcePolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *SharedResourcePolicySpec) DeepCopyInto(out *SharedResourcePolicySpec) {
*out = *in
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]SharedResourcePolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedResourcePolicySpec.
func (in *SharedResourcePolicySpec) DeepCopy() *SharedResourcePolicySpec {
if in == nil {
return nil
}
out := new(SharedResourcePolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TakeOverPolicyRule) DeepCopyInto(out *TakeOverPolicyRule) {
*out = *in
in.Selector.DeepCopyInto(&out.Selector)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TakeOverPolicyRule.
func (in *TakeOverPolicyRule) DeepCopy() *TakeOverPolicyRule {
if in == nil {
return nil
}
out := new(TakeOverPolicyRule)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TakeOverPolicySpec) DeepCopyInto(out *TakeOverPolicySpec) {
*out = *in
if in.Rules != nil {
in, out := &in.Rules, &out.Rules
*out = make([]TakeOverPolicyRule, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TakeOverPolicySpec.
func (in *TakeOverPolicySpec) DeepCopy() *TakeOverPolicySpec {
if in == nil {
return nil
}
out := new(TakeOverPolicySpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *TopologyPolicySpec) DeepCopyInto(out *TopologyPolicySpec) {
*out = *in
in.Placement.DeepCopyInto(&out.Placement)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TopologyPolicySpec.
func (in *TopologyPolicySpec) DeepCopy() *TopologyPolicySpec {
if in == nil {
return nil
}
out := new(TopologyPolicySpec)
in.DeepCopyInto(out)
return out
}

View File

@@ -1,124 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
"k8s.io/apimachinery/pkg/runtime"
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
)
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// AppStatus defines the observed state of Application
type AppStatus struct {
// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
// Important: Run "make" to regenerate code after modifying this file
v1alpha1.RolloutStatus `json:",inline"`
Phase common.ApplicationPhase `json:"status,omitempty"`
// Components record the related Components created by Application Controller
Components []runtimev1alpha1.TypedReference `json:"components,omitempty"`
// Services record the status of the application services
Services []common.ApplicationComponentStatus `json:"services,omitempty"`
// ResourceTracker record the status of the ResourceTracker
ResourceTracker *runtimev1alpha1.TypedReference `json:"resourceTracker,omitempty"`
// LatestRevision of the application configuration it generates
// +optional
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
}
// ApplicationTrait defines the trait of application
type ApplicationTrait struct {
Name string `json:"name"`
// +kubebuilder:pruning:PreserveUnknownFields
Properties runtime.RawExtension `json:"properties,omitempty"`
}
// ApplicationComponent describe the component of application
type ApplicationComponent struct {
Name string `json:"name"`
WorkloadType string `json:"type"`
// +kubebuilder:pruning:PreserveUnknownFields
Settings runtime.RawExtension `json:"settings,omitempty"`
// Traits define the trait of one component, the type must be array to keep the order.
Traits []ApplicationTrait `json:"traits,omitempty"`
// +kubebuilder:pruning:PreserveUnknownFields
// scopes in ApplicationComponent defines the component-level scopes
// the format is <scope-type:scope-instance-name> pairs, the key represents type of `ScopeDefinition` while the value represent the name of scope instance.
Scopes map[string]string `json:"scopes,omitempty"`
}
// ApplicationSpec is the spec of Application
type ApplicationSpec struct {
Components []ApplicationComponent `json:"components"`
// TODO(wonderflow): we should have application level scopes supported here
// RolloutPlan is the details on how to rollout the resources
// The controller simply replace the old resources with the new one if there is no rollout plan involved
// +optional
RolloutPlan *v1alpha1.RolloutPlan `json:"rolloutPlan,omitempty"`
}
// Application is the Schema for the applications API
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={oam},shortName=app
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="COMPONENT",type=string,JSONPath=`.spec.components[*].name`
// +kubebuilder:printcolumn:name="TYPE",type=string,JSONPath=`.spec.components[*].type`
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.status`
// +kubebuilder:printcolumn:name="HEALTHY",type=boolean,JSONPath=`.status.services[*].healthy`
// +kubebuilder:printcolumn:name="STATUS",type=string,JSONPath=`.status.services[*].message`
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
type Application struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationSpec `json:"spec,omitempty"`
Status common.AppStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ApplicationList contains a list of Application
type ApplicationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Application `json:"items"`
}
// GetComponent get the component from the application based on its workload type
func (app *Application) GetComponent(workloadType string) *ApplicationComponent {
for _, c := range app.Spec.Components {
if c.WorkloadType == workloadType {
return &c
}
}
return nil
}

View File

@@ -1,68 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
"reflect"
"testing"
)
func TestApplicationGetComponent(t *testing.T) {
ac1 := ApplicationComponent{
Name: "ac1",
WorkloadType: "type1",
}
ac2 := ApplicationComponent{
Name: "ac2",
WorkloadType: "type2",
}
tests := map[string]struct {
app *Application
componentName string
want *ApplicationComponent
}{
"test get one": {
app: &Application{
Spec: ApplicationSpec{
Components: []ApplicationComponent{
ac1, ac2,
},
},
},
componentName: ac1.WorkloadType,
want: &ac1,
},
"test get none": {
app: &Application{
Spec: ApplicationSpec{
Components: []ApplicationComponent{
ac2,
},
},
},
componentName: ac1.WorkloadType,
want: nil,
},
}
for name, tt := range tests {
t.Run(name, func(t *testing.T) {
if got := tt.app.GetComponent(tt.componentName); !reflect.DeepEqual(got, tt.want) {
t.Errorf("GetComponent() = %v, want %v", got, tt.want)
}
})
}
}

View File

@@ -1,48 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// ApplicationContextSpec is the spec of ApplicationContext
type ApplicationContextSpec struct {
// ApplicationRevisionName points to the snapshot of an Application with all its closure
ApplicationRevisionName string `json:"applicationRevisionName"`
}
// ApplicationContext is the Schema for the ApplicationContext API
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=appcontext,categories={oam}
// +kubebuilder:subresource:status
type ApplicationContext struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationContextSpec `json:"spec,omitempty"`
// we need to reuse the AC status
Status ApplicationConfigurationStatus `json:"status,omitempty"`
}
// ApplicationContextList contains a list of ApplicationContext
// +kubebuilder:object:root=true
type ApplicationContextList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplicationContext `json:"items"`
}

View File

@@ -1,73 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
)
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.
// ApplicationRevisionSpec is the spec of ApplicationRevision
type ApplicationRevisionSpec struct {
// Application records the snapshot of the created/modified Application
Application Application `json:"application"`
// ComponentDefinitions records the snapshot of the componentDefinitions related with the created/modified Application
ComponentDefinitions map[string]ComponentDefinition `json:"componentDefinitions,omitempty"`
// WorkloadDefinitions records the snapshot of the workloadDefinitions related with the created/modified Application
WorkloadDefinitions map[string]WorkloadDefinition `json:"workloadDefinitions,omitempty"`
// TraitDefinitions records the snapshot of the traitDefinitions related with the created/modified Application
TraitDefinitions map[string]TraitDefinition `json:"traitDefinitions,omitempty"`
// ScopeDefinitions records the snapshot of the scopeDefinitions related with the created/modified Application
ScopeDefinitions map[string]ScopeDefinition `json:"scopeDefinitions,omitempty"`
// Components records the rendered components from Application, it will contains the whole K8s CR of workload in it.
Components []common.RawComponent `json:"components,omitempty"`
// ApplicationConfiguration records the rendered applicationConfiguration from Application,
// it will contains the whole K8s CR of trait and the reference component in it.
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
ApplicationConfiguration runtime.RawExtension `json:"applicationConfiguration"`
}
// ApplicationRevision is the Schema for the ApplicationRevision API
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={oam},shortName=apprev
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
type ApplicationRevision struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationRevisionSpec `json:"spec,omitempty"`
}
// ApplicationRevisionList contains a list of ApplicationRevision
// +kubebuilder:object:root=true
type ApplicationRevisionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplicationRevision `json:"items"`
}

View File

@@ -1,86 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/oam-dev/kubevela/apis/standard.oam.dev/v1alpha1"
)
// AppRolloutSpec defines how to describe an upgrade between different apps
type AppRolloutSpec struct {
// TargetAppRevisionName contains the name of the applicationRevision that we need to upgrade to.
TargetAppRevisionName string `json:"targetAppRevisionName"`
// SourceAppRevisionName contains the name of the applicationRevision that we need to upgrade from.
// it can be empty only when the rolling is only a scale event
SourceAppRevisionName string `json:"sourceAppRevisionName,omitempty"`
// The list of component to upgrade in the application.
// We only support single component application so far
// TODO: (RZ) Support multiple components in an application
// +optional
ComponentList []string `json:"componentList,omitempty"`
// RolloutPlan is the details on how to rollout the resources
RolloutPlan v1alpha1.RolloutPlan `json:"rolloutPlan"`
// RevertOnDelete revert the rollout when the rollout CR is deleted
// It will remove the target app from the kubernetes if it's set to true
// +optional
RevertOnDelete *bool `json:"revertOnDelete,omitempty"`
}
// AppRolloutStatus defines the observed state of AppRollout
type AppRolloutStatus struct {
v1alpha1.RolloutStatus `json:",inline"`
// LastUpgradedTargetAppRevision contains the name of the app that we upgraded to
// We will restart the rollout if this is not the same as the spec
LastUpgradedTargetAppRevision string `json:"lastTargetAppRevision"`
// LastSourceAppRevision contains the name of the app that we need to upgrade from.
// We will restart the rollout if this is not the same as the spec
LastSourceAppRevision string `json:"LastSourceAppRevision,omitempty"`
}
// AppRollout is the Schema for the AppRollout API
// +kubebuilder:object:root=true
// +kubebuilder:resource:categories={oam},shortName=approllout
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="TARGET",type=string,JSONPath=`.status.rolloutStatus.rolloutTargetSize`
// +kubebuilder:printcolumn:name="UPGRADED",type=string,JSONPath=`.status.rolloutStatus.upgradedReplicas`
// +kubebuilder:printcolumn:name="READY",type=string,JSONPath=`.status.rolloutStatus.upgradedReadyReplicas`
// +kubebuilder:printcolumn:name="BATCH-STATE",type=string,JSONPath=`.status.rolloutStatus.batchRollingState`
// +kubebuilder:printcolumn:name="ROLLING-STATE",type=string,JSONPath=`.status.rolloutStatus.rollingState`
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=".metadata.creationTimestamp"
type AppRollout struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec AppRolloutSpec `json:"spec,omitempty"`
Status AppRolloutStatus `json:"status,omitempty"`
}
// AppRolloutList contains a list of AppRollout
// +kubebuilder:object:root=true
type AppRolloutList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []AppRollout `json:"items"`
}

View File

@@ -1,102 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
)
// ComponentDefinitionSpec defines the desired state of ComponentDefinition
type ComponentDefinitionSpec struct {
// Workload is a workload type descriptor
Workload common.WorkloadTypeDescriptor `json:"workload"`
// ChildResourceKinds are the list of GVK of the child resources this workload generates
ChildResourceKinds []common.ChildResourceKind `json:"childResourceKinds,omitempty"`
// RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload
// can be used by trait to create resource selectors(e.g. label selector for pods).
// +optional
RevisionLabel string `json:"revisionLabel,omitempty"`
// PodSpecPath indicates where/if this workload has K8s podSpec field
// if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
// +optional
PodSpecPath string `json:"podSpecPath,omitempty"`
// Status defines the custom health policy and status message for workload
// +optional
Status *common.Status `json:"status,omitempty"`
// Schematic defines the data format and template of the encapsulation of the workload
// +optional
Schematic *common.Schematic `json:"schematic,omitempty"`
// Extension is used for extension needs by OAM platform builders
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Extension *runtime.RawExtension `json:"extension,omitempty"`
}
// ComponentDefinitionStatus is the status of ComponentDefinition
type ComponentDefinitionStatus struct {
// ConditionedStatus reflects the observed status of a resource
runtimev1alpha1.ConditionedStatus `json:",inline"`
// ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
ConfigMapRef string `json:"configMapRef,omitempty"`
// LatestRevision of the component definition
// +optional
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
}
// +kubebuilder:object:root=true
// ComponentDefinition is the Schema for the componentdefinitions API
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=comp
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="WORKLOAD-KIND",type=string,JSONPath=".spec.workload.definition.kind"
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
type ComponentDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ComponentDefinitionSpec `json:"spec,omitempty"`
Status ComponentDefinitionStatus `json:"status,omitempty"`
}
// SetConditions set condition for WorkloadDefinition
func (cd *ComponentDefinition) SetConditions(c ...runtimev1alpha1.Condition) {
cd.Status.SetConditions(c...)
}
// GetCondition gets condition from WorkloadDefinition
func (cd *ComponentDefinition) GetCondition(conditionType runtimev1alpha1.ConditionType) runtimev1alpha1.Condition {
return cd.Status.GetCondition(conditionType)
}
// +kubebuilder:object:root=true
// ComponentDefinitionList contains a list of ComponentDefinition
type ComponentDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ComponentDefinition `json:"items"`
}

View File

@@ -1,134 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
"fmt"
"reflect"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/conversion"
"github.com/oam-dev/kubevela/apis/core.oam.dev/v1beta1"
)
// ApplicationV1alpha2ToV1beta1 will convert v1alpha2 to v1beta1
func ApplicationV1alpha2ToV1beta1(v1a2 *Application, v1b1 *v1beta1.Application) {
// 1) convert metav1.TypeMeta
// apiVersion and Kind automatically converted
// 2) convert metav1.ObjectMeta
v1b1.ObjectMeta = *v1a2.ObjectMeta.DeepCopy()
// 3) convert Spec ApplicationSpec
// 3.1) convert Spec.Components
for _, comp := range v1a2.Spec.Components {
// convert trait, especially for `.name` -> `.type`
var traits = make([]v1beta1.ApplicationTrait, len(comp.Traits))
for j, trait := range comp.Traits {
traits[j] = v1beta1.ApplicationTrait{
Type: trait.Name,
Properties: *trait.Properties.DeepCopy(),
}
}
// deep copy scopes
scopes := make(map[string]string)
for k, v := range comp.Scopes {
scopes[k] = v
}
// convert component
// `.settings` -> `.properties`
v1b1.Spec.Components = append(v1b1.Spec.Components, v1beta1.ApplicationComponent{
Name: comp.Name,
Type: comp.WorkloadType,
Properties: *comp.Settings.DeepCopy(),
Traits: traits,
Scopes: scopes,
})
}
// 3.2) convert Spec.RolloutPlan
v1b1.Spec.RolloutPlan = v1a2.Spec.RolloutPlan.DeepCopy()
// 4) convert Status common.AppStatus
v1b1.Status = *v1a2.Status.DeepCopy()
}
// ConvertTo converts this Application to the Hub version (v1beta1 only for now).
func (app *Application) ConvertTo(dst conversion.Hub) error {
switch convertedApp := dst.(type) {
case *v1beta1.Application:
klog.Infof("convert *v1alpha2.Application [%s] to *v1beta1.Application", app.Name)
ApplicationV1alpha2ToV1beta1(app, convertedApp)
return nil
default:
}
return fmt.Errorf("unsupported convertTo object %v", reflect.TypeOf(dst))
}
// ConvertFrom converts from the Hub version (v1beta1) to this version (v1alpha2).
func (app *Application) ConvertFrom(src conversion.Hub) error {
switch sourceApp := src.(type) {
case *v1beta1.Application:
klog.Infof("convert *v1alpha2.Application from *v1beta1.Application [%s]", sourceApp.Name)
// 1) convert metav1.TypeMeta
// apiVersion and Kind automatically converted
// 2) convert metav1.ObjectMeta
app.ObjectMeta = *sourceApp.ObjectMeta.DeepCopy()
// 3) convert Spec ApplicationSpec
// 3.1) convert Spec.Components
for _, comp := range sourceApp.Spec.Components {
// convert trait, especially for `.type` -> `.name`
var traits = make([]ApplicationTrait, len(comp.Traits))
for j, trait := range comp.Traits {
traits[j] = ApplicationTrait{
Name: trait.Type,
Properties: *trait.Properties.DeepCopy(),
}
}
// deep copy scopes
scopes := make(map[string]string)
for k, v := range comp.Scopes {
scopes[k] = v
}
// convert component
// `.properties` -> `.settings`
app.Spec.Components = append(app.Spec.Components, ApplicationComponent{
Name: comp.Name,
WorkloadType: comp.Type,
Settings: *comp.Properties.DeepCopy(),
Traits: traits,
Scopes: scopes,
})
}
// 3.2) convert Spec.RolloutPlan
app.Spec.RolloutPlan = sourceApp.Spec.RolloutPlan.DeepCopy()
// 4) convert Status common.AppStatus
app.Status = *sourceApp.Status.DeepCopy()
return nil
default:
}
return fmt.Errorf("unsupported ConvertFrom object %v", reflect.TypeOf(src))
}

View File

@@ -1,104 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/oam-dev/kubevela/pkg/oam"
)
// HealthStatus represents health status strings.
type HealthStatus string
const (
// StatusHealthy represents healthy status.
StatusHealthy HealthStatus = "HEALTHY"
// StatusUnhealthy represents unhealthy status.
StatusUnhealthy = "UNHEALTHY"
// StatusUnknown represents unknown status.
StatusUnknown = "UNKNOWN"
)
var _ oam.Scope = &HealthScope{}
// A HealthScopeSpec defines the desired state of a HealthScope.
type HealthScopeSpec struct {
// ProbeTimeout is the amount of time in seconds to wait when receiving a response before marked failure.
ProbeTimeout *int32 `json:"probe-timeout,omitempty"`
// ProbeInterval is the amount of time in seconds between probing tries.
ProbeInterval *int32 `json:"probe-interval,omitempty"`
// WorkloadReferences to the workloads that are in this scope.
WorkloadReferences []runtimev1alpha1.TypedReference `json:"workloadRefs"`
}
// A HealthScopeStatus represents the observed state of a HealthScope.
type HealthScopeStatus struct {
runtimev1alpha1.ConditionedStatus `json:",inline"`
// ScopeHealthCondition represents health condition summary of the scope
ScopeHealthCondition ScopeHealthCondition `json:"scopeHealthCondition"`
// WorkloadHealthConditions represents health condition of workloads in the scope
WorkloadHealthConditions []*WorkloadHealthCondition `json:"healthConditions,omitempty"`
}
// ScopeHealthCondition represents health condition summary of a scope.
type ScopeHealthCondition struct {
HealthStatus HealthStatus `json:"healthStatus"`
Total int64 `json:"total,omitempty"`
HealthyWorkloads int64 `json:"healthyWorkloads,omitempty"`
UnhealthyWorkloads int64 `json:"unhealthyWorkloads,omitempty"`
UnknownWorkloads int64 `json:"unknownWorkloads,omitempty"`
}
// WorkloadHealthCondition represents informative health condition.
type WorkloadHealthCondition struct {
// ComponentName represents the component name if target is a workload
ComponentName string `json:"componentName,omitempty"`
TargetWorkload runtimev1alpha1.TypedReference `json:"targetWorkload,omitempty"`
HealthStatus HealthStatus `json:"healthStatus"`
Diagnosis string `json:"diagnosis,omitempty"`
// WorkloadStatus represents status of workloads whose HealthStatus is UNKNOWN.
WorkloadStatus string `json:"workloadStatus,omitempty"`
}
// +kubebuilder:object:root=true
// A HealthScope determines an aggregate health status based of the health of components.
// +kubebuilder:resource:categories={oam}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:JSONPath=".status.health",name=HEALTH,type=string
type HealthScope struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HealthScopeSpec `json:"spec,omitempty"`
Status HealthScopeStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// HealthScopeList contains a list of HealthScope.
type HealthScopeList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []HealthScope `json:"items"`
}

View File

@@ -1,63 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/oam-dev/kubevela/pkg/oam"
)
var _ oam.Trait = &ManualScalerTrait{}
// A ManualScalerTraitSpec defines the desired state of a ManualScalerTrait.
type ManualScalerTraitSpec struct {
// ReplicaCount of the workload this trait applies to.
ReplicaCount int32 `json:"replicaCount"`
// WorkloadReference to the workload this trait applies to.
WorkloadReference runtimev1alpha1.TypedReference `json:"workloadRef"`
}
// A ManualScalerTraitStatus represents the observed state of a
// ManualScalerTrait.
type ManualScalerTraitStatus struct {
runtimev1alpha1.ConditionedStatus `json:",inline"`
}
// +kubebuilder:object:root=true
// A ManualScalerTrait determines how many replicas a workload should have.
// +kubebuilder:resource:categories={oam}
// +kubebuilder:subresource:status
type ManualScalerTrait struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ManualScalerTraitSpec `json:"spec,omitempty"`
Status ManualScalerTraitStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ManualScalerTraitList contains a list of ManualScalerTrait.
type ManualScalerTraitList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ManualScalerTrait `json:"items"`
}

View File

@@ -1,671 +0,0 @@
/*
Copyright 2021 The KubeVela Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package v1alpha2
import (
runtimev1alpha1 "github.com/crossplane/crossplane-runtime/apis/core/v1alpha1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
"github.com/oam-dev/kubevela/apis/core.oam.dev/common"
"github.com/oam-dev/kubevela/apis/types"
)
// A WorkloadDefinitionSpec defines the desired state of a WorkloadDefinition.
type WorkloadDefinitionSpec struct {
// Reference to the CustomResourceDefinition that defines this workload kind.
Reference common.DefinitionReference `json:"definitionRef"`
// ChildResourceKinds are the list of GVK of the child resources this workload generates
ChildResourceKinds []common.ChildResourceKind `json:"childResourceKinds,omitempty"`
// RevisionLabel indicates which label for underlying resources(e.g. pods) of this workload
// can be used by trait to create resource selectors(e.g. label selector for pods).
// +optional
RevisionLabel string `json:"revisionLabel,omitempty"`
// PodSpecPath indicates where/if this workload has K8s podSpec field
// if one workload has podSpec, trait can do lot's of assumption such as port, env, volume fields.
// +optional
PodSpecPath string `json:"podSpecPath,omitempty"`
// Status defines the custom health policy and status message for workload
// +optional
Status *common.Status `json:"status,omitempty"`
// Schematic defines the data format and template of the encapsulation of the workload
// +optional
Schematic *common.Schematic `json:"schematic,omitempty"`
// Extension is used for extension needs by OAM platform builders
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Extension *runtime.RawExtension `json:"extension,omitempty"`
}
// WorkloadDefinitionStatus is the status of WorkloadDefinition
type WorkloadDefinitionStatus struct {
runtimev1alpha1.ConditionedStatus `json:",inline"`
}
// +kubebuilder:object:root=true
// A WorkloadDefinition registers a kind of Kubernetes custom resource as a
// valid OAM workload kind by referencing its CustomResourceDefinition. The CRD
// is used to validate the schema of the workload when it is embedded in an OAM
// Component.
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=workload
// +kubebuilder:printcolumn:name="DEFINITION-NAME",type=string,JSONPath=".spec.definitionRef.name"
type WorkloadDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkloadDefinitionSpec `json:"spec,omitempty"`
Status WorkloadDefinitionStatus `json:"status,omitempty"`
}
// SetConditions set condition for WorkloadDefinition
func (wd *WorkloadDefinition) SetConditions(c ...runtimev1alpha1.Condition) {
wd.Status.SetConditions(c...)
}
// GetCondition gets condition from WorkloadDefinition
func (wd *WorkloadDefinition) GetCondition(conditionType runtimev1alpha1.ConditionType) runtimev1alpha1.Condition {
return wd.Status.GetCondition(conditionType)
}
// +kubebuilder:object:root=true
// WorkloadDefinitionList contains a list of WorkloadDefinition.
type WorkloadDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WorkloadDefinition `json:"items"`
}
// A TraitDefinitionSpec defines the desired state of a TraitDefinition.
type TraitDefinitionSpec struct {
// Reference to the CustomResourceDefinition that defines this trait kind.
Reference common.DefinitionReference `json:"definitionRef,omitempty"`
// Revision indicates whether a trait is aware of component revision
// +optional
RevisionEnabled bool `json:"revisionEnabled,omitempty"`
// WorkloadRefPath indicates where/if a trait accepts a workloadRef object
// +optional
WorkloadRefPath string `json:"workloadRefPath,omitempty"`
// PodDisruptive specifies whether using the trait will cause the pod to restart or not.
// +optional
PodDisruptive bool `json:"podDisruptive,omitempty"`
// AppliesToWorkloads specifies the list of workload kinds this trait
// applies to. Workload kinds are specified in kind.group/version format,
// e.g. server.core.oam.dev/v1alpha2. Traits that omit this field apply to
// all workload kinds.
// +optional
AppliesToWorkloads []string `json:"appliesToWorkloads,omitempty"`
// ConflictsWith specifies the list of traits(CRD name, Definition name, CRD group)
// which could not apply to the same workloads with this trait.
// Traits that omit this field can work with any other traits.
// Example rules:
// "service" # Trait definition name
// "services.k8s.io" # API resource/crd name
// "*.networking.k8s.io" # API group
// "labelSelector:foo=bar" # label selector
// labelSelector format: https://pkg.go.dev/k8s.io/apimachinery/pkg/labels#Parse
// +optional
ConflictsWith []string `json:"conflictsWith,omitempty"`
// Schematic defines the data format and template of the encapsulation of the trait
// +optional
Schematic *common.Schematic `json:"schematic,omitempty"`
// Status defines the custom health policy and status message for trait
// +optional
Status *common.Status `json:"status,omitempty"`
// Extension is used for extension needs by OAM platform builders
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Extension *runtime.RawExtension `json:"extension,omitempty"`
}
// TraitDefinitionStatus is the status of TraitDefinition
type TraitDefinitionStatus struct {
// ConditionedStatus reflects the observed status of a resource
runtimev1alpha1.ConditionedStatus `json:",inline"`
// ConfigMapRef refer to a ConfigMap which contains OpenAPI V3 JSON schema of Component parameters.
ConfigMapRef string `json:"configMapRef,omitempty"`
// LatestRevision of the trait definition
// +optional
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
}
// +kubebuilder:object:root=true
// A TraitDefinition registers a kind of Kubernetes custom resource as a valid
// OAM trait kind by referencing its CustomResourceDefinition. The CRD is used
// to validate the schema of the trait when it is embedded in an OAM
// ApplicationConfiguration.
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=trait
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="APPLIES-TO",type=string,JSONPath=".spec.appliesToWorkloads"
// +kubebuilder:printcolumn:name="DESCRIPTION",type=string,JSONPath=".metadata.annotations.definition\\.oam\\.dev/description"
type TraitDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec TraitDefinitionSpec `json:"spec,omitempty"`
Status TraitDefinitionStatus `json:"status,omitempty"`
}
// SetConditions set condition for TraitDefinition
func (td *TraitDefinition) SetConditions(c ...runtimev1alpha1.Condition) {
td.Status.SetConditions(c...)
}
// GetCondition gets condition from TraitDefinition
func (td *TraitDefinition) GetCondition(conditionType runtimev1alpha1.ConditionType) runtimev1alpha1.Condition {
return td.Status.GetCondition(conditionType)
}
// +kubebuilder:object:root=true
// TraitDefinitionList contains a list of TraitDefinition.
type TraitDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []TraitDefinition `json:"items"`
}
// A ScopeDefinitionSpec defines the desired state of a ScopeDefinition.
type ScopeDefinitionSpec struct {
// Reference to the CustomResourceDefinition that defines this scope kind.
Reference common.DefinitionReference `json:"definitionRef"`
// WorkloadRefsPath indicates if/where a scope accepts workloadRef objects
WorkloadRefsPath string `json:"workloadRefsPath,omitempty"`
// AllowComponentOverlap specifies whether an OAM component may exist in
// multiple instances of this kind of scope.
AllowComponentOverlap bool `json:"allowComponentOverlap"`
// Extension is used for extension needs by OAM platform builders
// +optional
// +kubebuilder:pruning:PreserveUnknownFields
Extension *runtime.RawExtension `json:"extension,omitempty"`
}
// +kubebuilder:object:root=true
// A ScopeDefinition registers a kind of Kubernetes custom resource as a valid
// OAM scope kind by referencing its CustomResourceDefinition. The CRD is used
// to validate the schema of the scope when it is embedded in an OAM
// ApplicationConfiguration.
// +kubebuilder:printcolumn:JSONPath=".spec.definitionRef.name",name=DEFINITION-NAME,type=string
// +kubebuilder:resource:scope=Namespaced,categories={oam},shortName=scope
type ScopeDefinition struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ScopeDefinitionSpec `json:"spec,omitempty"`
}
// +kubebuilder:object:root=true
// ScopeDefinitionList contains a list of ScopeDefinition.
type ScopeDefinitionList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ScopeDefinition `json:"items"`
}
// A ComponentParameter defines a configurable parameter of a component.
type ComponentParameter struct {
// Name of this parameter. OAM ApplicationConfigurations will specify
// parameter values using this name.
Name string `json:"name"`
// FieldPaths specifies an array of fields within this Component's workload
// that will be overwritten by the value of this parameter. The type of the
// parameter (e.g. int, string) is inferred from the type of these fields;
// All fields must be of the same type. Fields are specified as JSON field
// paths without a leading dot, for example 'spec.replicas'.
FieldPaths []string `json:"fieldPaths"`
// +kubebuilder:default:=false
// Required specifies whether or not a value for this parameter must be
// supplied when authoring an ApplicationConfiguration.
// +optional
Required *bool `json:"required,omitempty"`
// Description of this parameter.
// +optional
Description *string `json:"description,omitempty"`
}
// A ComponentSpec defines the desired state of a Component.
type ComponentSpec struct {
// A Workload that will be created for each ApplicationConfiguration that
// includes this Component. Workload is an instance of a workloadDefinition.
// We either use the GVK info or a special "type" field in the workload to associate
// the content of the workload with its workloadDefinition
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
Workload runtime.RawExtension `json:"workload"`
// HelmRelease records a Helm release used by a Helm module workload.
// +optional
Helm *common.Helm `json:"helm,omitempty"`
// Parameters exposed by this component. ApplicationConfigurations that
// reference this component may specify values for these parameters, which
// will in turn be injected into the embedded workload.
// +optional
Parameters []ComponentParameter `json:"parameters,omitempty"`
}
// A ComponentStatus represents the observed state of a Component.
type ComponentStatus struct {
// The generation observed by the component controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration"`
runtimev1alpha1.ConditionedStatus `json:",inline"`
// LatestRevision of component
// +optional
LatestRevision *common.Revision `json:"latestRevision,omitempty"`
// One Component should only be used by one AppConfig
}
// +kubebuilder:object:root=true
// A Component describes how an OAM workload kind may be instantiated.
// +kubebuilder:resource:categories={oam}
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:JSONPath=".spec.workload.kind",name=WORKLOAD-KIND,type=string
// +kubebuilder:printcolumn:name="age",type="date",JSONPath=".metadata.creationTimestamp"
type Component struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ComponentSpec `json:"spec,omitempty"`
Status ComponentStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ComponentList contains a list of Component.
type ComponentList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Component `json:"items"`
}
// A ComponentParameterValue specifies a value for a named parameter. The
// associated component must publish a parameter with this name.
type ComponentParameterValue struct {
// Name of the component parameter to set.
Name string `json:"name"`
// Value to set.
Value intstr.IntOrString `json:"value"`
}
// A ComponentTrait specifies a trait that should be applied to a component.
type ComponentTrait struct {
// A Trait that will be created for the component
// +kubebuilder:validation:EmbeddedResource
// +kubebuilder:pruning:PreserveUnknownFields
Trait runtime.RawExtension `json:"trait"`
// DataOutputs specify the data output sources from this trait.
// +optional
DataOutputs []DataOutput `json:"dataOutputs,omitempty"`
// DataInputs specify the data input sinks into this trait.
// +optional
DataInputs []DataInput `json:"dataInputs,omitempty"`
}
// A ComponentScope specifies a scope in which a component should exist.
type ComponentScope struct {
// A ScopeReference must refer to an OAM scope resource.
ScopeReference runtimev1alpha1.TypedReference `json:"scopeRef"`
}
// An ApplicationConfigurationComponent specifies a component of an
// ApplicationConfiguration. Each component is used to instantiate a workload.
type ApplicationConfigurationComponent struct {
// ComponentName specifies a component whose latest revision will be bind
// with ApplicationConfiguration. When the spec of the referenced component
// changes, ApplicationConfiguration will automatically migrate all trait
// affect from the prior revision to the new one. This is mutually exclusive
// with RevisionName.
// +optional
ComponentName string `json:"componentName,omitempty"`
// RevisionName of a specific component revision to which to bind
// ApplicationConfiguration. This is mutually exclusive with componentName.
// +optional
RevisionName string `json:"revisionName,omitempty"`
// DataOutputs specify the data output sources from this component.
DataOutputs []DataOutput `json:"dataOutputs,omitempty"`
// DataInputs specify the data input sinks into this component.
DataInputs []DataInput `json:"dataInputs,omitempty"`
// ParameterValues specify values for the the specified component's
// parameters. Any parameter required by the component must be specified.
// +optional
ParameterValues []ComponentParameterValue `json:"parameterValues,omitempty"`
// Traits of the specified component.
// +optional
Traits []ComponentTrait `json:"traits,omitempty"`
// Scopes in which the specified component should exist.
// +optional
Scopes []ComponentScope `json:"scopes,omitempty"`
}
// An ApplicationConfigurationSpec defines the desired state of a
// ApplicationConfiguration.
type ApplicationConfigurationSpec struct {
// Components of which this ApplicationConfiguration consists. Each
// component will be used to instantiate a workload.
Components []ApplicationConfigurationComponent `json:"components"`
}
// A TraitStatus represents the state of a trait.
type TraitStatus string
// A WorkloadTrait represents a trait associated with a workload and its status
type WorkloadTrait struct {
// Status is a place holder for a customized controller to fill
// if it needs a single place to summarize the status of the trait
Status TraitStatus `json:"status,omitempty"`
// Reference to a trait created by an ApplicationConfiguration.
Reference runtimev1alpha1.TypedReference `json:"traitRef"`
// Message will allow controller to leave some additional information for this trait
Message string `json:"message,omitempty"`
// AppliedGeneration indicates the generation observed by the appConfig controller.
// The same field is also recorded in the annotations of traits.
// A trait is possible to be deleted from cluster after created.
// This field is useful to track the observed generation of traits after they are
// deleted.
AppliedGeneration int64 `json:"appliedGeneration,omitempty"`
// DependencyUnsatisfied notify does the trait has dependency unsatisfied
DependencyUnsatisfied bool `json:"dependencyUnsatisfied,omitempty"`
}
// A ScopeStatus represents the state of a scope.
type ScopeStatus string
// A WorkloadScope represents a scope associated with a workload and its status
type WorkloadScope struct {
// Status is a place holder for a customized controller to fill
// if it needs a single place to summarize the status of the scope
Status ScopeStatus `json:"status,omitempty"`
// Reference to a scope created by an ApplicationConfiguration.
Reference runtimev1alpha1.TypedReference `json:"scopeRef"`
}
// A WorkloadStatus represents the status of a workload.
type WorkloadStatus struct {
// Status is a place holder for a customized controller to fill
// if it needs a single place to summarize the entire status of the workload
Status string `json:"status,omitempty"`
// ComponentName that produced this workload.
ComponentName string `json:"componentName,omitempty"`
// ComponentRevisionName of current component
ComponentRevisionName string `json:"componentRevisionName,omitempty"`
// DependencyUnsatisfied notify does the workload has dependency unsatisfied
DependencyUnsatisfied bool `json:"dependencyUnsatisfied,omitempty"`
// AppliedComponentRevision indicates the applied component revision name of this workload
AppliedComponentRevision string `json:"appliedComponentRevision,omitempty"`
// Reference to a workload created by an ApplicationConfiguration.
Reference runtimev1alpha1.TypedReference `json:"workloadRef,omitempty"`
// Traits associated with this workload.
Traits []WorkloadTrait `json:"traits,omitempty"`
// Scopes associated with this workload.
Scopes []WorkloadScope `json:"scopes,omitempty"`
}
// HistoryWorkload contain the old component revision that are still running
type HistoryWorkload struct {
// Revision of this workload
Revision string `json:"revision,omitempty"`
// Reference to running workload.
Reference runtimev1alpha1.TypedReference `json:"workloadRef,omitempty"`
}
// A ApplicationStatus represents the state of the entire application.
type ApplicationStatus string
// An ApplicationConfigurationStatus represents the observed state of a
// ApplicationConfiguration.
type ApplicationConfigurationStatus struct {
runtimev1alpha1.ConditionedStatus `json:",inline"`
// Status is a place holder for a customized controller to fill
// if it needs a single place to summarize the status of the entire application
Status ApplicationStatus `json:"status,omitempty"`
Dependency DependencyStatus `json:"dependency,omitempty"`
// RollingStatus indicates what phase are we in the rollout phase
RollingStatus types.RollingStatus `json:"rollingStatus,omitempty"`
// Workloads created by this ApplicationConfiguration.
Workloads []WorkloadStatus `json:"workloads,omitempty"`
// The generation observed by the appConfig controller.
// +optional
ObservedGeneration int64 `json:"observedGeneration"`
// HistoryWorkloads will record history but still working revision workloads.
HistoryWorkloads []HistoryWorkload `json:"historyWorkloads,omitempty"`
}
// DependencyStatus represents the observed state of the dependency of
// an ApplicationConfiguration.
type DependencyStatus struct {
Unsatisfied []UnstaifiedDependency `json:"unsatisfied,omitempty"`
}
// UnstaifiedDependency describes unsatisfied dependency flow between
// one pair of objects.
type UnstaifiedDependency struct {
Reason string `json:"reason"`
From DependencyFromObject `json:"from"`
To DependencyToObject `json:"to"`
}
// DependencyFromObject represents the object that dependency data comes from.
type DependencyFromObject struct {
runtimev1alpha1.TypedReference `json:",inline"`
FieldPath string `json:"fieldPath,omitempty"`
}
// DependencyToObject represents the object that dependency data goes to.
type DependencyToObject struct {
runtimev1alpha1.TypedReference `json:",inline"`
FieldPaths []string `json:"fieldPaths,omitempty"`
}
// +kubebuilder:object:root=true
// An ApplicationConfiguration represents an OAM application.
// +kubebuilder:resource:shortName=appconfig,categories={oam}
// +kubebuilder:subresource:status
type ApplicationConfiguration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec ApplicationConfigurationSpec `json:"spec,omitempty"`
Status ApplicationConfigurationStatus `json:"status,omitempty"`
}
// +kubebuilder:object:root=true
// ApplicationConfigurationList contains a list of ApplicationConfiguration.
type ApplicationConfigurationList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []ApplicationConfiguration `json:"items"`
}
// DataOutput specifies a data output source from an object.
type DataOutput struct {
// Name is the unique name of a DataOutput in an ApplicationConfiguration.
Name string `json:"name,omitempty"`
// FieldPath refers to the value of an object's field.
FieldPath string `json:"fieldPath,omitempty"`
// Conditions specify the conditions that should be satisfied before emitting a data output.
// Different conditions are AND-ed together.
// If no conditions is specified, it is by default to check output value not empty.
// +optional
Conditions []ConditionRequirement `json:"conditions,omitempty"`
// OutputStore specifies the object used to store intermediate data generated by Operations
OutputStore StoreReference `json:"outputStore,omitempty"`
}
// StoreReference specifies the referenced object in DataOutput or DataInput
type StoreReference struct {
runtimev1alpha1.TypedReference `json:",inline"`
// Operations specify the data processing operations
Operations []DataOperation `json:"operations,omitempty"`
}
// DataOperation defines the specific operation for data
type DataOperation struct {
// Type specifies the type of DataOperation
Type string `json:"type"`
// Operator specifies the operation under this DataOperation type
Operator DataOperator `json:"op"`
// ToFieldPath refers to the value of an object's field
ToFieldPath string `json:"toFieldPath"`
// ToDataPath refers to the value of an object's specfied by ToDataPath. For example the ToDataPath "redis" specifies "redis info" in '{"redis":"redis info"}'
ToDataPath string `json:"toDataPath,omitempty"`
// +optional
// Value specifies an expected value
// This is mutually exclusive with ValueFrom
Value string `json:"value,omitempty"`
// +optional
// ValueFrom specifies expected value from object such as workload and trait
// This is mutually exclusive with Value
ValueFrom ValueFrom `json:"valueFrom,omitempty"`
Conditions []ConditionRequirement `json:"conditions,omitempty"`
}
// DataOperator defines the type of Operator in DataOperation
type DataOperator string
const (
// AddOperator specifies the add operation for data passing
AddOperator DataOperator = "add"
// DeleteOperator specifies the delete operation for data passing
DeleteOperator DataOperator = "delete"
// ReplaceOperator specifies the replace operation for data passing
ReplaceOperator DataOperator = "replace"
)
// DataInput specifies a data input sink to an object.
// If input is array, it will be appended to the target field paths.
type DataInput struct {
// ValueFrom specifies the value source.
ValueFrom DataInputValueFrom `json:"valueFrom,omitempty"`
// ToFieldPaths specifies the field paths of an object to fill passed value.
ToFieldPaths []string `json:"toFieldPaths,omitempty"`
// StrategyMergeKeys specifies the merge key if the toFieldPaths target is an array.
// The StrategyMergeKeys is optional, by default, if the toFieldPaths target is an array, we will append.
// If StrategyMergeKeys specified, we will check the key in the target array.
// If any key exist, do update; if no key exist, append.
StrategyMergeKeys []string `json:"strategyMergeKeys,omitempty"`
// When the Conditions is satified, ToFieldPaths will be filled with passed value
Conditions []ConditionRequirement `json:"conditions,omitempty"`
// InputStore specifies the object used to read intermediate data genereted by DataOutput
InputStore StoreReference `json:"inputStore,omitempty"`
}
// DataInputValueFrom specifies the value source for a data input.
type DataInputValueFrom struct {
// DataOutputName matches a name of a DataOutput in the same AppConfig.
DataOutputName string `json:"dataOutputName"`
}
// ConditionRequirement specifies the requirement to match a value.
type ConditionRequirement struct {
Operator ConditionOperator `json:"op"`
// +optional
// Value specifies an expected value
// This is mutually exclusive with ValueFrom
Value string `json:"value,omitempty"`
// +optional
// ValueFrom specifies expected value from AppConfig
// This is mutually exclusive with Value
ValueFrom ValueFrom `json:"valueFrom,omitempty"`
// +optional
// FieldPath specifies got value from workload/trait object
FieldPath string `json:"fieldPath,omitempty"`
}
// ValueFrom gets value from AppConfig object by specifying a path
type ValueFrom struct {
FieldPath string `json:"fieldPath"`
}
// ConditionOperator specifies the operator to match a value.
type ConditionOperator string
const (
// ConditionEqual indicates equal to given value
ConditionEqual ConditionOperator = "eq"
// ConditionNotEqual indicates not equal to given value
ConditionNotEqual ConditionOperator = "notEq"
// ConditionNotEmpty indicates given value not empty
ConditionNotEmpty ConditionOperator = "notEmpty"
)

Some files were not shown because too many files have changed in this diff Show More