Commit Graph
344 Commits
Author SHA1 Message Date
Shaurya SrivastavaandGitHub 50c3223ce3 Feat: add configurable HTTP timeout to request, webhook, and notification steps (#7243)
* Feat: expose HTTP timeout on built-in workflow steps

Allow request, webhook, and notification steps to set an optional
timeout (Go duration string) that is forwarded to http.#HTTPDo as
request.timeout, so slow HTTP calls are no longer stuck at the 3s default.

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

* Feat: Made requested changes

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

* Fix: align timeout duration regex with Go ParseDuration

Accept "0" and leading-dot fractions like ".5s", matching
time.ParseDuration more closely while still rejecting unit-less
values such as "30".

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

---------

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>
2026-07-22 16:32:18 -07:00
Harsh Vardhan PandeyandGitHub 1ba52548ed Fix: storage trait mountToEnv should replace existing env value (#7217)
Signed-off-by: Harsh63870 <harshvardhanpandey372@gmail.com>
2026-07-14 16:24:47 +01:00
Vishal KumarandGitHub d7f67354f8 Feat: Added new deploy-components workflow step (#7213)
* feat(workflow): add deploy-components step for per-component multi-cluster targeting

Adds a pure-CUE workflow-step definition that lets each component in an
Application resolve its own target cluster(s) via topology policies,
filling the gap between apply-component (single component, static
cluster) and deploy (all components, cross-product against policies).

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

* chore(workflow): add rendered deploy-components WorkflowStepDefinition manifest

Generated from vela-templates/definitions/internal/workflowstep/deploy-components.cue
via make def-install, for installation as part of the vela-core Helm chart.

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

* test(e2e): add multicluster e2e for deploy-components step

Covers per-component topology-policy targeting (each component lands only
on its resolved cluster, no cross-product) and fast-fail validation when a
referenced component name is not present in the application.

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

* docs(workflow): add example doc for deploy-components step

Required by the definition-doc CI check for any new WorkflowStepDefinition.

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

* fix(workflow): normalize deploy-components import block to grouped form

The rendered manifest was generated with flat "import X" lines; the
project's CUE formatter (as used by CI's make reviewable) renders
multi-import blocks grouped as import (...). Fixes the check-diff CI job.

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

* fix(workflow): gate deploy-components applies on validation to prevent partial rollout

Previously, _missingComponents was derived from deploy's own realized keys,
which meant an invalid component name could only be detected after applies
for valid components had already started -- a partial rollout on failure.

Compute _missingComponents directly from the loaded component set instead
(via iteration, matching the pattern deploy itself already uses reliably --
an indexed lookup against the same field was empirically found to evaluate
before the load task resolves, causing false positives), and wrap deploy in
an if-guard so no component is applied unless every referenced name is
valid. Verified against a live multicluster setup: the negative case now
applies zero resources before failing, and the positive case is unaffected.

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

* style(workflow): tighten deploy-components comments

Comments narrated the debugging history behind each constraint; state
them as plain engineering facts instead.

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

* fix(workflow): correct mistyped #do string in multicluster.#GetPlacementsFromTopologyPolicies

The exported CUE symbol's #do value ("get-placements-from-tmulticlusterology-policies")
never matched the registered provider handler key ("get-placements-from-topology-policies"),
making it unusable by any CUE template. Fix the string and rename the symbol
to match. Unused elsewhere in the tree, so no other callers are affected.

deploy-components keeps its own local copy (for backport safety) but now
documents that it mirrors the corrected symbol.

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

* refactor(workflow): use the shared topology-placement symbol in deploy-components

Now that multicluster.#GetPlacementsFromTopologyPolicies is fixed, drop the
local #GetPlacements duplicate and reference the shared symbol directly.
deploy-components is new in this release, so there's no backport scenario
where it could ship without the fix landing alongside it.

Verified against a live multicluster controller build: positive case
resolves placements and applies correctly, negative case still gates
deploy on validation with zero partial rollout.

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

---------

Signed-off-by: vishal210893 <vishal210893@gmail.com>
2026-07-03 14:35:11 +01:00
5a44b5f10c Feat: auto remediate cue issues (#7199)
* feat(cue/upgrade): auto-remediate legacy CUE syntax at render time

Transparently rewrite CUE templates that use deprecated list arithmetic
(+, *) and conflicting field names (error) so that older definitions
continue to work with CUE ≥ v0.14 (KubeVela ≥ 1.11).

- CUEUpgradeFunc registry with ID, CUE/KubeVela version guards, precheck,
  and upgrade function fields
- upgradeListConcatenation: rewrites list1+list2 → list.Concat([list1,list2])
  and list*n → list.Repeat(list, n); adds "list" import as needed
- collectAddChain + extractListConcatArgs: flatten left-associative + chains
  and existing list.Concat([...]) leaves into a single flat call, so both
  fresh chains (a+b+c+d) and partially-upgraded chains produce one
  list.Concat([a,b,c,d]) with no nesting across repeated passes
- upgradeErrorFieldLabel: rewrites unquoted `error` field labels to "error"
  to avoid conflict with the CUE 0.14 built-in; precheck uses a tighter
  \berror\s*: regex to avoid false positives on identifiers like errorMessage
- EnsureCueVersionCompatibility: single entry point used at render time;
  LRU cache with TTL eviction, Prometheus metrics, feature flag
- ParseVersion: regex anchored to reject garbage suffixes (e.g. "1.11foo")
  while accepting pre-release+build metadata (e.g. "v1.13.0-alpha.1+dev")

- template.go: call EnsureCueVersionCompatibility for every template area
  (main, health, custom status, status detail) with correct DefinitionKind
  derived from which definition pointer is non-nil
- validate.go: upgrade policy templates before compiling in
  validateNoRequiredParameters

- `vela def upgrade FILE [-o OUTPUT]`: upgrades a single .cue file
- `vela def upgrade FILE --validate [--quiet]`: exit 1 if upgrade needed
- `vela def compat definitions` / `vela def compat applications`: scan
  cluster definitions/apps for compat issues; output as table or YAML
- Cyclomatic complexity kept below threshold by extracting scanDefinitions,
  scanDefRevisions, buildDefCompatReport, scanApplications, scanAppRevision
  as standalone functions with options structs
- revisionNum() helper for numeric vN comparison (avoids lexicographic bugs)
- mergeImports() dedup helper shared by ToCUEString and formatCUEString
- ANSI escape sequences replaced with fatih/color for portability
- goconst: "yaml" → outputFormatYAML named constant throughout

- Component, trait, and policy definition validating handlers: removed
  spurious obj.Name argument from fmt.Sprintf in warning messages

- FromCUEString: only prepend importString to the stored template when
  imports are non-empty; empty importString ("\n") was causing a leading
  newline that made yaml.v3 use |2 block scalar on every generated YAML

- gen_sdk testdata: removed unused imports (vela/op, encoding/base64) from
  one_of.cue that were exposed by our importString+templateString change
- e2e test: fix flaky trait-order assertion using ContainElements instead
  of index-based equality

Upgraded all built-in .cue files that used deprecated list arithmetic:
- vela-templates/definitions/internal/component/cron-task.cue
- vela-templates/definitions/internal/trait/command.cue
- vela-templates/definitions/internal/trait/container-ports.cue
- vela-templates/definitions/internal/trait/env.cue
- vela-templates/definitions/internal/trait/init-container.cue

Removed unused stdlib imports that caused `def gen-api` to fail:
- vela-templates/definitions/internal/workflowstep/apply-deployment.cue
- vela-templates/definitions/internal/workflowstep/apply-terraform-provider.cue
- vela-templates/definitions/internal/workflowstep/build-push-image.cue

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>

* fix(cue/upgrade): address PR review comments

- sync.atomic.Pointer for compatCache to fix data race on reinit
- SummaryVec → HistogramVec for both duration metrics (aggregatable
  across HA replicas); buckets tuned to sub-millisecond upgrade path
  and millisecond render path respectively
- errorFieldLabelRe: extend to match optional (?) and required (!)
  field constraint markers before the colon
- cue-compatibility-cache-size: clamp negative values to 0 (disabled)
  with warning log; document 0=disabled in flag help; cache put is
  no-op when capacity <= 0
- webhook: replace RequiresUpgrade+EnsureCueVersionCompatibility double
  parse with single EnsureCueVersionCompatibility call; use string
  comparison to detect upgrade and emit warning
- def compat: log warning when ApplicationRevision fetch fails instead
  of silently skipping (partial results are preserved)
- e2e: only delete definitions in DeferCleanup if this test created
  them (avoid deleting pre-existing shared resources)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>

* fix(cue/upgrade): address further PR review comments

- EnsureCueVersionCompatibility: return (string, bool) where bool
  indicates semantic upgrades were applied (len(applied)>0), not
  string inequality — prevents false-positive warnings from
  formatting-only normalisation; update all call sites
- webhook handlers (component, trait, policy): switch from
  RequiresUpgrade+EnsureCueVersionCompatibility double-call to single
  EnsureCueVersionCompatibility call using wasUpgraded bool; remove
  now-unused strings imports
- cache: skip eviction goroutine when capacity==0 (disabled); set
  compatCacheCancel=nil on disabled path to avoid stale cancel on
  next InitCompatibilityCache call
- e2e: replace boolean ownership tracking with createAndTrack helper
  that checks pre-existence via Get before Create, eliminating both
  the ambiguous-create leak and the boilerplate booleans

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>

* fix: address reviewer comments — cache determinism, e2e ownership race

- cache: store normalised string in compatEntry.upgraded even when no
  semantic fixes were applied, so cache-hit and cache-miss paths return
  identical output (fixes non-deterministic behaviour flagged in review)
- upgrade: return entry.upgraded on the requiresUpgrade=false cache-hit
  path instead of the raw input cueStr
- e2e: replace GET-then-CREATE ownership inference with atomic CREATE-
  first pattern; err==nil means we created it (register DeferCleanup),
  IsAlreadyExists means it pre-existed (skip cleanup), eliminating the
  GET/CREATE race window that could misattribute ownership

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Brian Kane <briankane1@gmail.com>

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 05:57:23 -07:00
Ayush KumarandGitHub 3eaf62b2a2 Fix(helmchart): wire options correctly (#7151) and decompose provider (#7154)
* Refactor(helm): extract type declarations into types.go

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

* Refactor(helm): extract Provider, constructors, and dry-run
  ctx into provider.go

Move the Provider singleton, NewProvider/NewProviderWithConfig
   constructors, DefaultCacheTTLConfig, the dry-run context helpers
  (WithDryRun/isDryRun), and the small log/cache key utilities out of
  helm.go into a dedicated provider.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract chart fetching into chart_fetch.go

Move detectChartSourceType, isMutableVersion, fetchChart
  (cache wrapper), fetchChartWithoutCache, determineCacheTTL, and the
  three per-source fetchers (fetchOCIChart, fetchURLChart,
  fetchRepoChart) out of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract values resolution into values.go

Move mergeValues, loadValuesFromSource,
  resolveValuesFromNamespace, loadConfigMapValues, loadSecretValues,
  plus the valueSourceMissingError sentinel and
  errCrossNamespaceValuesFrom guard out of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract post-renderer and ownership helpers
  into postrender.go

Move getActionConfig, velaLabelPostRenderer (struct + Run),
  velaOwnerLabels, and isOwnedByVela out of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract manifest parsing into manifest.go

Move parseManifestResources, isClusterScopedGVK,
  isClusterScopedKindStaticFallback, isTestResource, cleanResource,
  and orderResources out of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract release secret lifecycle into
  release_secrets.go

Move validateReleaseHealth, cleanOrphanedReleaseSecrets,
  listReleaseSecretNames, labelReleaseSecrets,
  deleteReleaseSecretsDirect, and InvalidateRelease out of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract dry-run render into dryrun.go

Move dryRunRender (used by webhook validation) and
  getKubeVersion (cluster Kubernetes version capabilities lookup) out
  of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): extract release dispatcher into release.go

Move installOrUpgradeChart (dispatcher between install/upgrade
   with fingerprint dedup, adoption detection, and publishVersion pin
  short-circuit) and computeReleaseFingerprint out of helm.go.

No behavior change. All 240 unit specs remain green.

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

* Refactor(helm): split install/upgrade into install.go and
  upgrade.go with option appliers

Move freshInstall, newInstallAction, and
  isRetryableInstallError into install.go. Extract the inline upgrade
  block from installOrUpgradeChart into a new performUpgrade function
  in upgrade.go.

Introduce applyCommonInstallOptions and
  applyCommonUpgradeOptions free functions that own option-to-action
  wiring per Helm action type. The asymmetry between the two
  (MaxHistory/CleanupOnFail/Recreate live only in the upgrade applier)
   is now visible in code and reflects the Helm SDK shape.

No behavior change. All 240 unit specs remain green.

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

* Chore(helm): remove Uninstall provider (unused)

The helmchart ComponentDefinition only calls helm.#Render.
  Deletion is handled by KubeVela GC and ResourceTracker, never by
  helm uninstall, so the Uninstall CUE template and the workflow
  provider registration were exercised by tests only.

Touched: UninstallParams/UninstallReturns in types.go, the
  Uninstall Go function and its registration in helm.go, the
  #Uninstall block in helm.cue, the uninstall registration in
  pkg/workflow/providers/helm/helm.go, and the corresponding
  helm_test.go cases.

No behavior change for any in-tree caller. All 237 remaining
  unit specs remain green.

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

* Fix(helm): wire includeCRDs and install-path force; drop waitTimeout (#7151)

includeCRDs was a complete no-op: the field was declared on RenderOptionsParams but never read. Wire it through SkipCRDs on both action.Install and action.Upgrade (inverted, since the user-facing field expresses inclusion).

force was wired on upgrade only. action.Install has a Force field in Helm SDK v3.14.4, so wire it there too.

waitTimeout had no backing Helm SDK field (only Timeout exists, covering both connection and wait). Remove the field from RenderOptionsParams and the CUE schema. timeout now documents its dual role.

maxHistory, cleanupOnFail, and recreatePods stay upgrade-only per the Helm SDK shape; CUE comments now state this explicitly.

Tests: 18 new specs covering applyCommonInstallOptions and applyCommonUpgradeOptions (each option, nil opts, unparseable timeout, asymmetry of upgrade-only fields). Suite: 258 of 258 passing.
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Refactor(helm): split helm_test.go alongside production files

helm_test.go was a single 2500-line test file. Mirror the production file layout: types_test.go, provider_test.go, chart_fetch_test.go, values_test.go, postrender_test.go, manifest_test.go, release_test.go, release_secrets_test.go, dryrun_test.go, install_test.go (extended with isRetryableInstallError/newInstallAction/freshInstall), upgrade_test.go. helm_test.go now owns only Render-entry tests (matching helm.go after the production split).

No test logic change. Suite remains 258 of 258 passing.

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

* Docs(helm): add one-line responsibility comment to each provider file

Every production .go file in the helm provider now opens with a single descriptive line immediately after the package declaration, so a reader can scan the directory and know what each file owns without opening it.

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

* chore(helm): fix the helmchart CD

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

* Test(helm): drop uninstall expectations from workflow provider tests

CI revealed three failing assertions in pkg/workflow/providers/helm: GetTemplate was expected to contain 'uninstall', and GetProviders was expected to expose an uninstall key with a non-nil function. The Uninstall provider was removed earlier in this branch since the native helmchart ComponentDefinition never invoked it, but the workflow-provider tests still referenced it. Update them to assert the render-only surface.

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

* Fix(helm): address cubic AI review on PR #7154

P0: release.go installOrUpgradeChart only treats driver.ErrReleaseNotFound as a missing release; other Get errors are surfaced rather than silently falling through to freshInstall.

P1: release.go guards existingRelease.Info nil before reading Status. postrender.go isOwnedByVela now matches the full velaCtx triple (AppName + AppNamespace + Name) rather than any non-empty ownership label, so two Applications targeting the same release name in the same namespace do not mis-detect each other as already owned.

P2: values.go deep-clones inline values before CoalesceTables so nested maps cannot be mutated through to the caller. dryrun.go uses the full server GitVersion when present so charts with patch-level kubeVersion constraints validate correctly. install.go isRetryableInstallError now catches 'cannot reuse a name that is still in use' and the dash-hyphen variant. upgrade.go applyCommonUpgradeOptions documents that helm v3 only consults SkipCRDs on the install-mode upgrade path. postrender.go Run no longer short-circuits when only the context is nil, so direct callers still get namespace defaulting.

Tests: remove three non-hermetic / no-cluster tests that did not actually assert their named behaviour. values_test now uses distinct application and release namespaces in the cross-namespace guard scenario, and adds a second positive case for the release-namespace branch. chart_fetch_test fetchOCIChart-with-auth block now captures and restores singleton.KubeClient via BeforeEach/AfterEach to match the sibling fetchURLChart and fetchRepoChart blocks. Suite stays green at 255 specs.
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Fix(helm): preserve numeric types in inline-values deep clone

Cubic flagged the JSON round-trip in deepCloneValues for coercing int to float64. Switch to runtime.DeepCopyJSON which walks the same nested map/slice/scalar shape but preserves Go numeric types. Templates that depend on integer type assertions (e.g. {{ .Values.replicaCount | int }}) now see the original type instead of a coerced float.

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

* Fix(helm): deep-clone inline values without runtime.DeepCopyJSON

Cubic flagged that runtime.DeepCopyJSON panics on plain int values because the helper only accepts the narrow set of types json.Unmarshal returns. CUE evaluation routinely produces Go int / int32 / int64 values, so the previous switch from json round-tripping to runtime.DeepCopyJSON traded one bug (int->float64 coercion) for another (panic on int).

Replace with a hand-rolled recursive walk that recreates maps and slices and copies scalars by interface assignment. Scalars are immutable in Go, so the interface copy is sufficient. The implementation accepts every type CUE evaluation can produce.

Add five focused unit tests: nil input, int preservation, int64/float64 preservation, nested-map isolation, and slice isolation. Suite at 260 specs.

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

* ci: retrigger checks

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

* Test(helm): exercise installOrUpgradeChart with helm fake KubeClient

Codecov patch coverage was failing because the file split moved installOrUpgradeChart into a new file (release.go) with no direct coverage. The previous unit tests were no-cluster smokes that did not assert anything meaningful and were rightly deleted earlier in this branch on cubic feedback.

Add a small seam (actionConfigFactory field on Provider, defaulting to the real cluster getter) so tests can swap in helm SDK kubefake.PrintingKubeClient plus an in-memory release storage driver. Six new specs exercise the dispatcher end-to-end: fresh install, fingerprint dedup short-circuit, chart-version upgrade, values-change upgrade, adoption of vanilla helm releases, and publishVersion pin short-circuit.

Package coverage climbs from ~71% to 82.6%. installOrUpgradeChart goes from 0% to 85.2%. performUpgrade goes from 0% to 90.9%. The remaining gaps (freshInstall retry path, release_secrets cluster helpers) require a real Kubernetes API and are exercised in the e2e suite.

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

* Test(helm): plug the second cluster-leak seam in dispatcher tests

Cubic flagged that the new dispatcher tests still let real Kubernetes calls escape: validateReleaseHealth (started as a goroutine after fingerprint-dedup short-circuit) called p.getActionConfig directly, and labelReleaseSecrets / listReleaseSecretNames / deleteReleaseSecretsDirect built a clientset from p.helmClient.RESTClientGetter().

Add a kubeClientFactory field on Provider next to actionConfigFactory and route all four helpers through it. installProviderWithFake injects a clientsetfake clientset alongside the fake action.Configuration. The release_secrets tests are reworked to use the helper as well, replacing the previous 'should not panic without a real cluster' smokes with assertions against the fake clientset: list filters to vela-owned secrets, label patches missing labels but never overwrites existing ones, delete cleans only matching helm-owned secrets.

Verified the suite emits zero 'Kubernetes cluster unreachable' log lines now. 266 specs green. Also strengthened the adoption test to assert all three app.oam.dev ownership labels.

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

* ci: retrigger checks

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

* ci: retrigger checks

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

* Fix(helm): restore corrupt-secret recovery via fall-through-on-any-Get-error

The earlier cubic-driven P0 fix narrowed the dispatcher to fall through to freshInstall only when getAction.Run returned driver.ErrReleaseNotFound. That broke the documented self-healing contract validated by test/e2e-test/helmchart_test.go ('Helmchart Self-Healing / should recover from corrupted Helm release secret'): a corrupted .data.release surfaces from the helm storage driver as a decode error (base64 / gzip / json), not as driver.ErrReleaseNotFound, so the strict check trapped those errors and skipped the orphan-state cleanup path that freshInstall + isRetryableInstallError implement.

Restore the original fall-through-on-any-error behaviour with two safety improvements: (1) non-NotFound errors are now logged at warning level so operators can spot RBAC / transient API failures that the recovery path then addresses (or fails to address); (2) the fingerprint slice in the stale-cache-clear log is bounds-checked so a short cached value cannot panic.

Add a unit regression that wraps the in-memory storage driver in a corruptingDriver returning a synthetic decode error for the named release. Asserts the dispatcher swallows the error, runs fresh install, and repopulates the cache with the new fingerprint. Mirrors the e2e contract at the unit-test layer so a future refactor cannot regress this without breaking both gates.

Suite: 267 of 267 passing.
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* Test(helm): seed corruption-recovery test at the canonical helm storage key

Cubic flagged that the new corrupt-secret regression seeded the in-memory storage driver at 'rel.v1' while helm SDK derives canonical keys of the form 'sh.helm.release.v1.<name>.v<version>'. The mismatch meant the seeded release never collided with helms install-path probe and the test passed without actually exercising the recovery branch.

Switch the seed key to the canonical form via the same makeKey shape helm SDK uses internally. The corruptingDriver layered on top still returns a synthetic decode error for Get/Query against the named release, so the dispatcher is forced through the swallow-and-fall-through path. Tightened the comment to be explicit about test scope: this unit pins the dispatcher-layer contract, the e2e test pins the end-to-end cleanup. Also relaxed the pre-seeded cache fingerprint to a realistic-length value so the truncation-safe log path exercises cleanly.

Suite: 267 of 267 passing.
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* ci: retrigger checks

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

* ci: retrigger checks

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

* Test(helm): drop canonical-key seed from corruption-recovery test

The canonical-key seed made the in-memory storage collide with the key helm SDK derives for the release, which triggered the orphan-state cleanup retry path in freshInstall. Cleanup uses the kubeClientFactory clientset (a fake clientset with no helm release secrets) so it deletes nothing; the storage-driver entry stays put; the retry install then fails with release: already exists. CI confirmed against the previous commit.

Seed only the corruptingDriver this time, no pre-existing release in storage. The dispatcher swallows the synthetic decode error from Get/Query and falls through to a clean fresh install, which is the contract this unit test is meant to pin. The full storage + clientset cleanup loop remains exercised by the e2e Helmchart Self-Healing scenario.

Updated the test comment to be explicit about scope: storage and clientset are intentionally not bridged in the fake setup; that bridging belongs in the e2e test, not here.

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

* ci: retrigger checks

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

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
2026-05-24 05:57:05 -07:00
bcf6af9747 Feat: helm chart auth (#7148)
* feat: kv native helm auth implementation

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

* feat: add e2e test cases for helm auth

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

* test: remove the env auth gate and improve test cases

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

* lint: drop unused []byte return from non-docker secret dispatchers

unparam flagged dispatchBasicAuthSecret, dispatchTLSSecret, and
dispatchOpaqueSecret because the second return value (raw config
bytes) was always nil. Only dispatchDockerConfigJSONSecret actually
needs that slot for the OCI temp credfile. Drop it from the other
three and update resolveAuthOptions plus the unit tests to match.

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

* feat: pr review changes

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

* style: gofmt/goimports auth.go doc comments

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

* chore: remove e2e-auth-images-load-local target

The dedicated target is gone; e2e-test-local now reads the same
.vscode/k3d-preload.txt image list that the VS Code setup task
uses so both flows pull from one source. Empty or missing file
is a no-op.

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

* chore: inline auth-test image list in e2e-test-local

`.vscode/k3d-preload.txt` is gitignored so it would not exist on a
fresh clone. Inline the three auth-test registry images directly
in the Make target so `make e2e-test-local` is self-contained.

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

* feat: address PR review comments

- Webhook ValidateCuexTemplate now wraps the context in helm.WithDryRun
  so a ComponentDefinition with concrete helm.#Render arguments cannot
  trigger a real chart fetch or install during admission validation.
- helmchart audit ConfigMap keeps `helm.oam.dev/chart` as a label when
  the source string is a valid Kubernetes label value (alphanumeric +
  `.-_`, 1-63 chars); URLs containing `://` or `/` only live in the
  annotation. Preserves existing label selectors for repo-style sources
  without breaking long OCI/HTTPS URLs.
- helm_test.go capture-and-restore singleton.KubeClient in fetchURLChart
  and fetchRepoChart auth Describes so fake clients do not leak into
  later tests in the package.
- utils_test.go swap the defer order so singleton.ReloadClients runs
  before WorkloadCompiler.Reload, otherwise the compiler reload would
  pick up the fake dynamic client and leak fake state.
- e2e.mk pre-load loop separates docker pull and k3d image import with
  `;` rather than `&&`. `set -e` does not abort a for-loop body when a
  command inside an `&&` chain fails, so the old form could continue
  after a failed pull.

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

* style: gofmt AfterAll indentation in helmchart_test.go

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

* feat: enhance Docker Hub credential handling in auth configuration

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

* feat: enhance Docker Hub credential handling in auth configuration

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

* fix(helm-auth): normalize Docker Hub alias for dockerconfigjson Secrets

Cubic flagged that the Docker Hub alias fix in writeOCIRegistryConfigFile
only covered synthesized basic-auth credentials. For verbatim
kubernetes.io/dockerconfigjson Secrets, a user-supplied config keyed
under "registry-1.docker.io" (the OCI pull host) would not be found by
ORAS/Helm, which normalizes to "https://index.docker.io/v1/".

normalizeDockerHubAliases parses the verbatim JSON, and when any of the
three Docker Hub host aliases ("registry-1.docker.io", "index.docker.io",
"docker.io") is keyed but the canonical v1 key is absent, copies the
entry under the canonical key. No-op when:
  - the canonical key is already present
  - no Docker Hub host is involved
  - the JSON is malformed or missing the auths field

Includes 7 new unit specs for the helper covering each alias, the no-op
cases, and malformed input.

Also brings in collateral local-fix changes:
  - pkg/webhook/utils/utils_test.go: register the cue.oam.dev/v1alpha1
    Package GVK in the fake DynamicClient scheme so
    TestValidateCuexTemplate/withCuexPackageImports can resolve the
    test/ext package after the WorkloadCompiler switch.
  - gofmt field-alignment normalization on auth_test.go and
    auth_registry_helpers_test.go (drift caught by check-diff CI).

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

* fix: namespace-default rendered resources, bind chart cache to credentials, surface HTTP 401s clearly, inject auth-test CA in e2e

Four fixes from stress testing the helmchart component:

1. Rendered resources without metadata.namespace landed in vela-system.
   Both code paths now default to releaseNamespace for namespaced kinds:
   the velaLabelPostRenderer (before helm SDK apply) and
   parseManifestResources (before KubeVela's tracker re-applies).
   isClusterScopedKind covers CRDs, ClusterRoles, Namespaces, etc.

2. Cached chart bytes survived credential rotation.
   computeAuthCacheTag hashes Secret.Type + sorted Data into a 16-char
   tag suffixed onto the cache key when auth.secretRef is declared. Any
   Secret edit (or different Secret reference) invalidates the cache and
   forces a fresh registry call that exercises the new credentials at the
   wire. Public charts (no auth) are unaffected.

3. HTTP 401/403 on chart fetch surfaced as YAML/JSON parse errors.
   HTTPGetWithOption now rejects non-2xx responses with
   'HTTP <status>: <body>' instead of returning the raw body for
   downstream parsers to choke on.

4. E2E HTTPS tests against chartmuseum's self-signed cert failed at the
   admission webhook. injectAuthTestCA patches vela-core in BeforeSuite
   with an init container that combines /etc/ssl/certs/ca-certificates.crt
   with testdata/auth/certs/ca.crt into a shared volume and points
   SSL_CERT_FILE at it.

Also normalize Docker Hub host aliases on verbatim
kubernetes.io/dockerconfigjson Secrets (cubic comment), and revert
TestValidateCuexTemplate's fake DynamicClient to the empty-scheme form
that lets it wrap every GVK as Unstructured (CI unit test fix).

Finding 3 (options.wait default) is deferred: schema-level defaults
don't materialize for optional fields carried into _options as a
structural copy. Tracked separately.

Issue 2 from the stress matrix (cache + credential rotation) is also
filed upstream as kubevela/kubevela#7150 for a longer-term
credential-bound cache invalidation design.

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

* fix(helm-auth): RESTMapper scope detection + auth tag binds source URL + drop flaky webhook test case

Address cubic P1 review comments and the unit-test CI failure. isClusterScopedKind only matched well-known built-in kinds; isClusterScopedGVK now asks the RESTMapper first so third-party cluster-scoped CRDs are recognised, with the static allowlist as a fallback. computeAuthCacheTag now folds params.Source and params.RepoURL into the hash so a multi-host dockerconfigjson Secret cannot reuse cached bytes across different registries. TestValidateCuexTemplate/withCuexPackageImports relied on cuex.DefaultCompiler.Reload picking up a fake-client-served Package CRD; since ValidateCuexTemplate now uses velacuex.WorkloadCompiler the fake-client setup does not surface the test/ext package, so the case is dropped (covered transitively by the helm provider unit tests and the e2e suite under helm.WithDryRun).

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

* style: gofmt import order in helm.go (lint + check-diff)

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

* fix(e2e): correct vela-core selector, alpine bundler, harden rollout wait

The label selector app.kubernetes.io/name=vela-core also matches the
cluster-gateway Deployment, so the init container was being appended to
the wrong workload and the controller pod never picked up the test CA.
Switching to the unique controller.oam.dev/name label fixes the routing,
and the diagnostic message at the empty-list branch is updated to point
operators at the new label.

addVolume and addInitContainer now update in place when an entry with
the same name already exists. Previously they silently skipped, which
meant the first patch on a cluster stuck for the lifetime of that
cluster and a corrected image or args could not be picked up by a
re-run.

busybox:1.36 ships without /etc/ssl/certs/ca-certificates.crt, so the
bundler was silently producing an empty combined.crt. alpine:3.18 ships
the public CA roots, so concatenating the auth-test CA onto the system
bundle produces a usable trust store that the main container reads via
SSL_CERT_FILE.

waitForDeploymentsAvailable used to return as soon as DeploymentAvailable
flipped to True and the new RS reached the desired replica count, which
left a window where old-RS pods still satisfied Available while the
controller container was still running with the previous image. The
check now also requires Status.Replicas == Status.UpdatedReplicas,
AvailableReplicas >= specReplicas and UnavailableReplicas == 0, so the
helper only returns once the rollout is fully complete.

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

* test(e2e): gate auth-test setup behind KUBEVELA_E2E_AUTH so other suites stay green

webhook-upgrade-check runs the same test/e2e-test suite as the full e2e
job but with ginkgo --focus-file requiredparam_validation_test.go. The
unconditional setupAuthRegistries in BeforeSuite was bringing up the
ChartMuseum / zot / nginx-bearer stack and patching vela-core for a
focus that did not need any of it, and the patched controller never
finished rolling on the upgrade-check cluster (the helm upgrade in that
job is expected to fail, so vela-core is in a stretched state when our
BeforeSuite tries to patch it).

Re-introduce KUBEVELA_E2E_AUTH=1 as the explicit opt-in. BeforeSuite and
AfterSuite only touch the auth registries when the env var is set, the
Helmchart Auth Describe block skips otherwise, and the make e2e-test
and e2e-test-local targets export the env so the full suite still runs
the auth specs. CI workflows that run a focused subset (like
webhook-upgrade-check) inherit the default off behavior and stop paying
the registry-setup cost.

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

---------

Signed-off-by: Ayush Kumar <aykumar@guidewire.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
2026-05-22 09:09:55 -07:00
28892ccc7e Feat: implement valuesFrom support for helmchart component and update… (#7099)
* feat: implement valuesFrom support for helmchart component and update documentation examples

Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>

* fix: address cubic review feedback on valuesFrom

Three issues raised by cubic AI review on kubevela#7099:

1. docs/examples/helmchart-valuesfrom/secret-and-inline.yaml —
   Expected-result comments used incorrect paths (resources.cpu /
   resources.mem) and values (500m) that did not match the actual CM
   data. Rewrote the narrative to use the real paths
   (resources.limits.cpu / resources.limits.memory) and bundled the
   Secret inline in the manifest so the example is self-contained and
   the expected output is deterministic.

2. docs/examples/helmchart-valuesfrom/secret-and-inline.yaml —
   The Secret was marked optional: true while the narrative required
   it for the merged output to match. Bundled the Secret inline and
   dropped the optional flag, removing the order/timing ambiguity.
   README.md updated to drop the now-redundant "create the Secret
   first" instruction.

3. pkg/cue/cuex/providers/helm/helm.go:Render —
   After removing the unconditional "default" fallback for
   releaseNamespace, Helm could run with an empty namespace when both
   Context.AppNamespace and Release.Namespace were unset (non-normal
   code paths — direct callers, tests, CLI tooling). Restored the
   "default" fallback at the end of the namespace resolution while
   keeping the Application-namespace plumbing for tenant-scoped
   cross-namespace rejection.

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

* feat: add valuesFrom fingerprinting for helmchart components to trigger workflow restarts on ConfigMap/Secret changes

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

* feat: add valuesFrom fingerprinting for helmchart components to trigger workflow restarts on ConfigMap/Secret changes

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

* feat: enhance valuesFrom support for helmchart components with fingerprinting and error handling

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

* docs: clarify cross-namespace restrictions for valuesFrom in helmchart examples

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

* ci: retrigger checks

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

* feat: add publishVersion support to Helm provider for stable release management

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

* feat: improve error handling for application retrieval in Helm provider

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

* ci: retrigger checks

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

* feat: add application publishVersion lookup defense in Helm provider tests

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

---------

Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-authored-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>
2026-04-28 20:02:58 -07:00
+1 bdf647df8c Feat: native helm component and provider (#7080)
* Proof Concept

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

* Cleanup dispatch stages and remove dry run namespaces

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

* Single Health Condition Working

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

* Multiple Health Conditions

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

* Support Empty Health Status

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

* Caching

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

* includes changes from make-reviewable

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

* minor formatting fixes

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

* fix: handles cases where resource is nil

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

* feat: creates chart release before returning rendered resources to kubevela

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

* feat: helm release record via dry-run for helm list visibility

The previous createChartRelease did a real helm install/upgrade which
deployed resources directly, conflicting with KubeVela's dispatch
("exists but not managed by any application" errors). Also, Helm's
lazy client via cli.New().RESTClientGetter() silently wrote to
in-memory storage instead of Kubernetes secrets, so helm list never
showed releases.

Fix: use dry-run install to build a release object without deploying
resources, and bypass Helm's lazy client by creating a direct
Kubernetes clientset wired to helmdriver.NewSecrets. Set KubeVersion
from the real cluster version to pass chart constraints.

Prevent duplicate revisions on repeated reconciles via mutex
serialization and in-memory fingerprint tracking (chartVersion +
values). New revisions are only created when chart version or values
actually change.

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

* fix: override Kubernetes version for kubeVersion validation in chart release

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

* feat: Enhance Helm chart component definition and CUE provider, update API types, and add new examples and documentation.

Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Add Helm uninstall action and optimize install/upgrade with release fingerprinting and KubeVela ownership labels.

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

* feat: Introduce  to prevent resources from being applied while ensuring they are recorded for garbage collection, and apply it to Helm release secrets.

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

* feat: Enhance velaLabelPostRenderer to include Helm ownership annotations and improve cache invalidation logic for Helm releases

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

* feat: Enhance Helm release secret tracking for garbage collection during application deletion and upgrades

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Co-Authored-By: Jerrin Francis <jerrinfrancis7@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>

* feat: Add Helm chart test and application definition for podinfo deployment

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

* feat: Refactor Helm release secret handling and improve metadata filtering for KubeVela adoption

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

* feat: Label existing Helm release secrets with KubeVela ownership for better tracking and cleanup

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

* feat: Remove outdated documentation files for Helm integration and revision management

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

* feat: Add various Helm chart application test and improve test coverage for Helmchart component

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

* feat: Update Helm chart tests to validate deployment list and ensure label presence

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

* feat: Enhance Helm chart tests for resource verification and application health checks

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

* feat: Update Helm chart test scenarios for multi-component health checks and resource configurations

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

* feat: Implement dry-run mode for Helm provider to enhance validation without cluster interaction

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

* feat: Refactor import statements and enhance Helmchart edge case tests for better error handling and validation

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

* feat: Refactor Helm provider methods for improved error handling and retry logic during installation

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

* feat: Improve Helm provider tests and documentation with enhanced assertions and example configurations

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

* feat: Register helm package with cuex.DefaultCompiler for improved import resolution

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

* feat: Remove crossplane application configuration from crossplane-app.yaml

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

* feat: Enhance workload compiler with external package loading and improve Helm chart health checks

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

* feat: Remove unused cuex import and initialization function from helm provider

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

* feat: Replace cuex.DefaultCompiler with localcuex.WorkloadCompiler for improved CUE compilation

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

* feat: Implement dry-run mode for Helm provider functions during validation

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

* test: add unit tests for Helm provider and workflow provider

- Created suite tests for the Helm provider in pkg/cue/cuex/providers/helm/suite_test.go.
- Implemented unit tests for Helm workflow provider in pkg/workflow/providers/helm/helm_test.go.
- Added suite tests for Helm workflow provider in pkg/workflow/providers/helm/suite_test.go.

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

* feat: Add additional health check tests for error scenarios

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

* feat: Enhance health check logic and improve documentation in helmchart definition

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

* feat: Refactor helmchart template for improved readability and structure

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

* docs: remove redundant struct-only tests from helm_test.go

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

* Feat: Implement CUE sanitization for OpenAPI schema generation

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

* feat: Add tests for rendering and fetching Helm charts with dry-run support

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

* feat: Enhance required parameter validation tests with retry logic for webhook synchronization

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

* feat: Improve chart version retrieval by sorting entries and enhancing error messages

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

* feat: Enhance primary output handling for Helm charts with stable ConfigMap metadata

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

* chore: Fix CUE formatting alignment in helmchart definition

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

* feat: Extend timeout for self-healing Helmchart tests to improve reliability

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

* feat: Increase timeout for golangci-lint to enhance linting reliability

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

---------

Signed-off-by: Brian Kane <briankane1@gmail.com>
Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Amit Singh <singhamitch@outlook.com>
Signed-off-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Signed-off-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Signed-off-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>
Signed-off-by: Vishal Kumar <vishal210893@gmail.com>
Signed-off-by: vaibhav0096 <vaibhav.agrawal0096@gmail.com>
Co-authored-by: Brian Kane <briankane1@gmail.com>
Co-authored-by: Amit Singh <singhamitch@outlook.com>
Co-authored-by: Jerrin Francis <jerrinfrancis7@gmail.com>
Co-authored-by: Reetika Malhotra <malhotra.reetika25@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <co@guidewire.com>
Co-authored-by: Chaitanyareddy0702 <chaitanyareddy0702@gmail.com>
Co-authored-by: Vishal Kumar <vishal210893@gmail.com>
Co-authored-by: Anaswara Suresh <anaswarasuresh2212@gmail.com>
Co-authored-by: vaibhav0096 <vaibhav.agrawal0096@gmail.com>
2026-04-15 11:06:33 +01:00
Vishal KumarandGitHub 356ecffe74 Fix: Update duration format handling and enhance StringParam with enum string support (#7053)
* Fix: update duration format handling and enhance StringParam with enum string support

Signed-off-by: Anaswara Suresh M K <anaswarasuresh2212@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>

* date build-push-image workflow and improve image handlinggp

Signed-off-by: Anaswara Suresh M K <anaswarasuresh2212@gmail.com>

* chore: commit to re run pipeline

Signed-off-by: Anaswara Suresh M K <anaswarasuresh2212@gmail.com>

* Feat: add deduplication and field order tracking in collections and array elements

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

* Fix: update test expectation for parameter data count in workflow step

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

* Feat: add tests for label handling and template body in workflow steps

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

* Feat: add tests for label handling and template body in workflow steps

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

* Refactor: rename AllowString to OpenEnum for clarity in enum handling

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

* Chore: format StringParam struct for improved readability

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

---------

Signed-off-by: Anaswara Suresh M K <anaswarasuresh2212@gmail.com>
Signed-off-by: vishal210893 <vishal210893@gmail.com>
Signed-off-by: Vaibhav Agrawal <vaibhav.agrawal0096@gmail.com>
2026-03-03 11:15:58 +00:00
4010da6765 Chore: fix trait definition translation discrepancies (#7044)
* Fix: Enhance CUE generation for optional fields in collection operations

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

* Feat: Add tests for optional fields and conditional logic in trait definitions

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

* Fix: Add namespace field to podAffinityTerm in affinity trait definition

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

* Fix: Add support for ForEachMap operation in CUE generation

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

* Fix: Add tests for ForEachMap let bindings and custom rendering in trait definitions

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

* Fix: Add optional description fields for PatchContainer and enhance parameter generation logic

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

* Fix: Update parameter access to bracket notation in CUE generation and tests

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

* Fix: Implement PatchStrategyAnnotation for CUE generation and enhance condition hoisting logic

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

* Fix: Add SpreadAll operation for array patches and enhance IntParam constraints handling

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

* Fix: Refactor writeSpreadAllOp to improve condition handling and element processing

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

* Fix: Correct nodeSelector spelling and references in affinity trait definition

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

* Fix: Add optional namespace field to podAffinityTerm in affinity trait definition

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

* test: re-trigger test pipelines

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

* ci: retrigger checks

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

* Fix: Update workflow API import paths to use the correct package location

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

* Fix: Update dependency versions in go.mod for improved compatibility

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

* ci: retrigger checks

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

* Fix: Add tests for SpreadAll operation and conditional handling in trait definitions

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

* Fix: Enhance optional field handling for non-string conditions in PatchContainer

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

* Fix: Implement ForceOptional parameter handling to retain optionality with defaults

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

* Fix: Add PatchStrategy field to PatchContainerConfig and update related logic in trait definitions

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

* Fix: Implement PatchFieldBuilder for fluent API construction of PatchContainerField

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

* Fix: Update test descriptions and enhance CUE generation for PatchFields with NotEmpty and IsSet conditions

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

---------

Signed-off-by: Ayush Kumar <ayushshyamkumar888@gmail.com>
Signed-off-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
Co-authored-by: Chaitanya Reddy Onteddu <chaitanyareddy0702@gmail.com>
2026-02-20 14:09:11 -08:00
Brian KaneandGitHub 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
d627ecea2a Chore: Upgrade cuelang version to v0.14.1 (#6877)
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 KumarandGitHub f196d66b5e Fix: Prevent index out-of-bounds in definitions (#6948)
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
James DobsonandGitHub d46ad7e06e Chore: Remove unused parameter 'addonName' from 'vela-cli' workflow step. (#6930)
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
S Code ManandGitHub 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
Brian KaneandGitHub 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
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
glaxmanandGitHub 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
jguionnetandGitHub 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
ClarenceLiuandGitHub 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
Vishal KumarandGitHub 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
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
9f09436359 Feat: add securityContext and podSecurityContext traits (#6666)
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
a5606b7808 Chore: (deps): Update k8s to 1.29 (#6654)
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
Tianxin DongandGitHub 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
Tianxin DongandGitHub 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
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
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
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
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
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
ErayandGitHub 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
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
yyzxwandGitHub 5d8543fd8b Fix: gateway triat miss port name (#6329)
Signed-off-by: yyzxw <1020938856@qq.com>
2023-09-13 10:03:37 +08:00
JohnJanandGitHub d787e95a08 Feat: apply-component supports namespace (#6248) 2023-08-31 14:08:48 +08:00
JohnJanandGitHub 6afe75efa6 Fix: container-ports trait reserve port name (#6274) 2023-08-23 15:09:56 +08:00
qiaozpandGitHub 307d1db36d Chore: revert "Feat: apply-component supports namespace" (#6247) 2023-08-07 15:44:20 +08:00
JohnJanandGitHub 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
JohnJanandGitHub 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
SomefiveandGitHub 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
SomefiveandGitHub 1a6dafafde Feat: support custom cascading gc policy (#6059) 2023-06-01 10:12:10 +08:00
Paul SweeneyandGitHub 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
SomefiveandGitHub 530d7c5bd6 Feat: support resource update policy (#6003) 2023-05-17 16:11:06 +08:00
SomefiveandGitHub 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
DaniandGitHub fb539048fb CUE line spaces and typo (#5997)
Signed-off-by: André Gomes <andre3000pt@gmail.com>
2023-05-16 10:50:31 +08:00
DaniandGitHub 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
Paul SweeneyandGitHub 4a1ed788a0 Fix: Restore service creation for gateway trait (#5978) 2023-05-12 13:32:33 +08:00
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
SomefiveandGitHub bfb673e0c9 Feat: support multi policies (#5811)
Signed-off-by: Somefive <yd219913@alibaba-inc.com>
2023-04-24 17:02:32 +08:00
SomefiveandGitHub 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