From ad1c16e31c67f3cfe9ddd1c1260545b22163ecd5 Mon Sep 17 00:00:00 2001 From: "red-hat-konflux[bot]" <126015336+red-hat-konflux[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 08:39:47 +0000 Subject: [PATCH] chore(deps): update module github.com/argoproj/gitops-engine to v0.7.3 Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com> --- go.mod | 3 +- go.sum | 4 +- .../argoproj/gitops-engine/pkg/diff/diff.go | 673 +- .../gitops-engine/pkg/diff/diff_options.go | 82 +- .../pkg/diff/internal/fieldmanager/README | 2 - .../internal/fieldmanager/borrowed_fields.go | 47 - .../fieldmanager/borrowed_managedfields.go | 248 - .../fieldmanager/borrowed_typeconverter.go | 130 - .../fieldmanager/borrowed_versionconverter.go | 101 - .../pkg/diff/internal/fieldmanager/doc.go | 25 - .../pkg/diff/internal/fieldmanager/wrapper.go | 22 - .../gitops-engine/pkg/health/health.go | 25 +- .../pkg/health/health_apiservice.go | 31 +- .../pkg/health/health_daemonset.go | 46 +- .../pkg/health/health_deployment.go | 16 +- .../gitops-engine/pkg/health/health_hpa.go | 10 +- .../gitops-engine/pkg/health/health_job.go | 26 +- .../gitops-engine/pkg/health/health_pod.go | 5 +- .../gitops-engine/pkg/health/health_pvc.go | 5 +- .../pkg/health/health_replicaset.go | 7 +- .../pkg/health/health_service.go | 5 +- .../pkg/health/health_statefulset.go | 5 +- .../gitops-engine/pkg/sync/common/types.go | 20 +- .../pkg/sync/hook/delete_policy.go | 26 - .../pkg/sync/hook/helm/delete_policy.go | 42 - .../gitops-engine/pkg/sync/hook/helm/hook.go | 9 - .../gitops-engine/pkg/sync/hook/helm/type.go | 47 - .../pkg/sync/hook/helm/weight.go | 19 - .../gitops-engine/pkg/sync/hook/hook.go | 58 - .../pkg/sync/resource/annotations.go | 41 - .../argoproj/gitops-engine/pkg/utils/io/io.go | 5 +- .../gitops-engine/pkg/utils/json/json.go | 25 +- .../gitops-engine/pkg/utils/kube/ctl.go | 94 +- .../gitops-engine/pkg/utils/kube/kube.go | 121 +- .../pkg/utils/kube/resource_ops.go | 347 +- .../pkg/utils/kube/scheme/parser.go | 14300 ---------------- .../pkg/utils/kube/scheme/typed.go | 77 - .../pkg/utils/kube/uniqueprotomodels.go | 191 - .../gitops-engine/pkg/utils/text/text.go | 8 - .../gitops-engine/pkg/utils/tracing/api.go | 2 +- .../pkg/utils/tracing/logging.go | 10 +- .../gitops-engine/pkg/utils/tracing/nop.go | 10 +- .../github.com/evanphx/json-patch/.gitignore | 6 + vendor/github.com/evanphx/json-patch/LICENSE | 25 + .../github.com/evanphx/json-patch/README.md | 315 + .../github.com/evanphx/json-patch/errors.go | 38 + vendor/github.com/evanphx/json-patch/merge.go | 389 + vendor/github.com/evanphx/json-patch/patch.go | 850 + .../klog/v2/internal/verbosity/verbosity.go | 303 - vendor/k8s.io/klog/v2/klogr/README.md | 19 + vendor/k8s.io/klog/v2/klogr/klogr.go | 208 + vendor/k8s.io/klog/v2/textlogger/options.go | 154 - .../k8s.io/klog/v2/textlogger/textlogger.go | 187 - .../klog/v2/textlogger/textlogger_slog.go | 52 - vendor/modules.txt | 14 +- 55 files changed, 2248 insertions(+), 17282 deletions(-) delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/README delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_fields.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_managedfields.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_typeconverter.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_versionconverter.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/doc.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/wrapper.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/delete_policy.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/delete_policy.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/hook.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/type.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/weight.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/hook.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/sync/resource/annotations.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/parser.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/typed.go delete mode 100644 vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go create mode 100644 vendor/github.com/evanphx/json-patch/.gitignore create mode 100644 vendor/github.com/evanphx/json-patch/LICENSE create mode 100644 vendor/github.com/evanphx/json-patch/README.md create mode 100644 vendor/github.com/evanphx/json-patch/errors.go create mode 100644 vendor/github.com/evanphx/json-patch/merge.go create mode 100644 vendor/github.com/evanphx/json-patch/patch.go delete mode 100644 vendor/k8s.io/klog/v2/internal/verbosity/verbosity.go create mode 100644 vendor/k8s.io/klog/v2/klogr/README.md create mode 100644 vendor/k8s.io/klog/v2/klogr/klogr.go delete mode 100644 vendor/k8s.io/klog/v2/textlogger/options.go delete mode 100644 vendor/k8s.io/klog/v2/textlogger/textlogger.go delete mode 100644 vendor/k8s.io/klog/v2/textlogger/textlogger_slog.go diff --git a/go.mod b/go.mod index 50782a789..cfe5be31d 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/Masterminds/sprig/v3 v3.3.0 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/ProtonMail/go-crypto v1.1.6 // indirect - github.com/argoproj/gitops-engine v0.7.1-0.20250905153922-d96c3d51e4c4 // indirect + github.com/argoproj/gitops-engine v0.7.3 // indirect github.com/argoproj/pkg v0.13.7-0.20250305113207-cbc37dc61de5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect @@ -65,6 +65,7 @@ require ( github.com/dlclark/regexp2 v1.11.5 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/evanphx/json-patch v5.9.11+incompatible // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f // indirect github.com/fatih/camelcase v1.0.0 // indirect diff --git a/go.sum b/go.sum index 1612dde96..32ff1116c 100644 --- a/go.sum +++ b/go.sum @@ -47,8 +47,8 @@ github.com/argoproj-labs/argocd-operator v0.15.0 h1:7zSjRchKUBCGBpz4v1pJ/Igmgn5b github.com/argoproj-labs/argocd-operator v0.15.0/go.mod h1:5jApqvt/B2NpI2fFEa7g/8TGUvnesspv86yu1E4hVUI= github.com/argoproj/argo-cd/v3 v3.0.19 h1:RtihsPLt+L3F4TfEHUKCsZlqgmOBv9XAKCHi/wvJ1+w= github.com/argoproj/argo-cd/v3 v3.0.19/go.mod h1:oTCI5r+Hacij94yJto2/mVXAHB8r3375h9SInqbS8EM= -github.com/argoproj/gitops-engine v0.7.1-0.20250905153922-d96c3d51e4c4 h1:OsQxWX8UHdwXuy72Y1Js8gQY3xmOzFEieCSpMoXKFb8= -github.com/argoproj/gitops-engine v0.7.1-0.20250905153922-d96c3d51e4c4/go.mod h1:duVhxDW7M7M7+19IBCVth2REOS11gmqzTWwj4u8N7aQ= +github.com/argoproj/gitops-engine v0.7.3 h1:0ZlRTReAJG5Y1PviQ8ZIJq/+VowxWe2uFwoXqYcbtXU= +github.com/argoproj/gitops-engine v0.7.3/go.mod h1:pRgVpLW7pZqf7n3COJ7UcDepk4cI61LAcJd64Q3Jq/c= github.com/argoproj/pkg v0.13.7-0.20250305113207-cbc37dc61de5 h1:YBoLSjpoaJXaXAldVvBRKJuOPvIXz9UOv6S96gMJM/Q= github.com/argoproj/pkg v0.13.7-0.20250305113207-cbc37dc61de5/go.mod h1:ebVOzFJphdN1p6EG2mIMECv/3Rk/almSaxIYuFAmsSw= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff.go index efe15f227..8c506eeb8 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff.go @@ -6,38 +6,25 @@ package diff import ( "bytes" - "context" - "encoding/base64" "encoding/json" "errors" "fmt" "reflect" - jsonpatch "github.com/evanphx/json-patch/v5" + jsonpatch "github.com/evanphx/json-patch" corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/util/jsonmergepatch" - "k8s.io/apimachinery/pkg/util/managedfields" "k8s.io/apimachinery/pkg/util/strategicpatch" "k8s.io/client-go/kubernetes/scheme" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" - "sigs.k8s.io/structured-merge-diff/v4/merge" - "sigs.k8s.io/structured-merge-diff/v4/typed" "github.com/argoproj/gitops-engine/internal/kubernetes_vendor/pkg/api/v1/endpoints" - "github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager" - "github.com/argoproj/gitops-engine/pkg/sync/resource" jsonutil "github.com/argoproj/gitops-engine/pkg/utils/json" - gescheme "github.com/argoproj/gitops-engine/pkg/utils/kube/scheme" + kubescheme "github.com/argoproj/gitops-engine/pkg/utils/kube/scheme" ) -const ( - couldNotMarshalErrMsg = "Could not unmarshal to object of type %s: %v" - AnnotationLastAppliedConfig = "kubectl.kubernetes.io/last-applied-configuration" - replacement = "++++++++" -) +const couldNotMarshalErrMsg = "Could not unmarshal to object of type %s: %v" // Holds diffing result of two resources type DiffResult struct { @@ -55,9 +42,10 @@ type DiffResultList struct { Modified bool } -type noopNormalizer struct{} +type noopNormalizer struct { +} -func (n *noopNormalizer) Normalize(_ *unstructured.Unstructured) error { +func (n *noopNormalizer) Normalize(un *unstructured.Unstructured) error { return nil } @@ -83,410 +71,27 @@ func Diff(config, live *unstructured.Unstructured, opts ...Option) (*DiffResult, live = remarshal(live, o) Normalize(live, opts...) } - - if o.serverSideDiff { - r, err := ServerSideDiff(config, live, opts...) - if err != nil { - return nil, fmt.Errorf("error calculating server side diff: %w", err) - } - return r, nil - } - - // TODO The two variables bellow are necessary because there is a cyclic - // dependency with the kube package that blocks the usage of constants - // from common package. common package needs to be refactored and exclude - // dependency from kube. - syncOptAnnotation := "argocd.argoproj.io/sync-options" - ssaAnnotation := "ServerSideApply=true" - - // structuredMergeDiff is mainly used as a feature flag to enable - // calculating diffs using the structured-merge-diff library - // used in k8s while performing server-side applies. It checks the - // given diff Option or if the desired state resource has the - // Server-Side apply sync option annotation enabled. - structuredMergeDiff := o.structuredMergeDiff || - (config != nil && resource.HasAnnotationOption(config, syncOptAnnotation, ssaAnnotation)) - if structuredMergeDiff { - r, err := StructuredMergeDiff(config, live, o.gvkParser, o.manager) - if err != nil { - return nil, fmt.Errorf("error calculating structured merge diff: %w", err) - } - return r, nil - } orig, err := GetLastAppliedConfigAnnotation(live) if err != nil { o.log.V(1).Info(fmt.Sprintf("Failed to get last applied configuration: %v", err)) - } else if orig != nil && config != nil { - Normalize(orig, opts...) - dr, err := ThreeWayDiff(orig, config, live) - if err == nil { - return dr, nil - } - o.log.V(1).Info(fmt.Sprintf("three-way diff calculation failed: %v. Falling back to two-way diff", err)) - } - return TwoWayDiff(config, live) -} - -// ServerSideDiff will execute a k8s server-side apply in dry-run mode with the -// given config. The result will be compared with given live resource to determine -// diff. If config or live are nil it means resource creation or deletion. In this -// no call will be made to kube-api and a simple diff will be returned. -func ServerSideDiff(config, live *unstructured.Unstructured, opts ...Option) (*DiffResult, error) { - if live != nil && config != nil { - result, err := serverSideDiff(config, live, opts...) - if err != nil { - return nil, fmt.Errorf("serverSideDiff error: %w", err) - } - return result, nil - } - // Currently, during resource creation a shallow diff (non ServerSide apply - // based) will be returned. The reasons are: - // - Saves 1 additional call to KubeAPI - // - Much lighter/faster diff - // - This is the existing behaviour users are already used to - // - No direct benefit to the user - result, err := handleResourceCreateOrDeleteDiff(config, live) - if err != nil { - return nil, fmt.Errorf("error handling resource creation or deletion: %w", err) - } - return result, nil -} - -// ServerSideDiff will execute a k8s server-side apply in dry-run mode with the -// given config. The result will be compared with given live resource to determine -// diff. Modifications done by mutation webhooks are removed from the diff by default. -// This behaviour can be customized with Option.WithIgnoreMutationWebhook. -func serverSideDiff(config, live *unstructured.Unstructured, opts ...Option) (*DiffResult, error) { - o := applyOptions(opts) - if o.serverSideDryRunner == nil { - return nil, errors.New("serverSideDryRunner is null") - } - predictedLiveStr, err := o.serverSideDryRunner.Run(context.Background(), config, o.manager) - if err != nil { - return nil, fmt.Errorf("error running server side apply in dryrun mode for resource %s/%s: %w", config.GetKind(), config.GetName(), err) - } - predictedLive, err := jsonStrToUnstructured(predictedLiveStr) - if err != nil { - return nil, fmt.Errorf("error converting json string to unstructured for resource %s/%s: %w", config.GetKind(), config.GetName(), err) - } - - if o.ignoreMutationWebhook { - predictedLive, err = removeWebhookMutation(predictedLive, live, o.gvkParser, o.manager) - if err != nil { - return nil, fmt.Errorf("error removing non config mutations for resource %s/%s: %w", config.GetKind(), config.GetName(), err) - } - } - - Normalize(predictedLive, opts...) - unstructured.RemoveNestedField(predictedLive.Object, "metadata", "managedFields") - - predictedLiveBytes, err := json.Marshal(predictedLive) - if err != nil { - return nil, fmt.Errorf("error marshaling predicted live for resource %s/%s: %w", config.GetKind(), config.GetName(), err) - } - - unstructured.RemoveNestedField(live.Object, "metadata", "managedFields") - liveBytes, err := json.Marshal(live) - if err != nil { - return nil, fmt.Errorf("error marshaling live resource %s/%s: %w", config.GetKind(), config.GetName(), err) - } - return buildDiffResult(predictedLiveBytes, liveBytes), nil -} - -// removeWebhookMutation will compare the predictedLive with live to identify changes done by mutation webhooks. -// Webhook mutations are removed from predictedLive by removing all fields which are not managed by the given 'manager'. -// At this step, we will only have the fields that are managed by the given 'manager'. -// It is then merged with the live state and re-assigned to predictedLive. This means that any -// fields not managed by the specified manager will be reverted with their state from live, including any webhook mutations. -// If the given predictedLive does not have the managedFields, an error will be returned. -func removeWebhookMutation(predictedLive, live *unstructured.Unstructured, gvkParser *managedfields.GvkParser, manager string) (*unstructured.Unstructured, error) { - plManagedFields := predictedLive.GetManagedFields() - if len(plManagedFields) == 0 { - return nil, fmt.Errorf("predictedLive for resource %s/%s must have the managedFields", predictedLive.GetKind(), predictedLive.GetName()) - } - gvk := predictedLive.GetObjectKind().GroupVersionKind() - pt := gvkParser.Type(gvk) - if pt == nil { - return nil, fmt.Errorf("unable to resolve parseableType for GroupVersionKind: %s", gvk) - } - - typedPredictedLive, err := pt.FromUnstructured(predictedLive.Object) - if err != nil { - return nil, fmt.Errorf("error converting predicted live state from unstructured to %s: %w", gvk, err) - } - - typedLive, err := pt.FromUnstructured(live.Object) - if err != nil { - return nil, fmt.Errorf("error converting live state from unstructured to %s: %w", gvk, err) - } - - // Initialize an empty fieldpath.Set to aggregate managed fields for the specified manager - managerFieldsSet := &fieldpath.Set{} - - // Iterate over all ManagedFields entries in predictedLive - for _, mfEntry := range plManagedFields { - managedFieldsSet := &fieldpath.Set{} - err := managedFieldsSet.FromJSON(bytes.NewReader(mfEntry.FieldsV1.Raw)) - if err != nil { - return nil, fmt.Errorf("error building managedFields set: %w", err) - } - if mfEntry.Manager == manager { - // Union the fields with the aggregated set - managerFieldsSet = managerFieldsSet.Union(managedFieldsSet) - } - } - - if managerFieldsSet.Empty() { - return nil, fmt.Errorf("no managed fields found for manager: %s", manager) - } - - predictedLiveFieldSet, err := typedPredictedLive.ToFieldSet() - if err != nil { - return nil, fmt.Errorf("error converting predicted live state to FieldSet: %w", err) - } - - // Remove fields from predicted live that are not managed by the provided manager - nonArgoFieldsSet := predictedLiveFieldSet.Difference(managerFieldsSet) - - // Compare the predicted live with the live resource - comparison, err := typedLive.Compare(typedPredictedLive) - if err != nil { - return nil, fmt.Errorf("error comparing predicted resource to live resource: %w", err) - } - - if comparison.Removed != nil && !comparison.Removed.Empty() { - // exclude the removed fields not owned by this manager from the comparison - comparison.Removed = comparison.Removed.Difference(nonArgoFieldsSet) - } - - // In case any of the removed fields cause schema violations, we will keep those fields - nonArgoFieldsSet = safelyRemoveFieldsSet(typedPredictedLive, nonArgoFieldsSet) - typedPredictedLive = typedPredictedLive.RemoveItems(nonArgoFieldsSet) - - // Apply the predicted live state to the live state to get a diff without mutation webhook fields - typedPredictedLive, err = typedLive.Merge(typedPredictedLive) - - // After applying the predicted live to live state, this would cause any removed fields to be restored. - // We need to re-remove these from predicted live. - typedPredictedLive = typedPredictedLive.RemoveItems(comparison.Removed) - - if err != nil { - return nil, fmt.Errorf("error applying predicted live to live state: %w", err) - } - - plu := typedPredictedLive.AsValue().Unstructured() - pl, ok := plu.(map[string]any) - if !ok { - return nil, fmt.Errorf("error converting live typedValue: expected map got %T", plu) - } - return &unstructured.Unstructured{Object: pl}, nil -} - -// safelyRemoveFieldSet will validate if removing the fieldsToRemove set from predictedLive maintains -// a valid schema. If removing a field in fieldsToRemove is invalid and breaks the schema, it is not safe -// to remove and will be skipped from removal from predictedLive. -func safelyRemoveFieldsSet(predictedLive *typed.TypedValue, fieldsToRemove *fieldpath.Set) *fieldpath.Set { - // In some cases, we cannot remove fields due to violation of the predicted live schema. In such cases we validate the removal - // of each field and only include it if the removal is valid. - testPredictedLive := predictedLive.RemoveItems(fieldsToRemove) - err := testPredictedLive.Validate() - if err != nil { - adjustedFieldsToRemove := fieldpath.NewSet() - fieldsToRemove.Iterate(func(p fieldpath.Path) { - singleFieldSet := fieldpath.NewSet(p) - testSingleRemoval := predictedLive.RemoveItems(singleFieldSet) - // Check if removing this single field maintains a valid schema - if testSingleRemoval.Validate() == nil { - // If valid, add this field to the adjusted set to remove - adjustedFieldsToRemove.Insert(p) + } else { + if orig != nil && config != nil { + Normalize(orig, opts...) + dr, err := ThreeWayDiff(orig, config, live) + if err == nil { + return dr, nil } - }) - return adjustedFieldsToRemove - } - // If no violations, return the original set to remove - return fieldsToRemove -} - -func jsonStrToUnstructured(jsonString string) (*unstructured.Unstructured, error) { - res := make(map[string]any) - err := json.Unmarshal([]byte(jsonString), &res) - if err != nil { - return nil, fmt.Errorf("unmarshal error: %w", err) - } - return &unstructured.Unstructured{Object: res}, nil -} - -// StructuredMergeDiff will calculate the diff using the structured-merge-diff -// k8s library (https://github.com/kubernetes-sigs/structured-merge-diff). -func StructuredMergeDiff(config, live *unstructured.Unstructured, gvkParser *managedfields.GvkParser, manager string) (*DiffResult, error) { - if live != nil && config != nil { - params := &SMDParams{ - config: config, - live: live, - gvkParser: gvkParser, - manager: manager, - } - return structuredMergeDiff(params) - } - return handleResourceCreateOrDeleteDiff(config, live) -} - -// SMDParams defines the parameters required by the structuredMergeDiff -// function -type SMDParams struct { - config *unstructured.Unstructured - live *unstructured.Unstructured - gvkParser *managedfields.GvkParser - manager string -} - -func structuredMergeDiff(p *SMDParams) (*DiffResult, error) { - gvk := p.config.GetObjectKind().GroupVersionKind() - pt := gescheme.ResolveParseableType(gvk, p.gvkParser) - if pt == nil { - return nil, fmt.Errorf("unable to resolve parseableType for GroupVersionKind: %s", gvk) - } - - // Build typed value from live and config unstructures - tvLive, err := pt.FromUnstructured(p.live.Object) - if err != nil { - return nil, fmt.Errorf("error building typed value from live resource: %w", err) - } - tvConfig, err := pt.FromUnstructured(p.config.Object) - if err != nil { - return nil, fmt.Errorf("error building typed value from config resource: %w", err) - } - - // Invoke the apply function to calculate the diff using - // the structured-merge-diff library - mergedLive, err := apply(tvConfig, tvLive, p) - if err != nil { - return nil, fmt.Errorf("error calculating diff: %w", err) - } - - // When mergedLive is nil it means that there is no change - if mergedLive == nil { - liveBytes, err := json.Marshal(p.live) - if err != nil { - return nil, fmt.Errorf("error marshaling live resource: %w", err) + o.log.V(1).Info(fmt.Sprintf("three-way diff calculation failed: %v. Falling back to two-way diff", err)) } - // In this case diff result will have live state for both, - // predicted and live. - return buildDiffResult(liveBytes, liveBytes), nil - } - - // Normalize merged live - predictedLive, err := normalizeTypedValue(mergedLive) - if err != nil { - return nil, fmt.Errorf("error applying default values in predicted live: %w", err) - } - - // Normalize live - taintedLive, err := normalizeTypedValue(tvLive) - if err != nil { - return nil, fmt.Errorf("error applying default values in live: %w", err) - } - - return buildDiffResult(predictedLive, taintedLive), nil -} - -// apply will build all the dependency required to invoke the smd.merge.updater.Apply -// to correctly calculate the diff with the same logic used in k8s with server-side -// apply. -func apply(tvConfig, tvLive *typed.TypedValue, p *SMDParams) (*typed.TypedValue, error) { - // Build the structured-merge-diff Updater - updater := merge.Updater{ - Converter: fieldmanager.NewVersionConverter(p.gvkParser, scheme.Scheme, p.config.GroupVersionKind().GroupVersion()), - } - - // Build a list of managers and which API version they own - managed, err := fieldmanager.DecodeManagedFields(p.live.GetManagedFields()) - if err != nil { - return nil, fmt.Errorf("error decoding managed fields: %w", err) - } - - // Use the desired manifest to extract the target resource version - version := fieldpath.APIVersion(p.config.GetAPIVersion()) - - // The manager string needs to be converted to the internal manager - // key used inside structured-merge-diff apply logic - managerKey, err := buildManagerInfoForApply(p.manager) - if err != nil { - return nil, fmt.Errorf("error building manager info: %w", err) - } - - // Finally invoke Apply to execute the same function used in k8s - // server-side applies - mergedLive, _, err := updater.Apply(tvLive, tvConfig, version, managed.Fields(), managerKey, true) - if err != nil { - return nil, fmt.Errorf("error while running updater.Apply: %w", err) - } - return mergedLive, err -} - -func buildManagerInfoForApply(manager string) (string, error) { - managerInfo := metav1.ManagedFieldsEntry{ - Manager: manager, - Operation: metav1.ManagedFieldsOperationApply, - } - return fieldmanager.BuildManagerIdentifier(&managerInfo) -} - -// normalizeTypedValue will prepare the given tv so it can be used in diffs by: -// - removing last-applied-configuration annotation -// - applying default values -func normalizeTypedValue(tv *typed.TypedValue) ([]byte, error) { - ru := tv.AsValue().Unstructured() - r, ok := ru.(map[string]any) - if !ok { - return nil, fmt.Errorf("error converting result typedValue: expected map got %T", ru) - } - resultUn := &unstructured.Unstructured{Object: r} - unstructured.RemoveNestedField(resultUn.Object, "metadata", "annotations", AnnotationLastAppliedConfig) - - resultBytes, err := json.Marshal(resultUn) - if err != nil { - return nil, fmt.Errorf("error while marshaling merged unstructured: %w", err) - } - - obj, err := scheme.Scheme.New(resultUn.GroupVersionKind()) - if err == nil { - err := json.Unmarshal(resultBytes, &obj) - if err != nil { - return nil, fmt.Errorf("error unmarshaling merged bytes into object: %w", err) - } - resultBytes, err = patchDefaultValues(resultBytes, obj) - if err != nil { - return nil, fmt.Errorf("error applying defaults: %w", err) - } - } - return resultBytes, nil -} - -func buildDiffResult(predictedBytes []byte, liveBytes []byte) *DiffResult { - return &DiffResult{ - Modified: string(liveBytes) != string(predictedBytes), - NormalizedLive: liveBytes, - PredictedLive: predictedBytes, } + return TwoWayDiff(config, live) } // TwoWayDiff performs a three-way diff and uses specified config as a recently applied config func TwoWayDiff(config, live *unstructured.Unstructured) (*DiffResult, error) { if live != nil && config != nil { return ThreeWayDiff(config, config.DeepCopy(), live) - } - return handleResourceCreateOrDeleteDiff(config, live) -} - -// handleResourceCreateOrDeleteDiff will calculate the diff in case of resource creation or -// deletion. Expects that config or live is nil which means that the resource is being -// created or being deleted. Will return error if both are nil or if none are nil. -func handleResourceCreateOrDeleteDiff(config, live *unstructured.Unstructured) (*DiffResult, error) { - if live != nil && config != nil { - return nil, errors.New("unnexpected state: expected live or config to be null: not create or delete operation") - } - if live != nil { + } else if live != nil { liveData, err := json.Marshal(live) if err != nil { return nil, err @@ -498,16 +103,18 @@ func handleResourceCreateOrDeleteDiff(config, live *unstructured.Unstructured) ( return nil, err } return &DiffResult{Modified: true, NormalizedLive: []byte("null"), PredictedLive: predictedLiveData}, nil + } else { + return nil, errors.New("both live and config are null objects") } - return nil, errors.New("both live and config are null objects") } // generateSchemeDefaultPatch runs the scheme default functions on the given parameter, and // return a patch representing the delta vs the origin parameter object. func generateSchemeDefaultPatch(kubeObj runtime.Object) ([]byte, error) { + // 1) Call scheme defaulter functions on a clone of our k8s resource object patched := kubeObj.DeepCopyObject() - gescheme.Scheme.Default(patched) + kubescheme.Scheme.Default(patched) // 2) Compare the original object (pre-defaulter funcs) with patched object (post-default funcs), // and generate a patch that can be applied against the original @@ -530,6 +137,7 @@ func generateSchemeDefaultPatch(kubeObj runtime.Object) ([]byte, error) { // applyPatch executes kubernetes server side patch: // uses corresponding data structure, applies appropriate defaults and executes strategic merge patch func applyPatch(liveBytes []byte, patchBytes []byte, newVersionedObject func() (runtime.Object, error)) ([]byte, []byte, error) { + // Construct an empty instance of the object we are applying a patch against predictedLive, err := newVersionedObject() if err != nil { @@ -545,6 +153,7 @@ func applyPatch(liveBytes []byte, patchBytes []byte, newVersionedObject func() ( // Unmarshal predictedLiveBytes into predictedLive; note that this will discard JSON fields in predictedLiveBytes // which are not in the predictedLive struct. predictedLive is thus "tainted" and we should not use it directly. if err = json.Unmarshal(predictedLiveBytes, &predictedLive); err == nil { + // 1) Calls 'kubescheme.Scheme.Default(predictedLive)' and generates a patch containing the delta of that // call, which can then be applied to predictedLiveBytes. // @@ -565,10 +174,10 @@ func applyPatch(liveBytes []byte, patchBytes []byte, newVersionedObject func() ( return nil, nil, err } - // 3) Unmarshall into a map[string]any, then back into byte[], to ensure the fields + // 3) Unmarshall into a map[string]interface{}, then back into byte[], to ensure the fields // are sorted in a consistent order (we do the same below, so that they can be // lexicographically compared with one another) - var result map[string]any + var result map[string]interface{} err = json.Unmarshal([]byte(predictedLiveBytes), &result) if err != nil { return nil, nil, err @@ -588,6 +197,7 @@ func applyPatch(liveBytes []byte, patchBytes []byte, newVersionedObject func() ( // However, this is much less likely since liveBytes is coming from a live k8s instance which // has already accepted those resources. Regardless, we still treat 'live' as tainted. if err = json.Unmarshal(liveBytes, live); err == nil { + // As above, indirectly apply the schema defaults against liveBytes patch, err := generateSchemeDefaultPatch(live) if err != nil { @@ -599,7 +209,7 @@ func applyPatch(liveBytes []byte, patchBytes []byte, newVersionedObject func() ( } // Ensure the fields are sorted in a consistent order (as above) - var result map[string]any + var result map[string]interface{} err = json.Unmarshal([]byte(liveBytes), &result) if err != nil { return nil, nil, err @@ -608,42 +218,10 @@ func applyPatch(liveBytes []byte, patchBytes []byte, newVersionedObject func() ( if err != nil { return nil, nil, err } - } - - return liveBytes, predictedLiveBytes, nil -} - -// patchDefaultValues will calculate the default values patch based on the -// given obj. It will apply the patch using the given objBytes and return -// the new patched object. -func patchDefaultValues(objBytes []byte, obj runtime.Object) ([]byte, error) { - // 1) Call 'kubescheme.Scheme.Default(obj)' to generate a patch containing - // the default values for the given scheme. - patch, err := generateSchemeDefaultPatch(obj) - if err != nil { - return nil, fmt.Errorf("error generating patch for default values: %w", err) - } - - // 2) Apply the patch with default values in objBytes. - patchedBytes, err := strategicpatch.StrategicMergePatch(objBytes, patch, obj) - if err != nil { - return nil, fmt.Errorf("error applying patch for default values: %w", err) - } - // 3) Unmarshall into a map[string]any, then back into byte[], to - // ensure the fields are sorted in a consistent order (we do the same below, - // so that they can be lexicographically compared with one another). - var result map[string]any - err = json.Unmarshal([]byte(patchedBytes), &result) - if err != nil { - return nil, fmt.Errorf("error unmarshaling patched bytes: %w", err) - } - patchedBytes, err = json.Marshal(result) - if err != nil { - return nil, fmt.Errorf("error marshaling patched bytes: %w", err) } - return patchedBytes, nil + return liveBytes, predictedLiveBytes, nil } // ThreeWayDiff performs a diff with the understanding of how to incorporate the @@ -681,7 +259,35 @@ func ThreeWayDiff(orig, config, live *unstructured.Unstructured) (*DiffResult, e } } - return buildDiffResult(predictedLiveBytes, liveBytes), nil + predictedLive := &unstructured.Unstructured{} + err = json.Unmarshal(predictedLiveBytes, predictedLive) + if err != nil { + return nil, err + } + + // 3. compare live and expected live object + dr := DiffResult{ + PredictedLive: predictedLiveBytes, + NormalizedLive: liveBytes, + Modified: string(predictedLiveBytes) != string(liveBytes), + } + return &dr, nil +} + +// stripTypeInformation strips any type information (e.g. float64 vs. int) from the unstructured +// object by remarshalling the object. This is important for diffing since it will cause godiff +// to report a false difference. +func stripTypeInformation(un *unstructured.Unstructured) *unstructured.Unstructured { + unBytes, err := json.Marshal(un) + if err != nil { + panic(err) + } + var newUn unstructured.Unstructured + err = json.Unmarshal(unBytes, &newUn) + if err != nil { + panic(err) + } + return &newUn } // removeNamespaceAnnotation remove the namespace and an empty annotation map from the metadata. @@ -691,14 +297,14 @@ func ThreeWayDiff(orig, config, live *unstructured.Unstructured) (*DiffResult, e func removeNamespaceAnnotation(orig *unstructured.Unstructured) *unstructured.Unstructured { orig = orig.DeepCopy() if metadataIf, ok := orig.Object["metadata"]; ok { - metadata := metadataIf.(map[string]any) + metadata := metadataIf.(map[string]interface{}) delete(metadata, "namespace") if annotationsIf, ok := metadata["annotations"]; ok { shouldDelete := false if annotationsIf == nil { shouldDelete = true } else { - annotation, ok := annotationsIf.(map[string]any) + annotation, ok := annotationsIf.(map[string]interface{}) if ok && len(annotation) == 0 { shouldDelete = true } @@ -763,21 +369,22 @@ func threeWayMergePatch(orig, config, live *unstructured.Unstructured) ([]byte, return scheme.Scheme.New(orig.GroupVersionKind()) } return patch, newVersionedObject, nil - } - // Remove defaulted fields from the live object. - // This subtracts any extra fields in the live object which are not present in last-applied-configuration. - live = &unstructured.Unstructured{Object: jsonutil.RemoveMapFields(orig.Object, live.Object)} + } else { + // Remove defaulted fields from the live object. + // This subtracts any extra fields in the live object which are not present in last-applied-configuration. + live = &unstructured.Unstructured{Object: jsonutil.RemoveMapFields(orig.Object, live.Object)} - liveBytes, err := json.Marshal(live.Object) - if err != nil { - return nil, nil, err - } + liveBytes, err := json.Marshal(live.Object) + if err != nil { + return nil, nil, err + } - patch, err := jsonmergepatch.CreateThreeWayJSONMergePatch(origBytes, configBytes, liveBytes) - if err != nil { - return nil, nil, err + patch, err := jsonmergepatch.CreateThreeWayJSONMergePatch(origBytes, configBytes, liveBytes) + if err != nil { + return nil, nil, err + } + return patch, nil, nil } - return patch, nil, nil } func GetLastAppliedConfigAnnotation(live *unstructured.Unstructured) (*unstructured.Unstructured, error) { @@ -792,7 +399,7 @@ func GetLastAppliedConfigAnnotation(live *unstructured.Unstructured) (*unstructu var obj unstructured.Unstructured err := json.Unmarshal([]byte(lastAppliedStr), &obj) if err != nil { - return nil, fmt.Errorf("failed to unmarshal %s in %s: %w", corev1.LastAppliedConfigAnnotation, live.GetName(), err) + return nil, fmt.Errorf("failed to unmarshal %s in %s: %v", corev1.LastAppliedConfigAnnotation, live.GetName(), err) } return &obj, nil } @@ -834,12 +441,11 @@ func Normalize(un *unstructured.Unstructured, opts ...Option) { unstructured.RemoveNestedField(un.Object, "metadata", "creationTimestamp") gvk := un.GroupVersionKind() - switch { - case gvk.Group == "" && gvk.Kind == "Secret": + if gvk.Group == "" && gvk.Kind == "Secret" { NormalizeSecret(un, opts...) - case gvk.Group == "rbac.authorization.k8s.io" && (gvk.Kind == "ClusterRole" || gvk.Kind == "Role"): + } else if gvk.Group == "rbac.authorization.k8s.io" && (gvk.Kind == "ClusterRole" || gvk.Kind == "Role") { normalizeRole(un, o) - case gvk.Group == "" && gvk.Kind == "Endpoints": + } else if gvk.Group == "" && gvk.Kind == "Endpoints" { normalizeEndpoint(un, o) } @@ -859,32 +465,6 @@ func NormalizeSecret(un *unstructured.Unstructured, opts ...Option) { if gvk.Group != "" || gvk.Kind != "Secret" { return } - - // move stringData to data section - if stringData, found, err := unstructured.NestedMap(un.Object, "stringData"); found && err == nil { - var data map[string]any - data, found, _ = unstructured.NestedMap(un.Object, "data") - if !found { - data = make(map[string]any) - } - - // base64 encode string values and add non-string values as is. - // This ensures that the apply fails if the secret is invalid. - for k, v := range stringData { - strVal, ok := v.(string) - if ok { - data[k] = base64.StdEncoding.EncodeToString([]byte(strVal)) - } else { - data[k] = v - } - } - - err := unstructured.SetNestedField(un.Object, data, "data") - if err == nil { - delete(un.Object, "stringData") - } - } - o := applyOptions(opts) var secret corev1.Secret err := runtime.DefaultUnstructuredConverter.FromUnstructured(un.Object, &secret) @@ -898,6 +478,15 @@ func NormalizeSecret(un *unstructured.Unstructured, opts ...Option) { secret.Data[k] = []byte("") } } + if len(secret.StringData) > 0 { + if secret.Data == nil { + secret.Data = make(map[string][]byte) + } + for k, v := range secret.StringData { + secret.Data[k] = []byte(v) + } + delete(un.Object, "stringData") + } newObj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(&secret) if err != nil { o.log.Error(err, "object unable to convert from secret") @@ -963,7 +552,7 @@ func normalizeRole(un *unstructured.Unstructured, o options) { if o.ignoreAggregatedRoles { aggrIf, ok := un.Object["aggregationRule"] if ok { - _, ok = aggrIf.(map[string]any) + _, ok = aggrIf.(map[string]interface{}) if !ok { o.log.Info(fmt.Sprintf("Malformed aggregationRule in resource '%s', won't modify.", un.GetName())) } else { @@ -976,17 +565,18 @@ func normalizeRole(un *unstructured.Unstructured, o options) { if !ok { return } - rules, ok := rulesIf.([]any) + rules, ok := rulesIf.([]interface{}) if !ok { return } if rules != nil && len(rules) == 0 { un.Object["rules"] = nil } + } // CreateTwoWayMergePatch is a helper to construct a two-way merge patch from objects (instead of bytes) -func CreateTwoWayMergePatch(orig, new, dataStruct any) ([]byte, bool, error) { +func CreateTwoWayMergePatch(orig, new, dataStruct interface{}) ([]byte, bool, error) { origBytes, err := json.Marshal(orig) if err != nil { return nil, false, err @@ -1002,13 +592,13 @@ func CreateTwoWayMergePatch(orig, new, dataStruct any) ([]byte, bool, error) { return patch, string(patch) != "{}", nil } -// HideSecretData replaces secret data & optional annotations values in specified target, live secrets and in last applied configuration of live secret with plus(+). Also preserves differences between -// target, live and last applied config values. E.g. if all three are equal the values would be replaced with same number of plus(+). If all are different then number of plus(+) +// HideSecretData replaces secret data values in specified target, live secrets and in last applied configuration of live secret with stars. Also preserves differences between +// target, live and last applied config values. E.g. if all three are equal the values would be replaced with same number of stars. If all the are different then number of stars // in replacement should be different. -func HideSecretData(target *unstructured.Unstructured, live *unstructured.Unstructured, hideAnnotations map[string]bool) (*unstructured.Unstructured, *unstructured.Unstructured, error) { - var liveLastAppliedAnnotation *unstructured.Unstructured +func HideSecretData(target *unstructured.Unstructured, live *unstructured.Unstructured) (*unstructured.Unstructured, *unstructured.Unstructured, error) { + var orig *unstructured.Unstructured if live != nil { - liveLastAppliedAnnotation, _ = GetLastAppliedConfigAnnotation(live) + orig, _ = GetLastAppliedConfigAnnotation(live) live = live.DeepCopy() } if target != nil { @@ -1016,7 +606,7 @@ func HideSecretData(target *unstructured.Unstructured, live *unstructured.Unstru } keys := map[string]bool{} - for _, obj := range []*unstructured.Unstructured{target, live, liveLastAppliedAnnotation} { + for _, obj := range []*unstructured.Unstructured{target, live, orig} { if obj == nil { continue } @@ -1028,61 +618,29 @@ func HideSecretData(target *unstructured.Unstructured, live *unstructured.Unstru } } - var err error - target, live, liveLastAppliedAnnotation, err = hide(target, live, liveLastAppliedAnnotation, keys, "data") - if err != nil { - return nil, nil, err - } - - target, live, liveLastAppliedAnnotation, err = hide(target, live, liveLastAppliedAnnotation, hideAnnotations, "metadata", "annotations") - if err != nil { - return nil, nil, err - } - - if live != nil && liveLastAppliedAnnotation != nil { - annotations := live.GetAnnotations() - if annotations == nil { - annotations = make(map[string]string) - } - // special case: hide "kubectl.kubernetes.io/last-applied-configuration" annotation - if _, ok := hideAnnotations[corev1.LastAppliedConfigAnnotation]; ok { - annotations[corev1.LastAppliedConfigAnnotation] = replacement - } else { - lastAppliedData, err := json.Marshal(liveLastAppliedAnnotation) - if err != nil { - return nil, nil, fmt.Errorf("error marshaling json: %w", err) - } - annotations[corev1.LastAppliedConfigAnnotation] = string(lastAppliedData) - } - live.SetAnnotations(annotations) - } - return target, live, nil -} - -func hide(target, live, liveLastAppliedAnnotation *unstructured.Unstructured, keys map[string]bool, fields ...string) (*unstructured.Unstructured, *unstructured.Unstructured, *unstructured.Unstructured, error) { for k := range keys { // we use "+" rather than the more common "*" - nextReplacement := replacement + nextReplacement := "++++++++" valToReplacement := make(map[string]string) - for _, obj := range []*unstructured.Unstructured{target, live, liveLastAppliedAnnotation} { - var data map[string]any + for _, obj := range []*unstructured.Unstructured{target, live, orig} { + var data map[string]interface{} if obj != nil { // handles an edge case when secret data has nil value // https://github.com/argoproj/argo-cd/issues/5584 - dataValue, ok, _ := unstructured.NestedFieldCopy(obj.Object, fields...) + dataValue, ok := obj.Object["data"] if ok { if dataValue == nil { continue } } var err error - data, _, err = unstructured.NestedMap(obj.Object, fields...) + data, _, err = unstructured.NestedMap(obj.Object, "data") if err != nil { - return nil, nil, nil, fmt.Errorf("unstructured.NestedMap error: %w", err) + return nil, nil, fmt.Errorf("unstructured.NestedMap error: %s", err) } } if data == nil { - data = make(map[string]any) + data = make(map[string]interface{}) } valData, ok := data[k] if !ok { @@ -1096,16 +654,28 @@ func hide(target, live, liveLastAppliedAnnotation *unstructured.Unstructured, ke valToReplacement[val] = replacement } data[k] = replacement - err := unstructured.SetNestedField(obj.Object, data, fields...) + err := unstructured.SetNestedField(obj.Object, data, "data") if err != nil { - return nil, nil, nil, fmt.Errorf("unstructured.SetNestedField error: %w", err) + return nil, nil, fmt.Errorf("unstructured.SetNestedField error: %s", err) } } } - return target, live, liveLastAppliedAnnotation, nil + if live != nil && orig != nil { + annotations := live.GetAnnotations() + if annotations == nil { + annotations = make(map[string]string) + } + lastAppliedData, err := json.Marshal(orig) + if err != nil { + return nil, nil, fmt.Errorf("error marshaling json: %s", err) + } + annotations[corev1.LastAppliedConfigAnnotation] = string(lastAppliedData) + live.SetAnnotations(annotations) + } + return target, live, nil } -func toString(val any) string { +func toString(val interface{}) string { if val == nil { return "" } @@ -1118,20 +688,11 @@ func toString(val any) string { // Remarshalling also strips any type information (e.g. float64 vs. int) from the unstructured // object. This is important for diffing since it will cause godiff to report a false difference. func remarshal(obj *unstructured.Unstructured, o options) *unstructured.Unstructured { + obj = stripTypeInformation(obj) data, err := json.Marshal(obj) if err != nil { panic(err) } - - // Unmarshal again to strip type information (e.g. float64 vs. int) from the unstructured - // object. This is important for diffing since it will cause godiff to report a false difference. - var newUn unstructured.Unstructured - err = json.Unmarshal(data, &newUn) - if err != nil { - panic(err) - } - obj = &newUn - gvk := obj.GroupVersionKind() item, err := scheme.Scheme.New(obj.GroupVersionKind()) if err != nil { diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff_options.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff_options.go index b2d69bec3..9a73ac82d 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff_options.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/diff/diff_options.go @@ -1,13 +1,8 @@ package diff import ( - "context" - "github.com/go-logr/logr" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/util/managedfields" - "k8s.io/klog/v2/textlogger" - cmdutil "k8s.io/kubectl/pkg/cmd/util" + "k8s.io/klog/v2/klogr" ) type Option func(*options) @@ -18,20 +13,13 @@ type options struct { ignoreAggregatedRoles bool normalizer Normalizer log logr.Logger - structuredMergeDiff bool - gvkParser *managedfields.GvkParser - manager string - serverSideDiff bool - serverSideDryRunner ServerSideDryRunner - ignoreMutationWebhook bool } func applyOptions(opts []Option) options { o := options{ ignoreAggregatedRoles: false, - ignoreMutationWebhook: true, normalizer: GetNoopNormalizer(), - log: textlogger.NewLogger(textlogger.NewConfig()), + log: klogr.New(), } for _, opt := range opts { opt(&o) @@ -39,36 +27,6 @@ func applyOptions(opts []Option) options { return o } -type KubeApplier interface { - ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force, validate, serverSideApply bool, manager string) (string, error) -} - -// ServerSideDryRunner defines the contract to run a server-side apply in -// dryrun mode. -type ServerSideDryRunner interface { - Run(ctx context.Context, obj *unstructured.Unstructured, manager string) (string, error) -} - -// K8sServerSideDryRunner is the Kubernetes implementation of ServerSideDryRunner. -type K8sServerSideDryRunner struct { - dryrunApplier KubeApplier -} - -// NewK8sServerSideDryRunner will instantiate a new K8sServerSideDryRunner with -// the given kubeApplier. -func NewK8sServerSideDryRunner(kubeApplier KubeApplier) *K8sServerSideDryRunner { - return &K8sServerSideDryRunner{ - dryrunApplier: kubeApplier, - } -} - -// ServerSideApplyDryRun will invoke a kubernetes server-side apply with the given -// obj and the given manager in dryrun mode. Will return the predicted live state -// json as string. -func (kdr *K8sServerSideDryRunner) Run(ctx context.Context, obj *unstructured.Unstructured, manager string) (string, error) { - return kdr.dryrunApplier.ApplyResource(ctx, obj, cmdutil.DryRunServer, false, false, true, manager) -} - func IgnoreAggregatedRoles(ignore bool) Option { return func(o *options) { o.ignoreAggregatedRoles = ignore @@ -86,39 +44,3 @@ func WithLogr(log logr.Logger) Option { o.log = log } } - -func WithStructuredMergeDiff(smd bool) Option { - return func(o *options) { - o.structuredMergeDiff = smd - } -} - -func WithGVKParser(parser *managedfields.GvkParser) Option { - return func(o *options) { - o.gvkParser = parser - } -} - -func WithManager(manager string) Option { - return func(o *options) { - o.manager = manager - } -} - -func WithServerSideDiff(ssd bool) Option { - return func(o *options) { - o.serverSideDiff = ssd - } -} - -func WithIgnoreMutationWebhook(mw bool) Option { - return func(o *options) { - o.ignoreMutationWebhook = mw - } -} - -func WithServerSideDryRunner(ssadr ServerSideDryRunner) Option { - return func(o *options) { - o.serverSideDryRunner = ssadr - } -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/README b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/README deleted file mode 100644 index 5efb7278b..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/README +++ /dev/null @@ -1,2 +0,0 @@ -Please check the doc.go file for more details about -how to use and maintain the code in this package. diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_fields.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_fields.go deleted file mode 100644 index b7a40c624..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_fields.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 2018 The Kubernetes 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 fieldmanager - -import ( - "bytes" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" -) - -// EmptyFields represents a set with no paths -// It looks like metav1.Fields{Raw: []byte("{}")} -var EmptyFields = func() metav1.FieldsV1 { - f, err := SetToFields(*fieldpath.NewSet()) - if err != nil { - panic("should never happen") - } - return f -}() - -// FieldsToSet creates a set paths from an input trie of fields -func FieldsToSet(f metav1.FieldsV1) (s fieldpath.Set, err error) { - err = s.FromJSON(bytes.NewReader(f.Raw)) - return s, err -} - -// SetToFields creates a trie of fields from an input set of paths -func SetToFields(s fieldpath.Set) (f metav1.FieldsV1, err error) { - f.Raw, err = s.ToJSON() - return f, err -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_managedfields.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_managedfields.go deleted file mode 100644 index 74da8f604..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_managedfields.go +++ /dev/null @@ -1,248 +0,0 @@ -/* -Copyright 2018 The Kubernetes 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 fieldmanager - -import ( - "encoding/json" - "fmt" - "sort" - - "k8s.io/apimachinery/pkg/api/meta" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" -) - -// ManagedInterface groups a fieldpath.ManagedFields together with the timestamps associated with each operation. -type ManagedInterface interface { - // Fields gets the fieldpath.ManagedFields. - Fields() fieldpath.ManagedFields - - // Times gets the timestamps associated with each operation. - Times() map[string]*metav1.Time -} - -type managedStruct struct { - fields fieldpath.ManagedFields - times map[string]*metav1.Time -} - -var _ ManagedInterface = &managedStruct{} - -// Fields implements ManagedInterface. -func (m *managedStruct) Fields() fieldpath.ManagedFields { - return m.fields -} - -// Times implements ManagedInterface. -func (m *managedStruct) Times() map[string]*metav1.Time { - return m.times -} - -// NewEmptyManaged creates an empty ManagedInterface. -func NewEmptyManaged() ManagedInterface { - return NewManaged(fieldpath.ManagedFields{}, map[string]*metav1.Time{}) -} - -// NewManaged creates a ManagedInterface from a fieldpath.ManagedFields and the timestamps associated with each operation. -func NewManaged(f fieldpath.ManagedFields, t map[string]*metav1.Time) ManagedInterface { - return &managedStruct{ - fields: f, - times: t, - } -} - -// RemoveObjectManagedFields removes the ManagedFields from the object -// before we merge so that it doesn't appear in the ManagedFields -// recursively. -func RemoveObjectManagedFields(obj runtime.Object) { - accessor, err := meta.Accessor(obj) - if err != nil { - panic(fmt.Sprintf("couldn't get accessor: %v", err)) - } - accessor.SetManagedFields(nil) -} - -// EncodeObjectManagedFields converts and stores the fieldpathManagedFields into the objects ManagedFields -func EncodeObjectManagedFields(obj runtime.Object, managed ManagedInterface) error { - accessor, err := meta.Accessor(obj) - if err != nil { - panic(fmt.Sprintf("couldn't get accessor: %v", err)) - } - - encodedManagedFields, err := encodeManagedFields(managed) - if err != nil { - return fmt.Errorf("failed to convert back managed fields to API: %v", err) - } - accessor.SetManagedFields(encodedManagedFields) - - return nil -} - -// DecodeManagedFields converts ManagedFields from the wire format (api format) -// to the format used by sigs.k8s.io/structured-merge-diff -func DecodeManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (ManagedInterface, error) { - managed := managedStruct{} - managed.fields = make(fieldpath.ManagedFields, len(encodedManagedFields)) - managed.times = make(map[string]*metav1.Time, len(encodedManagedFields)) - - for i, encodedVersionedSet := range encodedManagedFields { - switch encodedVersionedSet.Operation { - case metav1.ManagedFieldsOperationApply, metav1.ManagedFieldsOperationUpdate: - default: - return nil, fmt.Errorf("operation must be `Apply` or `Update`") - } - if len(encodedVersionedSet.APIVersion) < 1 { - return nil, fmt.Errorf("apiVersion must not be empty") - } - switch encodedVersionedSet.FieldsType { - case "FieldsV1": - // Valid case. - case "": - return nil, fmt.Errorf("missing fieldsType in managed fields entry %d", i) - default: - return nil, fmt.Errorf("invalid fieldsType %q in managed fields entry %d", encodedVersionedSet.FieldsType, i) - } - manager, err := BuildManagerIdentifier(&encodedVersionedSet) - if err != nil { - return nil, fmt.Errorf("error decoding manager from %v: %v", encodedVersionedSet, err) - } - managed.fields[manager], err = decodeVersionedSet(&encodedVersionedSet) - if err != nil { - return nil, fmt.Errorf("error decoding versioned set from %v: %v", encodedVersionedSet, err) - } - managed.times[manager] = encodedVersionedSet.Time - } - return &managed, nil -} - -// BuildManagerIdentifier creates a manager identifier string from a ManagedFieldsEntry -func BuildManagerIdentifier(encodedManager *metav1.ManagedFieldsEntry) (manager string, err error) { - encodedManagerCopy := *encodedManager - - // Never include fields type in the manager identifier - encodedManagerCopy.FieldsType = "" - - // Never include the fields in the manager identifier - encodedManagerCopy.FieldsV1 = nil - - // Never include the time in the manager identifier - encodedManagerCopy.Time = nil - - // For appliers, don't include the APIVersion in the manager identifier, - // so it will always have the same manager identifier each time it applied. - if encodedManager.Operation == metav1.ManagedFieldsOperationApply { - encodedManagerCopy.APIVersion = "" - } - - // Use the remaining fields to build the manager identifier - b, err := json.Marshal(&encodedManagerCopy) - if err != nil { - return "", fmt.Errorf("error marshalling manager identifier: %v", err) - } - - return string(b), nil -} - -func decodeVersionedSet(encodedVersionedSet *metav1.ManagedFieldsEntry) (versionedSet fieldpath.VersionedSet, err error) { - fields := EmptyFields - if encodedVersionedSet.FieldsV1 != nil { - fields = *encodedVersionedSet.FieldsV1 - } - set, err := FieldsToSet(fields) - if err != nil { - return nil, fmt.Errorf("error decoding set: %v", err) - } - return fieldpath.NewVersionedSet(&set, fieldpath.APIVersion(encodedVersionedSet.APIVersion), encodedVersionedSet.Operation == metav1.ManagedFieldsOperationApply), nil -} - -// encodeManagedFields converts ManagedFields from the format used by -// sigs.k8s.io/structured-merge-diff to the wire format (api format) -func encodeManagedFields(managed ManagedInterface) (encodedManagedFields []metav1.ManagedFieldsEntry, err error) { - if len(managed.Fields()) == 0 { - return nil, nil - } - encodedManagedFields = []metav1.ManagedFieldsEntry{} - for manager := range managed.Fields() { - versionedSet := managed.Fields()[manager] - v, err := encodeManagerVersionedSet(manager, versionedSet) - if err != nil { - return nil, fmt.Errorf("error encoding versioned set for %v: %v", manager, err) - } - if t, ok := managed.Times()[manager]; ok { - v.Time = t - } - encodedManagedFields = append(encodedManagedFields, *v) - } - return sortEncodedManagedFields(encodedManagedFields) -} - -func sortEncodedManagedFields(encodedManagedFields []metav1.ManagedFieldsEntry) (sortedManagedFields []metav1.ManagedFieldsEntry, err error) { - sort.Slice(encodedManagedFields, func(i, j int) bool { - p, q := encodedManagedFields[i], encodedManagedFields[j] - - if p.Operation != q.Operation { - return p.Operation < q.Operation - } - - pSeconds, qSeconds := int64(0), int64(0) - if p.Time != nil { - pSeconds = p.Time.Unix() - } - if q.Time != nil { - qSeconds = q.Time.Unix() - } - if pSeconds != qSeconds { - return pSeconds < qSeconds - } - - if p.Manager != q.Manager { - return p.Manager < q.Manager - } - - if p.APIVersion != q.APIVersion { - return p.APIVersion < q.APIVersion - } - return p.Subresource < q.Subresource - }) - - return encodedManagedFields, nil -} - -func encodeManagerVersionedSet(manager string, versionedSet fieldpath.VersionedSet) (encodedVersionedSet *metav1.ManagedFieldsEntry, err error) { - encodedVersionedSet = &metav1.ManagedFieldsEntry{} - - // Get as many fields as we can from the manager identifier - err = json.Unmarshal([]byte(manager), encodedVersionedSet) - if err != nil { - return nil, fmt.Errorf("error unmarshalling manager identifier %v: %v", manager, err) - } - - // Get the APIVersion, Operation, and Fields from the VersionedSet - encodedVersionedSet.APIVersion = string(versionedSet.APIVersion()) - if versionedSet.Applied() { - encodedVersionedSet.Operation = metav1.ManagedFieldsOperationApply - } - encodedVersionedSet.FieldsType = "FieldsV1" - fields, err := SetToFields(*versionedSet.Set()) - if err != nil { - return nil, fmt.Errorf("error encoding set: %v", err) - } - encodedVersionedSet.FieldsV1 = &fields - - return encodedVersionedSet, nil -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_typeconverter.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_typeconverter.go deleted file mode 100644 index 11ca37433..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_typeconverter.go +++ /dev/null @@ -1,130 +0,0 @@ -/* -Copyright 2018 The Kubernetes 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 fieldmanager - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/managedfields" - "k8s.io/kube-openapi/pkg/util/proto" - "sigs.k8s.io/structured-merge-diff/v4/typed" - "sigs.k8s.io/structured-merge-diff/v4/value" -) - -// TypeConverter allows you to convert from runtime.Object to -// typed.TypedValue and the other way around. -type TypeConverter interface { - ObjectToTyped(runtime.Object) (*typed.TypedValue, error) - TypedToObject(*typed.TypedValue) (runtime.Object, error) -} - -// DeducedTypeConverter is a TypeConverter for CRDs that don't have a -// schema. It does implement the same interface though (and create the -// same types of objects), so that everything can still work the same. -// CRDs are merged with all their fields being "atomic" (lists -// included). -// -// Note that this is not going to be sufficient for converting to/from -// CRDs that have a schema defined (we don't support that schema yet). -// TODO(jennybuckley): Use the schema provided by a CRD if it exists. -type DeducedTypeConverter struct{} - -var _ TypeConverter = DeducedTypeConverter{} - -// ObjectToTyped converts an object into a TypedValue with a "deduced type". -func (DeducedTypeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, error) { - switch o := obj.(type) { - case *unstructured.Unstructured: - return typed.DeducedParseableType.FromUnstructured(o.UnstructuredContent()) - default: - return typed.DeducedParseableType.FromStructured(obj) - } -} - -// TypedToObject transforms the typed value into a runtime.Object. That -// is not specific to deduced type. -func (DeducedTypeConverter) TypedToObject(value *typed.TypedValue) (runtime.Object, error) { - return valueToObject(value.AsValue()) -} - -type typeConverter struct { - parser *managedfields.GvkParser -} - -var _ TypeConverter = &typeConverter{} - -// NewTypeConverter builds a TypeConverter from a proto.Models. This -// will automatically find the proper version of the object, and the -// corresponding schema information. -func NewTypeConverter(models proto.Models, preserveUnknownFields bool) (TypeConverter, error) { - parser, err := managedfields.NewGVKParser(models, preserveUnknownFields) - if err != nil { - return nil, err - } - return &typeConverter{parser: parser}, nil -} - -func (c *typeConverter) ObjectToTyped(obj runtime.Object) (*typed.TypedValue, error) { - gvk := obj.GetObjectKind().GroupVersionKind() - t := c.parser.Type(gvk) - if t == nil { - return nil, newNoCorrespondingTypeError(gvk) - } - switch o := obj.(type) { - case *unstructured.Unstructured: - return t.FromUnstructured(o.UnstructuredContent()) - default: - return t.FromStructured(obj) - } -} - -func (c *typeConverter) TypedToObject(value *typed.TypedValue) (runtime.Object, error) { - return valueToObject(value.AsValue()) -} - -func valueToObject(val value.Value) (runtime.Object, error) { - vu := val.Unstructured() - switch o := vu.(type) { - case map[string]any: - return &unstructured.Unstructured{Object: o}, nil - default: - return nil, fmt.Errorf("failed to convert value to unstructured for type %T", vu) - } -} - -type noCorrespondingTypeErr struct { - gvk schema.GroupVersionKind -} - -func newNoCorrespondingTypeError(gvk schema.GroupVersionKind) error { - return &noCorrespondingTypeErr{gvk: gvk} -} - -func (k *noCorrespondingTypeErr) Error() string { - return fmt.Sprintf("no corresponding type for %v", k.gvk) -} - -func isNoCorrespondingTypeError(err error) bool { - if err == nil { - return false - } - _, ok := err.(*noCorrespondingTypeErr) - return ok -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_versionconverter.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_versionconverter.go deleted file mode 100644 index 477e92f79..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/borrowed_versionconverter.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 2018 The Kubernetes 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 fieldmanager - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/structured-merge-diff/v4/fieldpath" - "sigs.k8s.io/structured-merge-diff/v4/merge" - "sigs.k8s.io/structured-merge-diff/v4/typed" -) - -// versionConverter is an implementation of -// sigs.k8s.io/structured-merge-diff/merge.Converter -type versionConverter struct { - typeConverter TypeConverter - objectConvertor runtime.ObjectConvertor - hubGetter func(from schema.GroupVersion) schema.GroupVersion -} - -var _ merge.Converter = &versionConverter{} - -// NewVersionConverter builds a VersionConverter from a TypeConverter and an ObjectConvertor. -func newVersionConverter(t TypeConverter, o runtime.ObjectConvertor, h schema.GroupVersion) merge.Converter { - return &versionConverter{ - typeConverter: t, - objectConvertor: o, - hubGetter: func(from schema.GroupVersion) schema.GroupVersion { - return schema.GroupVersion{ - Group: from.Group, - Version: h.Version, - } - }, - } -} - -// NewCRDVersionConverter builds a VersionConverter for CRDs from a TypeConverter and an ObjectConvertor. -func newCRDVersionConverter(t TypeConverter, o runtime.ObjectConvertor, h schema.GroupVersion) merge.Converter { - return &versionConverter{ - typeConverter: t, - objectConvertor: o, - hubGetter: func(from schema.GroupVersion) schema.GroupVersion { - return h - }, - } -} - -// Convert implements sigs.k8s.io/structured-merge-diff/merge.Converter -func (v *versionConverter) Convert(object *typed.TypedValue, version fieldpath.APIVersion) (*typed.TypedValue, error) { - // Convert the smd typed value to a kubernetes object. - objectToConvert, err := v.typeConverter.TypedToObject(object) - if err != nil { - return object, err - } - - // Parse the target groupVersion. - groupVersion, err := schema.ParseGroupVersion(string(version)) - if err != nil { - return object, err - } - - // If attempting to convert to the same version as we already have, just return it. - fromVersion := objectToConvert.GetObjectKind().GroupVersionKind().GroupVersion() - if fromVersion == groupVersion { - return object, nil - } - - // Convert to internal - internalObject, err := v.objectConvertor.ConvertToVersion(objectToConvert, v.hubGetter(fromVersion)) - if err != nil { - return object, err - } - - // Convert the object into the target version - convertedObject, err := v.objectConvertor.ConvertToVersion(internalObject, groupVersion) - if err != nil { - return object, err - } - - // Convert the object back to a smd typed value and return it. - return v.typeConverter.ObjectToTyped(convertedObject) -} - -// IsMissingVersionError -func (v *versionConverter) IsMissingVersionError(err error) bool { - return runtime.IsNotRegisteredError(err) || isNoCorrespondingTypeError(err) -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/doc.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/doc.go deleted file mode 100644 index a1bdd5991..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Package fieldmanager is a special package as its main purpose -is to expose the dependencies required by structured-merge-diff -library to calculate diffs when server-side apply option is enabled. -The dependency tree necessary to have a `merge.Updater` instance -isn't trivial to implement and the strategy used is borrowing a copy -from Kubernetes apiserver codebase in order to expose the required -functionality. - -Below there is a list of borrowed files and a reference to which -package/file in Kubernetes they were copied from: - -- borrowed_fields.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/fields.go -- borrowed_managedfields.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/internal/managedfields.go -- borrowed_typeconverter.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/typeconverter.go -- borrowed_versionconverter.go: k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager/versionconverter.go - -In order to keep maintenance as minimal as possible the borrowed -files are verbatim copy from Kubernetes. The private objects that -need to be exposed are wrapped in the wrapper.go file. Updating -the borrowed files should be trivial in most cases but must be done -manually as we have no control over future refactorings Kubernetes -might do. -*/ -package fieldmanager diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/wrapper.go b/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/wrapper.go deleted file mode 100644 index b3f2de863..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager/wrapper.go +++ /dev/null @@ -1,22 +0,0 @@ -package fieldmanager - -/* -In order to keep maintenance as minimal as possible the borrowed -files in this package are verbatim copy from Kubernetes. The -private objects that need to be exposed are wrapped and exposed -in this file. -*/ - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/managedfields" - "sigs.k8s.io/structured-merge-diff/v4/merge" -) - -// NewVersionConverter will expose the version converter from the -// borrowed private function from k8s apiserver handler. -func NewVersionConverter(gvkParser *managedfields.GvkParser, o runtime.ObjectConvertor, h schema.GroupVersion) merge.Converter { - tc := &typeConverter{parser: gvkParser} - return newVersionConverter(tc, o, h) -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health.go index c615deea9..b93d8c967 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health.go @@ -1,11 +1,9 @@ package health import ( + "github.com/argoproj/gitops-engine/pkg/utils/kube" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/argoproj/gitops-engine/pkg/sync/hook" - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) // Represents resource health status @@ -66,7 +64,7 @@ func IsWorse(current, new HealthStatusCode) bool { // GetResourceHealth returns the health of a k8s resource func GetResourceHealth(obj *unstructured.Unstructured, healthOverride HealthOverride) (health *HealthStatus, err error) { - if obj.GetDeletionTimestamp() != nil && !hook.HasHookFinalizer(obj) { + if obj.GetDeletionTimestamp() != nil { return &HealthStatus{ Status: HealthStatusProgressing, Message: "Pending deletion", @@ -96,6 +94,7 @@ func GetResourceHealth(obj *unstructured.Unstructured, healthOverride HealthOver } } return health, err + } // GetHealthCheckFunc returns built-in health check function or nil if health check is not supported @@ -113,19 +112,23 @@ func GetHealthCheckFunc(gvk schema.GroupVersionKind) func(obj *unstructured.Unst return getDaemonSetHealth } case "extensions": - if gvk.Kind == kube.IngressKind { + switch gvk.Kind { + case kube.IngressKind: return getIngressHealth } case "argoproj.io": - if gvk.Kind == "Workflow" { + switch gvk.Kind { + case "Workflow": return getArgoWorkflowHealth } case "apiregistration.k8s.io": - if gvk.Kind == kube.APIServiceKind { + switch gvk.Kind { + case kube.APIServiceKind: return getAPIServiceHealth } case "networking.k8s.io": - if gvk.Kind == kube.IngressKind { + switch gvk.Kind { + case kube.IngressKind: return getIngressHealth } case "": @@ -138,11 +141,13 @@ func GetHealthCheckFunc(gvk schema.GroupVersionKind) func(obj *unstructured.Unst return getPodHealth } case "batch": - if gvk.Kind == kube.JobKind { + switch gvk.Kind { + case kube.JobKind: return getJobHealth } case "autoscaling": - if gvk.Kind == kube.HorizontalPodAutoscalerKind { + switch gvk.Kind { + case kube.HorizontalPodAutoscalerKind: return getHPAHealth } } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_apiservice.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_apiservice.go index 8def46256..6b9fb44a5 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_apiservice.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_apiservice.go @@ -3,12 +3,11 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getAPIServiceHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -18,14 +17,14 @@ func getAPIServiceHealth(obj *unstructured.Unstructured) (*HealthStatus, error) var apiService apiregistrationv1.APIService err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &apiService) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured APIService to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured APIService to typed: %v", err) } return getApiregistrationv1APIServiceHealth(&apiService) case apiregistrationv1beta1.SchemeGroupVersion.WithKind(kube.APIServiceKind): var apiService apiregistrationv1beta1.APIService err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &apiService) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured APIService to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured APIService to typed: %v", err) } return getApiregistrationv1beta1APIServiceHealth(&apiService) default: @@ -35,17 +34,19 @@ func getAPIServiceHealth(obj *unstructured.Unstructured) (*HealthStatus, error) func getApiregistrationv1APIServiceHealth(apiservice *apiregistrationv1.APIService) (*HealthStatus, error) { for _, c := range apiservice.Status.Conditions { - if c.Type == apiregistrationv1.Available { + switch c.Type { + case apiregistrationv1.Available: if c.Status == apiregistrationv1.ConditionTrue { return &HealthStatus{ Status: HealthStatusHealthy, Message: fmt.Sprintf("%s: %s", c.Reason, c.Message), }, nil + } else { + return &HealthStatus{ + Status: HealthStatusProgressing, + Message: fmt.Sprintf("%s: %s", c.Reason, c.Message), + }, nil } - return &HealthStatus{ - Status: HealthStatusProgressing, - Message: fmt.Sprintf("%s: %s", c.Reason, c.Message), - }, nil } } return &HealthStatus{ @@ -56,17 +57,19 @@ func getApiregistrationv1APIServiceHealth(apiservice *apiregistrationv1.APIServi func getApiregistrationv1beta1APIServiceHealth(apiservice *apiregistrationv1beta1.APIService) (*HealthStatus, error) { for _, c := range apiservice.Status.Conditions { - if c.Type == apiregistrationv1beta1.Available { + switch c.Type { + case apiregistrationv1beta1.Available: if c.Status == apiregistrationv1beta1.ConditionTrue { return &HealthStatus{ Status: HealthStatusHealthy, Message: fmt.Sprintf("%s: %s", c.Reason, c.Message), }, nil + } else { + return &HealthStatus{ + Status: HealthStatusProgressing, + Message: fmt.Sprintf("%s: %s", c.Reason, c.Message), + }, nil } - return &HealthStatus{ - Status: HealthStatusProgressing, - Message: fmt.Sprintf("%s: %s", c.Reason, c.Message), - }, nil } } return &HealthStatus{ diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_daemonset.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_daemonset.go index 9cb9eff8e..9de8e9ff9 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_daemonset.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_daemonset.go @@ -3,11 +3,10 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" appsv1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getDaemonSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -17,7 +16,7 @@ func getDaemonSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { var daemon appsv1.DaemonSet err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &daemon) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured DaemonSet to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured DaemonSet to typed: %v", err) } return getAppsv1DaemonSetHealth(&daemon) default: @@ -27,28 +26,29 @@ func getDaemonSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { func getAppsv1DaemonSetHealth(daemon *appsv1.DaemonSet) (*HealthStatus, error) { // Borrowed at kubernetes/kubectl/rollout_status.go https://github.com/kubernetes/kubernetes/blob/5232ad4a00ec93942d0b2c6359ee6cd1201b46bc/pkg/kubectl/rollout_status.go#L110 - if daemon.Generation > daemon.Status.ObservedGeneration { - return &HealthStatus{ - Status: HealthStatusProgressing, - Message: "Waiting for rollout to finish: observed daemon set generation less than desired generation", - }, nil - } - if daemon.Spec.UpdateStrategy.Type == appsv1.OnDeleteDaemonSetStrategyType { - return &HealthStatus{ - Status: HealthStatusHealthy, - Message: fmt.Sprintf("daemon set %d out of %d new pods have been updated", daemon.Status.UpdatedNumberScheduled, daemon.Status.DesiredNumberScheduled), - }, nil - } - if daemon.Status.UpdatedNumberScheduled < daemon.Status.DesiredNumberScheduled { - return &HealthStatus{ - Status: HealthStatusProgressing, - Message: fmt.Sprintf("Waiting for daemon set %q rollout to finish: %d out of %d new pods have been updated...", daemon.Name, daemon.Status.UpdatedNumberScheduled, daemon.Status.DesiredNumberScheduled), - }, nil - } - if daemon.Status.NumberAvailable < daemon.Status.DesiredNumberScheduled { + if daemon.Generation <= daemon.Status.ObservedGeneration { + if daemon.Spec.UpdateStrategy.Type == appsv1.OnDeleteDaemonSetStrategyType { + return &HealthStatus{ + Status: HealthStatusHealthy, + Message: fmt.Sprintf("daemon set %d out of %d new pods have been updated", daemon.Status.UpdatedNumberScheduled, daemon.Status.DesiredNumberScheduled), + }, nil + } + if daemon.Status.UpdatedNumberScheduled < daemon.Status.DesiredNumberScheduled { + return &HealthStatus{ + Status: HealthStatusProgressing, + Message: fmt.Sprintf("Waiting for daemon set %q rollout to finish: %d out of %d new pods have been updated...", daemon.Name, daemon.Status.UpdatedNumberScheduled, daemon.Status.DesiredNumberScheduled), + }, nil + } + if daemon.Status.NumberAvailable < daemon.Status.DesiredNumberScheduled { + return &HealthStatus{ + Status: HealthStatusProgressing, + Message: fmt.Sprintf("Waiting for daemon set %q rollout to finish: %d of %d updated pods are available...", daemon.Name, daemon.Status.NumberAvailable, daemon.Status.DesiredNumberScheduled), + }, nil + } + } else { return &HealthStatus{ Status: HealthStatusProgressing, - Message: fmt.Sprintf("Waiting for daemon set %q rollout to finish: %d of %d updated pods are available...", daemon.Name, daemon.Status.NumberAvailable, daemon.Status.DesiredNumberScheduled), + Message: "Waiting for rollout to finish: observed daemon set generation less then desired generation", }, nil } return &HealthStatus{ diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_deployment.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_deployment.go index 4f7984a2f..89865d324 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_deployment.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_deployment.go @@ -3,11 +3,10 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" appsv1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getDeploymentHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -17,7 +16,7 @@ func getDeploymentHealth(obj *unstructured.Unstructured) (*HealthStatus, error) var deployment appsv1.Deployment err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &deployment) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured Deployment to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured Deployment to typed: %v", err) } return getAppsv1DeploymentHealth(&deployment) default: @@ -35,23 +34,22 @@ func getAppsv1DeploymentHealth(deployment *appsv1.Deployment) (*HealthStatus, er // Borrowed at kubernetes/kubectl/rollout_status.go https://github.com/kubernetes/kubernetes/blob/5232ad4a00ec93942d0b2c6359ee6cd1201b46bc/pkg/kubectl/rollout_status.go#L80 if deployment.Generation <= deployment.Status.ObservedGeneration { cond := getAppsv1DeploymentCondition(deployment.Status, appsv1.DeploymentProgressing) - switch { - case cond != nil && cond.Reason == "ProgressDeadlineExceeded": + if cond != nil && cond.Reason == "ProgressDeadlineExceeded" { return &HealthStatus{ Status: HealthStatusDegraded, Message: fmt.Sprintf("Deployment %q exceeded its progress deadline", deployment.Name), }, nil - case deployment.Spec.Replicas != nil && deployment.Status.UpdatedReplicas < *deployment.Spec.Replicas: + } else if deployment.Spec.Replicas != nil && deployment.Status.UpdatedReplicas < *deployment.Spec.Replicas { return &HealthStatus{ Status: HealthStatusProgressing, Message: fmt.Sprintf("Waiting for rollout to finish: %d out of %d new replicas have been updated...", deployment.Status.UpdatedReplicas, *deployment.Spec.Replicas), }, nil - case deployment.Status.Replicas > deployment.Status.UpdatedReplicas: + } else if deployment.Status.Replicas > deployment.Status.UpdatedReplicas { return &HealthStatus{ Status: HealthStatusProgressing, Message: fmt.Sprintf("Waiting for rollout to finish: %d old replicas are pending termination...", deployment.Status.Replicas-deployment.Status.UpdatedReplicas), }, nil - case deployment.Status.AvailableReplicas < deployment.Status.UpdatedReplicas: + } else if deployment.Status.AvailableReplicas < deployment.Status.UpdatedReplicas { return &HealthStatus{ Status: HealthStatusProgressing, Message: fmt.Sprintf("Waiting for rollout to finish: %d of %d updated replicas are available...", deployment.Status.AvailableReplicas, deployment.Status.UpdatedReplicas), @@ -60,7 +58,7 @@ func getAppsv1DeploymentHealth(deployment *appsv1.Deployment) (*HealthStatus, er } else { return &HealthStatus{ Status: HealthStatusProgressing, - Message: "Waiting for rollout to finish: observed deployment generation less than desired generation", + Message: "Waiting for rollout to finish: observed deployment generation less then desired generation", }, nil } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_hpa.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_hpa.go index 67d178767..95580ebb0 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_hpa.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_hpa.go @@ -14,10 +14,12 @@ import ( "github.com/argoproj/gitops-engine/pkg/utils/kube" ) -var progressingStatus = &HealthStatus{ - Status: HealthStatusProgressing, - Message: "Waiting to Autoscale", -} +var ( + progressingStatus = &HealthStatus{ + Status: HealthStatusProgressing, + Message: "Waiting to Autoscale", + } +) type hpaCondition struct { Type string diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_job.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_job.go index b79b4d902..30e1811fd 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_job.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_job.go @@ -3,13 +3,10 @@ package health import ( "fmt" - corev1 "k8s.io/api/core/v1" - + "github.com/argoproj/gitops-engine/pkg/utils/kube" batchv1 "k8s.io/api/batch/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getJobHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -19,7 +16,7 @@ func getJobHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { var job batchv1.Job err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &job) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured Job to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured Job to typed: %v", err) } return getBatchv1JobHealth(&job) default: @@ -32,7 +29,6 @@ func getBatchv1JobHealth(job *batchv1.Job) (*HealthStatus, error) { var failMsg string complete := false var message string - isSuspended := false for _, condition := range job.Status.Conditions { switch condition.Type { case batchv1.JobFailed: @@ -42,31 +38,19 @@ func getBatchv1JobHealth(job *batchv1.Job) (*HealthStatus, error) { case batchv1.JobComplete: complete = true message = condition.Message - case batchv1.JobSuspended: - complete = true - message = condition.Message - if condition.Status == corev1.ConditionTrue { - isSuspended = true - } } } - switch { - case !complete: + if !complete { return &HealthStatus{ Status: HealthStatusProgressing, Message: message, }, nil - case failed: + } else if failed { return &HealthStatus{ Status: HealthStatusDegraded, Message: failMsg, }, nil - case isSuspended: - return &HealthStatus{ - Status: HealthStatusSuspended, - Message: failMsg, - }, nil - default: + } else { return &HealthStatus{ Status: HealthStatusHealthy, Message: message, diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pod.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pod.go index 9ebcef558..25db283ef 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pod.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pod.go @@ -4,12 +4,11 @@ import ( "fmt" "strings" + "github.com/argoproj/gitops-engine/pkg/utils/kube" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/kubectl/pkg/util/podutils" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getPodHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -19,7 +18,7 @@ func getPodHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { var pod corev1.Pod err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &pod) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured Pod to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured Pod to typed: %v", err) } return getCorev1PodHealth(&pod) default: diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pvc.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pvc.go index 7d41120a0..817e31510 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pvc.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_pvc.go @@ -3,11 +3,10 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getPVCHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -17,7 +16,7 @@ func getPVCHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { var pvc corev1.PersistentVolumeClaim err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &pvc) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured PersistentVolumeClaim to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured PersistentVolumeClaim to typed: %v", err) } return getCorev1PVCHealth(&pvc) default: diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_replicaset.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_replicaset.go index 7d59eaccc..1570c2fed 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_replicaset.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_replicaset.go @@ -3,12 +3,11 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getReplicaSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -18,7 +17,7 @@ func getReplicaSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) var replicaSet appsv1.ReplicaSet err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &replicaSet) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured ReplicaSet to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured ReplicaSet to typed: %v", err) } return getAppsv1ReplicaSetHealth(&replicaSet) default: @@ -43,7 +42,7 @@ func getAppsv1ReplicaSetHealth(replicaSet *appsv1.ReplicaSet) (*HealthStatus, er } else { return &HealthStatus{ Status: HealthStatusProgressing, - Message: "Waiting for rollout to finish: observed replica set generation less than desired generation", + Message: "Waiting for rollout to finish: observed replica set generation less then desired generation", }, nil } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_service.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_service.go index ea8cda2bb..17d5f3e4c 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_service.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_service.go @@ -3,11 +3,10 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getServiceHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -17,7 +16,7 @@ func getServiceHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { var service corev1.Service err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &service) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured Service to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured Service to typed: %v", err) } return getCorev1ServiceHealth(&service) default: diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_statefulset.go b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_statefulset.go index 920e5ed2d..52d156712 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/health/health_statefulset.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/health/health_statefulset.go @@ -3,11 +3,10 @@ package health import ( "fmt" + "github.com/argoproj/gitops-engine/pkg/utils/kube" appsv1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - - "github.com/argoproj/gitops-engine/pkg/utils/kube" ) func getStatefulSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) { @@ -17,7 +16,7 @@ func getStatefulSetHealth(obj *unstructured.Unstructured) (*HealthStatus, error) var sts appsv1.StatefulSet err := runtime.DefaultUnstructuredConverter.FromUnstructured(obj.Object, &sts) if err != nil { - return nil, fmt.Errorf("failed to convert unstructured StatefulSet to typed: %w", err) + return nil, fmt.Errorf("failed to convert unstructured StatefulSet to typed: %v", err) } return getAppsv1StatefulSetHealth(&sts) default: diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/common/types.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/common/types.go index 060f79369..bcff45b7a 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/common/types.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/sync/common/types.go @@ -16,12 +16,9 @@ const ( AnnotationKeyHook = "argocd.argoproj.io/hook" // AnnotationKeyHookDeletePolicy is the policy of deleting a hook AnnotationKeyHookDeletePolicy = "argocd.argoproj.io/hook-delete-policy" - AnnotationDeletionApproved = "argocd.argoproj.io/deletion-approved" // Sync option that disables dry run in resource is missing in the cluster SyncOptionSkipDryRunOnMissingResource = "SkipDryRunOnMissingResource=true" - // Sync option that disables dry run for applying resources - SyncOptionSkipDryRun = "SkipDryRun=true" // Sync option that disables resource pruning SyncOptionDisablePrune = "Prune=false" // Sync option that disables resource validation @@ -30,20 +27,8 @@ const ( SyncOptionPruneLast = "PruneLast=true" // Sync option that enables use of replace or create command instead of apply SyncOptionReplace = "Replace=true" - // Sync option that enables use of --force flag, delete and re-create - SyncOptionForce = "Force=true" // Sync option that enables use of --server-side flag instead of client-side SyncOptionServerSideApply = "ServerSideApply=true" - // Sync option that disables use of --server-side flag instead of client-side - SyncOptionDisableServerSideApply = "ServerSideApply=false" - // Sync option that disables resource deletion - SyncOptionDisableDeletion = "Delete=false" - // Sync option that sync only out of sync resources - SyncOptionApplyOutOfSyncOnly = "ApplyOutOfSyncOnly=true" - // Sync option that requires confirmation before deleting the resource - SyncOptionDeleteRequireConfirm = "Delete=confirm" - // Sync option that requires confirmation before deleting the resource - SyncOptionPruneRequireConfirm = "Prune=confirm" ) type PermissionValidator func(un *unstructured.Unstructured, res *metav1.APIResource) error @@ -118,6 +103,7 @@ func NewHookType(t string) (HookType, bool) { t == string(HookTypePostSync) || t == string(HookTypeSyncFail) || t == string(HookTypeSkip) + } type HookDeletePolicy string @@ -138,10 +124,6 @@ func NewHookDeletePolicy(p string) (HookDeletePolicy, bool) { type ResourceSyncResult struct { // holds associated resource key ResourceKey kube.ResourceKey - // Images holds the images associated with the resource. These images are collected on a best-effort basis - // from fields used by known workload resources. This does not necessarily reflect the exact list of images - // used by workloads in the application. - Images []string // holds resource version Version string // holds the execution order diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/delete_policy.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/delete_policy.go deleted file mode 100644 index 56a9e15c8..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/delete_policy.go +++ /dev/null @@ -1,26 +0,0 @@ -package hook - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - - "github.com/argoproj/gitops-engine/pkg/sync/common" - helmhook "github.com/argoproj/gitops-engine/pkg/sync/hook/helm" - resourceutil "github.com/argoproj/gitops-engine/pkg/sync/resource" -) - -func DeletePolicies(obj *unstructured.Unstructured) []common.HookDeletePolicy { - var policies []common.HookDeletePolicy - for _, text := range resourceutil.GetAnnotationCSVs(obj, common.AnnotationKeyHookDeletePolicy) { - p, ok := common.NewHookDeletePolicy(text) - if ok { - policies = append(policies, p) - } - } - for _, p := range helmhook.DeletePolicies(obj) { - policies = append(policies, p.DeletePolicy()) - } - if len(policies) == 0 { - policies = append(policies, common.HookDeletePolicyBeforeHookCreation) - } - return policies -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/delete_policy.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/delete_policy.go deleted file mode 100644 index f174eda7d..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/delete_policy.go +++ /dev/null @@ -1,42 +0,0 @@ -package helm - -import ( - "github.com/argoproj/gitops-engine/pkg/sync/common" - resourceutil "github.com/argoproj/gitops-engine/pkg/sync/resource" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" -) - -type DeletePolicy string - -const ( - BeforeHookCreation DeletePolicy = "before-hook-creation" - HookSucceeded DeletePolicy = "hook-succeeded" - HookFailed DeletePolicy = "hook-failed" -) - -// note that we do not take into account if this is or is not a hook, caller should check -func NewDeletePolicy(p string) (DeletePolicy, bool) { - return DeletePolicy(p), p == string(BeforeHookCreation) || p == string(HookSucceeded) || p == string(HookFailed) -} - -var hookDeletePolicies = map[DeletePolicy]common.HookDeletePolicy{ - BeforeHookCreation: common.HookDeletePolicyBeforeHookCreation, - HookSucceeded: common.HookDeletePolicyHookSucceeded, - HookFailed: common.HookDeletePolicyHookFailed, -} - -func (p DeletePolicy) DeletePolicy() common.HookDeletePolicy { - return hookDeletePolicies[p] -} - -func DeletePolicies(obj *unstructured.Unstructured) []DeletePolicy { - var policies []DeletePolicy - for _, text := range resourceutil.GetAnnotationCSVs(obj, "helm.sh/hook-delete-policy") { - p, ok := NewDeletePolicy(text) - if ok { - policies = append(policies, p) - } - } - return policies -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/hook.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/hook.go deleted file mode 100644 index 9b3339919..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/hook.go +++ /dev/null @@ -1,9 +0,0 @@ -package helm - -import "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - -func IsHook(obj *unstructured.Unstructured) bool { - value, ok := obj.GetAnnotations()["helm.sh/hook"] - // Helm use the same annotation to identify CRD as hooks, but they are not. - return ok && value != "crd-install" -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/type.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/type.go deleted file mode 100644 index f94f3bc47..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/type.go +++ /dev/null @@ -1,47 +0,0 @@ -package helm - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - - "github.com/argoproj/gitops-engine/pkg/sync/common" - resourceutil "github.com/argoproj/gitops-engine/pkg/sync/resource" -) - -type Type string - -const ( - PreInstall Type = "pre-install" - PreUpgrade Type = "pre-upgrade" - PostUpgrade Type = "post-upgrade" - PostInstall Type = "post-install" -) - -func NewType(t string) (Type, bool) { - return Type(t), - t == string(PreInstall) || - t == string(PreUpgrade) || - t == string(PostUpgrade) || - t == string(PostInstall) -} - -var hookTypes = map[Type]common.HookType{ - PreInstall: common.HookTypePreSync, - PreUpgrade: common.HookTypePreSync, - PostUpgrade: common.HookTypePostSync, - PostInstall: common.HookTypePostSync, -} - -func (t Type) HookType() common.HookType { - return hookTypes[t] -} - -func Types(obj *unstructured.Unstructured) []Type { - var types []Type - for _, text := range resourceutil.GetAnnotationCSVs(obj, "helm.sh/hook") { - t, ok := NewType(text) - if ok { - types = append(types, t) - } - } - return types -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/weight.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/weight.go deleted file mode 100644 index 15ecfdf20..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/helm/weight.go +++ /dev/null @@ -1,19 +0,0 @@ -package helm - -import ( - "strconv" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" -) - -// note that we do not take into account if this is or is not a hook, caller should check -func Weight(obj *unstructured.Unstructured) int { - text, ok := obj.GetAnnotations()["helm.sh/hook-weight"] - if ok { - value, err := strconv.Atoi(text) - if err == nil { - return value - } - } - return 0 -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/hook.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/hook.go deleted file mode 100644 index 66dfc26e5..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/hook/hook.go +++ /dev/null @@ -1,58 +0,0 @@ -package hook - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - - "github.com/argoproj/gitops-engine/pkg/sync/common" - helmhook "github.com/argoproj/gitops-engine/pkg/sync/hook/helm" - resourceutil "github.com/argoproj/gitops-engine/pkg/sync/resource" -) - -const ( - // HookFinalizer is the finalizer added to hooks to ensure they are deleted only after the sync phase is completed. - HookFinalizer = "argocd.argoproj.io/hook-finalizer" -) - -func HasHookFinalizer(obj *unstructured.Unstructured) bool { - finalizers := obj.GetFinalizers() - for _, finalizer := range finalizers { - if finalizer == HookFinalizer { - return true - } - } - return false -} - -func IsHook(obj *unstructured.Unstructured) bool { - _, ok := obj.GetAnnotations()[common.AnnotationKeyHook] - if ok { - return !Skip(obj) - } - return helmhook.IsHook(obj) -} - -func Skip(obj *unstructured.Unstructured) bool { - for _, hookType := range Types(obj) { - if hookType == common.HookTypeSkip { - return len(Types(obj)) == 1 - } - } - return false -} - -func Types(obj *unstructured.Unstructured) []common.HookType { - var types []common.HookType - for _, text := range resourceutil.GetAnnotationCSVs(obj, common.AnnotationKeyHook) { - t, ok := common.NewHookType(text) - if ok { - types = append(types, t) - } - } - // we ignore Helm hooks if we have Argo hook - if len(types) == 0 { - for _, t := range helmhook.Types(obj) { - types = append(types, t.HookType()) - } - } - return types -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/sync/resource/annotations.go b/vendor/github.com/argoproj/gitops-engine/pkg/sync/resource/annotations.go deleted file mode 100644 index aa9c27cdc..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/sync/resource/annotations.go +++ /dev/null @@ -1,41 +0,0 @@ -package resource - -import ( - "strings" -) - -// AnnotationGetter defines the operations required to inspect if a resource -// has annotations -type AnnotationGetter interface { - GetAnnotations() map[string]string -} - -// GetAnnotationCSVs will return the value of the annotation identified by -// the given key. If the annotation has comma separated values, the returned -// list will contain all deduped values. -func GetAnnotationCSVs(obj AnnotationGetter, key string) []string { - // may for de-duping - valuesToBool := make(map[string]bool) - for _, item := range strings.Split(obj.GetAnnotations()[key], ",") { - val := strings.TrimSpace(item) - if val != "" { - valuesToBool[val] = true - } - } - var values []string - for val := range valuesToBool { - values = append(values, val) - } - return values -} - -// HasAnnotationOption will return if the given obj has an annotation defined -// as the given key and has in its values, the occurrence of val. -func HasAnnotationOption(obj AnnotationGetter, key, val string) bool { - for _, item := range GetAnnotationCSVs(obj, key) { - if item == val { - return true - } - } - return false -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/io/io.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/io/io.go index 6f07bb192..338d8c9b9 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/io/io.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/io/io.go @@ -4,8 +4,9 @@ import ( "os" ) -// TempDir is set to '/dev/shm' if exists, otherwise is "", which defaults to os.TempDir() when passed to os.CreateTemp() -var TempDir string +var ( + TempDir string +) func init() { fileInfo, err := os.Stat("/dev/shm") diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/json/json.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/json/json.go index 4cb2f8ed0..7f2999e71 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/json/json.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/json/json.go @@ -1,28 +1,31 @@ package json // https://github.com/ksonnet/ksonnet/blob/master/pkg/kubecfg/diff.go -func removeFields(config, live any) any { +func removeFields(config, live interface{}) interface{} { switch c := config.(type) { - case map[string]any: - l, ok := live.(map[string]any) + case map[string]interface{}: + l, ok := live.(map[string]interface{}) if ok { return RemoveMapFields(c, l) + } else { + return live } - return live - case []any: - l, ok := live.([]any) + case []interface{}: + l, ok := live.([]interface{}) if ok { return RemoveListFields(c, l) + } else { + return live } - return live default: return live } + } // RemoveMapFields remove all non-existent fields in the live that don't exist in the config -func RemoveMapFields(config, live map[string]any) map[string]any { - result := map[string]any{} +func RemoveMapFields(config, live map[string]interface{}) map[string]interface{} { + result := map[string]interface{}{} for k, v1 := range config { v2, ok := live[k] if !ok { @@ -36,10 +39,10 @@ func RemoveMapFields(config, live map[string]any) map[string]any { return result } -func RemoveListFields(config, live []any) []any { +func RemoveListFields(config, live []interface{}) []interface{} { // If live is longer than config, then the extra elements at the end of the // list will be returned as-is so they appear in the diff. - result := make([]any, 0, len(live)) + result := make([]interface{}, 0, len(live)) for i, v2 := range live { if len(config) > i { if v2 != nil { diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go index 8af205ad4..1a2ede1e5 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/ctl.go @@ -3,7 +3,7 @@ package kube import ( "context" "fmt" - "os" + "io/ioutil" "strings" "github.com/go-logr/logr" @@ -19,7 +19,6 @@ import ( "k8s.io/kube-openapi/pkg/util/proto" "k8s.io/kubectl/pkg/util/openapi" - "github.com/argoproj/gitops-engine/pkg/diff" utils "github.com/argoproj/gitops-engine/pkg/utils/io" "github.com/argoproj/gitops-engine/pkg/utils/tracing" ) @@ -34,7 +33,6 @@ type Kubectl interface { ConvertToVersion(obj *unstructured.Unstructured, group, version string) (*unstructured.Unstructured, error) DeleteResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, deleteOptions metav1.DeleteOptions) error GetResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string) (*unstructured.Unstructured, error) - CreateResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, obj *unstructured.Unstructured, createOptions metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) PatchResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, patchType types.PatchType, patchBytes []byte, subresources ...string) (*unstructured.Unstructured, error) GetAPIResources(config *rest.Config, preferred bool, resourceFilter ResourceFilter) ([]APIResourceInfo, error) GetServerVersion(config *rest.Config) (string, error) @@ -82,6 +80,7 @@ func (k *KubectlCmd) filterAPIResources(config *rest.Config, preferred bool, res gv = schema.GroupVersion{} } for _, apiResource := range apiResourcesList.APIResources { + if resourceFilter.IsExcludedResource(gv.Group, apiResource.Kind, config.Host) { continue } @@ -118,6 +117,20 @@ func isSupportedVerb(apiResource *metav1.APIResource, verb string) bool { return false } +type CreateGVKParserError struct { + err error +} + +func NewCreateGVKParserError(err error) *CreateGVKParserError { + return &CreateGVKParserError{ + err: err, + } +} + +func (e *CreateGVKParserError) Error() string { + return fmt.Sprintf("error creating gvk parser: %s", e.err) +} + // LoadOpenAPISchema will load all existing resource schemas from the cluster // and return: // - openapi.Resources: used for getting the proto.Schema from a GVK @@ -132,28 +145,26 @@ func (k *KubectlCmd) LoadOpenAPISchema(config *rest.Config) (openapi.Resources, oapiGetter := openapi.NewOpenAPIGetter(disco) oapiResources, err := openapi.NewOpenAPIParser(oapiGetter).Parse() if err != nil { - return nil, nil, fmt.Errorf("error getting openapi resources: %w", err) + return nil, nil, fmt.Errorf("error getting openapi resources: %s", err) } - gvkParser, err := k.newGVKParser(oapiGetter) + gvkParser, err := newGVKParser(oapiGetter) if err != nil { - return oapiResources, nil, fmt.Errorf("error getting gvk parser: %w", err) + // return a specific error type to allow gracefully handle + // creating GVK Parser bug: + // https://github.com/kubernetes/kubernetes/issues/103597 + return oapiResources, nil, NewCreateGVKParserError(err) } return oapiResources, gvkParser, nil } -func (k *KubectlCmd) newGVKParser(oapiGetter discovery.OpenAPISchemaInterface) (*managedfields.GvkParser, error) { +func newGVKParser(oapiGetter *openapi.CachedOpenAPIGetter) (*managedfields.GvkParser, error) { doc, err := oapiGetter.OpenAPISchema() if err != nil { - return nil, fmt.Errorf("error getting openapi schema: %w", err) + return nil, fmt.Errorf("error getting openapi schema: %s", err) } models, err := proto.NewOpenAPIData(doc) if err != nil { - return nil, fmt.Errorf("error getting openapi data: %w", err) - } - var taintedGVKs []schema.GroupVersionKind - models, taintedGVKs = newUniqueModels(models) - if len(taintedGVKs) > 0 { - k.Log.Info("Duplicate GVKs detected in OpenAPI schema. This could cause inaccurate diffs.", "gvks", taintedGVKs) + return nil, fmt.Errorf("error getting openapi data: %s", err) } gvkParser, err := managedfields.NewGVKParser(models, false) if err != nil { @@ -197,29 +208,6 @@ func (k *KubectlCmd) GetResource(ctx context.Context, config *rest.Config, gvk s return resourceIf.Get(ctx, name, metav1.GetOptions{}) } -// CreateResource creates resource -func (k *KubectlCmd) CreateResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, obj *unstructured.Unstructured, createOptions metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error) { - span := k.Tracer.StartSpan("CreateResource") - span.SetBaggageItem("kind", gvk.Kind) - span.SetBaggageItem("name", name) - defer span.Finish() - dynamicIf, err := dynamic.NewForConfig(config) - if err != nil { - return nil, err - } - disco, err := discovery.NewDiscoveryClientForConfig(config) - if err != nil { - return nil, err - } - apiResource, err := ServerResourceForGroupVersionKind(disco, gvk, "create") - if err != nil { - return nil, err - } - resource := gvk.GroupVersion().WithResource(apiResource.Name) - resourceIf := ToResourceInterface(dynamicIf, apiResource, resource, namespace) - return resourceIf.Create(ctx, obj, createOptions, subresources...) -} - // PatchResource patches resource func (k *KubectlCmd) PatchResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, patchType types.PatchType, patchBytes []byte, subresources ...string) (*unstructured.Unstructured, error) { span := k.Tracer.StartSpan("PatchResource") @@ -272,15 +260,14 @@ func (k *KubectlCmd) DeleteResource(ctx context.Context, config *rest.Config, gv } func (k *KubectlCmd) ManageResources(config *rest.Config, openAPISchema openapi.Resources) (ResourceOperations, func(), error) { - f, err := os.CreateTemp(utils.TempDir, "") + f, err := ioutil.TempFile(utils.TempDir, "") if err != nil { - return nil, nil, fmt.Errorf("failed to generate temp file for kubeconfig: %w", err) + return nil, nil, fmt.Errorf("failed to generate temp file for kubeconfig: %v", err) } _ = f.Close() err = WriteKubeConfig(config, "", f.Name()) if err != nil { - utils.DeleteFile(f.Name()) - return nil, nil, fmt.Errorf("failed to write kubeconfig: %w", err) + return nil, nil, fmt.Errorf("failed to write kubeconfig: %v", err) } fact := kubeCmdFactory(f.Name(), "", config) cleanup := func() { @@ -296,31 +283,6 @@ func (k *KubectlCmd) ManageResources(config *rest.Config, openAPISchema openapi. }, cleanup, nil } -func ManageServerSideDiffDryRuns(config *rest.Config, openAPISchema openapi.Resources, tracer tracing.Tracer, log logr.Logger, onKubectlRun OnKubectlRunFunc) (diff.KubeApplier, func(), error) { - f, err := os.CreateTemp(utils.TempDir, "") - if err != nil { - return nil, nil, fmt.Errorf("failed to generate temp file for kubeconfig: %w", err) - } - _ = f.Close() - err = WriteKubeConfig(config, "", f.Name()) - if err != nil { - utils.DeleteFile(f.Name()) - return nil, nil, fmt.Errorf("failed to write kubeconfig: %w", err) - } - fact := kubeCmdFactory(f.Name(), "", config) - cleanup := func() { - utils.DeleteFile(f.Name()) - } - return &kubectlServerSideDiffDryRunApplier{ - config: config, - fact: fact, - openAPISchema: openAPISchema, - tracer: tracer, - log: log, - onKubectlRun: onKubectlRun, - }, cleanup, nil -} - // ConvertToVersion converts an unstructured object into the specified group/version func (k *KubectlCmd) ConvertToVersion(obj *unstructured.Unstructured, group string, version string) (*unstructured.Unstructured, error) { span := k.Tracer.StartSpan("ConvertToVersion") diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/kube.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/kube.go index 0c144a699..f25b11e61 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/kube.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/kube.go @@ -4,7 +4,6 @@ package kube import ( "bytes" "context" - "errors" "fmt" "io" "regexp" @@ -13,9 +12,9 @@ import ( "github.com/go-logr/logr" - corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" + apierr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" @@ -89,8 +88,8 @@ func GetResourceKey(obj *unstructured.Unstructured) ResourceKey { return NewResourceKey(gvk.Group, gvk.Kind, obj.GetNamespace(), obj.GetName()) } -func GetObjectRef(obj *unstructured.Unstructured) corev1.ObjectReference { - return corev1.ObjectReference{ +func GetObjectRef(obj *unstructured.Unstructured) v1.ObjectReference { + return v1.ObjectReference{ UID: obj.GetUID(), APIVersion: obj.GetAPIVersion(), Kind: obj.GetKind(), @@ -103,17 +102,17 @@ func GetObjectRef(obj *unstructured.Unstructured) corev1.ObjectReference { func TestConfig(config *rest.Config) error { kubeclientset, err := kubernetes.NewForConfig(config) if err != nil { - return fmt.Errorf("REST config invalid: %w", err) + return fmt.Errorf("REST config invalid: %s", err) } _, err = kubeclientset.ServerVersion() if err != nil { - return fmt.Errorf("REST config invalid: %w", err) + return fmt.Errorf("REST config invalid: %s", err) } return nil } // ToUnstructured converts a concrete K8s API type to a un unstructured object -func ToUnstructured(obj any) (*unstructured.Unstructured, error) { +func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error) { uObj, err := runtime.NewTestUnstructuredConverter(equality.Semantic).ToUnstructured(obj) if err != nil { return nil, err @@ -122,7 +121,7 @@ func ToUnstructured(obj any) (*unstructured.Unstructured, error) { } // MustToUnstructured converts a concrete K8s API type to a un unstructured object and panics if not successful -func MustToUnstructured(obj any) *unstructured.Unstructured { +func MustToUnstructured(obj interface{}) *unstructured.Unstructured { uObj, err := ToUnstructured(obj) if err != nil { panic(err) @@ -181,7 +180,7 @@ func IsCRD(obj *unstructured.Unstructured) bool { // See: https://github.com/ksonnet/ksonnet/blob/master/utils/client.go func ServerResourceForGroupVersionKind(disco discovery.DiscoveryInterface, gvk schema.GroupVersionKind, verb string) (*metav1.APIResource, error) { // default is to return a not found for the requested resource - retErr := apierrors.NewNotFound(schema.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, "") + retErr := apierr.NewNotFound(schema.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, "") resources, err := disco.ServerResourcesForGroupVersion(gvk.GroupVersion().String()) if err != nil { return nil, err @@ -190,10 +189,11 @@ func ServerResourceForGroupVersionKind(disco discovery.DiscoveryInterface, gvk s if r.Kind == gvk.Kind { if isSupportedVerb(&r, verb) { return &r, nil + } else { + // We have a match, but the API does not support the action + // that was requested. Memorize this. + retErr = apierr.NewMethodNotSupported(schema.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, verb) } - // We have a match, but the API does not support the action - // that was requested. Memorize this. - retErr = apierrors.NewMethodNotSupported(schema.GroupResource{Group: gvk.Group, Resource: gvk.Kind}, verb) } } return nil, retErr @@ -205,17 +205,14 @@ var ( // See ApplyOpts::Run() // cmdutil.AddSourceToErr(fmt.Sprintf("applying patch:\n%s\nto:\n%v\nfor:", patchBytes, info), info.Source, err) kubectlApplyPatchErrOutRegexp = regexp.MustCompile(`(?s)^error when applying patch:.*\nfor: "\S+": `) - - kubectlErrOutMapRegexp = regexp.MustCompile(`map\[.*\]`) ) // cleanKubectlOutput makes the error output of kubectl a little better to read func cleanKubectlOutput(s string) string { s = strings.TrimSpace(s) s = kubectlErrOutRegexp.ReplaceAllString(s, "") - s = kubectlErrOutMapRegexp.ReplaceAllString(s, "") s = kubectlApplyPatchErrOutRegexp.ReplaceAllString(s, "") - s = strings.ReplaceAll(s, "; if you choose to ignore these errors, turn validation off with --validate=false", "") + s = strings.Replace(s, "; if you choose to ignore these errors, turn validation off with --validate=false", "", -1) return s } @@ -227,12 +224,6 @@ func WriteKubeConfig(restConfig *rest.Config, namespace, filename string) error // NewKubeConfig converts a clientcmdapi.Config (kubeconfig) from a rest.Config func NewKubeConfig(restConfig *rest.Config, namespace string) *clientcmdapi.Config { - var proxyUrl string - if restConfig.Proxy != nil { - if u, err := restConfig.Proxy(nil); err == nil { - proxyUrl = u.String() - } - } return &clientcmdapi.Config{ CurrentContext: restConfig.Host, Contexts: map[string]*clientcmdapi.Context{ @@ -245,11 +236,10 @@ func NewKubeConfig(restConfig *rest.Config, namespace string) *clientcmdapi.Conf Clusters: map[string]*clientcmdapi.Cluster{ restConfig.Host: { Server: restConfig.Host, - TLSServerName: restConfig.ServerName, - InsecureSkipTLSVerify: restConfig.Insecure, - CertificateAuthority: restConfig.CAFile, - CertificateAuthorityData: restConfig.CAData, - ProxyURL: proxyUrl, + TLSServerName: restConfig.TLSClientConfig.ServerName, + InsecureSkipTLSVerify: restConfig.TLSClientConfig.Insecure, + CertificateAuthority: restConfig.TLSClientConfig.CAFile, + CertificateAuthorityData: restConfig.TLSClientConfig.CAData, }, }, AuthInfos: map[string]*clientcmdapi.AuthInfo{ @@ -263,20 +253,20 @@ func NewKubeConfig(restConfig *rest.Config, namespace string) *clientcmdapi.Conf func newAuthInfo(restConfig *rest.Config) *clientcmdapi.AuthInfo { authInfo := clientcmdapi.AuthInfo{} haveCredentials := false - if restConfig.CertFile != "" { - authInfo.ClientCertificate = restConfig.CertFile + if restConfig.TLSClientConfig.CertFile != "" { + authInfo.ClientCertificate = restConfig.TLSClientConfig.CertFile haveCredentials = true } - if len(restConfig.CertData) > 0 { - authInfo.ClientCertificateData = restConfig.CertData + if len(restConfig.TLSClientConfig.CertData) > 0 { + authInfo.ClientCertificateData = restConfig.TLSClientConfig.CertData haveCredentials = true } - if restConfig.KeyFile != "" { - authInfo.ClientKey = restConfig.KeyFile + if restConfig.TLSClientConfig.KeyFile != "" { + authInfo.ClientKey = restConfig.TLSClientConfig.KeyFile haveCredentials = true } - if len(restConfig.KeyData) > 0 { - authInfo.ClientKeyData = restConfig.KeyData + if len(restConfig.TLSClientConfig.KeyData) > 0 { + authInfo.ClientKeyData = restConfig.TLSClientConfig.KeyData haveCredentials = true } if restConfig.Username != "" { @@ -315,7 +305,7 @@ func SplitYAML(yamlData []byte) ([]*unstructured.Unstructured, error) { for _, yml := range ymls { u := &unstructured.Unstructured{} if err := yaml.Unmarshal([]byte(yml), u); err != nil { - return objs, fmt.Errorf("failed to unmarshal manifest: %w", err) + return objs, fmt.Errorf("failed to unmarshal manifest: %v", err) } objs = append(objs, u) } @@ -334,10 +324,10 @@ func SplitYAMLToString(yamlData []byte) ([]string, error) { for { ext := runtime.RawExtension{} if err := d.Decode(&ext); err != nil { - if errors.Is(err, io.EOF) { + if err == io.EOF { break } - return objs, fmt.Errorf("failed to unmarshal manifest: %w", err) + return objs, fmt.Errorf("failed to unmarshal manifest: %v", err) } ext.Raw = bytes.TrimSpace(ext.Raw) if len(ext.Raw) == 0 || bytes.Equal(ext.Raw, []byte("null")) { @@ -407,63 +397,20 @@ func GetDeploymentReplicas(u *unstructured.Unstructured) *int64 { return &val } -func GetResourceImages(u *unstructured.Unstructured) []string { - var containers []any - var found bool - var err error - var images []string - - containerPaths := [][]string{ - // Resources without template, like pods - {"spec", "containers"}, - // Resources with template, like deployments - {"spec", "template", "spec", "containers"}, - // Cronjobs - {"spec", "jobTemplate", "spec", "template", "spec", "containers"}, - } - - for _, path := range containerPaths { - containers, found, err = unstructured.NestedSlice(u.Object, path...) - if found && err == nil { - break - } - } - - if !found || err != nil { - return nil - } - - for _, container := range containers { - containerMap, ok := container.(map[string]any) - if !ok { - continue - } - - image, found, err := unstructured.NestedString(containerMap, "image") - if !found || err != nil { - continue - } - - images = append(images, image) - } - - return images -} - // RetryUntilSucceed keep retrying given action with specified interval until action succeed or specified context is done. func RetryUntilSucceed(ctx context.Context, interval time.Duration, desc string, log logr.Logger, action func() error) { - pollErr := wait.PollUntilContextCancel(ctx, interval, true, func(_ context.Context) (bool /*done*/, error) { - log.V(1).Info("Start " + desc) + pollErr := wait.PollImmediateUntil(interval, func() (bool /*done*/, error) { + log.V(1).Info(fmt.Sprintf("Start %s", desc)) err := action() if err == nil { - log.V(1).Info("Completed " + desc) + log.V(1).Info(fmt.Sprintf("Completed %s", desc)) return true, nil } log.V(1).Info(fmt.Sprintf("Failed to %s: %+v, retrying in %v", desc, err, interval)) return false, nil - }) + }, ctx.Done()) if pollErr != nil { // The only error that can happen here is wait.ErrWaitTimeout if ctx is done. - log.V(1).Info("Stop retrying " + desc) + log.V(1).Info(fmt.Sprintf("Stop retrying %s", desc)) } } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/resource_ops.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/resource_ops.go index b110153f0..178a599cc 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/resource_ops.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/resource_ops.go @@ -6,7 +6,7 @@ import ( "encoding/json" "errors" "fmt" - "os" + "io/ioutil" "strings" "github.com/go-logr/logr" @@ -14,7 +14,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/cli-runtime/pkg/genericclioptions" "k8s.io/cli-runtime/pkg/printers" @@ -39,13 +38,12 @@ import ( // ResourceOperations provides methods to manage k8s resources type ResourceOperations interface { - ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force bool, validate bool, serverSideApply bool, manager string) (string, error) + ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force, validate, serverSideApply bool) (string, error) ReplaceResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force bool) (string, error) CreateResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, validate bool) (string, error) UpdateResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy) (*unstructured.Unstructured, error) } -// This is a generic implementation for doing most kubectl operations. Implements the ResourceOperations interface. type kubectlResourceOperations struct { config *rest.Config log logr.Logger @@ -55,75 +53,59 @@ type kubectlResourceOperations struct { openAPISchema openapi.Resources } -// This is an implementation specific for doing server-side diff dry runs. Implements the KubeApplier interface. -type kubectlServerSideDiffDryRunApplier struct { - config *rest.Config - log logr.Logger - tracer tracing.Tracer - onKubectlRun OnKubectlRunFunc - fact cmdutil.Factory - openAPISchema openapi.Resources -} +type commandExecutor func(f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string) error -type commandExecutor func(ioStreams genericclioptions.IOStreams, fileName string) error +func (k *kubectlResourceOperations) runResourceCommand(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, executor commandExecutor) (string, error) { + manifestBytes, err := json.Marshal(obj) + if err != nil { + return "", err + } + manifestFile, err := ioutil.TempFile(io.TempDir, "") + if err != nil { + return "", fmt.Errorf("Failed to generate temp file for manifest: %v", err) + } + if _, err = manifestFile.Write(manifestBytes); err != nil { + return "", fmt.Errorf("Failed to write manifest: %v", err) + } + if err = manifestFile.Close(); err != nil { + return "", fmt.Errorf("Failed to close manifest: %v", err) + } + defer io.DeleteFile(manifestFile.Name()) -func maybeLogManifest(manifestBytes []byte, log logr.Logger) error { // log manifest - if log.V(1).Enabled() { + if k.log.V(1).Enabled() { var obj unstructured.Unstructured err := json.Unmarshal(manifestBytes, &obj) if err != nil { - return err + return "", err } - redacted, _, err := diff.HideSecretData(&obj, nil, nil) + redacted, _, err := diff.HideSecretData(&obj, nil) if err != nil { - return err + return "", err } redactedBytes, err := json.Marshal(redacted) if err != nil { - return err + return "", err } - log.V(1).Info(string(redactedBytes)) + k.log.V(1).Info(string(redactedBytes)) } - return nil -} - -func createManifestFile(obj *unstructured.Unstructured, log logr.Logger) (*os.File, error) { - manifestBytes, err := json.Marshal(obj) - if err != nil { - return nil, err - } - manifestFile, err := os.CreateTemp(io.TempDir, "") - if err != nil { - return nil, fmt.Errorf("failed to generate temp file for manifest: %w", err) - } - if _, err = manifestFile.Write(manifestBytes); err != nil { - return nil, fmt.Errorf("failed to write manifest: %w", err) - } - if err = manifestFile.Close(); err != nil { - return nil, fmt.Errorf("failed to close manifest: %w", err) - } - - err = maybeLogManifest(manifestBytes, log) - if err != nil { - return nil, err - } - return manifestFile, nil -} - -func (k *kubectlResourceOperations) runResourceCommand(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, executor commandExecutor) (string, error) { - manifestFile, err := createManifestFile(obj, k.log) - if err != nil { - return "", err - } - defer io.DeleteFile(manifestFile.Name()) var out []string - // rbac resouces are first applied with auth reconcile kubectl feature. if obj.GetAPIVersion() == "rbac.authorization.k8s.io/v1" { - outReconcile, err := k.rbacReconcile(ctx, obj, manifestFile.Name(), dryRunStrategy) + // If it is an RBAC resource, run `kubectl auth reconcile`. This is preferred over + // `kubectl apply`, which cannot tolerate changes in roleRef, which is an immutable field. + // See: https://github.com/kubernetes/kubernetes/issues/66353 + // `auth reconcile` will delete and recreate the resource if necessary + outReconcile, err := func() (string, error) { + cleanup, err := k.processKubectlRun("auth") + if err != nil { + return "", err + } + defer cleanup() + return k.authReconcile(ctx, obj, manifestFile.Name(), dryRunStrategy) + }() if err != nil { - return "", fmt.Errorf("error running rbacReconcile: %w", err) + return "", err } out = append(out, outReconcile) // We still want to fallthrough and run `kubectl apply` in order set the @@ -136,7 +118,7 @@ func (k *kubectlResourceOperations) runResourceCommand(ctx context.Context, obj Out: &bytes.Buffer{}, ErrOut: &bytes.Buffer{}, } - err = executor(ioStreams, manifestFile.Name()) + err = executor(k.fact, ioStreams, manifestFile.Name()) if err != nil { return "", errors.New(cleanKubectlOutput(err.Error())) } @@ -149,62 +131,6 @@ func (k *kubectlResourceOperations) runResourceCommand(ctx context.Context, obj return strings.Join(out, ". "), nil } -func (k *kubectlServerSideDiffDryRunApplier) runResourceCommand(obj *unstructured.Unstructured, executor commandExecutor) (string, error) { - manifestFile, err := createManifestFile(obj, k.log) - if err != nil { - return "", err - } - defer io.DeleteFile(manifestFile.Name()) - - stdoutBuf := &bytes.Buffer{} - stderrBuf := &bytes.Buffer{} - - // Run kubectl apply - ioStreams := genericclioptions.IOStreams{ - In: &bytes.Buffer{}, - Out: stdoutBuf, - ErrOut: stderrBuf, - } - err = executor(ioStreams, manifestFile.Name()) - if err != nil { - return "", errors.New(cleanKubectlOutput(err.Error())) - } - stdout := stdoutBuf.String() - stderr := stderrBuf.String() - - if stderr != "" && stdout == "" { - err := fmt.Errorf("server-side dry run apply had non-empty stderr: %s", stderr) - k.log.Error(err, "server-side diff") - return "", err - } - if stderr != "" { - k.log.Info("Warning: Server-side dry run apply had non-empty stderr: %s", stderr) - } - return stdout, nil -} - -// rbacReconcile will perform reconciliation for RBAC resources. It will run -// the following command: -// -// kubectl auth reconcile -// -// This is preferred over `kubectl apply`, which cannot tolerate changes in -// roleRef, which is an immutable field. -// See: https://github.com/kubernetes/kubernetes/issues/66353 -// `auth reconcile` will delete and recreate the resource if necessary -func (k *kubectlResourceOperations) rbacReconcile(ctx context.Context, obj *unstructured.Unstructured, fileName string, dryRunStrategy cmdutil.DryRunStrategy) (string, error) { - cleanup, err := processKubectlRun(k.onKubectlRun, "auth") - if err != nil { - return "", fmt.Errorf("error processing kubectl run auth: %w", err) - } - defer cleanup() - outReconcile, err := k.authReconcile(ctx, obj, fileName, dryRunStrategy) - if err != nil { - return "", fmt.Errorf("error running kubectl auth reconcile: %w", err) - } - return outReconcile, nil -} - func kubeCmdFactory(kubeconfig, ns string, config *rest.Config) cmdutil.Factory { kubeConfigFlags := genericclioptions.NewConfigFlags(true) if ns != "" { @@ -213,9 +139,6 @@ func kubeCmdFactory(kubeconfig, ns string, config *rest.Config) cmdutil.Factory kubeConfigFlags.KubeConfig = &kubeconfig kubeConfigFlags.WithDiscoveryBurst(config.Burst) kubeConfigFlags.WithDiscoveryQPS(config.QPS) - kubeConfigFlags.Impersonate = &config.Impersonate.UserName - kubeConfigFlags.ImpersonateUID = &config.Impersonate.UID - kubeConfigFlags.ImpersonateGroup = &config.Impersonate.Groups matchVersionKubeConfigFlags := cmdutil.NewMatchVersionFlags(kubeConfigFlags) return cmdutil.NewFactory(matchVersionKubeConfigFlags) } @@ -226,18 +149,18 @@ func (k *kubectlResourceOperations) ReplaceResource(ctx context.Context, obj *un span.SetBaggageItem("name", obj.GetName()) defer span.Finish() k.log.Info(fmt.Sprintf("Replacing resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace())) - return k.runResourceCommand(ctx, obj, dryRunStrategy, func(ioStreams genericclioptions.IOStreams, fileName string) error { - cleanup, err := processKubectlRun(k.onKubectlRun, "replace") + return k.runResourceCommand(ctx, obj, dryRunStrategy, func(f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string) error { + cleanup, err := k.processKubectlRun("replace") if err != nil { return err } defer cleanup() - replaceOptions, err := k.newReplaceOptions(k.config, k.fact, ioStreams, fileName, obj.GetNamespace(), force, dryRunStrategy) + replaceOptions, err := newReplaceOptions(k.config, f, ioStreams, fileName, obj.GetNamespace(), force, dryRunStrategy) if err != nil { return err } - return replaceOptions.Run(k.fact) + return replaceOptions.Run(f) }) } @@ -247,14 +170,14 @@ func (k *kubectlResourceOperations) CreateResource(ctx context.Context, obj *uns span.SetBaggageItem("kind", gvk.Kind) span.SetBaggageItem("name", obj.GetName()) defer span.Finish() - return k.runResourceCommand(ctx, obj, dryRunStrategy, func(ioStreams genericclioptions.IOStreams, fileName string) error { - cleanup, err := processKubectlRun(k.onKubectlRun, "create") + return k.runResourceCommand(ctx, obj, dryRunStrategy, func(f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string) error { + cleanup, err := k.processKubectlRun("create") if err != nil { return err } defer cleanup() - createOptions, err := k.newCreateOptions(ioStreams, fileName, dryRunStrategy) + createOptions, err := newCreateOptions(k.config, ioStreams, fileName, dryRunStrategy) if err != nil { return err } @@ -267,7 +190,7 @@ func (k *kubectlResourceOperations) CreateResource(ctx context.Context, obj *uns _ = command.Flags().Set("validate", "true") } - return createOptions.RunCreate(k.fact, command) + return createOptions.RunCreate(f, command) }) } @@ -301,24 +224,20 @@ func (k *kubectlResourceOperations) UpdateResource(ctx context.Context, obj *uns } // ApplyResource performs an apply of a unstructured resource -func (k *kubectlServerSideDiffDryRunApplier) ApplyResource(_ context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force bool, validate bool, serverSideApply bool, manager string) (string, error) { +func (k *kubectlResourceOperations) ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force, validate, serverSideApply bool) (string, error) { span := k.tracer.StartSpan("ApplyResource") span.SetBaggageItem("kind", obj.GetKind()) span.SetBaggageItem("name", obj.GetName()) defer span.Finish() - k.log.V(1).WithValues( - "dry-run", [...]string{"none", "client", "server"}[dryRunStrategy], - "manager", manager, - "serverSideApply", serverSideApply).Info(fmt.Sprintf("Running server-side diff. Dry run applying resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace())) - - return k.runResourceCommand(obj, func(ioStreams genericclioptions.IOStreams, fileName string) error { - cleanup, err := processKubectlRun(k.onKubectlRun, "apply") + k.log.Info(fmt.Sprintf("Applying resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace())) + return k.runResourceCommand(ctx, obj, dryRunStrategy, func(f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string) error { + cleanup, err := k.processKubectlRun("apply") if err != nil { return err } defer cleanup() - applyOpts, err := k.newApplyOptions(ioStreams, obj, fileName, validate, force, serverSideApply, dryRunStrategy, manager) + applyOpts, err := k.newApplyOptions(ioStreams, obj, fileName, validate, force, serverSideApply, dryRunStrategy) if err != nil { return err } @@ -326,50 +245,19 @@ func (k *kubectlServerSideDiffDryRunApplier) ApplyResource(_ context.Context, ob }) } -// ApplyResource performs an apply of a unstructured resource -func (k *kubectlResourceOperations) ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force, validate, serverSideApply bool, manager string) (string, error) { - span := k.tracer.StartSpan("ApplyResource") - span.SetBaggageItem("kind", obj.GetKind()) - span.SetBaggageItem("name", obj.GetName()) - defer span.Finish() - logWithLevel := k.log - if dryRunStrategy != cmdutil.DryRunNone { - logWithLevel = logWithLevel.V(1) - } - logWithLevel.WithValues( - "dry-run", [...]string{"none", "client", "server"}[dryRunStrategy], - "manager", manager, - "serverSideApply", serverSideApply, - "serverSideDiff", true).Info(fmt.Sprintf("Applying resource %s/%s in cluster: %s, namespace: %s", obj.GetKind(), obj.GetName(), k.config.Host, obj.GetNamespace())) - - return k.runResourceCommand(ctx, obj, dryRunStrategy, func(ioStreams genericclioptions.IOStreams, fileName string) error { - cleanup, err := processKubectlRun(k.onKubectlRun, "apply") - if err != nil { - return err - } - defer cleanup() - - applyOpts, err := k.newApplyOptions(ioStreams, obj, fileName, validate, force, serverSideApply, dryRunStrategy, manager) - if err != nil { - return err - } - return applyOpts.Run() - }) -} - -func newApplyOptionsCommon(config *rest.Config, fact cmdutil.Factory, ioStreams genericclioptions.IOStreams, obj *unstructured.Unstructured, fileName string, validate bool, force bool, serverSideApply bool, dryRunStrategy cmdutil.DryRunStrategy, manager string) (*apply.ApplyOptions, error) { - flags := apply.NewApplyFlags(ioStreams) +func (k *kubectlResourceOperations) newApplyOptions(ioStreams genericclioptions.IOStreams, obj *unstructured.Unstructured, fileName string, validate bool, force, serverSideApply bool, dryRunStrategy cmdutil.DryRunStrategy) (*apply.ApplyOptions, error) { + flags := apply.NewApplyFlags(k.fact, ioStreams) o := &apply.ApplyOptions{ IOStreams: ioStreams, - VisitedUids: sets.Set[types.UID]{}, - VisitedNamespaces: sets.Set[string]{}, + VisitedUids: sets.NewString(), + VisitedNamespaces: sets.NewString(), Recorder: genericclioptions.NoopRecorder{}, PrintFlags: flags.PrintFlags, Overwrite: true, OpenAPIPatch: true, ServerSideApply: serverSideApply, } - dynamicClient, err := dynamic.NewForConfig(config) + dynamicClient, err := dynamic.NewForConfig(k.config) if err != nil { return nil, err } @@ -378,64 +266,18 @@ func newApplyOptionsCommon(config *rest.Config, fact cmdutil.Factory, ioStreams if err != nil { return nil, err } - o.OpenAPIGetter = fact - o.DryRunStrategy = dryRunStrategy - o.FieldManager = manager - validateDirective := metav1.FieldValidationIgnore - if validate { - validateDirective = metav1.FieldValidationStrict - } - o.Validator, err = fact.Validator(validateDirective) - if err != nil { - return nil, err - } - o.Builder = fact.NewBuilder() - o.Mapper, err = fact.ToRESTMapper() + o.OpenAPISchema = k.openAPISchema + o.Validator, err = k.fact.Validator(validate) if err != nil { return nil, err } - - o.DeleteOptions.Filenames = []string{fileName} - o.Namespace = obj.GetNamespace() - o.DeleteOptions.ForceDeletion = force - o.DryRunStrategy = dryRunStrategy - if manager != "" { - o.FieldManager = manager - } - return o, nil -} - -func (k *kubectlServerSideDiffDryRunApplier) newApplyOptions(ioStreams genericclioptions.IOStreams, obj *unstructured.Unstructured, fileName string, validate bool, force, serverSideApply bool, dryRunStrategy cmdutil.DryRunStrategy, manager string) (*apply.ApplyOptions, error) { - o, err := newApplyOptionsCommon(k.config, k.fact, ioStreams, obj, fileName, validate, force, serverSideApply, dryRunStrategy, manager) + discoveryClient, err := discovery.NewDiscoveryClientForConfig(k.config) if err != nil { return nil, err } - - o.ToPrinter = func(operation string) (printers.ResourcePrinter, error) { - o.PrintFlags.NamePrintFlags.Operation = operation - if o.DryRunStrategy != cmdutil.DryRunServer { - return nil, fmt.Errorf("invalid dry run strategy passed to server-side diff dry run applier: %d, expected %d", o.DryRunStrategy, cmdutil.DryRunServer) - } - // managedFields are required by server-side diff to identify - // changes made by mutation webhooks. - o.PrintFlags.JSONYamlPrintFlags.ShowManagedFields = true - p, err := o.PrintFlags.JSONYamlPrintFlags.ToPrinter("json") - if err != nil { - return nil, fmt.Errorf("error configuring server-side diff printer: %w", err) - } - return p, nil - } - - o.ForceConflicts = true - - if err := o.Validate(); err != nil { - return nil, fmt.Errorf("error validating options: %w", err) - } - return o, nil -} - -func (k *kubectlResourceOperations) newApplyOptions(ioStreams genericclioptions.IOStreams, obj *unstructured.Unstructured, fileName string, validate bool, force, serverSideApply bool, dryRunStrategy cmdutil.DryRunStrategy, manager string) (*apply.ApplyOptions, error) { - o, err := newApplyOptionsCommon(k.config, k.fact, ioStreams, obj, fileName, validate, force, serverSideApply, dryRunStrategy, manager) + o.DryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) + o.Builder = k.fact.NewBuilder() + o.Mapper, err = k.fact.ToRESTMapper() if err != nil { return nil, err } @@ -451,23 +293,19 @@ func (k *kubectlResourceOperations) newApplyOptions(ioStreams genericclioptions. case cmdutil.DryRunServer: err = o.PrintFlags.Complete("%s (server dry run)") if err != nil { - return nil, fmt.Errorf("error configuring server dryrun printer: %w", err) + return nil, err } } return o.PrintFlags.ToPrinter() } - - if serverSideApply { - o.ForceConflicts = true - } - - if err := o.Validate(); err != nil { - return nil, fmt.Errorf("error validating options: %w", err) - } + o.DeleteOptions.FilenameOptions.Filenames = []string{fileName} + o.Namespace = obj.GetNamespace() + o.DeleteOptions.ForceDeletion = force + o.DryRunStrategy = dryRunStrategy return o, nil } -func (k *kubectlResourceOperations) newCreateOptions(ioStreams genericclioptions.IOStreams, fileName string, dryRunStrategy cmdutil.DryRunStrategy) (*create.CreateOptions, error) { +func newCreateOptions(config *rest.Config, ioStreams genericclioptions.IOStreams, fileName string, dryRunStrategy cmdutil.DryRunStrategy) (*create.CreateOptions, error) { o := create.NewCreateOptions(ioStreams) recorder, err := o.RecordFlags.ToRecorder() @@ -476,6 +314,17 @@ func (k *kubectlResourceOperations) newCreateOptions(ioStreams genericclioptions } o.Recorder = recorder + dynamicClient, err := dynamic.NewForConfig(config) + if err != nil { + return nil, err + } + + discoveryClient, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + o.DryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) + switch dryRunStrategy { case cmdutil.DryRunClient: err = o.PrintFlags.Complete("%s (dry run)") @@ -498,14 +347,10 @@ func (k *kubectlResourceOperations) newCreateOptions(ioStreams genericclioptions return printer.PrintObj(obj, o.Out) } o.FilenameOptions.Filenames = []string{fileName} - - if err := o.Validate(); err != nil { - return nil, fmt.Errorf("error validating options: %w", err) - } return o, nil } -func (k *kubectlResourceOperations) newReplaceOptions(config *rest.Config, f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string, namespace string, force bool, dryRunStrategy cmdutil.DryRunStrategy) (*replace.ReplaceOptions, error) { +func newReplaceOptions(config *rest.Config, f cmdutil.Factory, ioStreams genericclioptions.IOStreams, fileName string, namespace string, force bool, dryRunStrategy cmdutil.DryRunStrategy) (*replace.ReplaceOptions, error) { o := replace.NewReplaceOptions(ioStreams) recorder, err := o.RecordFlags.ToRecorder() @@ -523,7 +368,11 @@ func (k *kubectlResourceOperations) newReplaceOptions(config *rest.Config, f cmd if err != nil { return nil, err } - + discoveryClient, err := discovery.NewDiscoveryClientForConfig(config) + if err != nil { + return nil, err + } + o.DryRunVerifier = resource.NewDryRunVerifier(dynamicClient, discoveryClient) o.Builder = func() *resource.Builder { return f.NewBuilder() } @@ -550,16 +399,9 @@ func (k *kubectlResourceOperations) newReplaceOptions(config *rest.Config, f cmd return printer.PrintObj(obj, o.Out) } - o.DeleteOptions.Filenames = []string{fileName} + o.DeleteOptions.FilenameOptions.Filenames = []string{fileName} o.Namespace = namespace - - if dryRunStrategy == cmdutil.DryRunNone { - o.DeleteOptions.ForceDeletion = force - } - - if err := o.Validate(); err != nil { - return nil, fmt.Errorf("error validating options: %w", err) - } + o.DeleteOptions.ForceDeletion = force return o, nil } @@ -589,10 +431,6 @@ func newReconcileOptions(f cmdutil.Factory, kubeClient *kubernetes.Clientset, fi return nil, err } o.PrintObject = printer.PrintObj - - if err := o.Validate(); err != nil { - return nil, fmt.Errorf("error validating options: %w", err) - } return o, nil } @@ -618,8 +456,9 @@ func (k *kubectlResourceOperations) authReconcile(ctx context.Context, obj *unst } reconcileOpts, err := newReconcileOptions(k.fact, kubeClient, manifestFile, ioStreams, obj.GetNamespace(), dryRunStrategy) if err != nil { - return "", fmt.Errorf("error calling newReconcileOptions: %w", err) + return "", err } + err = reconcileOpts.Validate() if err != nil { return "", errors.New(cleanKubectlOutput(err.Error())) @@ -639,9 +478,9 @@ func (k *kubectlResourceOperations) authReconcile(ctx context.Context, obj *unst return strings.Join(out, ". "), nil } -func processKubectlRun(onKubectlRun OnKubectlRunFunc, cmd string) (CleanupFunc, error) { - if onKubectlRun != nil { - return onKubectlRun(cmd) +func (k *kubectlResourceOperations) processKubectlRun(cmd string) (CleanupFunc, error) { + if k.onKubectlRun != nil { + return k.onKubectlRun(cmd) } return func() {}, nil } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/parser.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/parser.go deleted file mode 100644 index 441e28e9d..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/parser.go +++ /dev/null @@ -1,14300 +0,0 @@ -// Code generated by hack/update_static_schema.sh; DO NOT EDIT. -// Everything below is downloaded from applyconfigurations/internal/internal.go in kubernetes/client-go. - -/* -Copyright The Kubernetes 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 applyconfiguration-gen. DO NOT EDIT. - -package scheme - -import ( - fmt "fmt" - sync "sync" - - typed "sigs.k8s.io/structured-merge-diff/v4/typed" -) - -func StaticParser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: io.k8s.api.admissionregistration.v1.AuditAnnotation - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: valueExpression - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1.ExpressionWarning - map: - fields: - - name: fieldRef - type: - scalar: string - default: "" - - name: warning - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1.MatchCondition - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1.MatchResources - map: - fields: - - name: excludeResourceRules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations - elementRelationship: atomic - - name: matchPolicy - type: - scalar: string - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1.MutatingWebhook - map: - fields: - - name: admissionReviewVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: clientConfig - type: - namedType: io.k8s.api.admissionregistration.v1.WebhookClientConfig - default: {} - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchPolicy - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: reinvocationPolicy - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.RuleWithOperations - elementRelationship: atomic - - name: sideEffects - type: - scalar: string - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: webhooks - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.MutatingWebhook - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1.NamedRuleWithOperations - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: apiVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: operations - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourceNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: scope - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1.ParamKind - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1.ParamRef - map: - fields: - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: parameterNotFoundAction - type: - scalar: string - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1.RuleWithOperations - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: apiVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: operations - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: scope - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1.ServiceReference - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: path - type: - scalar: string - - name: port - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1.TypeChecking - map: - fields: - - name: expressionWarnings - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.ExpressionWarning - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec - default: {} - - name: status - type: - namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus - default: {} -- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec - default: {} -- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyBindingSpec - map: - fields: - - name: matchResources - type: - namedType: io.k8s.api.admissionregistration.v1.MatchResources - - name: paramRef - type: - namedType: io.k8s.api.admissionregistration.v1.ParamRef - - name: policyName - type: - scalar: string - - name: validationActions - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicySpec - map: - fields: - - name: auditAnnotations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.AuditAnnotation - elementRelationship: atomic - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchConstraints - type: - namedType: io.k8s.api.admissionregistration.v1.MatchResources - - name: paramKind - type: - namedType: io.k8s.api.admissionregistration.v1.ParamKind - - name: validations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.Validation - elementRelationship: atomic - - name: variables - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.Variable - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1.ValidatingAdmissionPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: typeChecking - type: - namedType: io.k8s.api.admissionregistration.v1.TypeChecking -- name: io.k8s.api.admissionregistration.v1.ValidatingWebhook - map: - fields: - - name: admissionReviewVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: clientConfig - type: - namedType: io.k8s.api.admissionregistration.v1.WebhookClientConfig - default: {} - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchPolicy - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.RuleWithOperations - elementRelationship: atomic - - name: sideEffects - type: - scalar: string - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: webhooks - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.ValidatingWebhook - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1.Validation - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: message - type: - scalar: string - - name: messageExpression - type: - scalar: string - - name: reason - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1.Variable - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1.WebhookClientConfig - map: - fields: - - name: caBundle - type: - scalar: string - - name: service - type: - namedType: io.k8s.api.admissionregistration.v1.ServiceReference - - name: url - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration - map: - fields: - - name: expression - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: valueExpression - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning - map: - fields: - - name: fieldRef - type: - scalar: string - default: "" - - name: warning - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1alpha1.JSONPatch - map: - fields: - - name: expression - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1alpha1.MatchCondition - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1alpha1.MatchResources - map: - fields: - - name: excludeResourceRules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations - elementRelationship: atomic - - name: matchPolicy - type: - scalar: string - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec - default: {} -- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec - default: {} -- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicyBindingSpec - map: - fields: - - name: matchResources - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources - - name: paramRef - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ParamRef - - name: policyName - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1alpha1.MutatingAdmissionPolicySpec - map: - fields: - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchConstraints - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources - - name: mutations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.Mutation - elementRelationship: atomic - - name: paramKind - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ParamKind - - name: reinvocationPolicy - type: - scalar: string - - name: variables - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.Variable - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1alpha1.Mutation - map: - fields: - - name: applyConfiguration - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ApplyConfiguration - - name: jsonPatch - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.JSONPatch - - name: patchType - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: apiVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: operations - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourceNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: scope - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1alpha1.ParamKind - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1alpha1.ParamRef - map: - fields: - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: parameterNotFoundAction - type: - scalar: string - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1alpha1.TypeChecking - map: - fields: - - name: expressionWarnings - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec - default: {} - - name: status - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus - default: {} -- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec - default: {} -- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec - map: - fields: - - name: matchResources - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources - - name: paramRef - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ParamRef - - name: policyName - type: - scalar: string - - name: validationActions - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec - map: - fields: - - name: auditAnnotations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation - elementRelationship: atomic - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchConstraints - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources - - name: paramKind - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.ParamKind - - name: validations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.Validation - elementRelationship: atomic - - name: variables - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1alpha1.Variable - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: typeChecking - type: - namedType: io.k8s.api.admissionregistration.v1alpha1.TypeChecking -- name: io.k8s.api.admissionregistration.v1alpha1.Validation - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: message - type: - scalar: string - - name: messageExpression - type: - scalar: string - - name: reason - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1alpha1.Variable - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1beta1.AuditAnnotation - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: valueExpression - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1beta1.ExpressionWarning - map: - fields: - - name: fieldRef - type: - scalar: string - default: "" - - name: warning - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1beta1.MatchCondition - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.admissionregistration.v1beta1.MatchResources - map: - fields: - - name: excludeResourceRules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations - elementRelationship: atomic - - name: matchPolicy - type: - scalar: string - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1beta1.MutatingWebhook - map: - fields: - - name: admissionReviewVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: clientConfig - type: - namedType: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig - default: {} - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchPolicy - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: reinvocationPolicy - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.RuleWithOperations - elementRelationship: atomic - - name: sideEffects - type: - scalar: string - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: webhooks - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.MutatingWebhook - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: apiVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: operations - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourceNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: scope - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1beta1.ParamKind - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1beta1.ParamRef - map: - fields: - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: parameterNotFoundAction - type: - scalar: string - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1beta1.ServiceReference - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: path - type: - scalar: string - - name: port - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1beta1.TypeChecking - map: - fields: - - name: expressionWarnings - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.ExpressionWarning - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec - default: {} - - name: status - type: - namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus - default: {} -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec - default: {} -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec - map: - fields: - - name: matchResources - type: - namedType: io.k8s.api.admissionregistration.v1beta1.MatchResources - - name: paramRef - type: - namedType: io.k8s.api.admissionregistration.v1beta1.ParamRef - - name: policyName - type: - scalar: string - - name: validationActions - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec - map: - fields: - - name: auditAnnotations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.AuditAnnotation - elementRelationship: atomic - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchConstraints - type: - namedType: io.k8s.api.admissionregistration.v1beta1.MatchResources - - name: paramKind - type: - namedType: io.k8s.api.admissionregistration.v1beta1.ParamKind - - name: validations - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.Validation - elementRelationship: atomic - - name: variables - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.Variable - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: typeChecking - type: - namedType: io.k8s.api.admissionregistration.v1beta1.TypeChecking -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook - map: - fields: - - name: admissionReviewVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: clientConfig - type: - namedType: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig - default: {} - - name: failurePolicy - type: - scalar: string - - name: matchConditions - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.MatchCondition - elementRelationship: associative - keys: - - name - - name: matchPolicy - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1.RuleWithOperations - elementRelationship: atomic - - name: sideEffects - type: - scalar: string - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: webhooks - type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1beta1.Validation - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: message - type: - scalar: string - - name: messageExpression - type: - scalar: string - - name: reason - type: - scalar: string -- name: io.k8s.api.admissionregistration.v1beta1.Variable - map: - fields: - - name: expression - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig - map: - fields: - - name: caBundle - type: - scalar: string - - name: service - type: - namedType: io.k8s.api.admissionregistration.v1beta1.ServiceReference - - name: url - type: - scalar: string -- name: io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion - map: - fields: - - name: apiServerID - type: - scalar: string - - name: decodableVersions - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: encodingVersion - type: - scalar: string - - name: servedVersions - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersion - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus - default: {} -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: observedGeneration - type: - scalar: numeric - - name: reason - type: - scalar: string - default: "" - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus - map: - fields: - - name: commonEncodingVersion - type: - scalar: string - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition - elementRelationship: associative - keys: - - type - - name: storageVersions - type: - list: - elementType: - namedType: io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion - elementRelationship: associative - keys: - - apiServerID -- name: io.k8s.api.apps.v1.ControllerRevision - map: - fields: - - name: apiVersion - type: - scalar: string - - name: data - type: - namedType: __untyped_atomic_ - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: revision - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1.DaemonSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1.DaemonSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1.DaemonSetStatus - default: {} -- name: io.k8s.api.apps.v1.DaemonSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1.DaemonSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: updateStrategy - type: - namedType: io.k8s.api.apps.v1.DaemonSetUpdateStrategy - default: {} -- name: io.k8s.api.apps.v1.DaemonSetStatus - map: - fields: - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1.DaemonSetCondition - elementRelationship: associative - keys: - - type - - name: currentNumberScheduled - type: - scalar: numeric - default: 0 - - name: desiredNumberScheduled - type: - scalar: numeric - default: 0 - - name: numberAvailable - type: - scalar: numeric - - name: numberMisscheduled - type: - scalar: numeric - default: 0 - - name: numberReady - type: - scalar: numeric - default: 0 - - name: numberUnavailable - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: updatedNumberScheduled - type: - scalar: numeric -- name: io.k8s.api.apps.v1.DaemonSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1.RollingUpdateDaemonSet - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1.Deployment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1.DeploymentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1.DeploymentStatus - default: {} -- name: io.k8s.api.apps.v1.DeploymentCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1.DeploymentSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: paused - type: - scalar: boolean - - name: progressDeadlineSeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy - type: - namedType: io.k8s.api.apps.v1.DeploymentStrategy - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1.DeploymentStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1.DeploymentCondition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: unavailableReplicas - type: - scalar: numeric - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1.DeploymentStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1.RollingUpdateDeployment - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1.ReplicaSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1.ReplicaSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1.ReplicaSetStatus - default: {} -- name: io.k8s.api.apps.v1.ReplicaSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1.ReplicaSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1.ReplicaSetStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1.ReplicaSetCondition - elementRelationship: associative - keys: - - type - - name: fullyLabeledReplicas - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1.RollingUpdateDaemonSet - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1.RollingUpdateDeployment - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: partition - type: - scalar: numeric -- name: io.k8s.api.apps.v1.StatefulSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1.StatefulSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1.StatefulSetStatus - default: {} -- name: io.k8s.api.apps.v1.StatefulSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1.StatefulSetOrdinals - map: - fields: - - name: start - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string -- name: io.k8s.api.apps.v1.StatefulSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: ordinals - type: - namedType: io.k8s.api.apps.v1.StatefulSetOrdinals - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy - - name: podManagementPolicy - type: - scalar: string - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: serviceName - type: - scalar: string - default: "" - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: updateStrategy - type: - namedType: io.k8s.api.apps.v1.StatefulSetUpdateStrategy - default: {} - - name: volumeClaimTemplates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim - elementRelationship: atomic -- name: io.k8s.api.apps.v1.StatefulSetStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - default: 0 - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1.StatefulSetCondition - elementRelationship: associative - keys: - - type - - name: currentReplicas - type: - scalar: numeric - - name: currentRevision - type: - scalar: string - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 - - name: updateRevision - type: - scalar: string - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1.StatefulSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1beta1.ControllerRevision - map: - fields: - - name: apiVersion - type: - scalar: string - - name: data - type: - namedType: __untyped_atomic_ - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: revision - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta1.Deployment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1beta1.DeploymentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1beta1.DeploymentStatus - default: {} -- name: io.k8s.api.apps.v1beta1.DeploymentCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1beta1.DeploymentSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: paused - type: - scalar: boolean - - name: progressDeadlineSeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: rollbackTo - type: - namedType: io.k8s.api.apps.v1beta1.RollbackConfig - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy - type: - namedType: io.k8s.api.apps.v1beta1.DeploymentStrategy - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1beta1.DeploymentStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1beta1.DeploymentCondition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: unavailableReplicas - type: - scalar: numeric - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.DeploymentStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1beta1.RollingUpdateDeployment - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1beta1.RollbackConfig - map: - fields: - - name: revision - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.RollingUpdateDeployment - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: partition - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.StatefulSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetStatus - default: {} -- name: io.k8s.api.apps.v1beta1.StatefulSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1beta1.StatefulSetOrdinals - map: - fields: - - name: start - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string -- name: io.k8s.api.apps.v1beta1.StatefulSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: ordinals - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetOrdinals - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy - - name: podManagementPolicy - type: - scalar: string - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: serviceName - type: - scalar: string - default: "" - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: updateStrategy - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy - default: {} - - name: volumeClaimTemplates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim - elementRelationship: atomic -- name: io.k8s.api.apps.v1beta1.StatefulSetStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - default: 0 - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1beta1.StatefulSetCondition - elementRelationship: associative - keys: - - type - - name: currentReplicas - type: - scalar: numeric - - name: currentRevision - type: - scalar: string - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 - - name: updateRevision - type: - scalar: string - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1beta2.ControllerRevision - map: - fields: - - name: apiVersion - type: - scalar: string - - name: data - type: - namedType: __untyped_atomic_ - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: revision - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta2.DaemonSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1beta2.DaemonSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1beta2.DaemonSetStatus - default: {} -- name: io.k8s.api.apps.v1beta2.DaemonSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1beta2.DaemonSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: updateStrategy - type: - namedType: io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy - default: {} -- name: io.k8s.api.apps.v1beta2.DaemonSetStatus - map: - fields: - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1beta2.DaemonSetCondition - elementRelationship: associative - keys: - - type - - name: currentNumberScheduled - type: - scalar: numeric - default: 0 - - name: desiredNumberScheduled - type: - scalar: numeric - default: 0 - - name: numberAvailable - type: - scalar: numeric - - name: numberMisscheduled - type: - scalar: numeric - default: 0 - - name: numberReady - type: - scalar: numeric - default: 0 - - name: numberUnavailable - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: updatedNumberScheduled - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1beta2.Deployment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1beta2.DeploymentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1beta2.DeploymentStatus - default: {} -- name: io.k8s.api.apps.v1beta2.DeploymentCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1beta2.DeploymentSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: paused - type: - scalar: boolean - - name: progressDeadlineSeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy - type: - namedType: io.k8s.api.apps.v1beta2.DeploymentStrategy - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1beta2.DeploymentStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1beta2.DeploymentCondition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: unavailableReplicas - type: - scalar: numeric - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta2.DeploymentStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1beta2.RollingUpdateDeployment - - name: type - type: - scalar: string -- name: io.k8s.api.apps.v1beta2.ReplicaSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1beta2.ReplicaSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1beta2.ReplicaSetStatus - default: {} -- name: io.k8s.api.apps.v1beta2.ReplicaSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1beta2.ReplicaSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1beta2.ReplicaSetStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1beta2.ReplicaSetCondition - elementRelationship: associative - keys: - - type - - name: fullyLabeledReplicas - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1beta2.RollingUpdateDeployment - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: partition - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta2.StatefulSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetStatus - default: {} -- name: io.k8s.api.apps.v1beta2.StatefulSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1beta2.StatefulSetOrdinals - map: - fields: - - name: start - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string -- name: io.k8s.api.apps.v1beta2.StatefulSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: ordinals - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetOrdinals - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy - - name: podManagementPolicy - type: - scalar: string - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: serviceName - type: - scalar: string - default: "" - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: updateStrategy - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy - default: {} - - name: volumeClaimTemplates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim - elementRelationship: atomic -- name: io.k8s.api.apps.v1beta2.StatefulSetStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - default: 0 - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.apps.v1beta2.StatefulSetCondition - elementRelationship: associative - keys: - - type - - name: currentReplicas - type: - scalar: numeric - - name: currentRevision - type: - scalar: string - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 - - name: updateRevision - type: - scalar: string - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy - - name: type - type: - scalar: string -- name: io.k8s.api.autoscaling.v1.CrossVersionObjectReference - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec - default: {} - - name: status - type: - namedType: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus - default: {} -- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec - map: - fields: - - name: maxReplicas - type: - scalar: numeric - default: 0 - - name: minReplicas - type: - scalar: numeric - - name: scaleTargetRef - type: - namedType: io.k8s.api.autoscaling.v1.CrossVersionObjectReference - default: {} - - name: targetCPUUtilizationPercentage - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus - map: - fields: - - name: currentCPUUtilizationPercentage - type: - scalar: numeric - - name: currentReplicas - type: - scalar: numeric - default: 0 - - name: desiredReplicas - type: - scalar: numeric - default: 0 - - name: lastScaleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource - map: - fields: - - name: container - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: target - type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus - map: - fields: - - name: container - type: - scalar: string - default: "" - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.CrossVersionObjectReference - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.ExternalMetricSource - map: - fields: - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} - - name: target - type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ExternalMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.HPAScalingPolicy - map: - fields: - - name: periodSeconds - type: - scalar: numeric - default: 0 - - name: type - type: - scalar: string - default: "" - - name: value - type: - scalar: numeric - default: 0 -- name: io.k8s.api.autoscaling.v2.HPAScalingRules - map: - fields: - - name: policies - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.HPAScalingPolicy - elementRelationship: atomic - - name: selectPolicy - type: - scalar: string - - name: stabilizationWindowSeconds - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec - default: {} - - name: status - type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus - default: {} -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - map: - fields: - - name: scaleDown - type: - namedType: io.k8s.api.autoscaling.v2.HPAScalingRules - - name: scaleUp - type: - namedType: io.k8s.api.autoscaling.v2.HPAScalingRules -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec - map: - fields: - - name: behavior - type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - - name: maxReplicas - type: - scalar: numeric - default: 0 - - name: metrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.MetricSpec - elementRelationship: atomic - - name: minReplicas - type: - scalar: numeric - - name: scaleTargetRef - type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference - default: {} -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition - elementRelationship: associative - keys: - - type - - name: currentMetrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.MetricStatus - elementRelationship: atomic - - name: currentReplicas - type: - scalar: numeric - - name: desiredReplicas - type: - scalar: numeric - default: 0 - - name: lastScaleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2.MetricIdentifier - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2.MetricSpec - map: - fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource - - name: external - type: - namedType: io.k8s.api.autoscaling.v2.ExternalMetricSource - - name: object - type: - namedType: io.k8s.api.autoscaling.v2.ObjectMetricSource - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2.PodsMetricSource - - name: resource - type: - namedType: io.k8s.api.autoscaling.v2.ResourceMetricSource - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.MetricStatus - map: - fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus - - name: external - type: - namedType: io.k8s.api.autoscaling.v2.ExternalMetricStatus - - name: object - type: - namedType: io.k8s.api.autoscaling.v2.ObjectMetricStatus - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2.PodsMetricStatus - - name: resource - type: - namedType: io.k8s.api.autoscaling.v2.ResourceMetricStatus - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.MetricTarget - map: - fields: - - name: averageUtilization - type: - scalar: numeric - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type - type: - scalar: string - default: "" - - name: value - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2.MetricValueStatus - map: - fields: - - name: averageUtilization - type: - scalar: numeric - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: value - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2.ObjectMetricSource - map: - fields: - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} - - name: target - type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ObjectMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.PodsMetricSource - map: - fields: - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} - - name: target - type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.PodsMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.ResourceMetricSource - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: target - type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ResourceMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource - map: - fields: - - name: container - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: targetAverageUtilization - type: - scalar: numeric - - name: targetAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus - map: - fields: - - name: container - type: - scalar: string - default: "" - - name: currentAverageUtilization - type: - scalar: numeric - - name: currentAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource - map: - fields: - - name: metricName - type: - scalar: string - default: "" - - name: metricSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: targetAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: targetValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus - map: - fields: - - name: currentAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: currentValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metricName - type: - scalar: string - default: "" - - name: metricSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec - default: {} - - name: status - type: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus - default: {} -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec - map: - fields: - - name: maxReplicas - type: - scalar: numeric - default: 0 - - name: metrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta1.MetricSpec - elementRelationship: atomic - - name: minReplicas - type: - scalar: numeric - - name: scaleTargetRef - type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - default: {} -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition - elementRelationship: atomic - - name: currentMetrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta1.MetricStatus - elementRelationship: atomic - - name: currentReplicas - type: - scalar: numeric - default: 0 - - name: desiredReplicas - type: - scalar: numeric - default: 0 - - name: lastScaleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2beta1.MetricSpec - map: - fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource - - name: external - type: - namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource - - name: object - type: - namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricSource - - name: resource - type: - namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.MetricStatus - map: - fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus - - name: external - type: - namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus - - name: object - type: - namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus - - name: resource - type: - namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource - map: - fields: - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metricName - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - default: {} - - name: targetValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus - map: - fields: - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: currentValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metricName - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - default: {} -- name: io.k8s.api.autoscaling.v2beta1.PodsMetricSource - map: - fields: - - name: metricName - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: targetAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus - map: - fields: - - name: currentAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metricName - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: targetAverageUtilization - type: - scalar: numeric - - name: targetAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus - map: - fields: - - name: currentAverageUtilization - type: - scalar: numeric - - name: currentAverageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource - map: - fields: - - name: container - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus - map: - fields: - - name: container - type: - scalar: string - default: "" - - name: current - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource - map: - fields: - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy - map: - fields: - - name: periodSeconds - type: - scalar: numeric - default: 0 - - name: type - type: - scalar: string - default: "" - - name: value - type: - scalar: numeric - default: 0 -- name: io.k8s.api.autoscaling.v2beta2.HPAScalingRules - map: - fields: - - name: policies - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy - elementRelationship: atomic - - name: selectPolicy - type: - scalar: string - - name: stabilizationWindowSeconds - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec - default: {} - - name: status - type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus - default: {} -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior - map: - fields: - - name: scaleDown - type: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules - - name: scaleUp - type: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec - map: - fields: - - name: behavior - type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior - - name: maxReplicas - type: - scalar: numeric - default: 0 - - name: metrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.MetricSpec - elementRelationship: atomic - - name: minReplicas - type: - scalar: numeric - - name: scaleTargetRef - type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition - elementRelationship: atomic - - name: currentMetrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.MetricStatus - elementRelationship: atomic - - name: currentReplicas - type: - scalar: numeric - default: 0 - - name: desiredReplicas - type: - scalar: numeric - default: 0 - - name: lastScaleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta2.MetricSpec - map: - fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource - - name: external - type: - namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource - - name: object - type: - namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricSource - - name: resource - type: - namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.MetricStatus - map: - fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus - - name: external - type: - namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus - - name: object - type: - namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus - - name: resource - type: - namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta2.MetricTarget - map: - fields: - - name: averageUtilization - type: - scalar: numeric - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type - type: - scalar: string - default: "" - - name: value - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - map: - fields: - - name: averageUtilization - type: - scalar: numeric - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: value - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource - map: - fields: - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2beta2.PodsMetricSource - map: - fields: - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: metric - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus - map: - fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.batch.v1.CronJob - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.batch.v1.CronJobSpec - default: {} - - name: status - type: - namedType: io.k8s.api.batch.v1.CronJobStatus - default: {} -- name: io.k8s.api.batch.v1.CronJobSpec - map: - fields: - - name: concurrencyPolicy - type: - scalar: string - - name: failedJobsHistoryLimit - type: - scalar: numeric - - name: jobTemplate - type: - namedType: io.k8s.api.batch.v1.JobTemplateSpec - default: {} - - name: schedule - type: - scalar: string - default: "" - - name: startingDeadlineSeconds - type: - scalar: numeric - - name: successfulJobsHistoryLimit - type: - scalar: numeric - - name: suspend - type: - scalar: boolean - - name: timeZone - type: - scalar: string -- name: io.k8s.api.batch.v1.CronJobStatus - map: - fields: - - name: active - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: atomic - - name: lastScheduleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastSuccessfulTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.batch.v1.Job - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.batch.v1.JobSpec - default: {} - - name: status - type: - namedType: io.k8s.api.batch.v1.JobStatus - default: {} -- name: io.k8s.api.batch.v1.JobCondition - map: - fields: - - name: lastProbeTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.batch.v1.JobSpec - map: - fields: - - name: activeDeadlineSeconds - type: - scalar: numeric - - name: backoffLimit - type: - scalar: numeric - - name: backoffLimitPerIndex - type: - scalar: numeric - - name: completionMode - type: - scalar: string - - name: completions - type: - scalar: numeric - - name: managedBy - type: - scalar: string - - name: manualSelector - type: - scalar: boolean - - name: maxFailedIndexes - type: - scalar: numeric - - name: parallelism - type: - scalar: numeric - - name: podFailurePolicy - type: - namedType: io.k8s.api.batch.v1.PodFailurePolicy - - name: podReplacementPolicy - type: - scalar: string - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: successPolicy - type: - namedType: io.k8s.api.batch.v1.SuccessPolicy - - name: suspend - type: - scalar: boolean - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: ttlSecondsAfterFinished - type: - scalar: numeric -- name: io.k8s.api.batch.v1.JobStatus - map: - fields: - - name: active - type: - scalar: numeric - - name: completedIndexes - type: - scalar: string - - name: completionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.batch.v1.JobCondition - elementRelationship: atomic - - name: failed - type: - scalar: numeric - - name: failedIndexes - type: - scalar: string - - name: ready - type: - scalar: numeric - - name: startTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: succeeded - type: - scalar: numeric - - name: terminating - type: - scalar: numeric - - name: uncountedTerminatedPods - type: - namedType: io.k8s.api.batch.v1.UncountedTerminatedPods -- name: io.k8s.api.batch.v1.JobTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.batch.v1.JobSpec - default: {} -- name: io.k8s.api.batch.v1.PodFailurePolicy - map: - fields: - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.batch.v1.PodFailurePolicyRule - elementRelationship: atomic -- name: io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement - map: - fields: - - name: containerName - type: - scalar: string - - name: operator - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: numeric - elementRelationship: associative -- name: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern - map: - fields: - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.batch.v1.PodFailurePolicyRule - map: - fields: - - name: action - type: - scalar: string - default: "" - - name: onExitCodes - type: - namedType: io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement - - name: onPodConditions - type: - list: - elementType: - namedType: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern - elementRelationship: atomic -- name: io.k8s.api.batch.v1.SuccessPolicy - map: - fields: - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.batch.v1.SuccessPolicyRule - elementRelationship: atomic -- name: io.k8s.api.batch.v1.SuccessPolicyRule - map: - fields: - - name: succeededCount - type: - scalar: numeric - - name: succeededIndexes - type: - scalar: string -- name: io.k8s.api.batch.v1.UncountedTerminatedPods - map: - fields: - - name: failed - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: succeeded - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.batch.v1beta1.CronJob - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.batch.v1beta1.CronJobSpec - default: {} - - name: status - type: - namedType: io.k8s.api.batch.v1beta1.CronJobStatus - default: {} -- name: io.k8s.api.batch.v1beta1.CronJobSpec - map: - fields: - - name: concurrencyPolicy - type: - scalar: string - - name: failedJobsHistoryLimit - type: - scalar: numeric - - name: jobTemplate - type: - namedType: io.k8s.api.batch.v1beta1.JobTemplateSpec - default: {} - - name: schedule - type: - scalar: string - default: "" - - name: startingDeadlineSeconds - type: - scalar: numeric - - name: successfulJobsHistoryLimit - type: - scalar: numeric - - name: suspend - type: - scalar: boolean - - name: timeZone - type: - scalar: string -- name: io.k8s.api.batch.v1beta1.CronJobStatus - map: - fields: - - name: active - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: atomic - - name: lastScheduleTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastSuccessfulTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.batch.v1beta1.JobTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.batch.v1.JobSpec - default: {} -- name: io.k8s.api.certificates.v1.CertificateSigningRequest - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestSpec - default: {} - - name: status - type: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestStatus - default: {} -- name: io.k8s.api.certificates.v1.CertificateSigningRequestCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.certificates.v1.CertificateSigningRequestSpec - map: - fields: - - name: expirationSeconds - type: - scalar: numeric - - name: extra - type: - map: - elementType: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: request - type: - scalar: string - - name: signerName - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - - name: usages - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: username - type: - scalar: string -- name: io.k8s.api.certificates.v1.CertificateSigningRequestStatus - map: - fields: - - name: certificate - type: - scalar: string - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.certificates.v1alpha1.ClusterTrustBundle - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.certificates.v1alpha1.ClusterTrustBundleSpec - default: {} -- name: io.k8s.api.certificates.v1alpha1.ClusterTrustBundleSpec - map: - fields: - - name: signerName - type: - scalar: string - - name: trustBundle - type: - scalar: string - default: "" -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec - default: {} - - name: status - type: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus - default: {} -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec - map: - fields: - - name: expirationSeconds - type: - scalar: numeric - - name: extra - type: - map: - elementType: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: request - type: - scalar: string - - name: signerName - type: - scalar: string - - name: uid - type: - scalar: string - - name: usages - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: username - type: - scalar: string -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus - map: - fields: - - name: certificate - type: - scalar: string - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.coordination.v1.Lease - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.coordination.v1.LeaseSpec - default: {} -- name: io.k8s.api.coordination.v1.LeaseSpec - map: - fields: - - name: acquireTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: holderIdentity - type: - scalar: string - - name: leaseDurationSeconds - type: - scalar: numeric - - name: leaseTransitions - type: - scalar: numeric - - name: preferredHolder - type: - scalar: string - - name: renewTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: strategy - type: - scalar: string -- name: io.k8s.api.coordination.v1alpha2.LeaseCandidate - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec - default: {} -- name: io.k8s.api.coordination.v1alpha2.LeaseCandidateSpec - map: - fields: - - name: binaryVersion - type: - scalar: string - default: "" - - name: emulationVersion - type: - scalar: string - - name: leaseName - type: - scalar: string - default: "" - - name: pingTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: renewTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: strategy - type: - scalar: string -- name: io.k8s.api.coordination.v1beta1.Lease - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.coordination.v1beta1.LeaseSpec - default: {} -- name: io.k8s.api.coordination.v1beta1.LeaseSpec - map: - fields: - - name: acquireTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: holderIdentity - type: - scalar: string - - name: leaseDurationSeconds - type: - scalar: numeric - - name: leaseTransitions - type: - scalar: numeric - - name: preferredHolder - type: - scalar: string - - name: renewTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: strategy - type: - scalar: string -- name: io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: partition - type: - scalar: numeric - - name: readOnly - type: - scalar: boolean - - name: volumeID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.Affinity - map: - fields: - - name: nodeAffinity - type: - namedType: io.k8s.api.core.v1.NodeAffinity - - name: podAffinity - type: - namedType: io.k8s.api.core.v1.PodAffinity - - name: podAntiAffinity - type: - namedType: io.k8s.api.core.v1.PodAntiAffinity -- name: io.k8s.api.core.v1.AppArmorProfile - map: - fields: - - name: localhostProfile - type: - scalar: string - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: localhostProfile - discriminatorValue: LocalhostProfile -- name: io.k8s.api.core.v1.AttachedVolume - map: - fields: - - name: devicePath - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.AzureDiskVolumeSource - map: - fields: - - name: cachingMode - type: - scalar: string - default: ReadWrite - - name: diskName - type: - scalar: string - default: "" - - name: diskURI - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - default: ext4 - - name: kind - type: - scalar: string - default: Shared - - name: readOnly - type: - scalar: boolean - default: false -- name: io.k8s.api.core.v1.AzureFilePersistentVolumeSource - map: - fields: - - name: readOnly - type: - scalar: boolean - - name: secretName - type: - scalar: string - default: "" - - name: secretNamespace - type: - scalar: string - - name: shareName - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.AzureFileVolumeSource - map: - fields: - - name: readOnly - type: - scalar: boolean - - name: secretName - type: - scalar: string - default: "" - - name: shareName - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.CSIPersistentVolumeSource - map: - fields: - - name: controllerExpandSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: controllerPublishSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: driver - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - - name: nodeExpandSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: nodePublishSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: nodeStageSecretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: readOnly - type: - scalar: boolean - - name: volumeAttributes - type: - map: - elementType: - scalar: string - - name: volumeHandle - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.CSIVolumeSource - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - - name: nodePublishSecretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: readOnly - type: - scalar: boolean - - name: volumeAttributes - type: - map: - elementType: - scalar: string -- name: io.k8s.api.core.v1.Capabilities - map: - fields: - - name: add - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: drop - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.CephFSPersistentVolumeSource - map: - fields: - - name: monitors - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: path - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretFile - type: - scalar: string - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: user - type: - scalar: string -- name: io.k8s.api.core.v1.CephFSVolumeSource - map: - fields: - - name: monitors - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: path - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretFile - type: - scalar: string - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: user - type: - scalar: string -- name: io.k8s.api.core.v1.CinderPersistentVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: volumeID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.CinderVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: volumeID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ClientIPConfig - map: - fields: - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.core.v1.ClusterTrustBundleProjection - map: - fields: - - name: labelSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: name - type: - scalar: string - - name: optional - type: - scalar: boolean - - name: path - type: - scalar: string - default: "" - - name: signerName - type: - scalar: string -- name: io.k8s.api.core.v1.ComponentCondition - map: - fields: - - name: error - type: - scalar: string - - name: message - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ComponentStatus - map: - fields: - - name: apiVersion - type: - scalar: string - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ComponentCondition - elementRelationship: associative - keys: - - type - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} -- name: io.k8s.api.core.v1.ConfigMap - map: - fields: - - name: apiVersion - type: - scalar: string - - name: binaryData - type: - map: - elementType: - scalar: string - - name: data - type: - map: - elementType: - scalar: string - - name: immutable - type: - scalar: boolean - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} -- name: io.k8s.api.core.v1.ConfigMapEnvSource - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean -- name: io.k8s.api.core.v1.ConfigMapKeySelector - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean - elementRelationship: atomic -- name: io.k8s.api.core.v1.ConfigMapNodeConfigSource - map: - fields: - - name: kubeletConfigKey - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: resourceVersion - type: - scalar: string - - name: uid - type: - scalar: string -- name: io.k8s.api.core.v1.ConfigMapProjection - map: - fields: - - name: items - type: - list: - elementType: - namedType: io.k8s.api.core.v1.KeyToPath - elementRelationship: atomic - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean -- name: io.k8s.api.core.v1.ConfigMapVolumeSource - map: - fields: - - name: defaultMode - type: - scalar: numeric - - name: items - type: - list: - elementType: - namedType: io.k8s.api.core.v1.KeyToPath - elementRelationship: atomic - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean -- name: io.k8s.api.core.v1.Container - map: - fields: - - name: args - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: command - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: env - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EnvVar - elementRelationship: associative - keys: - - name - - name: envFrom - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EnvFromSource - elementRelationship: atomic - - name: image - type: - scalar: string - - name: imagePullPolicy - type: - scalar: string - - name: lifecycle - type: - namedType: io.k8s.api.core.v1.Lifecycle - - name: livenessProbe - type: - namedType: io.k8s.api.core.v1.Probe - - name: name - type: - scalar: string - default: "" - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerPort - elementRelationship: associative - keys: - - containerPort - - protocol - - name: readinessProbe - type: - namedType: io.k8s.api.core.v1.Probe - - name: resizePolicy - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerResizePolicy - elementRelationship: atomic - - name: resources - type: - namedType: io.k8s.api.core.v1.ResourceRequirements - default: {} - - name: restartPolicy - type: - scalar: string - - name: securityContext - type: - namedType: io.k8s.api.core.v1.SecurityContext - - name: startupProbe - type: - namedType: io.k8s.api.core.v1.Probe - - name: stdin - type: - scalar: boolean - - name: stdinOnce - type: - scalar: boolean - - name: terminationMessagePath - type: - scalar: string - - name: terminationMessagePolicy - type: - scalar: string - - name: tty - type: - scalar: boolean - - name: volumeDevices - type: - list: - elementType: - namedType: io.k8s.api.core.v1.VolumeDevice - elementRelationship: associative - keys: - - devicePath - - name: volumeMounts - type: - list: - elementType: - namedType: io.k8s.api.core.v1.VolumeMount - elementRelationship: associative - keys: - - mountPath - - name: workingDir - type: - scalar: string -- name: io.k8s.api.core.v1.ContainerImage - map: - fields: - - name: names - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: sizeBytes - type: - scalar: numeric -- name: io.k8s.api.core.v1.ContainerPort - map: - fields: - - name: containerPort - type: - scalar: numeric - default: 0 - - name: hostIP - type: - scalar: string - - name: hostPort - type: - scalar: numeric - - name: name - type: - scalar: string - - name: protocol - type: - scalar: string - default: TCP -- name: io.k8s.api.core.v1.ContainerResizePolicy - map: - fields: - - name: resourceName - type: - scalar: string - default: "" - - name: restartPolicy - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ContainerState - map: - fields: - - name: running - type: - namedType: io.k8s.api.core.v1.ContainerStateRunning - - name: terminated - type: - namedType: io.k8s.api.core.v1.ContainerStateTerminated - - name: waiting - type: - namedType: io.k8s.api.core.v1.ContainerStateWaiting -- name: io.k8s.api.core.v1.ContainerStateRunning - map: - fields: - - name: startedAt - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.core.v1.ContainerStateTerminated - map: - fields: - - name: containerID - type: - scalar: string - - name: exitCode - type: - scalar: numeric - default: 0 - - name: finishedAt - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: signal - type: - scalar: numeric - - name: startedAt - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.core.v1.ContainerStateWaiting - map: - fields: - - name: message - type: - scalar: string - - name: reason - type: - scalar: string -- name: io.k8s.api.core.v1.ContainerStatus - map: - fields: - - name: allocatedResources - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: allocatedResourcesStatus - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ResourceStatus - elementRelationship: associative - keys: - - name - - name: containerID - type: - scalar: string - - name: image - type: - scalar: string - default: "" - - name: imageID - type: - scalar: string - default: "" - - name: lastState - type: - namedType: io.k8s.api.core.v1.ContainerState - default: {} - - name: name - type: - scalar: string - default: "" - - name: ready - type: - scalar: boolean - default: false - - name: resources - type: - namedType: io.k8s.api.core.v1.ResourceRequirements - - name: restartCount - type: - scalar: numeric - default: 0 - - name: started - type: - scalar: boolean - - name: state - type: - namedType: io.k8s.api.core.v1.ContainerState - default: {} - - name: user - type: - namedType: io.k8s.api.core.v1.ContainerUser - - name: volumeMounts - type: - list: - elementType: - namedType: io.k8s.api.core.v1.VolumeMountStatus - elementRelationship: associative - keys: - - mountPath -- name: io.k8s.api.core.v1.ContainerUser - map: - fields: - - name: linux - type: - namedType: io.k8s.api.core.v1.LinuxContainerUser -- name: io.k8s.api.core.v1.DaemonEndpoint - map: - fields: - - name: Port - type: - scalar: numeric - default: 0 -- name: io.k8s.api.core.v1.DownwardAPIProjection - map: - fields: - - name: items - type: - list: - elementType: - namedType: io.k8s.api.core.v1.DownwardAPIVolumeFile - elementRelationship: atomic -- name: io.k8s.api.core.v1.DownwardAPIVolumeFile - map: - fields: - - name: fieldRef - type: - namedType: io.k8s.api.core.v1.ObjectFieldSelector - - name: mode - type: - scalar: numeric - - name: path - type: - scalar: string - default: "" - - name: resourceFieldRef - type: - namedType: io.k8s.api.core.v1.ResourceFieldSelector -- name: io.k8s.api.core.v1.DownwardAPIVolumeSource - map: - fields: - - name: defaultMode - type: - scalar: numeric - - name: items - type: - list: - elementType: - namedType: io.k8s.api.core.v1.DownwardAPIVolumeFile - elementRelationship: atomic -- name: io.k8s.api.core.v1.EmptyDirVolumeSource - map: - fields: - - name: medium - type: - scalar: string - - name: sizeLimit - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.core.v1.EndpointAddress - map: - fields: - - name: hostname - type: - scalar: string - - name: ip - type: - scalar: string - default: "" - - name: nodeName - type: - scalar: string - - name: targetRef - type: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: atomic -- name: io.k8s.api.core.v1.EndpointPort - map: - fields: - - name: appProtocol - type: - scalar: string - - name: name - type: - scalar: string - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.EndpointSubset - map: - fields: - - name: addresses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EndpointAddress - elementRelationship: atomic - - name: notReadyAddresses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EndpointAddress - elementRelationship: atomic - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EndpointPort - elementRelationship: atomic -- name: io.k8s.api.core.v1.Endpoints - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: subsets - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EndpointSubset - elementRelationship: atomic -- name: io.k8s.api.core.v1.EnvFromSource - map: - fields: - - name: configMapRef - type: - namedType: io.k8s.api.core.v1.ConfigMapEnvSource - - name: prefix - type: - scalar: string - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretEnvSource -- name: io.k8s.api.core.v1.EnvVar - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: value - type: - scalar: string - - name: valueFrom - type: - namedType: io.k8s.api.core.v1.EnvVarSource -- name: io.k8s.api.core.v1.EnvVarSource - map: - fields: - - name: configMapKeyRef - type: - namedType: io.k8s.api.core.v1.ConfigMapKeySelector - - name: fieldRef - type: - namedType: io.k8s.api.core.v1.ObjectFieldSelector - - name: resourceFieldRef - type: - namedType: io.k8s.api.core.v1.ResourceFieldSelector - - name: secretKeyRef - type: - namedType: io.k8s.api.core.v1.SecretKeySelector -- name: io.k8s.api.core.v1.EphemeralContainer - map: - fields: - - name: args - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: command - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: env - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EnvVar - elementRelationship: associative - keys: - - name - - name: envFrom - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EnvFromSource - elementRelationship: atomic - - name: image - type: - scalar: string - - name: imagePullPolicy - type: - scalar: string - - name: lifecycle - type: - namedType: io.k8s.api.core.v1.Lifecycle - - name: livenessProbe - type: - namedType: io.k8s.api.core.v1.Probe - - name: name - type: - scalar: string - default: "" - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerPort - elementRelationship: associative - keys: - - containerPort - - protocol - - name: readinessProbe - type: - namedType: io.k8s.api.core.v1.Probe - - name: resizePolicy - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerResizePolicy - elementRelationship: atomic - - name: resources - type: - namedType: io.k8s.api.core.v1.ResourceRequirements - default: {} - - name: restartPolicy - type: - scalar: string - - name: securityContext - type: - namedType: io.k8s.api.core.v1.SecurityContext - - name: startupProbe - type: - namedType: io.k8s.api.core.v1.Probe - - name: stdin - type: - scalar: boolean - - name: stdinOnce - type: - scalar: boolean - - name: targetContainerName - type: - scalar: string - - name: terminationMessagePath - type: - scalar: string - - name: terminationMessagePolicy - type: - scalar: string - - name: tty - type: - scalar: boolean - - name: volumeDevices - type: - list: - elementType: - namedType: io.k8s.api.core.v1.VolumeDevice - elementRelationship: associative - keys: - - devicePath - - name: volumeMounts - type: - list: - elementType: - namedType: io.k8s.api.core.v1.VolumeMount - elementRelationship: associative - keys: - - mountPath - - name: workingDir - type: - scalar: string -- name: io.k8s.api.core.v1.EphemeralVolumeSource - map: - fields: - - name: volumeClaimTemplate - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimTemplate -- name: io.k8s.api.core.v1.Event - map: - fields: - - name: action - type: - scalar: string - - name: apiVersion - type: - scalar: string - - name: count - type: - scalar: numeric - - name: eventTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: firstTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: involvedObject - type: - namedType: io.k8s.api.core.v1.ObjectReference - default: {} - - name: kind - type: - scalar: string - - name: lastTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: reason - type: - scalar: string - - name: related - type: - namedType: io.k8s.api.core.v1.ObjectReference - - name: reportingComponent - type: - scalar: string - default: "" - - name: reportingInstance - type: - scalar: string - default: "" - - name: series - type: - namedType: io.k8s.api.core.v1.EventSeries - - name: source - type: - namedType: io.k8s.api.core.v1.EventSource - default: {} - - name: type - type: - scalar: string -- name: io.k8s.api.core.v1.EventSeries - map: - fields: - - name: count - type: - scalar: numeric - - name: lastObservedTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime -- name: io.k8s.api.core.v1.EventSource - map: - fields: - - name: component - type: - scalar: string - - name: host - type: - scalar: string -- name: io.k8s.api.core.v1.ExecAction - map: - fields: - - name: command - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.FCVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: lun - type: - scalar: numeric - - name: readOnly - type: - scalar: boolean - - name: targetWWNs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: wwids - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.FlexPersistentVolumeSource - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - - name: options - type: - map: - elementType: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretReference -- name: io.k8s.api.core.v1.FlexVolumeSource - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: fsType - type: - scalar: string - - name: options - type: - map: - elementType: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference -- name: io.k8s.api.core.v1.FlockerVolumeSource - map: - fields: - - name: datasetName - type: - scalar: string - - name: datasetUUID - type: - scalar: string -- name: io.k8s.api.core.v1.GCEPersistentDiskVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: partition - type: - scalar: numeric - - name: pdName - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean -- name: io.k8s.api.core.v1.GRPCAction - map: - fields: - - name: port - type: - scalar: numeric - default: 0 - - name: service - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.GitRepoVolumeSource - map: - fields: - - name: directory - type: - scalar: string - - name: repository - type: - scalar: string - default: "" - - name: revision - type: - scalar: string -- name: io.k8s.api.core.v1.GlusterfsPersistentVolumeSource - map: - fields: - - name: endpoints - type: - scalar: string - default: "" - - name: endpointsNamespace - type: - scalar: string - - name: path - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean -- name: io.k8s.api.core.v1.GlusterfsVolumeSource - map: - fields: - - name: endpoints - type: - scalar: string - default: "" - - name: path - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean -- name: io.k8s.api.core.v1.HTTPGetAction - map: - fields: - - name: host - type: - scalar: string - - name: httpHeaders - type: - list: - elementType: - namedType: io.k8s.api.core.v1.HTTPHeader - elementRelationship: atomic - - name: path - type: - scalar: string - - name: port - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: scheme - type: - scalar: string -- name: io.k8s.api.core.v1.HTTPHeader - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.HostAlias - map: - fields: - - name: hostnames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: ip - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.HostIP - map: - fields: - - name: ip - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.HostPathVolumeSource - map: - fields: - - name: path - type: - scalar: string - default: "" - - name: type - type: - scalar: string -- name: io.k8s.api.core.v1.ISCSIPersistentVolumeSource - map: - fields: - - name: chapAuthDiscovery - type: - scalar: boolean - - name: chapAuthSession - type: - scalar: boolean - - name: fsType - type: - scalar: string - - name: initiatorName - type: - scalar: string - - name: iqn - type: - scalar: string - default: "" - - name: iscsiInterface - type: - scalar: string - default: default - - name: lun - type: - scalar: numeric - default: 0 - - name: portals - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: targetPortal - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ISCSIVolumeSource - map: - fields: - - name: chapAuthDiscovery - type: - scalar: boolean - - name: chapAuthSession - type: - scalar: boolean - - name: fsType - type: - scalar: string - - name: initiatorName - type: - scalar: string - - name: iqn - type: - scalar: string - default: "" - - name: iscsiInterface - type: - scalar: string - default: default - - name: lun - type: - scalar: numeric - default: 0 - - name: portals - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: targetPortal - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ImageVolumeSource - map: - fields: - - name: pullPolicy - type: - scalar: string - - name: reference - type: - scalar: string -- name: io.k8s.api.core.v1.KeyToPath - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: mode - type: - scalar: numeric - - name: path - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.Lifecycle - map: - fields: - - name: postStart - type: - namedType: io.k8s.api.core.v1.LifecycleHandler - - name: preStop - type: - namedType: io.k8s.api.core.v1.LifecycleHandler -- name: io.k8s.api.core.v1.LifecycleHandler - map: - fields: - - name: exec - type: - namedType: io.k8s.api.core.v1.ExecAction - - name: httpGet - type: - namedType: io.k8s.api.core.v1.HTTPGetAction - - name: sleep - type: - namedType: io.k8s.api.core.v1.SleepAction - - name: tcpSocket - type: - namedType: io.k8s.api.core.v1.TCPSocketAction -- name: io.k8s.api.core.v1.LimitRange - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.LimitRangeSpec - default: {} -- name: io.k8s.api.core.v1.LimitRangeItem - map: - fields: - - name: default - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: defaultRequest - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: max - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: maxLimitRequestRatio - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: min - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.LimitRangeSpec - map: - fields: - - name: limits - type: - list: - elementType: - namedType: io.k8s.api.core.v1.LimitRangeItem - elementRelationship: atomic -- name: io.k8s.api.core.v1.LinuxContainerUser - map: - fields: - - name: gid - type: - scalar: numeric - default: 0 - - name: supplementalGroups - type: - list: - elementType: - scalar: numeric - elementRelationship: atomic - - name: uid - type: - scalar: numeric - default: 0 -- name: io.k8s.api.core.v1.LoadBalancerIngress - map: - fields: - - name: hostname - type: - scalar: string - - name: ip - type: - scalar: string - - name: ipMode - type: - scalar: string - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PortStatus - elementRelationship: atomic -- name: io.k8s.api.core.v1.LoadBalancerStatus - map: - fields: - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.core.v1.LoadBalancerIngress - elementRelationship: atomic -- name: io.k8s.api.core.v1.LocalObjectReference - map: - fields: - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.LocalVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: path - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ModifyVolumeStatus - map: - fields: - - name: status - type: - scalar: string - default: "" - - name: targetVolumeAttributesClassName - type: - scalar: string -- name: io.k8s.api.core.v1.NFSVolumeSource - map: - fields: - - name: path - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean - - name: server - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.Namespace - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.NamespaceSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.NamespaceStatus - default: {} -- name: io.k8s.api.core.v1.NamespaceCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.NamespaceSpec - map: - fields: - - name: finalizers - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.NamespaceStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NamespaceCondition - elementRelationship: associative - keys: - - type - - name: phase - type: - scalar: string -- name: io.k8s.api.core.v1.Node - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.NodeSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.NodeStatus - default: {} -- name: io.k8s.api.core.v1.NodeAddress - map: - fields: - - name: address - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.NodeAffinity - map: - fields: - - name: preferredDuringSchedulingIgnoredDuringExecution - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PreferredSchedulingTerm - elementRelationship: atomic - - name: requiredDuringSchedulingIgnoredDuringExecution - type: - namedType: io.k8s.api.core.v1.NodeSelector -- name: io.k8s.api.core.v1.NodeCondition - map: - fields: - - name: lastHeartbeatTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.NodeConfigSource - map: - fields: - - name: configMap - type: - namedType: io.k8s.api.core.v1.ConfigMapNodeConfigSource -- name: io.k8s.api.core.v1.NodeConfigStatus - map: - fields: - - name: active - type: - namedType: io.k8s.api.core.v1.NodeConfigSource - - name: assigned - type: - namedType: io.k8s.api.core.v1.NodeConfigSource - - name: error - type: - scalar: string - - name: lastKnownGood - type: - namedType: io.k8s.api.core.v1.NodeConfigSource -- name: io.k8s.api.core.v1.NodeDaemonEndpoints - map: - fields: - - name: kubeletEndpoint - type: - namedType: io.k8s.api.core.v1.DaemonEndpoint - default: {} -- name: io.k8s.api.core.v1.NodeFeatures - map: - fields: - - name: supplementalGroupsPolicy - type: - scalar: boolean -- name: io.k8s.api.core.v1.NodeRuntimeHandler - map: - fields: - - name: features - type: - namedType: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.NodeRuntimeHandlerFeatures - map: - fields: - - name: recursiveReadOnlyMounts - type: - scalar: boolean - - name: userNamespaces - type: - scalar: boolean -- name: io.k8s.api.core.v1.NodeSelector - map: - fields: - - name: nodeSelectorTerms - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NodeSelectorTerm - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.core.v1.NodeSelectorRequirement - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: operator - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.NodeSelectorTerm - map: - fields: - - name: matchExpressions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NodeSelectorRequirement - elementRelationship: atomic - - name: matchFields - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NodeSelectorRequirement - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.core.v1.NodeSpec - map: - fields: - - name: configSource - type: - namedType: io.k8s.api.core.v1.NodeConfigSource - - name: externalID - type: - scalar: string - - name: podCIDR - type: - scalar: string - - name: podCIDRs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: providerID - type: - scalar: string - - name: taints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Taint - elementRelationship: atomic - - name: unschedulable - type: - scalar: boolean -- name: io.k8s.api.core.v1.NodeStatus - map: - fields: - - name: addresses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NodeAddress - elementRelationship: associative - keys: - - type - - name: allocatable - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: capacity - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NodeCondition - elementRelationship: associative - keys: - - type - - name: config - type: - namedType: io.k8s.api.core.v1.NodeConfigStatus - - name: daemonEndpoints - type: - namedType: io.k8s.api.core.v1.NodeDaemonEndpoints - default: {} - - name: features - type: - namedType: io.k8s.api.core.v1.NodeFeatures - - name: images - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerImage - elementRelationship: atomic - - name: nodeInfo - type: - namedType: io.k8s.api.core.v1.NodeSystemInfo - default: {} - - name: phase - type: - scalar: string - - name: runtimeHandlers - type: - list: - elementType: - namedType: io.k8s.api.core.v1.NodeRuntimeHandler - elementRelationship: atomic - - name: volumesAttached - type: - list: - elementType: - namedType: io.k8s.api.core.v1.AttachedVolume - elementRelationship: atomic - - name: volumesInUse - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.NodeSystemInfo - map: - fields: - - name: architecture - type: - scalar: string - default: "" - - name: bootID - type: - scalar: string - default: "" - - name: containerRuntimeVersion - type: - scalar: string - default: "" - - name: kernelVersion - type: - scalar: string - default: "" - - name: kubeProxyVersion - type: - scalar: string - default: "" - - name: kubeletVersion - type: - scalar: string - default: "" - - name: machineID - type: - scalar: string - default: "" - - name: operatingSystem - type: - scalar: string - default: "" - - name: osImage - type: - scalar: string - default: "" - - name: systemUUID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ObjectFieldSelector - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldPath - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.ObjectReference - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldPath - type: - scalar: string - - name: kind - type: - scalar: string - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: resourceVersion - type: - scalar: string - - name: uid - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.PersistentVolume - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.PersistentVolumeStatus - default: {} -- name: io.k8s.api.core.v1.PersistentVolumeClaim - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimStatus - default: {} -- name: io.k8s.api.core.v1.PersistentVolumeClaimCondition - map: - fields: - - name: lastProbeTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PersistentVolumeClaimSpec - map: - fields: - - name: accessModes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: dataSource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: dataSourceRef - type: - namedType: io.k8s.api.core.v1.TypedObjectReference - - name: resources - type: - namedType: io.k8s.api.core.v1.VolumeResourceRequirements - default: {} - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: storageClassName - type: - scalar: string - - name: volumeAttributesClassName - type: - scalar: string - - name: volumeMode - type: - scalar: string - - name: volumeName - type: - scalar: string -- name: io.k8s.api.core.v1.PersistentVolumeClaimStatus - map: - fields: - - name: accessModes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allocatedResourceStatuses - type: - map: - elementType: - scalar: string - elementRelationship: separable - - name: allocatedResources - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: capacity - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimCondition - elementRelationship: associative - keys: - - type - - name: currentVolumeAttributesClassName - type: - scalar: string - - name: modifyVolumeStatus - type: - namedType: io.k8s.api.core.v1.ModifyVolumeStatus - - name: phase - type: - scalar: string -- name: io.k8s.api.core.v1.PersistentVolumeClaimTemplate - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimSpec - default: {} -- name: io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource - map: - fields: - - name: claimName - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean -- name: io.k8s.api.core.v1.PersistentVolumeSpec - map: - fields: - - name: accessModes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: awsElasticBlockStore - type: - namedType: io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource - - name: azureDisk - type: - namedType: io.k8s.api.core.v1.AzureDiskVolumeSource - - name: azureFile - type: - namedType: io.k8s.api.core.v1.AzureFilePersistentVolumeSource - - name: capacity - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: cephfs - type: - namedType: io.k8s.api.core.v1.CephFSPersistentVolumeSource - - name: cinder - type: - namedType: io.k8s.api.core.v1.CinderPersistentVolumeSource - - name: claimRef - type: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: separable - - name: csi - type: - namedType: io.k8s.api.core.v1.CSIPersistentVolumeSource - - name: fc - type: - namedType: io.k8s.api.core.v1.FCVolumeSource - - name: flexVolume - type: - namedType: io.k8s.api.core.v1.FlexPersistentVolumeSource - - name: flocker - type: - namedType: io.k8s.api.core.v1.FlockerVolumeSource - - name: gcePersistentDisk - type: - namedType: io.k8s.api.core.v1.GCEPersistentDiskVolumeSource - - name: glusterfs - type: - namedType: io.k8s.api.core.v1.GlusterfsPersistentVolumeSource - - name: hostPath - type: - namedType: io.k8s.api.core.v1.HostPathVolumeSource - - name: iscsi - type: - namedType: io.k8s.api.core.v1.ISCSIPersistentVolumeSource - - name: local - type: - namedType: io.k8s.api.core.v1.LocalVolumeSource - - name: mountOptions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nfs - type: - namedType: io.k8s.api.core.v1.NFSVolumeSource - - name: nodeAffinity - type: - namedType: io.k8s.api.core.v1.VolumeNodeAffinity - - name: persistentVolumeReclaimPolicy - type: - scalar: string - - name: photonPersistentDisk - type: - namedType: io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource - - name: portworxVolume - type: - namedType: io.k8s.api.core.v1.PortworxVolumeSource - - name: quobyte - type: - namedType: io.k8s.api.core.v1.QuobyteVolumeSource - - name: rbd - type: - namedType: io.k8s.api.core.v1.RBDPersistentVolumeSource - - name: scaleIO - type: - namedType: io.k8s.api.core.v1.ScaleIOPersistentVolumeSource - - name: storageClassName - type: - scalar: string - - name: storageos - type: - namedType: io.k8s.api.core.v1.StorageOSPersistentVolumeSource - - name: volumeAttributesClassName - type: - scalar: string - - name: volumeMode - type: - scalar: string - - name: vsphereVolume - type: - namedType: io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource -- name: io.k8s.api.core.v1.PersistentVolumeStatus - map: - fields: - - name: lastPhaseTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: phase - type: - scalar: string - - name: reason - type: - scalar: string -- name: io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: pdID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.Pod - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.PodSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.PodStatus - default: {} -- name: io.k8s.api.core.v1.PodAffinity - map: - fields: - - name: preferredDuringSchedulingIgnoredDuringExecution - type: - list: - elementType: - namedType: io.k8s.api.core.v1.WeightedPodAffinityTerm - elementRelationship: atomic - - name: requiredDuringSchedulingIgnoredDuringExecution - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodAffinityTerm - elementRelationship: atomic -- name: io.k8s.api.core.v1.PodAffinityTerm - map: - fields: - - name: labelSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: matchLabelKeys - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: mismatchLabelKeys - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: namespaces - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: topologyKey - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PodAntiAffinity - map: - fields: - - name: preferredDuringSchedulingIgnoredDuringExecution - type: - list: - elementType: - namedType: io.k8s.api.core.v1.WeightedPodAffinityTerm - elementRelationship: atomic - - name: requiredDuringSchedulingIgnoredDuringExecution - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodAffinityTerm - elementRelationship: atomic -- name: io.k8s.api.core.v1.PodCondition - map: - fields: - - name: lastProbeTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PodDNSConfig - map: - fields: - - name: nameservers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: options - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodDNSConfigOption - elementRelationship: atomic - - name: searches - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.PodDNSConfigOption - map: - fields: - - name: name - type: - scalar: string - - name: value - type: - scalar: string -- name: io.k8s.api.core.v1.PodIP - map: - fields: - - name: ip - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PodOS - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PodReadinessGate - map: - fields: - - name: conditionType - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PodResourceClaim - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: resourceClaimName - type: - scalar: string - - name: resourceClaimTemplateName - type: - scalar: string -- name: io.k8s.api.core.v1.PodResourceClaimStatus - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: resourceClaimName - type: - scalar: string -- name: io.k8s.api.core.v1.PodSchedulingGate - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PodSecurityContext - map: - fields: - - name: appArmorProfile - type: - namedType: io.k8s.api.core.v1.AppArmorProfile - - name: fsGroup - type: - scalar: numeric - - name: fsGroupChangePolicy - type: - scalar: string - - name: runAsGroup - type: - scalar: numeric - - name: runAsNonRoot - type: - scalar: boolean - - name: runAsUser - type: - scalar: numeric - - name: seLinuxChangePolicy - type: - scalar: string - - name: seLinuxOptions - type: - namedType: io.k8s.api.core.v1.SELinuxOptions - - name: seccompProfile - type: - namedType: io.k8s.api.core.v1.SeccompProfile - - name: supplementalGroups - type: - list: - elementType: - scalar: numeric - elementRelationship: atomic - - name: supplementalGroupsPolicy - type: - scalar: string - - name: sysctls - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Sysctl - elementRelationship: atomic - - name: windowsOptions - type: - namedType: io.k8s.api.core.v1.WindowsSecurityContextOptions -- name: io.k8s.api.core.v1.PodSpec - map: - fields: - - name: activeDeadlineSeconds - type: - scalar: numeric - - name: affinity - type: - namedType: io.k8s.api.core.v1.Affinity - - name: automountServiceAccountToken - type: - scalar: boolean - - name: containers - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Container - elementRelationship: associative - keys: - - name - - name: dnsConfig - type: - namedType: io.k8s.api.core.v1.PodDNSConfig - - name: dnsPolicy - type: - scalar: string - - name: enableServiceLinks - type: - scalar: boolean - - name: ephemeralContainers - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EphemeralContainer - elementRelationship: associative - keys: - - name - - name: hostAliases - type: - list: - elementType: - namedType: io.k8s.api.core.v1.HostAlias - elementRelationship: associative - keys: - - ip - - name: hostIPC - type: - scalar: boolean - - name: hostNetwork - type: - scalar: boolean - - name: hostPID - type: - scalar: boolean - - name: hostUsers - type: - scalar: boolean - - name: hostname - type: - scalar: string - - name: imagePullSecrets - type: - list: - elementType: - namedType: io.k8s.api.core.v1.LocalObjectReference - elementRelationship: associative - keys: - - name - - name: initContainers - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Container - elementRelationship: associative - keys: - - name - - name: nodeName - type: - scalar: string - - name: nodeSelector - type: - map: - elementType: - scalar: string - elementRelationship: atomic - - name: os - type: - namedType: io.k8s.api.core.v1.PodOS - - name: overhead - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: preemptionPolicy - type: - scalar: string - - name: priority - type: - scalar: numeric - - name: priorityClassName - type: - scalar: string - - name: readinessGates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodReadinessGate - elementRelationship: atomic - - name: resourceClaims - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodResourceClaim - elementRelationship: associative - keys: - - name - - name: resources - type: - namedType: io.k8s.api.core.v1.ResourceRequirements - - name: restartPolicy - type: - scalar: string - - name: runtimeClassName - type: - scalar: string - - name: schedulerName - type: - scalar: string - - name: schedulingGates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodSchedulingGate - elementRelationship: associative - keys: - - name - - name: securityContext - type: - namedType: io.k8s.api.core.v1.PodSecurityContext - - name: serviceAccount - type: - scalar: string - - name: serviceAccountName - type: - scalar: string - - name: setHostnameAsFQDN - type: - scalar: boolean - - name: shareProcessNamespace - type: - scalar: boolean - - name: subdomain - type: - scalar: string - - name: terminationGracePeriodSeconds - type: - scalar: numeric - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable - - name: volumes - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Volume - elementRelationship: associative - keys: - - name -- name: io.k8s.api.core.v1.PodStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodCondition - elementRelationship: associative - keys: - - type - - name: containerStatuses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerStatus - elementRelationship: atomic - - name: ephemeralContainerStatuses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerStatus - elementRelationship: atomic - - name: hostIP - type: - scalar: string - - name: hostIPs - type: - list: - elementType: - namedType: io.k8s.api.core.v1.HostIP - elementRelationship: atomic - - name: initContainerStatuses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ContainerStatus - elementRelationship: atomic - - name: message - type: - scalar: string - - name: nominatedNodeName - type: - scalar: string - - name: phase - type: - scalar: string - - name: podIP - type: - scalar: string - - name: podIPs - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodIP - elementRelationship: associative - keys: - - ip - - name: qosClass - type: - scalar: string - - name: reason - type: - scalar: string - - name: resize - type: - scalar: string - - name: resourceClaimStatuses - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PodResourceClaimStatus - elementRelationship: associative - keys: - - name - - name: startTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.core.v1.PodTemplate - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.core.v1.PodTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.PodSpec - default: {} -- name: io.k8s.api.core.v1.PortStatus - map: - fields: - - name: error - type: - scalar: string - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PortworxVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: volumeID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PreferredSchedulingTerm - map: - fields: - - name: preference - type: - namedType: io.k8s.api.core.v1.NodeSelectorTerm - default: {} - - name: weight - type: - scalar: numeric - default: 0 -- name: io.k8s.api.core.v1.Probe - map: - fields: - - name: exec - type: - namedType: io.k8s.api.core.v1.ExecAction - - name: failureThreshold - type: - scalar: numeric - - name: grpc - type: - namedType: io.k8s.api.core.v1.GRPCAction - - name: httpGet - type: - namedType: io.k8s.api.core.v1.HTTPGetAction - - name: initialDelaySeconds - type: - scalar: numeric - - name: periodSeconds - type: - scalar: numeric - - name: successThreshold - type: - scalar: numeric - - name: tcpSocket - type: - namedType: io.k8s.api.core.v1.TCPSocketAction - - name: terminationGracePeriodSeconds - type: - scalar: numeric - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.core.v1.ProjectedVolumeSource - map: - fields: - - name: defaultMode - type: - scalar: numeric - - name: sources - type: - list: - elementType: - namedType: io.k8s.api.core.v1.VolumeProjection - elementRelationship: atomic -- name: io.k8s.api.core.v1.QuobyteVolumeSource - map: - fields: - - name: group - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: registry - type: - scalar: string - default: "" - - name: tenant - type: - scalar: string - - name: user - type: - scalar: string - - name: volume - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.RBDPersistentVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: image - type: - scalar: string - default: "" - - name: keyring - type: - scalar: string - default: /etc/ceph/keyring - - name: monitors - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: pool - type: - scalar: string - default: rbd - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: user - type: - scalar: string - default: admin -- name: io.k8s.api.core.v1.RBDVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: image - type: - scalar: string - default: "" - - name: keyring - type: - scalar: string - default: /etc/ceph/keyring - - name: monitors - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: pool - type: - scalar: string - default: rbd - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: user - type: - scalar: string - default: admin -- name: io.k8s.api.core.v1.ReplicationController - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.ReplicationControllerSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.ReplicationControllerStatus - default: {} -- name: io.k8s.api.core.v1.ReplicationControllerCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ReplicationControllerSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: selector - type: - map: - elementType: - scalar: string - elementRelationship: atomic - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec -- name: io.k8s.api.core.v1.ReplicationControllerStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ReplicationControllerCondition - elementRelationship: associative - keys: - - type - - name: fullyLabeledReplicas - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 -- name: io.k8s.api.core.v1.ResourceClaim - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: request - type: - scalar: string -- name: io.k8s.api.core.v1.ResourceFieldSelector - map: - fields: - - name: containerName - type: - scalar: string - - name: divisor - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: resource - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.ResourceHealth - map: - fields: - - name: health - type: - scalar: string - - name: resourceID - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ResourceQuota - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.ResourceQuotaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.ResourceQuotaStatus - default: {} -- name: io.k8s.api.core.v1.ResourceQuotaSpec - map: - fields: - - name: hard - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: scopeSelector - type: - namedType: io.k8s.api.core.v1.ScopeSelector - - name: scopes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.ResourceQuotaStatus - map: - fields: - - name: hard - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: used - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.core.v1.ResourceRequirements - map: - fields: - - name: claims - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ResourceClaim - elementRelationship: associative - keys: - - name - - name: limits - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: requests - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.core.v1.ResourceStatus - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: resources - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ResourceHealth - elementRelationship: associative - keys: - - resourceID -- name: io.k8s.api.core.v1.SELinuxOptions - map: - fields: - - name: level - type: - scalar: string - - name: role - type: - scalar: string - - name: type - type: - scalar: string - - name: user - type: - scalar: string -- name: io.k8s.api.core.v1.ScaleIOPersistentVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - default: xfs - - name: gateway - type: - scalar: string - default: "" - - name: protectionDomain - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.SecretReference - - name: sslEnabled - type: - scalar: boolean - - name: storageMode - type: - scalar: string - default: ThinProvisioned - - name: storagePool - type: - scalar: string - - name: system - type: - scalar: string - default: "" - - name: volumeName - type: - scalar: string -- name: io.k8s.api.core.v1.ScaleIOVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - default: xfs - - name: gateway - type: - scalar: string - default: "" - - name: protectionDomain - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: sslEnabled - type: - scalar: boolean - - name: storageMode - type: - scalar: string - default: ThinProvisioned - - name: storagePool - type: - scalar: string - - name: system - type: - scalar: string - default: "" - - name: volumeName - type: - scalar: string -- name: io.k8s.api.core.v1.ScopeSelector - map: - fields: - - name: matchExpressions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ScopedResourceSelectorRequirement - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.core.v1.ScopedResourceSelectorRequirement - map: - fields: - - name: operator - type: - scalar: string - default: "" - - name: scopeName - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.SeccompProfile - map: - fields: - - name: localhostProfile - type: - scalar: string - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: localhostProfile - discriminatorValue: LocalhostProfile -- name: io.k8s.api.core.v1.Secret - map: - fields: - - name: apiVersion - type: - scalar: string - - name: data - type: - map: - elementType: - scalar: string - - name: immutable - type: - scalar: boolean - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: stringData - type: - map: - elementType: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.core.v1.SecretEnvSource - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean -- name: io.k8s.api.core.v1.SecretKeySelector - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean - elementRelationship: atomic -- name: io.k8s.api.core.v1.SecretProjection - map: - fields: - - name: items - type: - list: - elementType: - namedType: io.k8s.api.core.v1.KeyToPath - elementRelationship: atomic - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean -- name: io.k8s.api.core.v1.SecretReference - map: - fields: - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.SecretVolumeSource - map: - fields: - - name: defaultMode - type: - scalar: numeric - - name: items - type: - list: - elementType: - namedType: io.k8s.api.core.v1.KeyToPath - elementRelationship: atomic - - name: optional - type: - scalar: boolean - - name: secretName - type: - scalar: string -- name: io.k8s.api.core.v1.SecurityContext - map: - fields: - - name: allowPrivilegeEscalation - type: - scalar: boolean - - name: appArmorProfile - type: - namedType: io.k8s.api.core.v1.AppArmorProfile - - name: capabilities - type: - namedType: io.k8s.api.core.v1.Capabilities - - name: privileged - type: - scalar: boolean - - name: procMount - type: - scalar: string - - name: readOnlyRootFilesystem - type: - scalar: boolean - - name: runAsGroup - type: - scalar: numeric - - name: runAsNonRoot - type: - scalar: boolean - - name: runAsUser - type: - scalar: numeric - - name: seLinuxOptions - type: - namedType: io.k8s.api.core.v1.SELinuxOptions - - name: seccompProfile - type: - namedType: io.k8s.api.core.v1.SeccompProfile - - name: windowsOptions - type: - namedType: io.k8s.api.core.v1.WindowsSecurityContextOptions -- name: io.k8s.api.core.v1.Service - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.ServiceSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.ServiceStatus - default: {} -- name: io.k8s.api.core.v1.ServiceAccount - map: - fields: - - name: apiVersion - type: - scalar: string - - name: automountServiceAccountToken - type: - scalar: boolean - - name: imagePullSecrets - type: - list: - elementType: - namedType: io.k8s.api.core.v1.LocalObjectReference - elementRelationship: atomic - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: secrets - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ObjectReference - elementRelationship: associative - keys: - - name -- name: io.k8s.api.core.v1.ServiceAccountTokenProjection - map: - fields: - - name: audience - type: - scalar: string - - name: expirationSeconds - type: - scalar: numeric - - name: path - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ServicePort - map: - fields: - - name: appProtocol - type: - scalar: string - - name: name - type: - scalar: string - - name: nodePort - type: - scalar: numeric - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - default: TCP - - name: targetPort - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.core.v1.ServiceSpec - map: - fields: - - name: allocateLoadBalancerNodePorts - type: - scalar: boolean - - name: clusterIP - type: - scalar: string - - name: clusterIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: externalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: externalName - type: - scalar: string - - name: externalTrafficPolicy - type: - scalar: string - - name: healthCheckNodePort - type: - scalar: numeric - - name: internalTrafficPolicy - type: - scalar: string - - name: ipFamilies - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: ipFamilyPolicy - type: - scalar: string - - name: loadBalancerClass - type: - scalar: string - - name: loadBalancerIP - type: - scalar: string - - name: loadBalancerSourceRanges - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ServicePort - elementRelationship: associative - keys: - - port - - protocol - - name: publishNotReadyAddresses - type: - scalar: boolean - - name: selector - type: - map: - elementType: - scalar: string - elementRelationship: atomic - - name: sessionAffinity - type: - scalar: string - - name: sessionAffinityConfig - type: - namedType: io.k8s.api.core.v1.SessionAffinityConfig - - name: trafficDistribution - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.core.v1.ServiceStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: loadBalancer - type: - namedType: io.k8s.api.core.v1.LoadBalancerStatus - default: {} -- name: io.k8s.api.core.v1.SessionAffinityConfig - map: - fields: - - name: clientIP - type: - namedType: io.k8s.api.core.v1.ClientIPConfig -- name: io.k8s.api.core.v1.SleepAction - map: - fields: - - name: seconds - type: - scalar: numeric - default: 0 -- name: io.k8s.api.core.v1.StorageOSPersistentVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.ObjectReference - - name: volumeName - type: - scalar: string - - name: volumeNamespace - type: - scalar: string -- name: io.k8s.api.core.v1.StorageOSVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: readOnly - type: - scalar: boolean - - name: secretRef - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: volumeName - type: - scalar: string - - name: volumeNamespace - type: - scalar: string -- name: io.k8s.api.core.v1.Sysctl - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.TCPSocketAction - map: - fields: - - name: host - type: - scalar: string - - name: port - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.core.v1.Taint - map: - fields: - - name: effect - type: - scalar: string - default: "" - - name: key - type: - scalar: string - default: "" - - name: timeAdded - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: value - type: - scalar: string -- name: io.k8s.api.core.v1.Toleration - map: - fields: - - name: effect - type: - scalar: string - - name: key - type: - scalar: string - - name: operator - type: - scalar: string - - name: tolerationSeconds - type: - scalar: numeric - - name: value - type: - scalar: string -- name: io.k8s.api.core.v1.TopologySelectorLabelRequirement - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.core.v1.TopologySelectorTerm - map: - fields: - - name: matchLabelExpressions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySelectorLabelRequirement - elementRelationship: atomic - elementRelationship: atomic -- name: io.k8s.api.core.v1.TopologySpreadConstraint - map: - fields: - - name: labelSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: matchLabelKeys - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: maxSkew - type: - scalar: numeric - default: 0 - - name: minDomains - type: - scalar: numeric - - name: nodeAffinityPolicy - type: - scalar: string - - name: nodeTaintsPolicy - type: - scalar: string - - name: topologyKey - type: - scalar: string - default: "" - - name: whenUnsatisfiable - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.TypedLocalObjectReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.TypedObjectReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string -- name: io.k8s.api.core.v1.Volume - map: - fields: - - name: awsElasticBlockStore - type: - namedType: io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource - - name: azureDisk - type: - namedType: io.k8s.api.core.v1.AzureDiskVolumeSource - - name: azureFile - type: - namedType: io.k8s.api.core.v1.AzureFileVolumeSource - - name: cephfs - type: - namedType: io.k8s.api.core.v1.CephFSVolumeSource - - name: cinder - type: - namedType: io.k8s.api.core.v1.CinderVolumeSource - - name: configMap - type: - namedType: io.k8s.api.core.v1.ConfigMapVolumeSource - - name: csi - type: - namedType: io.k8s.api.core.v1.CSIVolumeSource - - name: downwardAPI - type: - namedType: io.k8s.api.core.v1.DownwardAPIVolumeSource - - name: emptyDir - type: - namedType: io.k8s.api.core.v1.EmptyDirVolumeSource - - name: ephemeral - type: - namedType: io.k8s.api.core.v1.EphemeralVolumeSource - - name: fc - type: - namedType: io.k8s.api.core.v1.FCVolumeSource - - name: flexVolume - type: - namedType: io.k8s.api.core.v1.FlexVolumeSource - - name: flocker - type: - namedType: io.k8s.api.core.v1.FlockerVolumeSource - - name: gcePersistentDisk - type: - namedType: io.k8s.api.core.v1.GCEPersistentDiskVolumeSource - - name: gitRepo - type: - namedType: io.k8s.api.core.v1.GitRepoVolumeSource - - name: glusterfs - type: - namedType: io.k8s.api.core.v1.GlusterfsVolumeSource - - name: hostPath - type: - namedType: io.k8s.api.core.v1.HostPathVolumeSource - - name: image - type: - namedType: io.k8s.api.core.v1.ImageVolumeSource - - name: iscsi - type: - namedType: io.k8s.api.core.v1.ISCSIVolumeSource - - name: name - type: - scalar: string - default: "" - - name: nfs - type: - namedType: io.k8s.api.core.v1.NFSVolumeSource - - name: persistentVolumeClaim - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource - - name: photonPersistentDisk - type: - namedType: io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource - - name: portworxVolume - type: - namedType: io.k8s.api.core.v1.PortworxVolumeSource - - name: projected - type: - namedType: io.k8s.api.core.v1.ProjectedVolumeSource - - name: quobyte - type: - namedType: io.k8s.api.core.v1.QuobyteVolumeSource - - name: rbd - type: - namedType: io.k8s.api.core.v1.RBDVolumeSource - - name: scaleIO - type: - namedType: io.k8s.api.core.v1.ScaleIOVolumeSource - - name: secret - type: - namedType: io.k8s.api.core.v1.SecretVolumeSource - - name: storageos - type: - namedType: io.k8s.api.core.v1.StorageOSVolumeSource - - name: vsphereVolume - type: - namedType: io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource -- name: io.k8s.api.core.v1.VolumeDevice - map: - fields: - - name: devicePath - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.VolumeMount - map: - fields: - - name: mountPath - type: - scalar: string - default: "" - - name: mountPropagation - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean - - name: recursiveReadOnly - type: - scalar: string - - name: subPath - type: - scalar: string - - name: subPathExpr - type: - scalar: string -- name: io.k8s.api.core.v1.VolumeMountStatus - map: - fields: - - name: mountPath - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: readOnly - type: - scalar: boolean - - name: recursiveReadOnly - type: - scalar: string -- name: io.k8s.api.core.v1.VolumeNodeAffinity - map: - fields: - - name: required - type: - namedType: io.k8s.api.core.v1.NodeSelector -- name: io.k8s.api.core.v1.VolumeProjection - map: - fields: - - name: clusterTrustBundle - type: - namedType: io.k8s.api.core.v1.ClusterTrustBundleProjection - - name: configMap - type: - namedType: io.k8s.api.core.v1.ConfigMapProjection - - name: downwardAPI - type: - namedType: io.k8s.api.core.v1.DownwardAPIProjection - - name: secret - type: - namedType: io.k8s.api.core.v1.SecretProjection - - name: serviceAccountToken - type: - namedType: io.k8s.api.core.v1.ServiceAccountTokenProjection -- name: io.k8s.api.core.v1.VolumeResourceRequirements - map: - fields: - - name: limits - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: requests - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource - map: - fields: - - name: fsType - type: - scalar: string - - name: storagePolicyID - type: - scalar: string - - name: storagePolicyName - type: - scalar: string - - name: volumePath - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.WeightedPodAffinityTerm - map: - fields: - - name: podAffinityTerm - type: - namedType: io.k8s.api.core.v1.PodAffinityTerm - default: {} - - name: weight - type: - scalar: numeric - default: 0 -- name: io.k8s.api.core.v1.WindowsSecurityContextOptions - map: - fields: - - name: gmsaCredentialSpec - type: - scalar: string - - name: gmsaCredentialSpecName - type: - scalar: string - - name: hostProcess - type: - scalar: boolean - - name: runAsUserName - type: - scalar: string -- name: io.k8s.api.discovery.v1.Endpoint - map: - fields: - - name: addresses - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: conditions - type: - namedType: io.k8s.api.discovery.v1.EndpointConditions - default: {} - - name: deprecatedTopology - type: - map: - elementType: - scalar: string - - name: hints - type: - namedType: io.k8s.api.discovery.v1.EndpointHints - - name: hostname - type: - scalar: string - - name: nodeName - type: - scalar: string - - name: targetRef - type: - namedType: io.k8s.api.core.v1.ObjectReference - - name: zone - type: - scalar: string -- name: io.k8s.api.discovery.v1.EndpointConditions - map: - fields: - - name: ready - type: - scalar: boolean - - name: serving - type: - scalar: boolean - - name: terminating - type: - scalar: boolean -- name: io.k8s.api.discovery.v1.EndpointHints - map: - fields: - - name: forZones - type: - list: - elementType: - namedType: io.k8s.api.discovery.v1.ForZone - elementRelationship: atomic -- name: io.k8s.api.discovery.v1.EndpointPort - map: - fields: - - name: appProtocol - type: - scalar: string - - name: name - type: - scalar: string - - name: port - type: - scalar: numeric - - name: protocol - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.discovery.v1.EndpointSlice - map: - fields: - - name: addressType - type: - scalar: string - default: "" - - name: apiVersion - type: - scalar: string - - name: endpoints - type: - list: - elementType: - namedType: io.k8s.api.discovery.v1.Endpoint - elementRelationship: atomic - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.discovery.v1.EndpointPort - elementRelationship: atomic -- name: io.k8s.api.discovery.v1.ForZone - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.discovery.v1beta1.Endpoint - map: - fields: - - name: addresses - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: conditions - type: - namedType: io.k8s.api.discovery.v1beta1.EndpointConditions - default: {} - - name: hints - type: - namedType: io.k8s.api.discovery.v1beta1.EndpointHints - - name: hostname - type: - scalar: string - - name: nodeName - type: - scalar: string - - name: targetRef - type: - namedType: io.k8s.api.core.v1.ObjectReference - - name: topology - type: - map: - elementType: - scalar: string -- name: io.k8s.api.discovery.v1beta1.EndpointConditions - map: - fields: - - name: ready - type: - scalar: boolean - - name: serving - type: - scalar: boolean - - name: terminating - type: - scalar: boolean -- name: io.k8s.api.discovery.v1beta1.EndpointHints - map: - fields: - - name: forZones - type: - list: - elementType: - namedType: io.k8s.api.discovery.v1beta1.ForZone - elementRelationship: atomic -- name: io.k8s.api.discovery.v1beta1.EndpointPort - map: - fields: - - name: appProtocol - type: - scalar: string - - name: name - type: - scalar: string - - name: port - type: - scalar: numeric - - name: protocol - type: - scalar: string -- name: io.k8s.api.discovery.v1beta1.EndpointSlice - map: - fields: - - name: addressType - type: - scalar: string - default: "" - - name: apiVersion - type: - scalar: string - - name: endpoints - type: - list: - elementType: - namedType: io.k8s.api.discovery.v1beta1.Endpoint - elementRelationship: atomic - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.discovery.v1beta1.EndpointPort - elementRelationship: atomic -- name: io.k8s.api.discovery.v1beta1.ForZone - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.events.v1.Event - map: - fields: - - name: action - type: - scalar: string - - name: apiVersion - type: - scalar: string - - name: deprecatedCount - type: - scalar: numeric - - name: deprecatedFirstTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deprecatedLastTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deprecatedSource - type: - namedType: io.k8s.api.core.v1.EventSource - default: {} - - name: eventTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: note - type: - scalar: string - - name: reason - type: - scalar: string - - name: regarding - type: - namedType: io.k8s.api.core.v1.ObjectReference - default: {} - - name: related - type: - namedType: io.k8s.api.core.v1.ObjectReference - - name: reportingController - type: - scalar: string - - name: reportingInstance - type: - scalar: string - - name: series - type: - namedType: io.k8s.api.events.v1.EventSeries - - name: type - type: - scalar: string -- name: io.k8s.api.events.v1.EventSeries - map: - fields: - - name: count - type: - scalar: numeric - default: 0 - - name: lastObservedTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime -- name: io.k8s.api.events.v1beta1.Event - map: - fields: - - name: action - type: - scalar: string - - name: apiVersion - type: - scalar: string - - name: deprecatedCount - type: - scalar: numeric - - name: deprecatedFirstTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deprecatedLastTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deprecatedSource - type: - namedType: io.k8s.api.core.v1.EventSource - default: {} - - name: eventTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: note - type: - scalar: string - - name: reason - type: - scalar: string - - name: regarding - type: - namedType: io.k8s.api.core.v1.ObjectReference - default: {} - - name: related - type: - namedType: io.k8s.api.core.v1.ObjectReference - - name: reportingController - type: - scalar: string - - name: reportingInstance - type: - scalar: string - - name: series - type: - namedType: io.k8s.api.events.v1beta1.EventSeries - - name: type - type: - scalar: string -- name: io.k8s.api.events.v1beta1.EventSeries - map: - fields: - - name: count - type: - scalar: numeric - default: 0 - - name: lastObservedTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime -- name: io.k8s.api.extensions.v1beta1.DaemonSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.DaemonSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.DaemonSetStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.DaemonSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.DaemonSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: templateGeneration - type: - scalar: numeric - - name: updateStrategy - type: - namedType: io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy - default: {} -- name: io.k8s.api.extensions.v1beta1.DaemonSetStatus - map: - fields: - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.DaemonSetCondition - elementRelationship: associative - keys: - - type - - name: currentNumberScheduled - type: - scalar: numeric - default: 0 - - name: desiredNumberScheduled - type: - scalar: numeric - default: 0 - - name: numberAvailable - type: - scalar: numeric - - name: numberMisscheduled - type: - scalar: numeric - default: 0 - - name: numberReady - type: - scalar: numeric - default: 0 - - name: numberUnavailable - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: updatedNumberScheduled - type: - scalar: numeric -- name: io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet - - name: type - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.Deployment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.DeploymentCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.DeploymentSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: paused - type: - scalar: boolean - - name: progressDeadlineSeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: rollbackTo - type: - namedType: io.k8s.api.extensions.v1beta1.RollbackConfig - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentStrategy - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.extensions.v1beta1.DeploymentStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.DeploymentCondition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: unavailableReplicas - type: - scalar: numeric - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.extensions.v1beta1.DeploymentStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment - - name: type - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath - map: - fields: - - name: backend - type: - namedType: io.k8s.api.extensions.v1beta1.IngressBackend - default: {} - - name: path - type: - scalar: string - - name: pathType - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue - map: - fields: - - name: paths - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IPBlock - map: - fields: - - name: cidr - type: - scalar: string - default: "" - - name: except - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.Ingress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.IngressSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.IngressStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressBackend - map: - fields: - - name: resource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: serviceName - type: - scalar: string - - name: servicePort - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress - map: - fields: - - name: hostname - type: - scalar: string - - name: ip - type: - scalar: string - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressPortStatus - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus - map: - fields: - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressPortStatus - map: - fields: - - name: error - type: - scalar: string - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.IngressRule - map: - fields: - - name: host - type: - scalar: string - - name: http - type: - namedType: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue -- name: io.k8s.api.extensions.v1beta1.IngressSpec - map: - fields: - - name: backend - type: - namedType: io.k8s.api.extensions.v1beta1.IngressBackend - - name: ingressClassName - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressRule - elementRelationship: atomic - - name: tls - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressTLS - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressStatus - map: - fields: - - name: loadBalancer - type: - namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressTLS - map: - fields: - - name: hosts - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: secretName - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.NetworkPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec - default: {} -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule - map: - fields: - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - elementRelationship: atomic - - name: to - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule - map: - fields: - - name: from - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - elementRelationship: atomic - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - map: - fields: - - name: ipBlock - type: - namedType: io.k8s.api.extensions.v1beta1.IPBlock - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - map: - fields: - - name: endPort - type: - scalar: numeric - - name: port - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: protocol - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.NetworkPolicySpec - map: - fields: - - name: egress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule - elementRelationship: atomic - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule - elementRelationship: atomic - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - default: {} - - name: policyTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.ReplicaSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.ReplicaSetCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.ReplicaSetSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.extensions.v1beta1.ReplicaSetStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetCondition - elementRelationship: associative - keys: - - type - - name: fullyLabeledReplicas - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.RollbackConfig - map: - fields: - - name: revision - type: - scalar: numeric -- name: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration - map: - fields: - - name: lendablePercent - type: - scalar: numeric - - name: nominalConcurrencyShares - type: - scalar: numeric -- name: io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod - map: - fields: - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1.FlowSchema - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1.FlowSchemaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1.FlowSchemaStatus - default: {} -- name: io.k8s.api.flowcontrol.v1.FlowSchemaCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1.FlowSchemaSpec - map: - fields: - - name: distinguisherMethod - type: - namedType: io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod - - name: matchingPrecedence - type: - scalar: numeric - default: 0 - - name: priorityLevelConfiguration - type: - namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationReference - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1.FlowSchemaStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1.FlowSchemaCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1.GroupSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1.LimitResponse - map: - fields: - - name: queuing - type: - namedType: io.k8s.api.flowcontrol.v1.QueuingConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: queuing - discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration - map: - fields: - - name: borrowingLimitPercent - type: - scalar: numeric - - name: lendablePercent - type: - scalar: numeric - - name: limitResponse - type: - namedType: io.k8s.api.flowcontrol.v1.LimitResponse - default: {} - - name: nominalConcurrencyShares - type: - scalar: numeric -- name: io.k8s.api.flowcontrol.v1.NonResourcePolicyRule - map: - fields: - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects - map: - fields: - - name: nonResourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1.NonResourcePolicyRule - elementRelationship: atomic - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1.ResourcePolicyRule - elementRelationship: atomic - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1.Subject - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationStatus - default: {} -- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec - map: - fields: - - name: exempt - type: - namedType: io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration - - name: limited - type: - namedType: io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: exempt - discriminatorValue: Exempt - - fieldName: limited - discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1.QueuingConfiguration - map: - fields: - - name: handSize - type: - scalar: numeric - default: 0 - - name: queueLengthLimit - type: - scalar: numeric - default: 0 - - name: queues - type: - scalar: numeric - default: 0 -- name: io.k8s.api.flowcontrol.v1.ResourcePolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: clusterScope - type: - scalar: boolean - - name: namespaces - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1.ServiceAccountSubject - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1.Subject - map: - fields: - - name: group - type: - namedType: io.k8s.api.flowcontrol.v1.GroupSubject - - name: kind - type: - scalar: string - default: "" - - name: serviceAccount - type: - namedType: io.k8s.api.flowcontrol.v1.ServiceAccountSubject - - name: user - type: - namedType: io.k8s.api.flowcontrol.v1.UserSubject - unions: - - discriminator: kind - fields: - - fieldName: group - discriminatorValue: Group - - fieldName: serviceAccount - discriminatorValue: ServiceAccount - - fieldName: user - discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1.UserSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration - map: - fields: - - name: lendablePercent - type: - scalar: numeric - - name: nominalConcurrencyShares - type: - scalar: numeric -- name: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod - map: - fields: - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchema - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus - default: {} -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaSpec - map: - fields: - - name: distinguisherMethod - type: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod - - name: matchingPrecedence - type: - scalar: numeric - default: 0 - - name: priorityLevelConfiguration - type: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta1.FlowSchemaStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.FlowSchemaCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1beta1.GroupSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta1.LimitResponse - map: - fields: - - name: queuing - type: - namedType: io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: queuing - discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration - map: - fields: - - name: assuredConcurrencyShares - type: - scalar: numeric - default: 0 - - name: borrowingLimitPercent - type: - scalar: numeric - - name: lendablePercent - type: - scalar: numeric - - name: limitResponse - type: - namedType: io.k8s.api.flowcontrol.v1beta1.LimitResponse - default: {} -- name: io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule - map: - fields: - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta1.PolicyRulesWithSubjects - map: - fields: - - name: nonResourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.NonResourcePolicyRule - elementRelationship: atomic - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule - elementRelationship: atomic - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.Subject - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus - default: {} -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec - map: - fields: - - name: exempt - type: - namedType: io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration - - name: limited - type: - namedType: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: exempt - discriminatorValue: Exempt - - fieldName: limited - discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1beta1.QueuingConfiguration - map: - fields: - - name: handSize - type: - scalar: numeric - default: 0 - - name: queueLengthLimit - type: - scalar: numeric - default: 0 - - name: queues - type: - scalar: numeric - default: 0 -- name: io.k8s.api.flowcontrol.v1beta1.ResourcePolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: clusterScope - type: - scalar: boolean - - name: namespaces - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta1.Subject - map: - fields: - - name: group - type: - namedType: io.k8s.api.flowcontrol.v1beta1.GroupSubject - - name: kind - type: - scalar: string - default: "" - - name: serviceAccount - type: - namedType: io.k8s.api.flowcontrol.v1beta1.ServiceAccountSubject - - name: user - type: - namedType: io.k8s.api.flowcontrol.v1beta1.UserSubject - unions: - - discriminator: kind - fields: - - fieldName: group - discriminatorValue: Group - - fieldName: serviceAccount - discriminatorValue: ServiceAccount - - fieldName: user - discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1beta1.UserSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta2.ExemptPriorityLevelConfiguration - map: - fields: - - name: lendablePercent - type: - scalar: numeric - - name: nominalConcurrencyShares - type: - scalar: numeric -- name: io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod - map: - fields: - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchema - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowSchemaStatus - default: {} -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchemaCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec - map: - fields: - - name: distinguisherMethod - type: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod - - name: matchingPrecedence - type: - scalar: numeric - default: 0 - - name: priorityLevelConfiguration - type: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta2.FlowSchemaStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.FlowSchemaCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1beta2.GroupSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta2.LimitResponse - map: - fields: - - name: queuing - type: - namedType: io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: queuing - discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration - map: - fields: - - name: assuredConcurrencyShares - type: - scalar: numeric - default: 0 - - name: borrowingLimitPercent - type: - scalar: numeric - - name: lendablePercent - type: - scalar: numeric - - name: limitResponse - type: - namedType: io.k8s.api.flowcontrol.v1beta2.LimitResponse - default: {} -- name: io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule - map: - fields: - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects - map: - fields: - - name: nonResourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule - elementRelationship: atomic - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule - elementRelationship: atomic - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.Subject - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus - default: {} -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec - map: - fields: - - name: exempt - type: - namedType: io.k8s.api.flowcontrol.v1beta2.ExemptPriorityLevelConfiguration - - name: limited - type: - namedType: io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: exempt - discriminatorValue: Exempt - - fieldName: limited - discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration - map: - fields: - - name: handSize - type: - scalar: numeric - default: 0 - - name: queueLengthLimit - type: - scalar: numeric - default: 0 - - name: queues - type: - scalar: numeric - default: 0 -- name: io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: clusterScope - type: - scalar: boolean - - name: namespaces - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta2.Subject - map: - fields: - - name: group - type: - namedType: io.k8s.api.flowcontrol.v1beta2.GroupSubject - - name: kind - type: - scalar: string - default: "" - - name: serviceAccount - type: - namedType: io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject - - name: user - type: - namedType: io.k8s.api.flowcontrol.v1beta2.UserSubject - unions: - - discriminator: kind - fields: - - fieldName: group - discriminatorValue: Group - - fieldName: serviceAccount - discriminatorValue: ServiceAccount - - fieldName: user - discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1beta2.UserSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration - map: - fields: - - name: lendablePercent - type: - scalar: numeric - - name: nominalConcurrencyShares - type: - scalar: numeric -- name: io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod - map: - fields: - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta3.FlowSchema - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1beta3.FlowSchemaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1beta3.FlowSchemaStatus - default: {} -- name: io.k8s.api.flowcontrol.v1beta3.FlowSchemaCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1beta3.FlowSchemaSpec - map: - fields: - - name: distinguisherMethod - type: - namedType: io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod - - name: matchingPrecedence - type: - scalar: numeric - default: 0 - - name: priorityLevelConfiguration - type: - namedType: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta3.PolicyRulesWithSubjects - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta3.FlowSchemaStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta3.FlowSchemaCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1beta3.GroupSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta3.LimitResponse - map: - fields: - - name: queuing - type: - namedType: io.k8s.api.flowcontrol.v1beta3.QueuingConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: queuing - discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration - map: - fields: - - name: borrowingLimitPercent - type: - scalar: numeric - - name: lendablePercent - type: - scalar: numeric - - name: limitResponse - type: - namedType: io.k8s.api.flowcontrol.v1beta3.LimitResponse - default: {} - - name: nominalConcurrencyShares - type: - scalar: numeric - default: 0 -- name: io.k8s.api.flowcontrol.v1beta3.NonResourcePolicyRule - map: - fields: - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta3.PolicyRulesWithSubjects - map: - fields: - - name: nonResourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta3.NonResourcePolicyRule - elementRelationship: atomic - - name: resourceRules - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta3.ResourcePolicyRule - elementRelationship: atomic - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta3.Subject - elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus - default: {} -- name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - - name: type - type: - scalar: string -- name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec - map: - fields: - - name: exempt - type: - namedType: io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration - - name: limited - type: - namedType: io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: exempt - discriminatorValue: Exempt - - fieldName: limited - discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1beta3.QueuingConfiguration - map: - fields: - - name: handSize - type: - scalar: numeric - default: 0 - - name: queueLengthLimit - type: - scalar: numeric - default: 0 - - name: queues - type: - scalar: numeric - default: 0 -- name: io.k8s.api.flowcontrol.v1beta3.ResourcePolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: clusterScope - type: - scalar: boolean - - name: namespaces - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1beta3.ServiceAccountSubject - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1beta3.Subject - map: - fields: - - name: group - type: - namedType: io.k8s.api.flowcontrol.v1beta3.GroupSubject - - name: kind - type: - scalar: string - default: "" - - name: serviceAccount - type: - namedType: io.k8s.api.flowcontrol.v1beta3.ServiceAccountSubject - - name: user - type: - namedType: io.k8s.api.flowcontrol.v1beta3.UserSubject - unions: - - discriminator: kind - fields: - - fieldName: group - discriminatorValue: Group - - fieldName: serviceAccount - discriminatorValue: ServiceAccount - - fieldName: user - discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1beta3.UserSubject - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.imagepolicy.v1alpha1.ImageReview - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.imagepolicy.v1alpha1.ImageReviewSpec - default: {} - - name: status - type: - namedType: io.k8s.api.imagepolicy.v1alpha1.ImageReviewStatus - default: {} -- name: io.k8s.api.imagepolicy.v1alpha1.ImageReviewContainerSpec - map: - fields: - - name: image - type: - scalar: string -- name: io.k8s.api.imagepolicy.v1alpha1.ImageReviewSpec - map: - fields: - - name: annotations - type: - map: - elementType: - scalar: string - - name: containers - type: - list: - elementType: - namedType: io.k8s.api.imagepolicy.v1alpha1.ImageReviewContainerSpec - elementRelationship: atomic - - name: namespace - type: - scalar: string -- name: io.k8s.api.imagepolicy.v1alpha1.ImageReviewStatus - map: - fields: - - name: allowed - type: - scalar: boolean - default: false - - name: auditAnnotations - type: - map: - elementType: - scalar: string - - name: reason - type: - scalar: string -- name: io.k8s.api.networking.v1.HTTPIngressPath - map: - fields: - - name: backend - type: - namedType: io.k8s.api.networking.v1.IngressBackend - default: {} - - name: path - type: - scalar: string - - name: pathType - type: - scalar: string -- name: io.k8s.api.networking.v1.HTTPIngressRuleValue - map: - fields: - - name: paths - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.HTTPIngressPath - elementRelationship: atomic -- name: io.k8s.api.networking.v1.IPBlock - map: - fields: - - name: cidr - type: - scalar: string - default: "" - - name: except - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.networking.v1.Ingress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1.IngressSpec - default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1.IngressStatus - default: {} -- name: io.k8s.api.networking.v1.IngressBackend - map: - fields: - - name: resource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: service - type: - namedType: io.k8s.api.networking.v1.IngressServiceBackend -- name: io.k8s.api.networking.v1.IngressClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1.IngressClassSpec - default: {} -- name: io.k8s.api.networking.v1.IngressClassParametersReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - - name: scope - type: - scalar: string -- name: io.k8s.api.networking.v1.IngressClassSpec - map: - fields: - - name: controller - type: - scalar: string - - name: parameters - type: - namedType: io.k8s.api.networking.v1.IngressClassParametersReference -- name: io.k8s.api.networking.v1.IngressLoadBalancerIngress - map: - fields: - - name: hostname - type: - scalar: string - - name: ip - type: - scalar: string - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.IngressPortStatus - elementRelationship: atomic -- name: io.k8s.api.networking.v1.IngressLoadBalancerStatus - map: - fields: - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.IngressLoadBalancerIngress - elementRelationship: atomic -- name: io.k8s.api.networking.v1.IngressPortStatus - map: - fields: - - name: error - type: - scalar: string - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - default: "" -- name: io.k8s.api.networking.v1.IngressRule - map: - fields: - - name: host - type: - scalar: string - - name: http - type: - namedType: io.k8s.api.networking.v1.HTTPIngressRuleValue -- name: io.k8s.api.networking.v1.IngressServiceBackend - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: port - type: - namedType: io.k8s.api.networking.v1.ServiceBackendPort - default: {} -- name: io.k8s.api.networking.v1.IngressSpec - map: - fields: - - name: defaultBackend - type: - namedType: io.k8s.api.networking.v1.IngressBackend - - name: ingressClassName - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.IngressRule - elementRelationship: atomic - - name: tls - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.IngressTLS - elementRelationship: atomic -- name: io.k8s.api.networking.v1.IngressStatus - map: - fields: - - name: loadBalancer - type: - namedType: io.k8s.api.networking.v1.IngressLoadBalancerStatus - default: {} -- name: io.k8s.api.networking.v1.IngressTLS - map: - fields: - - name: hosts - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: secretName - type: - scalar: string -- name: io.k8s.api.networking.v1.NetworkPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1.NetworkPolicySpec - default: {} -- name: io.k8s.api.networking.v1.NetworkPolicyEgressRule - map: - fields: - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.NetworkPolicyPort - elementRelationship: atomic - - name: to - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.NetworkPolicyPeer - elementRelationship: atomic -- name: io.k8s.api.networking.v1.NetworkPolicyIngressRule - map: - fields: - - name: from - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.NetworkPolicyPeer - elementRelationship: atomic - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.NetworkPolicyPort - elementRelationship: atomic -- name: io.k8s.api.networking.v1.NetworkPolicyPeer - map: - fields: - - name: ipBlock - type: - namedType: io.k8s.api.networking.v1.IPBlock - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.networking.v1.NetworkPolicyPort - map: - fields: - - name: endPort - type: - scalar: numeric - - name: port - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: protocol - type: - scalar: string -- name: io.k8s.api.networking.v1.NetworkPolicySpec - map: - fields: - - name: egress - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.NetworkPolicyEgressRule - elementRelationship: atomic - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.networking.v1.NetworkPolicyIngressRule - elementRelationship: atomic - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - default: {} - - name: policyTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.networking.v1.ServiceBackendPort - map: - fields: - - name: name - type: - scalar: string - - name: number - type: - scalar: numeric - elementRelationship: atomic -- name: io.k8s.api.networking.v1alpha1.IPAddress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1alpha1.IPAddressSpec - default: {} -- name: io.k8s.api.networking.v1alpha1.IPAddressSpec - map: - fields: - - name: parentRef - type: - namedType: io.k8s.api.networking.v1alpha1.ParentReference -- name: io.k8s.api.networking.v1alpha1.ParentReference - map: - fields: - - name: group - type: - scalar: string - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: resource - type: - scalar: string -- name: io.k8s.api.networking.v1alpha1.ServiceCIDR - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1alpha1.ServiceCIDRSpec - default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1alpha1.ServiceCIDRStatus - default: {} -- name: io.k8s.api.networking.v1alpha1.ServiceCIDRSpec - map: - fields: - - name: cidrs - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.networking.v1alpha1.ServiceCIDRStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.networking.v1beta1.HTTPIngressPath - map: - fields: - - name: backend - type: - namedType: io.k8s.api.networking.v1beta1.IngressBackend - default: {} - - name: path - type: - scalar: string - - name: pathType - type: - scalar: string -- name: io.k8s.api.networking.v1beta1.HTTPIngressRuleValue - map: - fields: - - name: paths - type: - list: - elementType: - namedType: io.k8s.api.networking.v1beta1.HTTPIngressPath - elementRelationship: atomic -- name: io.k8s.api.networking.v1beta1.IPAddress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1beta1.IPAddressSpec - default: {} -- name: io.k8s.api.networking.v1beta1.IPAddressSpec - map: - fields: - - name: parentRef - type: - namedType: io.k8s.api.networking.v1beta1.ParentReference -- name: io.k8s.api.networking.v1beta1.Ingress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1beta1.IngressSpec - default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1beta1.IngressStatus - default: {} -- name: io.k8s.api.networking.v1beta1.IngressBackend - map: - fields: - - name: resource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: serviceName - type: - scalar: string - - name: servicePort - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.networking.v1beta1.IngressClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1beta1.IngressClassSpec - default: {} -- name: io.k8s.api.networking.v1beta1.IngressClassParametersReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - - name: scope - type: - scalar: string -- name: io.k8s.api.networking.v1beta1.IngressClassSpec - map: - fields: - - name: controller - type: - scalar: string - - name: parameters - type: - namedType: io.k8s.api.networking.v1beta1.IngressClassParametersReference -- name: io.k8s.api.networking.v1beta1.IngressLoadBalancerIngress - map: - fields: - - name: hostname - type: - scalar: string - - name: ip - type: - scalar: string - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.networking.v1beta1.IngressPortStatus - elementRelationship: atomic -- name: io.k8s.api.networking.v1beta1.IngressLoadBalancerStatus - map: - fields: - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.networking.v1beta1.IngressLoadBalancerIngress - elementRelationship: atomic -- name: io.k8s.api.networking.v1beta1.IngressPortStatus - map: - fields: - - name: error - type: - scalar: string - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - default: "" -- name: io.k8s.api.networking.v1beta1.IngressRule - map: - fields: - - name: host - type: - scalar: string - - name: http - type: - namedType: io.k8s.api.networking.v1beta1.HTTPIngressRuleValue -- name: io.k8s.api.networking.v1beta1.IngressSpec - map: - fields: - - name: backend - type: - namedType: io.k8s.api.networking.v1beta1.IngressBackend - - name: ingressClassName - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.networking.v1beta1.IngressRule - elementRelationship: atomic - - name: tls - type: - list: - elementType: - namedType: io.k8s.api.networking.v1beta1.IngressTLS - elementRelationship: atomic -- name: io.k8s.api.networking.v1beta1.IngressStatus - map: - fields: - - name: loadBalancer - type: - namedType: io.k8s.api.networking.v1beta1.IngressLoadBalancerStatus - default: {} -- name: io.k8s.api.networking.v1beta1.IngressTLS - map: - fields: - - name: hosts - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: secretName - type: - scalar: string -- name: io.k8s.api.networking.v1beta1.ParentReference - map: - fields: - - name: group - type: - scalar: string - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: resource - type: - scalar: string -- name: io.k8s.api.networking.v1beta1.ServiceCIDR - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.networking.v1beta1.ServiceCIDRSpec - default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1beta1.ServiceCIDRStatus - default: {} -- name: io.k8s.api.networking.v1beta1.ServiceCIDRSpec - map: - fields: - - name: cidrs - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.networking.v1beta1.ServiceCIDRStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.node.v1.Overhead - map: - fields: - - name: podFixed - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.node.v1.RuntimeClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: handler - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: overhead - type: - namedType: io.k8s.api.node.v1.Overhead - - name: scheduling - type: - namedType: io.k8s.api.node.v1.Scheduling -- name: io.k8s.api.node.v1.Scheduling - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - elementRelationship: atomic - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: io.k8s.api.node.v1alpha1.Overhead - map: - fields: - - name: podFixed - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.node.v1alpha1.RuntimeClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.node.v1alpha1.RuntimeClassSpec - default: {} -- name: io.k8s.api.node.v1alpha1.RuntimeClassSpec - map: - fields: - - name: overhead - type: - namedType: io.k8s.api.node.v1alpha1.Overhead - - name: runtimeHandler - type: - scalar: string - default: "" - - name: scheduling - type: - namedType: io.k8s.api.node.v1alpha1.Scheduling -- name: io.k8s.api.node.v1alpha1.Scheduling - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - elementRelationship: atomic - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: io.k8s.api.node.v1beta1.Overhead - map: - fields: - - name: podFixed - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.node.v1beta1.RuntimeClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: handler - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: overhead - type: - namedType: io.k8s.api.node.v1beta1.Overhead - - name: scheduling - type: - namedType: io.k8s.api.node.v1beta1.Scheduling -- name: io.k8s.api.node.v1beta1.Scheduling - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - elementRelationship: atomic - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: io.k8s.api.policy.v1.Eviction - map: - fields: - - name: apiVersion - type: - scalar: string - - name: deleteOptions - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} -- name: io.k8s.api.policy.v1.PodDisruptionBudget - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.policy.v1.PodDisruptionBudgetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.policy.v1.PodDisruptionBudgetStatus - default: {} -- name: io.k8s.api.policy.v1.PodDisruptionBudgetSpec - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: minAvailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: unhealthyPodEvictionPolicy - type: - scalar: string -- name: io.k8s.api.policy.v1.PodDisruptionBudgetStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: currentHealthy - type: - scalar: numeric - default: 0 - - name: desiredHealthy - type: - scalar: numeric - default: 0 - - name: disruptedPods - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: disruptionsAllowed - type: - scalar: numeric - default: 0 - - name: expectedPods - type: - scalar: numeric - default: 0 - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.policy.v1beta1.Eviction - map: - fields: - - name: apiVersion - type: - scalar: string - - name: deleteOptions - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} -- name: io.k8s.api.policy.v1beta1.PodDisruptionBudget - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus - default: {} -- name: io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: minAvailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: unhealthyPodEvictionPolicy - type: - scalar: string -- name: io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: currentHealthy - type: - scalar: numeric - default: 0 - - name: desiredHealthy - type: - scalar: numeric - default: 0 - - name: disruptedPods - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: disruptionsAllowed - type: - scalar: numeric - default: 0 - - name: expectedPods - type: - scalar: numeric - default: 0 - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.rbac.v1.AggregationRule - map: - fields: - - name: clusterRoleSelectors - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.ClusterRole - map: - fields: - - name: aggregationRule - type: - namedType: io.k8s.api.rbac.v1.AggregationRule - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1.PolicyRule - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.ClusterRoleBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: roleRef - type: - namedType: io.k8s.api.rbac.v1.RoleRef - default: {} - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1.Subject - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.PolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourceNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.Role - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1.PolicyRule - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.RoleBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: roleRef - type: - namedType: io.k8s.api.rbac.v1.RoleRef - default: {} - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1.Subject - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.RoleRef - map: - fields: - - name: apiGroup - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.rbac.v1.Subject - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.AggregationRule - map: - fields: - - name: clusterRoleSelectors - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.ClusterRole - map: - fields: - - name: aggregationRule - type: - namedType: io.k8s.api.rbac.v1alpha1.AggregationRule - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1alpha1.PolicyRule - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.ClusterRoleBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: roleRef - type: - namedType: io.k8s.api.rbac.v1alpha1.RoleRef - default: {} - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1alpha1.Subject - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.PolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourceNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.Role - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1alpha1.PolicyRule - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.RoleBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: roleRef - type: - namedType: io.k8s.api.rbac.v1alpha1.RoleRef - default: {} - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1alpha1.Subject - elementRelationship: atomic -- name: io.k8s.api.rbac.v1alpha1.RoleRef - map: - fields: - - name: apiGroup - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.rbac.v1alpha1.Subject - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string -- name: io.k8s.api.rbac.v1beta1.AggregationRule - map: - fields: - - name: clusterRoleSelectors - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - elementRelationship: atomic -- name: io.k8s.api.rbac.v1beta1.ClusterRole - map: - fields: - - name: aggregationRule - type: - namedType: io.k8s.api.rbac.v1beta1.AggregationRule - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1beta1.PolicyRule - elementRelationship: atomic -- name: io.k8s.api.rbac.v1beta1.ClusterRoleBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: roleRef - type: - namedType: io.k8s.api.rbac.v1beta1.RoleRef - default: {} - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1beta1.Subject - elementRelationship: atomic -- name: io.k8s.api.rbac.v1beta1.PolicyRule - map: - fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nonResourceURLs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourceNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: verbs - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.rbac.v1beta1.Role - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1beta1.PolicyRule - elementRelationship: atomic -- name: io.k8s.api.rbac.v1beta1.RoleBinding - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: roleRef - type: - namedType: io.k8s.api.rbac.v1beta1.RoleRef - default: {} - - name: subjects - type: - list: - elementType: - namedType: io.k8s.api.rbac.v1beta1.Subject - elementRelationship: atomic -- name: io.k8s.api.rbac.v1beta1.RoleRef - map: - fields: - - name: apiGroup - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.rbac.v1beta1.Subject - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string -- name: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: data - type: - namedType: __untyped_atomic_ - - name: device - type: - scalar: string - default: "" - - name: driver - type: - scalar: string - default: "" - - name: networkData - type: - namedType: io.k8s.api.resource.v1alpha3.NetworkDeviceData - - name: pool - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.AllocationResult - map: - fields: - - name: devices - type: - namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationResult - default: {} - - name: nodeSelector - type: - namedType: io.k8s.api.core.v1.NodeSelector -- name: io.k8s.api.resource.v1alpha3.BasicDevice - map: - fields: - - name: attributes - type: - map: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceAttribute - - name: capacity - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.resource.v1alpha3.CELDeviceSelector - map: - fields: - - name: expression - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.Device - map: - fields: - - name: basic - type: - namedType: io.k8s.api.resource.v1alpha3.BasicDevice - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration - map: - fields: - - name: opaque - type: - namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration - - name: requests - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: source - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.DeviceAllocationResult - map: - fields: - - name: config - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceAllocationConfiguration - elementRelationship: atomic - - name: results - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DeviceAttribute - map: - fields: - - name: bool - type: - scalar: boolean - - name: int - type: - scalar: numeric - - name: string - type: - scalar: string - - name: version - type: - scalar: string -- name: io.k8s.api.resource.v1alpha3.DeviceClaim - map: - fields: - - name: config - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration - elementRelationship: atomic - - name: constraints - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceConstraint - elementRelationship: atomic - - name: requests - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceRequest - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DeviceClaimConfiguration - map: - fields: - - name: opaque - type: - namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration - - name: requests - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DeviceClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1alpha3.DeviceClassSpec - default: {} -- name: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration - map: - fields: - - name: opaque - type: - namedType: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration -- name: io.k8s.api.resource.v1alpha3.DeviceClassSpec - map: - fields: - - name: config - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceClassConfiguration - elementRelationship: atomic - - name: selectors - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceSelector - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DeviceConstraint - map: - fields: - - name: matchAttribute - type: - scalar: string - - name: requests - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DeviceRequest - map: - fields: - - name: adminAccess - type: - scalar: boolean - - name: allocationMode - type: - scalar: string - - name: count - type: - scalar: numeric - - name: deviceClassName - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: selectors - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.DeviceSelector - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.DeviceRequestAllocationResult - map: - fields: - - name: adminAccess - type: - scalar: boolean - - name: device - type: - scalar: string - default: "" - - name: driver - type: - scalar: string - default: "" - - name: pool - type: - scalar: string - default: "" - - name: request - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.DeviceSelector - map: - fields: - - name: cel - type: - namedType: io.k8s.api.resource.v1alpha3.CELDeviceSelector -- name: io.k8s.api.resource.v1alpha3.NetworkDeviceData - map: - fields: - - name: hardwareAddress - type: - scalar: string - - name: interfaceName - type: - scalar: string - - name: ips - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.resource.v1alpha3.OpaqueDeviceConfiguration - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: parameters - type: - namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1alpha3.ResourceClaim - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec - default: {} - - name: status - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimStatus - default: {} -- name: io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: resource - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1alpha3.ResourceClaimSpec - map: - fields: - - name: devices - type: - namedType: io.k8s.api.resource.v1alpha3.DeviceClaim - default: {} -- name: io.k8s.api.resource.v1alpha3.ResourceClaimStatus - map: - fields: - - name: allocation - type: - namedType: io.k8s.api.resource.v1alpha3.AllocationResult - - name: devices - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.AllocatedDeviceStatus - elementRelationship: associative - keys: - - driver - - device - - pool - - name: reservedFor - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimConsumerReference - elementRelationship: associative - keys: - - uid -- name: io.k8s.api.resource.v1alpha3.ResourceClaimTemplate - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec - default: {} -- name: io.k8s.api.resource.v1alpha3.ResourceClaimTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceClaimSpec - default: {} -- name: io.k8s.api.resource.v1alpha3.ResourcePool - map: - fields: - - name: generation - type: - scalar: numeric - default: 0 - - name: name - type: - scalar: string - default: "" - - name: resourceSliceCount - type: - scalar: numeric - default: 0 -- name: io.k8s.api.resource.v1alpha3.ResourceSlice - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1alpha3.ResourceSliceSpec - default: {} -- name: io.k8s.api.resource.v1alpha3.ResourceSliceSpec - map: - fields: - - name: allNodes - type: - scalar: boolean - - name: devices - type: - list: - elementType: - namedType: io.k8s.api.resource.v1alpha3.Device - elementRelationship: atomic - - name: driver - type: - scalar: string - default: "" - - name: nodeName - type: - scalar: string - - name: nodeSelector - type: - namedType: io.k8s.api.core.v1.NodeSelector - - name: pool - type: - namedType: io.k8s.api.resource.v1alpha3.ResourcePool - default: {} -- name: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: data - type: - namedType: __untyped_atomic_ - - name: device - type: - scalar: string - default: "" - - name: driver - type: - scalar: string - default: "" - - name: networkData - type: - namedType: io.k8s.api.resource.v1beta1.NetworkDeviceData - - name: pool - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1beta1.AllocationResult - map: - fields: - - name: devices - type: - namedType: io.k8s.api.resource.v1beta1.DeviceAllocationResult - default: {} - - name: nodeSelector - type: - namedType: io.k8s.api.core.v1.NodeSelector -- name: io.k8s.api.resource.v1beta1.BasicDevice - map: - fields: - - name: attributes - type: - map: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceAttribute - - name: capacity - type: - map: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceCapacity -- name: io.k8s.api.resource.v1beta1.CELDeviceSelector - map: - fields: - - name: expression - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1beta1.Device - map: - fields: - - name: basic - type: - namedType: io.k8s.api.resource.v1beta1.BasicDevice - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration - map: - fields: - - name: opaque - type: - namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration - - name: requests - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: source - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1beta1.DeviceAllocationResult - map: - fields: - - name: config - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceAllocationConfiguration - elementRelationship: atomic - - name: results - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.DeviceAttribute - map: - fields: - - name: bool - type: - scalar: boolean - - name: int - type: - scalar: numeric - - name: string - type: - scalar: string - - name: version - type: - scalar: string -- name: io.k8s.api.resource.v1beta1.DeviceCapacity - map: - fields: - - name: value - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.resource.v1beta1.DeviceClaim - map: - fields: - - name: config - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceClaimConfiguration - elementRelationship: atomic - - name: constraints - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceConstraint - elementRelationship: atomic - - name: requests - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceRequest - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.DeviceClaimConfiguration - map: - fields: - - name: opaque - type: - namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration - - name: requests - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.DeviceClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1beta1.DeviceClassSpec - default: {} -- name: io.k8s.api.resource.v1beta1.DeviceClassConfiguration - map: - fields: - - name: opaque - type: - namedType: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration -- name: io.k8s.api.resource.v1beta1.DeviceClassSpec - map: - fields: - - name: config - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceClassConfiguration - elementRelationship: atomic - - name: selectors - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceSelector - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.DeviceConstraint - map: - fields: - - name: matchAttribute - type: - scalar: string - - name: requests - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.DeviceRequest - map: - fields: - - name: adminAccess - type: - scalar: boolean - - name: allocationMode - type: - scalar: string - - name: count - type: - scalar: numeric - - name: deviceClassName - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: selectors - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.DeviceSelector - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.DeviceRequestAllocationResult - map: - fields: - - name: adminAccess - type: - scalar: boolean - - name: device - type: - scalar: string - default: "" - - name: driver - type: - scalar: string - default: "" - - name: pool - type: - scalar: string - default: "" - - name: request - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1beta1.DeviceSelector - map: - fields: - - name: cel - type: - namedType: io.k8s.api.resource.v1beta1.CELDeviceSelector -- name: io.k8s.api.resource.v1beta1.NetworkDeviceData - map: - fields: - - name: hardwareAddress - type: - scalar: string - - name: interfaceName - type: - scalar: string - - name: ips - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.resource.v1beta1.OpaqueDeviceConfiguration - map: - fields: - - name: driver - type: - scalar: string - default: "" - - name: parameters - type: - namedType: __untyped_atomic_ -- name: io.k8s.api.resource.v1beta1.ResourceClaim - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1beta1.ResourceClaimSpec - default: {} - - name: status - type: - namedType: io.k8s.api.resource.v1beta1.ResourceClaimStatus - default: {} -- name: io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: resource - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - default: "" -- name: io.k8s.api.resource.v1beta1.ResourceClaimSpec - map: - fields: - - name: devices - type: - namedType: io.k8s.api.resource.v1beta1.DeviceClaim - default: {} -- name: io.k8s.api.resource.v1beta1.ResourceClaimStatus - map: - fields: - - name: allocation - type: - namedType: io.k8s.api.resource.v1beta1.AllocationResult - - name: devices - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.AllocatedDeviceStatus - elementRelationship: associative - keys: - - driver - - device - - pool - - name: reservedFor - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.ResourceClaimConsumerReference - elementRelationship: associative - keys: - - uid -- name: io.k8s.api.resource.v1beta1.ResourceClaimTemplate - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec - default: {} -- name: io.k8s.api.resource.v1beta1.ResourceClaimTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1beta1.ResourceClaimSpec - default: {} -- name: io.k8s.api.resource.v1beta1.ResourcePool - map: - fields: - - name: generation - type: - scalar: numeric - default: 0 - - name: name - type: - scalar: string - default: "" - - name: resourceSliceCount - type: - scalar: numeric - default: 0 -- name: io.k8s.api.resource.v1beta1.ResourceSlice - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.resource.v1beta1.ResourceSliceSpec - default: {} -- name: io.k8s.api.resource.v1beta1.ResourceSliceSpec - map: - fields: - - name: allNodes - type: - scalar: boolean - - name: devices - type: - list: - elementType: - namedType: io.k8s.api.resource.v1beta1.Device - elementRelationship: atomic - - name: driver - type: - scalar: string - default: "" - - name: nodeName - type: - scalar: string - - name: nodeSelector - type: - namedType: io.k8s.api.core.v1.NodeSelector - - name: pool - type: - namedType: io.k8s.api.resource.v1beta1.ResourcePool - default: {} -- name: io.k8s.api.scheduling.v1.PriorityClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: description - type: - scalar: string - - name: globalDefault - type: - scalar: boolean - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: preemptionPolicy - type: - scalar: string - - name: value - type: - scalar: numeric - default: 0 -- name: io.k8s.api.scheduling.v1alpha1.PriorityClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: description - type: - scalar: string - - name: globalDefault - type: - scalar: boolean - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: preemptionPolicy - type: - scalar: string - - name: value - type: - scalar: numeric - default: 0 -- name: io.k8s.api.scheduling.v1beta1.PriorityClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: description - type: - scalar: string - - name: globalDefault - type: - scalar: boolean - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: preemptionPolicy - type: - scalar: string - - name: value - type: - scalar: numeric - default: 0 -- name: io.k8s.api.storage.v1.CSIDriver - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1.CSIDriverSpec - default: {} -- name: io.k8s.api.storage.v1.CSIDriverSpec - map: - fields: - - name: attachRequired - type: - scalar: boolean - - name: fsGroupPolicy - type: - scalar: string - - name: podInfoOnMount - type: - scalar: boolean - - name: requiresRepublish - type: - scalar: boolean - - name: seLinuxMount - type: - scalar: boolean - - name: storageCapacity - type: - scalar: boolean - - name: tokenRequests - type: - list: - elementType: - namedType: io.k8s.api.storage.v1.TokenRequest - elementRelationship: atomic - - name: volumeLifecycleModes - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.storage.v1.CSINode - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1.CSINodeSpec - default: {} -- name: io.k8s.api.storage.v1.CSINodeDriver - map: - fields: - - name: allocatable - type: - namedType: io.k8s.api.storage.v1.VolumeNodeResources - - name: name - type: - scalar: string - default: "" - - name: nodeID - type: - scalar: string - default: "" - - name: topologyKeys - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.storage.v1.CSINodeSpec - map: - fields: - - name: drivers - type: - list: - elementType: - namedType: io.k8s.api.storage.v1.CSINodeDriver - elementRelationship: associative - keys: - - name -- name: io.k8s.api.storage.v1.CSIStorageCapacity - map: - fields: - - name: apiVersion - type: - scalar: string - - name: capacity - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: kind - type: - scalar: string - - name: maximumVolumeSize - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: nodeTopology - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: storageClassName - type: - scalar: string - default: "" -- name: io.k8s.api.storage.v1.StorageClass - map: - fields: - - name: allowVolumeExpansion - type: - scalar: boolean - - name: allowedTopologies - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySelectorTerm - elementRelationship: atomic - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: mountOptions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: parameters - type: - map: - elementType: - scalar: string - - name: provisioner - type: - scalar: string - default: "" - - name: reclaimPolicy - type: - scalar: string - - name: volumeBindingMode - type: - scalar: string -- name: io.k8s.api.storage.v1.TokenRequest - map: - fields: - - name: audience - type: - scalar: string - default: "" - - name: expirationSeconds - type: - scalar: numeric -- name: io.k8s.api.storage.v1.VolumeAttachment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1.VolumeAttachmentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.storage.v1.VolumeAttachmentStatus - default: {} -- name: io.k8s.api.storage.v1.VolumeAttachmentSource - map: - fields: - - name: inlineVolumeSpec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeSpec - - name: persistentVolumeName - type: - scalar: string -- name: io.k8s.api.storage.v1.VolumeAttachmentSpec - map: - fields: - - name: attacher - type: - scalar: string - default: "" - - name: nodeName - type: - scalar: string - default: "" - - name: source - type: - namedType: io.k8s.api.storage.v1.VolumeAttachmentSource - default: {} -- name: io.k8s.api.storage.v1.VolumeAttachmentStatus - map: - fields: - - name: attachError - type: - namedType: io.k8s.api.storage.v1.VolumeError - - name: attached - type: - scalar: boolean - default: false - - name: attachmentMetadata - type: - map: - elementType: - scalar: string - - name: detachError - type: - namedType: io.k8s.api.storage.v1.VolumeError -- name: io.k8s.api.storage.v1.VolumeError - map: - fields: - - name: message - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.storage.v1.VolumeNodeResources - map: - fields: - - name: count - type: - scalar: numeric -- name: io.k8s.api.storage.v1alpha1.CSIStorageCapacity - map: - fields: - - name: apiVersion - type: - scalar: string - - name: capacity - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: kind - type: - scalar: string - - name: maximumVolumeSize - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: nodeTopology - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: storageClassName - type: - scalar: string - default: "" -- name: io.k8s.api.storage.v1alpha1.VolumeAttachment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1alpha1.VolumeAttachmentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.storage.v1alpha1.VolumeAttachmentStatus - default: {} -- name: io.k8s.api.storage.v1alpha1.VolumeAttachmentSource - map: - fields: - - name: inlineVolumeSpec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeSpec - - name: persistentVolumeName - type: - scalar: string -- name: io.k8s.api.storage.v1alpha1.VolumeAttachmentSpec - map: - fields: - - name: attacher - type: - scalar: string - default: "" - - name: nodeName - type: - scalar: string - default: "" - - name: source - type: - namedType: io.k8s.api.storage.v1alpha1.VolumeAttachmentSource - default: {} -- name: io.k8s.api.storage.v1alpha1.VolumeAttachmentStatus - map: - fields: - - name: attachError - type: - namedType: io.k8s.api.storage.v1alpha1.VolumeError - - name: attached - type: - scalar: boolean - default: false - - name: attachmentMetadata - type: - map: - elementType: - scalar: string - - name: detachError - type: - namedType: io.k8s.api.storage.v1alpha1.VolumeError -- name: io.k8s.api.storage.v1alpha1.VolumeAttributesClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: driverName - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: parameters - type: - map: - elementType: - scalar: string -- name: io.k8s.api.storage.v1alpha1.VolumeError - map: - fields: - - name: message - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.storage.v1beta1.CSIDriver - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1beta1.CSIDriverSpec - default: {} -- name: io.k8s.api.storage.v1beta1.CSIDriverSpec - map: - fields: - - name: attachRequired - type: - scalar: boolean - - name: fsGroupPolicy - type: - scalar: string - - name: podInfoOnMount - type: - scalar: boolean - - name: requiresRepublish - type: - scalar: boolean - - name: seLinuxMount - type: - scalar: boolean - - name: storageCapacity - type: - scalar: boolean - - name: tokenRequests - type: - list: - elementType: - namedType: io.k8s.api.storage.v1beta1.TokenRequest - elementRelationship: atomic - - name: volumeLifecycleModes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.storage.v1beta1.CSINode - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1beta1.CSINodeSpec - default: {} -- name: io.k8s.api.storage.v1beta1.CSINodeDriver - map: - fields: - - name: allocatable - type: - namedType: io.k8s.api.storage.v1beta1.VolumeNodeResources - - name: name - type: - scalar: string - default: "" - - name: nodeID - type: - scalar: string - default: "" - - name: topologyKeys - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.storage.v1beta1.CSINodeSpec - map: - fields: - - name: drivers - type: - list: - elementType: - namedType: io.k8s.api.storage.v1beta1.CSINodeDriver - elementRelationship: associative - keys: - - name -- name: io.k8s.api.storage.v1beta1.CSIStorageCapacity - map: - fields: - - name: apiVersion - type: - scalar: string - - name: capacity - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: kind - type: - scalar: string - - name: maximumVolumeSize - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: nodeTopology - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: storageClassName - type: - scalar: string - default: "" -- name: io.k8s.api.storage.v1beta1.StorageClass - map: - fields: - - name: allowVolumeExpansion - type: - scalar: boolean - - name: allowedTopologies - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySelectorTerm - elementRelationship: atomic - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: mountOptions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: parameters - type: - map: - elementType: - scalar: string - - name: provisioner - type: - scalar: string - default: "" - - name: reclaimPolicy - type: - scalar: string - - name: volumeBindingMode - type: - scalar: string -- name: io.k8s.api.storage.v1beta1.TokenRequest - map: - fields: - - name: audience - type: - scalar: string - default: "" - - name: expirationSeconds - type: - scalar: numeric -- name: io.k8s.api.storage.v1beta1.VolumeAttachment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storage.v1beta1.VolumeAttachmentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.storage.v1beta1.VolumeAttachmentStatus - default: {} -- name: io.k8s.api.storage.v1beta1.VolumeAttachmentSource - map: - fields: - - name: inlineVolumeSpec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeSpec - - name: persistentVolumeName - type: - scalar: string -- name: io.k8s.api.storage.v1beta1.VolumeAttachmentSpec - map: - fields: - - name: attacher - type: - scalar: string - default: "" - - name: nodeName - type: - scalar: string - default: "" - - name: source - type: - namedType: io.k8s.api.storage.v1beta1.VolumeAttachmentSource - default: {} -- name: io.k8s.api.storage.v1beta1.VolumeAttachmentStatus - map: - fields: - - name: attachError - type: - namedType: io.k8s.api.storage.v1beta1.VolumeError - - name: attached - type: - scalar: boolean - default: false - - name: attachmentMetadata - type: - map: - elementType: - scalar: string - - name: detachError - type: - namedType: io.k8s.api.storage.v1beta1.VolumeError -- name: io.k8s.api.storage.v1beta1.VolumeAttributesClass - map: - fields: - - name: apiVersion - type: - scalar: string - - name: driverName - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: parameters - type: - map: - elementType: - scalar: string -- name: io.k8s.api.storage.v1beta1.VolumeError - map: - fields: - - name: message - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.storage.v1beta1.VolumeNodeResources - map: - fields: - - name: count - type: - scalar: numeric -- name: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource - map: - fields: - - name: group - type: - scalar: string - - name: resource - type: - scalar: string - - name: version - type: - scalar: string -- name: io.k8s.api.storagemigration.v1alpha1.MigrationCondition - map: - fields: - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec - default: {} - - name: status - type: - namedType: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus - default: {} -- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationSpec - map: - fields: - - name: continueToken - type: - scalar: string - - name: resource - type: - namedType: io.k8s.api.storagemigration.v1alpha1.GroupVersionResource - default: {} -- name: io.k8s.api.storagemigration.v1alpha1.StorageVersionMigrationStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.storagemigration.v1alpha1.MigrationCondition - elementRelationship: associative - keys: - - type - - name: resourceVersion - type: - scalar: string -- name: io.k8s.apimachinery.pkg.api.resource.Quantity - scalar: untyped -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - default: "" - - name: observedGeneration - type: - scalar: numeric - - name: reason - type: - scalar: string - default: "" - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions - map: - fields: - - name: apiVersion - type: - scalar: string - - name: dryRun - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: gracePeriodSeconds - type: - scalar: numeric - - name: ignoreStoreReadErrorWithClusterBreakingPotential - type: - scalar: boolean - - name: kind - type: - scalar: string - - name: orphanDependents - type: - scalar: boolean - - name: preconditions - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions - - name: propagationPolicy - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - map: - fields: - - name: matchExpressions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - elementRelationship: atomic - - name: matchLabels - type: - map: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: operator - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldsType - type: - scalar: string - - name: fieldsV1 - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - - name: manager - type: - scalar: string - - name: operation - type: - scalar: string - - name: subresource - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - scalar: untyped -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - map: - fields: - - name: annotations - type: - map: - elementType: - scalar: string - - name: creationTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deletionGracePeriodSeconds - type: - scalar: numeric - - name: deletionTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: finalizers - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: generateName - type: - scalar: string - - name: generation - type: - scalar: numeric - - name: labels - type: - map: - elementType: - scalar: string - - name: managedFields - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - elementRelationship: atomic - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: ownerReferences - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - elementRelationship: associative - keys: - - uid - - name: resourceVersion - type: - scalar: string - - name: selfLink - type: - scalar: string - - name: uid - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - map: - fields: - - name: apiVersion - type: - scalar: string - default: "" - - name: blockOwnerDeletion - type: - scalar: boolean - - name: controller - type: - scalar: boolean - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions - map: - fields: - - name: resourceVersion - type: - scalar: string - - name: uid - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time - scalar: untyped -- name: io.k8s.apimachinery.pkg.runtime.RawExtension - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.apimachinery.pkg.util.intstr.IntOrString - scalar: untyped -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/typed.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/typed.go deleted file mode 100644 index c9645d211..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/scheme/typed.go +++ /dev/null @@ -1,77 +0,0 @@ -package scheme - -import ( - "reflect" - "sync" - - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/managedfields" - "sigs.k8s.io/structured-merge-diff/v4/typed" -) - -// ResolveParseableType will build and return a ParseableType object -// based on the given gvk and GvkParser. If the given gvkParser is nil -// it will return a DeducedParseableType which is not suitable for -// calculating diffs. Will use the statically defined schema for k8s -// built in types. Will rely on the given gvk parser for CRD schemas. -func ResolveParseableType(gvk schema.GroupVersionKind, parser *managedfields.GvkParser) *typed.ParseableType { - if parser == nil { - return &typed.DeducedParseableType - } - pt := resolveFromStaticParser(gvk, parser) - if pt == nil { - return parser.Type(gvk) - } - return pt -} - -func resolveFromStaticParser(gvk schema.GroupVersionKind, parser *managedfields.GvkParser) *typed.ParseableType { - gvkNameMap := getGvkMap(parser) - name := gvkNameMap[gvk] - if name == "" { - return nil - } - - p := StaticParser() - if p == nil { - return nil - } - pt := p.Type(name) - if pt.IsValid() { - return &pt - } - return nil -} - -var ( - gvkMap map[schema.GroupVersionKind]string - extractOnce sync.Once -) - -func getGvkMap(parser *managedfields.GvkParser) map[schema.GroupVersionKind]string { - extractOnce.Do(func() { - gvkMap = extractGvkMap(parser) - }) - return gvkMap -} - -func extractGvkMap(parser *managedfields.GvkParser) map[schema.GroupVersionKind]string { - results := make(map[schema.GroupVersionKind]string) - - value := reflect.ValueOf(parser) - gvkValue := reflect.Indirect(value).FieldByName("gvks") - iter := gvkValue.MapRange() - for iter.Next() { - group := iter.Key().FieldByName("Group").String() - version := iter.Key().FieldByName("Version").String() - kind := iter.Key().FieldByName("Kind").String() - gvk := schema.GroupVersionKind{ - Group: group, - Version: version, - Kind: kind, - } - name := iter.Value().String() - results[gvk] = name - } - return results -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go deleted file mode 100644 index ba8b2a3ea..000000000 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/kube/uniqueprotomodels.go +++ /dev/null @@ -1,191 +0,0 @@ -package kube - -import ( - "fmt" - "sort" - - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/kube-openapi/pkg/util/proto" -) - -/** -The upstream Kubernetes NewGVKParser method causes problems for Argo CD. -https://github.com/kubernetes/apimachinery/blob/eb26334eeb0f769be8f0c5665ff34713cfdec83e/pkg/util/managedfields/gvkparser.go#L73 - -The function fails in instances where it is probably more desirable for Argo CD to simply ignore the error and move on. -But since the upstream implementation doesn't offer the option to ignore the error, we have to mutate the input to the -function to completely avoid the case that can produce the error. - -When encountering the error from NewGVKParser, we used to just set the internal GVKParser instance to nil, log the -error as info, and move on. - -But Argo CD increasingly relies on the GVKParser to produce reliable diffs, especially with server-side diffing. And -we're better off with an incorrectly-initialized GVKParser than no GVKParser at all. - -To understand why NewGVKParser fails, we need to understand how Kubernetes constructs its OpenAPI models. - -Kubernetes contains a built-in OpenAPI document containing the `definitions` for every built-in Kubernetes API. This -document includes shared structs like APIResourceList. Some of these definitions include an -x-kubernetes-group-version-kind extension. - -Aggregated APIs produce their own OpenAPI documents, which are merged with the built-in OpenAPI document. The aggregated -API documents generally include all the definitions of all the structs which are used anywhere by the API. This often -includes some of the same structs as the built-in OpenAPI document. - -So when Kubernetes constructs the complete OpenAPI document (the one served at /openapi/v2), it merges the built-in -OpenAPI document with the aggregated API OpenAPI documents. - -When the aggregator encounters two different definitions for the same struct (as determined by a deep compare) with the -same GVK (as determined by the value in the x-kubernetes-group-version-kind extension), it appends a `_vX` suffix to the -definition name in the OpenAPI document (where X is the count of the number of times the aggregator has seen the same -definition). Basically, it's communicating "different APIs have different opinions about the structure of structs with -this GVK, so I'm going to give them different names and let you sort it out." -https://github.com/kubernetes/kube-openapi/blob/b456828f718bab62dc3013d192665eb3d17f8fe9/pkg/aggregator/aggregator.go#L238-L279 - -This behavior is fine from the perspective of a typical Kubernetes API user. They download the OpenAPI document, they -see that there are two different "opinions" about the structure of a struct, and they can choose which one they want to -rely on. - -But Argo CD has to be generic. We need to take the provided OpenAPI document and use it to construct a GVKParser. And -the GVKParser (reasonably) rejects the OpenAPI document if it contains two definitions for the same struct. - -So we have to do some work to make the OpenAPI document palatable to the GVKParser. We have to remove the duplicate -definitions. Specifically, we take the first one and log a warning for each subsequent definition with the same GVK. - -In practice, this probably generally appears when a common aggregated API was built at a time significantly before the -current Kubernetes version. The most common case is that the metrics server is built against an older version of the -Kubernetes libraries, using old versions of the structs. When the metrics server is updated to use the latest version of -the Kubernetes libraries, the problems go away, because the aggregated API and Kubernetes agree about the shape of the -struct. - -Using the first encountered definition is imperfect and could result in unreliable diffs. But it's better than -constructing completely-wrong diffs due to the lack of a GVKParser. -*/ - -// uniqueModels is a model provider that ensures that no two models share the same gvk. Use newUniqueModels to -// initialize it and enforce uniqueness. -type uniqueModels struct { - models map[string]proto.Schema -} - -// LookupModel is public through the interface of Models. It -// returns a visitable schema from the given model name. -// Copied verbatim from here: https://github.com/kubernetes/kube-openapi/blob/b456828f718bab62dc3013d192665eb3d17f8fe9/pkg/util/proto/document.go#L322-L326 -func (d *uniqueModels) LookupModel(model string) proto.Schema { - return d.models[model] -} - -// Copied verbatim from here: https://github.com/kubernetes/kube-openapi/blob/b456828f718bab62dc3013d192665eb3d17f8fe9/pkg/util/proto/document.go#L328-L337 -func (d *uniqueModels) ListModels() []string { - models := []string{} - - for model := range d.models { - models = append(models, model) - } - - sort.Strings(models) - return models -} - -// newUniqueModels returns a new uniqueModels instance and a list of warnings for models that share the same gvk. -func newUniqueModels(models proto.Models) (proto.Models, []schema.GroupVersionKind) { - var taintedGVKs []schema.GroupVersionKind - gvks := map[schema.GroupVersionKind]string{} - um := &uniqueModels{models: map[string]proto.Schema{}} - for _, modelName := range models.ListModels() { - model := models.LookupModel(modelName) - if model == nil { - panic(fmt.Sprintf("ListModels returns a model that can't be looked-up for: %v", modelName)) - } - gvkList := parseGroupVersionKind(model) - gvk, wasProcessed := modelGvkWasAlreadyProcessed(model, gvks) - if !wasProcessed { - um.models[modelName] = model - - // Add GVKs to the map, so we can detect a duplicate GVK later. - for _, gvk := range gvkList { - if len(gvk.Kind) > 0 { - gvks[gvk] = modelName - } - } - } else { - taintedGVKs = append(taintedGVKs, gvk) - } - } - return um, taintedGVKs -} - -// modelGvkWasAlreadyProcessed inspects a model to determine if it would trigger a duplicate GVK error. The gvks map -// holds the GVKs of all the models that have already been processed. If the model would trigger a duplicate GVK error, -// the function returns the GVK that would trigger the error and true. Otherwise, it returns an empty GVK and false. -func modelGvkWasAlreadyProcessed(model proto.Schema, gvks map[schema.GroupVersionKind]string) (schema.GroupVersionKind, bool) { - gvkList := parseGroupVersionKind(model) - // Not every model has a GVK extension specified. For those models, this loop will be skipped. - for _, gvk := range gvkList { - // The kind length check is copied from managedfields.NewGVKParser. It's unclear what edge case it's handling, - // but the behavior of this function should match NewGVKParser. - if len(gvk.Kind) > 0 { - _, ok := gvks[gvk] - if ok { - // This is the only condition under which NewGVKParser would return a duplicate GVK error. - return gvk, true - } - } - } - return schema.GroupVersionKind{}, false -} - -// groupVersionKindExtensionKey is the key used to lookup the -// GroupVersionKind value for an object definition from the -// definition's "extensions" map. -// Copied verbatim from: https://github.com/kubernetes/apimachinery/blob/eb26334eeb0f769be8f0c5665ff34713cfdec83e/pkg/util/managedfields/gvkparser.go#L29-L32 -const groupVersionKindExtensionKey = "x-kubernetes-group-version-kind" - -// parseGroupVersionKind gets and parses GroupVersionKind from the extension. Returns empty if it doesn't have one. -// Copied verbatim from: https://github.com/kubernetes/apimachinery/blob/eb26334eeb0f769be8f0c5665ff34713cfdec83e/pkg/util/managedfields/gvkparser.go#L82-L128 -func parseGroupVersionKind(s proto.Schema) []schema.GroupVersionKind { - extensions := s.GetExtensions() - - gvkListResult := []schema.GroupVersionKind{} - - // Get the extensions - gvkExtension, ok := extensions[groupVersionKindExtensionKey] - if !ok { - return []schema.GroupVersionKind{} - } - - // gvk extension must be a list of at least 1 element. - gvkList, ok := gvkExtension.([]any) - if !ok { - return []schema.GroupVersionKind{} - } - - for _, gvk := range gvkList { - // gvk extension list must be a map with group, version, and - // kind fields - gvkMap, ok := gvk.(map[any]any) - if !ok { - continue - } - group, ok := gvkMap["group"].(string) - if !ok { - continue - } - version, ok := gvkMap["version"].(string) - if !ok { - continue - } - kind, ok := gvkMap["kind"].(string) - if !ok { - continue - } - - gvkListResult = append(gvkListResult, schema.GroupVersionKind{ - Group: group, - Version: version, - Kind: kind, - }) - } - - return gvkListResult -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/text/text.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/text/text.go index 7c8f865a6..5b83b7b42 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/text/text.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/text/text.go @@ -8,11 +8,3 @@ func FirstNonEmpty(args ...string) string { } return "" } - -// WithDefault return defaultValue when val is blank -func WithDefault(val string, defaultValue string) string { - if len(val) == 0 { - return defaultValue - } - return val -} diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/api.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/api.go index 89670a67b..1d28daa94 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/api.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/api.go @@ -11,6 +11,6 @@ type Tracer interface { } type Span interface { - SetBaggageItem(key string, value any) + SetBaggageItem(key string, value interface{}) Finish() } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/logging.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/logging.go index fd0619f99..166e09c13 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/logging.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/logging.go @@ -25,7 +25,7 @@ func (l LoggingTracer) StartSpan(operationName string) Span { return loggingSpan{ logger: l.logger, operationName: operationName, - baggage: make(map[string]any), + baggage: make(map[string]interface{}), start: time.Now(), } } @@ -33,7 +33,7 @@ func (l LoggingTracer) StartSpan(operationName string) Span { type loggingSpan struct { logger logr.Logger operationName string - baggage map[string]any + baggage map[string]interface{} start time.Time } @@ -43,12 +43,12 @@ func (s loggingSpan) Finish() { Info("Trace") } -func (s loggingSpan) SetBaggageItem(key string, value any) { +func (s loggingSpan) SetBaggageItem(key string, value interface{}) { s.baggage[key] = value } -func baggageToVals(baggage map[string]any) []any { - result := make([]any, 0, len(baggage)*2) +func baggageToVals(baggage map[string]interface{}) []interface{} { + result := make([]interface{}, 0, len(baggage)*2) for k, v := range baggage { result = append(result, k, v) } diff --git a/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/nop.go b/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/nop.go index e39b67b99..94984d611 100644 --- a/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/nop.go +++ b/vendor/github.com/argoproj/gitops-engine/pkg/utils/tracing/nop.go @@ -5,15 +5,17 @@ var ( _ Span = nopSpan{} ) -type NopTracer struct{} +type NopTracer struct { +} -func (n NopTracer) StartSpan(_ string) Span { +func (n NopTracer) StartSpan(operationName string) Span { return nopSpan{} } -type nopSpan struct{} +type nopSpan struct { +} -func (n nopSpan) SetBaggageItem(_ string, _ any) { +func (n nopSpan) SetBaggageItem(key string, value interface{}) { } func (n nopSpan) Finish() { diff --git a/vendor/github.com/evanphx/json-patch/.gitignore b/vendor/github.com/evanphx/json-patch/.gitignore new file mode 100644 index 000000000..b7ed7f956 --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/.gitignore @@ -0,0 +1,6 @@ +# editor and IDE paraphernalia +.idea +.vscode + +# macOS paraphernalia +.DS_Store diff --git a/vendor/github.com/evanphx/json-patch/LICENSE b/vendor/github.com/evanphx/json-patch/LICENSE new file mode 100644 index 000000000..df76d7d77 --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2014, Evan Phoenix +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the Evan Phoenix nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/evanphx/json-patch/README.md b/vendor/github.com/evanphx/json-patch/README.md new file mode 100644 index 000000000..86fefd5bf --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/README.md @@ -0,0 +1,315 @@ +# JSON-Patch +`jsonpatch` is a library which provides functionality for both applying +[RFC6902 JSON patches](http://tools.ietf.org/html/rfc6902) against documents, as +well as for calculating & applying [RFC7396 JSON merge patches](https://tools.ietf.org/html/rfc7396). + +[![GoDoc](https://godoc.org/github.com/evanphx/json-patch?status.svg)](http://godoc.org/github.com/evanphx/json-patch) +[![Build Status](https://github.com/evanphx/json-patch/actions/workflows/go.yml/badge.svg)](https://github.com/evanphx/json-patch/actions/workflows/go.yml) +[![Report Card](https://goreportcard.com/badge/github.com/evanphx/json-patch)](https://goreportcard.com/report/github.com/evanphx/json-patch) + +# Get It! + +**Latest and greatest**: +```bash +go get -u github.com/evanphx/json-patch/v5 +``` + +If you need version 4, use `go get -u gopkg.in/evanphx/json-patch.v4` + +(previous versions below `v3` are unavailable) + +# Use It! +* [Create and apply a merge patch](#create-and-apply-a-merge-patch) +* [Create and apply a JSON Patch](#create-and-apply-a-json-patch) +* [Comparing JSON documents](#comparing-json-documents) +* [Combine merge patches](#combine-merge-patches) + + +# Configuration + +* There is a global configuration variable `jsonpatch.SupportNegativeIndices`. + This defaults to `true` and enables the non-standard practice of allowing + negative indices to mean indices starting at the end of an array. This + functionality can be disabled by setting `jsonpatch.SupportNegativeIndices = + false`. + +* There is a global configuration variable `jsonpatch.AccumulatedCopySizeLimit`, + which limits the total size increase in bytes caused by "copy" operations in a + patch. It defaults to 0, which means there is no limit. + +These global variables control the behavior of `jsonpatch.Apply`. + +An alternative to `jsonpatch.Apply` is `jsonpatch.ApplyWithOptions` whose behavior +is controlled by an `options` parameter of type `*jsonpatch.ApplyOptions`. + +Structure `jsonpatch.ApplyOptions` includes the configuration options above +and adds two new options: `AllowMissingPathOnRemove` and `EnsurePathExistsOnAdd`. + +When `AllowMissingPathOnRemove` is set to `true`, `jsonpatch.ApplyWithOptions` will ignore +`remove` operations whose `path` points to a non-existent location in the JSON document. +`AllowMissingPathOnRemove` defaults to `false` which will lead to `jsonpatch.ApplyWithOptions` +returning an error when hitting a missing `path` on `remove`. + +When `EnsurePathExistsOnAdd` is set to `true`, `jsonpatch.ApplyWithOptions` will make sure +that `add` operations produce all the `path` elements that are missing from the target object. + +Use `jsonpatch.NewApplyOptions` to create an instance of `jsonpatch.ApplyOptions` +whose values are populated from the global configuration variables. + +## Create and apply a merge patch +Given both an original JSON document and a modified JSON document, you can create +a [Merge Patch](https://tools.ietf.org/html/rfc7396) document. + +It can describe the changes needed to convert from the original to the +modified JSON document. + +Once you have a merge patch, you can apply it to other JSON documents using the +`jsonpatch.MergePatch(document, patch)` function. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + // Let's create a merge patch from these two documents... + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + target := []byte(`{"name": "Jane", "age": 24}`) + + patch, err := jsonpatch.CreateMergePatch(original, target) + if err != nil { + panic(err) + } + + // Now lets apply the patch against a different JSON document... + + alternative := []byte(`{"name": "Tina", "age": 28, "height": 3.75}`) + modifiedAlternative, err := jsonpatch.MergePatch(alternative, patch) + + fmt.Printf("patch document: %s\n", patch) + fmt.Printf("updated alternative doc: %s\n", modifiedAlternative) +} +``` + +When ran, you get the following output: + +```bash +$ go run main.go +patch document: {"height":null,"name":"Jane"} +updated alternative doc: {"age":28,"name":"Jane"} +``` + +## Create and apply a JSON Patch +You can create patch objects using `DecodePatch([]byte)`, which can then +be applied against JSON documents. + +The following is an example of creating a patch from two operations, and +applying it against a JSON document. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + patchJSON := []byte(`[ + {"op": "replace", "path": "/name", "value": "Jane"}, + {"op": "remove", "path": "/height"} + ]`) + + patch, err := jsonpatch.DecodePatch(patchJSON) + if err != nil { + panic(err) + } + + modified, err := patch.Apply(original) + if err != nil { + panic(err) + } + + fmt.Printf("Original document: %s\n", original) + fmt.Printf("Modified document: %s\n", modified) +} +``` + +When ran, you get the following output: + +```bash +$ go run main.go +Original document: {"name": "John", "age": 24, "height": 3.21} +Modified document: {"age":24,"name":"Jane"} +``` + +## Comparing JSON documents +Due to potential whitespace and ordering differences, one cannot simply compare +JSON strings or byte-arrays directly. + +As such, you can instead use `jsonpatch.Equal(document1, document2)` to +determine if two JSON documents are _structurally_ equal. This ignores +whitespace differences, and key-value ordering. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + similar := []byte(` + { + "age": 24, + "height": 3.21, + "name": "John" + } + `) + different := []byte(`{"name": "Jane", "age": 20, "height": 3.37}`) + + if jsonpatch.Equal(original, similar) { + fmt.Println(`"original" is structurally equal to "similar"`) + } + + if !jsonpatch.Equal(original, different) { + fmt.Println(`"original" is _not_ structurally equal to "different"`) + } +} +``` + +When ran, you get the following output: +```bash +$ go run main.go +"original" is structurally equal to "similar" +"original" is _not_ structurally equal to "different" +``` + +## Combine merge patches +Given two JSON merge patch documents, it is possible to combine them into a +single merge patch which can describe both set of changes. + +The resulting merge patch can be used such that applying it results in a +document structurally similar as merging each merge patch to the document +in succession. + +```go +package main + +import ( + "fmt" + + jsonpatch "github.com/evanphx/json-patch" +) + +func main() { + original := []byte(`{"name": "John", "age": 24, "height": 3.21}`) + + nameAndHeight := []byte(`{"height":null,"name":"Jane"}`) + ageAndEyes := []byte(`{"age":4.23,"eyes":"blue"}`) + + // Let's combine these merge patch documents... + combinedPatch, err := jsonpatch.MergeMergePatches(nameAndHeight, ageAndEyes) + if err != nil { + panic(err) + } + + // Apply each patch individual against the original document + withoutCombinedPatch, err := jsonpatch.MergePatch(original, nameAndHeight) + if err != nil { + panic(err) + } + + withoutCombinedPatch, err = jsonpatch.MergePatch(withoutCombinedPatch, ageAndEyes) + if err != nil { + panic(err) + } + + // Apply the combined patch against the original document + + withCombinedPatch, err := jsonpatch.MergePatch(original, combinedPatch) + if err != nil { + panic(err) + } + + // Do both result in the same thing? They should! + if jsonpatch.Equal(withCombinedPatch, withoutCombinedPatch) { + fmt.Println("Both JSON documents are structurally the same!") + } + + fmt.Printf("combined merge patch: %s", combinedPatch) +} +``` + +When ran, you get the following output: +```bash +$ go run main.go +Both JSON documents are structurally the same! +combined merge patch: {"age":4.23,"eyes":"blue","height":null,"name":"Jane"} +``` + +# CLI for comparing JSON documents +You can install the commandline program `json-patch`. + +This program can take multiple JSON patch documents as arguments, +and fed a JSON document from `stdin`. It will apply the patch(es) against +the document and output the modified doc. + +**patch.1.json** +```json +[ + {"op": "replace", "path": "/name", "value": "Jane"}, + {"op": "remove", "path": "/height"} +] +``` + +**patch.2.json** +```json +[ + {"op": "add", "path": "/address", "value": "123 Main St"}, + {"op": "replace", "path": "/age", "value": "21"} +] +``` + +**document.json** +```json +{ + "name": "John", + "age": 24, + "height": 3.21 +} +``` + +You can then run: + +```bash +$ go install github.com/evanphx/json-patch/cmd/json-patch +$ cat document.json | json-patch -p patch.1.json -p patch.2.json +{"address":"123 Main St","age":"21","name":"Jane"} +``` + +# Help It! +Contributions are welcomed! Leave [an issue](https://github.com/evanphx/json-patch/issues) +or [create a PR](https://github.com/evanphx/json-patch/compare). + + +Before creating a pull request, we'd ask that you make sure tests are passing +and that you have added new tests when applicable. + +Contributors can run tests using: + +```bash +go test -cover ./... +``` + +Builds for pull requests are tested automatically +using [GitHub Actions](https://github.com/evanphx/json-patch/actions/workflows/go.yml). diff --git a/vendor/github.com/evanphx/json-patch/errors.go b/vendor/github.com/evanphx/json-patch/errors.go new file mode 100644 index 000000000..75304b443 --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/errors.go @@ -0,0 +1,38 @@ +package jsonpatch + +import "fmt" + +// AccumulatedCopySizeError is an error type returned when the accumulated size +// increase caused by copy operations in a patch operation has exceeded the +// limit. +type AccumulatedCopySizeError struct { + limit int64 + accumulated int64 +} + +// NewAccumulatedCopySizeError returns an AccumulatedCopySizeError. +func NewAccumulatedCopySizeError(l, a int64) *AccumulatedCopySizeError { + return &AccumulatedCopySizeError{limit: l, accumulated: a} +} + +// Error implements the error interface. +func (a *AccumulatedCopySizeError) Error() string { + return fmt.Sprintf("Unable to complete the copy, the accumulated size increase of copy is %d, exceeding the limit %d", a.accumulated, a.limit) +} + +// ArraySizeError is an error type returned when the array size has exceeded +// the limit. +type ArraySizeError struct { + limit int + size int +} + +// NewArraySizeError returns an ArraySizeError. +func NewArraySizeError(l, s int) *ArraySizeError { + return &ArraySizeError{limit: l, size: s} +} + +// Error implements the error interface. +func (a *ArraySizeError) Error() string { + return fmt.Sprintf("Unable to create array of size %d, limit is %d", a.size, a.limit) +} diff --git a/vendor/github.com/evanphx/json-patch/merge.go b/vendor/github.com/evanphx/json-patch/merge.go new file mode 100644 index 000000000..ad88d4018 --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/merge.go @@ -0,0 +1,389 @@ +package jsonpatch + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" +) + +func merge(cur, patch *lazyNode, mergeMerge bool) *lazyNode { + curDoc, err := cur.intoDoc() + + if err != nil { + pruneNulls(patch) + return patch + } + + patchDoc, err := patch.intoDoc() + + if err != nil { + return patch + } + + mergeDocs(curDoc, patchDoc, mergeMerge) + + return cur +} + +func mergeDocs(doc, patch *partialDoc, mergeMerge bool) { + for k, v := range *patch { + if v == nil { + if mergeMerge { + (*doc)[k] = nil + } else { + delete(*doc, k) + } + } else { + cur, ok := (*doc)[k] + + if !ok || cur == nil { + if !mergeMerge { + pruneNulls(v) + } + + (*doc)[k] = v + } else { + (*doc)[k] = merge(cur, v, mergeMerge) + } + } + } +} + +func pruneNulls(n *lazyNode) { + sub, err := n.intoDoc() + + if err == nil { + pruneDocNulls(sub) + } else { + ary, err := n.intoAry() + + if err == nil { + pruneAryNulls(ary) + } + } +} + +func pruneDocNulls(doc *partialDoc) *partialDoc { + for k, v := range *doc { + if v == nil { + delete(*doc, k) + } else { + pruneNulls(v) + } + } + + return doc +} + +func pruneAryNulls(ary *partialArray) *partialArray { + newAry := []*lazyNode{} + + for _, v := range *ary { + if v != nil { + pruneNulls(v) + } + newAry = append(newAry, v) + } + + *ary = newAry + + return ary +} + +var ErrBadJSONDoc = fmt.Errorf("Invalid JSON Document") +var ErrBadJSONPatch = fmt.Errorf("Invalid JSON Patch") +var errBadMergeTypes = fmt.Errorf("Mismatched JSON Documents") + +// MergeMergePatches merges two merge patches together, such that +// applying this resulting merged merge patch to a document yields the same +// as merging each merge patch to the document in succession. +func MergeMergePatches(patch1Data, patch2Data []byte) ([]byte, error) { + return doMergePatch(patch1Data, patch2Data, true) +} + +// MergePatch merges the patchData into the docData. +func MergePatch(docData, patchData []byte) ([]byte, error) { + return doMergePatch(docData, patchData, false) +} + +func doMergePatch(docData, patchData []byte, mergeMerge bool) ([]byte, error) { + doc := &partialDoc{} + + docErr := json.Unmarshal(docData, doc) + + patch := &partialDoc{} + + patchErr := json.Unmarshal(patchData, patch) + + if _, ok := docErr.(*json.SyntaxError); ok { + return nil, ErrBadJSONDoc + } + + if _, ok := patchErr.(*json.SyntaxError); ok { + return nil, ErrBadJSONPatch + } + + if docErr == nil && *doc == nil { + return nil, ErrBadJSONDoc + } + + if patchErr == nil && *patch == nil { + return nil, ErrBadJSONPatch + } + + if docErr != nil || patchErr != nil { + // Not an error, just not a doc, so we turn straight into the patch + if patchErr == nil { + if mergeMerge { + doc = patch + } else { + doc = pruneDocNulls(patch) + } + } else { + patchAry := &partialArray{} + patchErr = json.Unmarshal(patchData, patchAry) + + if patchErr != nil { + return nil, ErrBadJSONPatch + } + + pruneAryNulls(patchAry) + + out, patchErr := json.Marshal(patchAry) + + if patchErr != nil { + return nil, ErrBadJSONPatch + } + + return out, nil + } + } else { + mergeDocs(doc, patch, mergeMerge) + } + + return json.Marshal(doc) +} + +// resemblesJSONArray indicates whether the byte-slice "appears" to be +// a JSON array or not. +// False-positives are possible, as this function does not check the internal +// structure of the array. It only checks that the outer syntax is present and +// correct. +func resemblesJSONArray(input []byte) bool { + input = bytes.TrimSpace(input) + + hasPrefix := bytes.HasPrefix(input, []byte("[")) + hasSuffix := bytes.HasSuffix(input, []byte("]")) + + return hasPrefix && hasSuffix +} + +// CreateMergePatch will return a merge patch document capable of converting +// the original document(s) to the modified document(s). +// The parameters can be bytes of either two JSON Documents, or two arrays of +// JSON documents. +// The merge patch returned follows the specification defined at http://tools.ietf.org/html/draft-ietf-appsawg-json-merge-patch-07 +func CreateMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalResemblesArray := resemblesJSONArray(originalJSON) + modifiedResemblesArray := resemblesJSONArray(modifiedJSON) + + // Do both byte-slices seem like JSON arrays? + if originalResemblesArray && modifiedResemblesArray { + return createArrayMergePatch(originalJSON, modifiedJSON) + } + + // Are both byte-slices are not arrays? Then they are likely JSON objects... + if !originalResemblesArray && !modifiedResemblesArray { + return createObjectMergePatch(originalJSON, modifiedJSON) + } + + // None of the above? Then return an error because of mismatched types. + return nil, errBadMergeTypes +} + +// createObjectMergePatch will return a merge-patch document capable of +// converting the original document to the modified document. +func createObjectMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalDoc := map[string]interface{}{} + modifiedDoc := map[string]interface{}{} + + err := json.Unmarshal(originalJSON, &originalDoc) + if err != nil { + return nil, ErrBadJSONDoc + } + + err = json.Unmarshal(modifiedJSON, &modifiedDoc) + if err != nil { + return nil, ErrBadJSONDoc + } + + dest, err := getDiff(originalDoc, modifiedDoc) + if err != nil { + return nil, err + } + + return json.Marshal(dest) +} + +// createArrayMergePatch will return an array of merge-patch documents capable +// of converting the original document to the modified document for each +// pair of JSON documents provided in the arrays. +// Arrays of mismatched sizes will result in an error. +func createArrayMergePatch(originalJSON, modifiedJSON []byte) ([]byte, error) { + originalDocs := []json.RawMessage{} + modifiedDocs := []json.RawMessage{} + + err := json.Unmarshal(originalJSON, &originalDocs) + if err != nil { + return nil, ErrBadJSONDoc + } + + err = json.Unmarshal(modifiedJSON, &modifiedDocs) + if err != nil { + return nil, ErrBadJSONDoc + } + + total := len(originalDocs) + if len(modifiedDocs) != total { + return nil, ErrBadJSONDoc + } + + result := []json.RawMessage{} + for i := 0; i < len(originalDocs); i++ { + original := originalDocs[i] + modified := modifiedDocs[i] + + patch, err := createObjectMergePatch(original, modified) + if err != nil { + return nil, err + } + + result = append(result, json.RawMessage(patch)) + } + + return json.Marshal(result) +} + +// Returns true if the array matches (must be json types). +// As is idiomatic for go, an empty array is not the same as a nil array. +func matchesArray(a, b []interface{}) bool { + if len(a) != len(b) { + return false + } + if (a == nil && b != nil) || (a != nil && b == nil) { + return false + } + for i := range a { + if !matchesValue(a[i], b[i]) { + return false + } + } + return true +} + +// Returns true if the values matches (must be json types) +// The types of the values must match, otherwise it will always return false +// If two map[string]interface{} are given, all elements must match. +func matchesValue(av, bv interface{}) bool { + if reflect.TypeOf(av) != reflect.TypeOf(bv) { + return false + } + switch at := av.(type) { + case string: + bt := bv.(string) + if bt == at { + return true + } + case float64: + bt := bv.(float64) + if bt == at { + return true + } + case bool: + bt := bv.(bool) + if bt == at { + return true + } + case nil: + // Both nil, fine. + return true + case map[string]interface{}: + bt := bv.(map[string]interface{}) + if len(bt) != len(at) { + return false + } + for key := range bt { + av, aOK := at[key] + bv, bOK := bt[key] + if aOK != bOK { + return false + } + if !matchesValue(av, bv) { + return false + } + } + return true + case []interface{}: + bt := bv.([]interface{}) + return matchesArray(at, bt) + } + return false +} + +// getDiff returns the (recursive) difference between a and b as a map[string]interface{}. +func getDiff(a, b map[string]interface{}) (map[string]interface{}, error) { + into := map[string]interface{}{} + for key, bv := range b { + av, ok := a[key] + // value was added + if !ok { + into[key] = bv + continue + } + // If types have changed, replace completely + if reflect.TypeOf(av) != reflect.TypeOf(bv) { + into[key] = bv + continue + } + // Types are the same, compare values + switch at := av.(type) { + case map[string]interface{}: + bt := bv.(map[string]interface{}) + dst := make(map[string]interface{}, len(bt)) + dst, err := getDiff(at, bt) + if err != nil { + return nil, err + } + if len(dst) > 0 { + into[key] = dst + } + case string, float64, bool: + if !matchesValue(av, bv) { + into[key] = bv + } + case []interface{}: + bt := bv.([]interface{}) + if !matchesArray(at, bt) { + into[key] = bv + } + case nil: + switch bv.(type) { + case nil: + // Both nil, fine. + default: + into[key] = bv + } + default: + panic(fmt.Sprintf("Unknown type:%T in key %s", av, key)) + } + } + // Now add all deleted values as nil + for key := range a { + _, found := b[key] + if !found { + into[key] = nil + } + } + return into, nil +} diff --git a/vendor/github.com/evanphx/json-patch/patch.go b/vendor/github.com/evanphx/json-patch/patch.go new file mode 100644 index 000000000..95136681b --- /dev/null +++ b/vendor/github.com/evanphx/json-patch/patch.go @@ -0,0 +1,850 @@ +package jsonpatch + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "strconv" + "strings" +) + +const ( + eRaw = iota + eDoc + eAry +) + +var ( + // SupportNegativeIndices decides whether to support non-standard practice of + // allowing negative indices to mean indices starting at the end of an array. + // Default to true. + SupportNegativeIndices bool = true + // AccumulatedCopySizeLimit limits the total size increase in bytes caused by + // "copy" operations in a patch. + AccumulatedCopySizeLimit int64 = 0 +) + +var ( + ErrTestFailed = errors.New("test failed") + ErrMissing = errors.New("missing value") + ErrUnknownType = errors.New("unknown object type") + ErrInvalid = errors.New("invalid state detected") + ErrInvalidIndex = errors.New("invalid index referenced") +) + +type lazyNode struct { + raw *json.RawMessage + doc partialDoc + ary partialArray + which int +} + +// Operation is a single JSON-Patch step, such as a single 'add' operation. +type Operation map[string]*json.RawMessage + +// Patch is an ordered collection of Operations. +type Patch []Operation + +type partialDoc map[string]*lazyNode +type partialArray []*lazyNode + +type container interface { + get(key string) (*lazyNode, error) + set(key string, val *lazyNode) error + add(key string, val *lazyNode) error + remove(key string) error +} + +func newLazyNode(raw *json.RawMessage) *lazyNode { + return &lazyNode{raw: raw, doc: nil, ary: nil, which: eRaw} +} + +func (n *lazyNode) MarshalJSON() ([]byte, error) { + switch n.which { + case eRaw: + return json.Marshal(n.raw) + case eDoc: + return json.Marshal(n.doc) + case eAry: + return json.Marshal(n.ary) + default: + return nil, ErrUnknownType + } +} + +func (n *lazyNode) UnmarshalJSON(data []byte) error { + dest := make(json.RawMessage, len(data)) + copy(dest, data) + n.raw = &dest + n.which = eRaw + return nil +} + +func deepCopy(src *lazyNode) (*lazyNode, int, error) { + if src == nil { + return nil, 0, nil + } + a, err := src.MarshalJSON() + if err != nil { + return nil, 0, err + } + sz := len(a) + ra := make(json.RawMessage, sz) + copy(ra, a) + return newLazyNode(&ra), sz, nil +} + +func (n *lazyNode) intoDoc() (*partialDoc, error) { + if n.which == eDoc { + return &n.doc, nil + } + + if n.raw == nil { + return nil, ErrInvalid + } + + err := json.Unmarshal(*n.raw, &n.doc) + + if err != nil { + return nil, err + } + + n.which = eDoc + return &n.doc, nil +} + +func (n *lazyNode) intoAry() (*partialArray, error) { + if n.which == eAry { + return &n.ary, nil + } + + if n.raw == nil { + return nil, ErrInvalid + } + + err := json.Unmarshal(*n.raw, &n.ary) + + if err != nil { + return nil, err + } + + n.which = eAry + return &n.ary, nil +} + +func (n *lazyNode) compact() []byte { + buf := &bytes.Buffer{} + + if n.raw == nil { + return nil + } + + err := json.Compact(buf, *n.raw) + + if err != nil { + return *n.raw + } + + return buf.Bytes() +} + +func (n *lazyNode) tryDoc() bool { + if n.raw == nil { + return false + } + + err := json.Unmarshal(*n.raw, &n.doc) + + if err != nil { + return false + } + + n.which = eDoc + return true +} + +func (n *lazyNode) tryAry() bool { + if n.raw == nil { + return false + } + + err := json.Unmarshal(*n.raw, &n.ary) + + if err != nil { + return false + } + + n.which = eAry + return true +} + +func (n *lazyNode) equal(o *lazyNode) bool { + if n.which == eRaw { + if !n.tryDoc() && !n.tryAry() { + if o.which != eRaw { + return false + } + + return bytes.Equal(n.compact(), o.compact()) + } + } + + if n.which == eDoc { + if o.which == eRaw { + if !o.tryDoc() { + return false + } + } + + if o.which != eDoc { + return false + } + + if len(n.doc) != len(o.doc) { + return false + } + + for k, v := range n.doc { + ov, ok := o.doc[k] + + if !ok { + return false + } + + if (v == nil) != (ov == nil) { + return false + } + + if v == nil && ov == nil { + continue + } + + if !v.equal(ov) { + return false + } + } + + return true + } + + if o.which != eAry && !o.tryAry() { + return false + } + + if len(n.ary) != len(o.ary) { + return false + } + + for idx, val := range n.ary { + if !val.equal(o.ary[idx]) { + return false + } + } + + return true +} + +// Kind reads the "op" field of the Operation. +func (o Operation) Kind() string { + if obj, ok := o["op"]; ok && obj != nil { + var op string + + err := json.Unmarshal(*obj, &op) + + if err != nil { + return "unknown" + } + + return op + } + + return "unknown" +} + +// Path reads the "path" field of the Operation. +func (o Operation) Path() (string, error) { + if obj, ok := o["path"]; ok && obj != nil { + var op string + + err := json.Unmarshal(*obj, &op) + + if err != nil { + return "unknown", err + } + + return op, nil + } + + return "unknown", fmt.Errorf("operation missing path field: %w", ErrMissing) +} + +// From reads the "from" field of the Operation. +func (o Operation) From() (string, error) { + if obj, ok := o["from"]; ok && obj != nil { + var op string + + err := json.Unmarshal(*obj, &op) + + if err != nil { + return "unknown", err + } + + return op, nil + } + + return "unknown", fmt.Errorf("operation, missing from field: %w", ErrMissing) +} + +func (o Operation) value() *lazyNode { + if obj, ok := o["value"]; ok { + return newLazyNode(obj) + } + + return nil +} + +// ValueInterface decodes the operation value into an interface. +func (o Operation) ValueInterface() (interface{}, error) { + if obj, ok := o["value"]; ok && obj != nil { + var v interface{} + + err := json.Unmarshal(*obj, &v) + + if err != nil { + return nil, err + } + + return v, nil + } + + return nil, fmt.Errorf("operation, missing value field: %w", ErrMissing) +} + +func isArray(buf []byte) bool { +Loop: + for _, c := range buf { + switch c { + case ' ': + case '\n': + case '\t': + continue + case '[': + return true + default: + break Loop + } + } + + return false +} + +func findObject(pd *container, path string) (container, string) { + doc := *pd + + split := strings.Split(path, "/") + + if len(split) < 2 { + return nil, "" + } + + parts := split[1 : len(split)-1] + + key := split[len(split)-1] + + var err error + + for _, part := range parts { + + next, ok := doc.get(decodePatchKey(part)) + + if next == nil || ok != nil || next.raw == nil { + return nil, "" + } + + if isArray(*next.raw) { + doc, err = next.intoAry() + + if err != nil { + return nil, "" + } + } else { + doc, err = next.intoDoc() + + if err != nil { + return nil, "" + } + } + } + + return doc, decodePatchKey(key) +} + +func (d *partialDoc) set(key string, val *lazyNode) error { + (*d)[key] = val + return nil +} + +func (d *partialDoc) add(key string, val *lazyNode) error { + (*d)[key] = val + return nil +} + +func (d *partialDoc) get(key string) (*lazyNode, error) { + return (*d)[key], nil +} + +func (d *partialDoc) remove(key string) error { + _, ok := (*d)[key] + if !ok { + return fmt.Errorf("Unable to remove nonexistent key: %s: %w", key, ErrMissing) + } + + delete(*d, key) + return nil +} + +// set should only be used to implement the "replace" operation, so "key" must +// be an already existing index in "d". +func (d *partialArray) set(key string, val *lazyNode) error { + idx, err := strconv.Atoi(key) + if err != nil { + return err + } + + if idx < 0 { + if !SupportNegativeIndices { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + if idx < -len(*d) { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + idx += len(*d) + } + + (*d)[idx] = val + return nil +} + +func (d *partialArray) add(key string, val *lazyNode) error { + if key == "-" { + *d = append(*d, val) + return nil + } + + idx, err := strconv.Atoi(key) + if err != nil { + return fmt.Errorf("value was not a proper array index: '%s': %w", key, err) + } + + sz := len(*d) + 1 + + ary := make([]*lazyNode, sz) + + cur := *d + + if idx >= len(ary) { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + + if idx < 0 { + if !SupportNegativeIndices { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + if idx < -len(ary) { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + idx += len(ary) + } + + copy(ary[0:idx], cur[0:idx]) + ary[idx] = val + copy(ary[idx+1:], cur[idx:]) + + *d = ary + return nil +} + +func (d *partialArray) get(key string) (*lazyNode, error) { + idx, err := strconv.Atoi(key) + + if err != nil { + return nil, err + } + + if idx < 0 { + if !SupportNegativeIndices { + return nil, fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + if idx < -len(*d) { + return nil, fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + idx += len(*d) + } + + if idx >= len(*d) { + return nil, fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + + return (*d)[idx], nil +} + +func (d *partialArray) remove(key string) error { + idx, err := strconv.Atoi(key) + if err != nil { + return err + } + + cur := *d + + if idx >= len(cur) { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + + if idx < 0 { + if !SupportNegativeIndices { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + if idx < -len(cur) { + return fmt.Errorf("Unable to access invalid index: %d: %w", idx, ErrInvalidIndex) + } + idx += len(cur) + } + + ary := make([]*lazyNode, len(cur)-1) + + copy(ary[0:idx], cur[0:idx]) + copy(ary[idx:], cur[idx+1:]) + + *d = ary + return nil + +} + +func (p Patch) add(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return fmt.Errorf("add operation failed to decode path: %w", ErrMissing) + } + + con, key := findObject(doc, path) + + if con == nil { + return fmt.Errorf("add operation does not apply: doc is missing path: \"%s\": %w", path, ErrMissing) + } + + err = con.add(key, op.value()) + if err != nil { + return fmt.Errorf("error in add for path: '%s': %w", path, err) + } + + return nil +} + +func (p Patch) remove(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return fmt.Errorf("remove operation failed to decode path: %w", ErrMissing) + } + + con, key := findObject(doc, path) + + if con == nil { + return fmt.Errorf("remove operation does not apply: doc is missing path: \"%s\": %w", path, ErrMissing) + } + + err = con.remove(key) + if err != nil { + return fmt.Errorf("error in remove for path: '%s': %w", path, err) + } + + return nil +} + +func (p Patch) replace(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return fmt.Errorf("replace operation failed to decode path: %w", err) + } + + if path == "" { + val := op.value() + + if val.which == eRaw { + if !val.tryDoc() { + if !val.tryAry() { + return fmt.Errorf("replace operation value must be object or array: %w", err) + } + } + } + + switch val.which { + case eAry: + *doc = &val.ary + case eDoc: + *doc = &val.doc + case eRaw: + return fmt.Errorf("replace operation hit impossible case: %w", err) + } + + return nil + } + + con, key := findObject(doc, path) + + if con == nil { + return fmt.Errorf("replace operation does not apply: doc is missing path: %s: %w", path, ErrMissing) + } + + _, ok := con.get(key) + if ok != nil { + return fmt.Errorf("replace operation does not apply: doc is missing key: %s: %w", path, ErrMissing) + } + + err = con.set(key, op.value()) + if err != nil { + return fmt.Errorf("error in remove for path: '%s': %w", path, err) + } + + return nil +} + +func (p Patch) move(doc *container, op Operation) error { + from, err := op.From() + if err != nil { + return fmt.Errorf("move operation failed to decode from: %w", err) + } + + con, key := findObject(doc, from) + + if con == nil { + return fmt.Errorf("move operation does not apply: doc is missing from path: %s: %w", from, ErrMissing) + } + + val, err := con.get(key) + if err != nil { + return fmt.Errorf("error in move for path: '%s': %w", key, err) + } + + err = con.remove(key) + if err != nil { + return fmt.Errorf("error in move for path: '%s': %w", key, err) + } + + path, err := op.Path() + if err != nil { + return fmt.Errorf("move operation failed to decode path: %w", err) + } + + con, key = findObject(doc, path) + + if con == nil { + return fmt.Errorf("move operation does not apply: doc is missing destination path: %s: %w", path, ErrMissing) + } + + err = con.add(key, val) + if err != nil { + return fmt.Errorf("error in move for path: '%s': %w", path, err) + } + + return nil +} + +func (p Patch) test(doc *container, op Operation) error { + path, err := op.Path() + if err != nil { + return fmt.Errorf("test operation failed to decode path: %w", err) + } + + if path == "" { + var self lazyNode + + switch sv := (*doc).(type) { + case *partialDoc: + self.doc = *sv + self.which = eDoc + case *partialArray: + self.ary = *sv + self.which = eAry + } + + if self.equal(op.value()) { + return nil + } + + return fmt.Errorf("testing value %s failed: %w", path, ErrTestFailed) + } + + con, key := findObject(doc, path) + + if con == nil { + return fmt.Errorf("test operation does not apply: is missing path: %s: %w", path, ErrMissing) + } + + val, err := con.get(key) + if err != nil { + return fmt.Errorf("error in test for path: '%s': %w", path, err) + } + + if val == nil { + if op.value() == nil || op.value().raw == nil { + return nil + } + return fmt.Errorf("testing value %s failed: %w", path, ErrTestFailed) + } else if op.value() == nil { + return fmt.Errorf("testing value %s failed: %w", path, ErrTestFailed) + } + + if val.equal(op.value()) { + return nil + } + + return fmt.Errorf("testing value %s failed: %w", path, ErrTestFailed) +} + +func (p Patch) copy(doc *container, op Operation, accumulatedCopySize *int64) error { + from, err := op.From() + if err != nil { + return fmt.Errorf("copy operation failed to decode from: %w", err) + } + + con, key := findObject(doc, from) + + if con == nil { + return fmt.Errorf("copy operation does not apply: doc is missing from path: %s: %w", from, ErrMissing) + } + + val, err := con.get(key) + if err != nil { + return fmt.Errorf("error in copy for from: '%s': %w", from, err) + } + + path, err := op.Path() + if err != nil { + return fmt.Errorf("copy operation failed to decode path: %w", ErrMissing) + } + + con, key = findObject(doc, path) + + if con == nil { + return fmt.Errorf("copy operation does not apply: doc is missing destination path: %s: %w", path, ErrMissing) + } + + valCopy, sz, err := deepCopy(val) + if err != nil { + return fmt.Errorf("error while performing deep copy: %w", err) + } + + (*accumulatedCopySize) += int64(sz) + if AccumulatedCopySizeLimit > 0 && *accumulatedCopySize > AccumulatedCopySizeLimit { + return NewAccumulatedCopySizeError(AccumulatedCopySizeLimit, *accumulatedCopySize) + } + + err = con.add(key, valCopy) + if err != nil { + return fmt.Errorf("error while adding value during copy: %w", err) + } + + return nil +} + +// Equal indicates if 2 JSON documents have the same structural equality. +func Equal(a, b []byte) bool { + ra := make(json.RawMessage, len(a)) + copy(ra, a) + la := newLazyNode(&ra) + + rb := make(json.RawMessage, len(b)) + copy(rb, b) + lb := newLazyNode(&rb) + + return la.equal(lb) +} + +// DecodePatch decodes the passed JSON document as an RFC 6902 patch. +func DecodePatch(buf []byte) (Patch, error) { + var p Patch + + err := json.Unmarshal(buf, &p) + + if err != nil { + return nil, err + } + + return p, nil +} + +// Apply mutates a JSON document according to the patch, and returns the new +// document. +func (p Patch) Apply(doc []byte) ([]byte, error) { + return p.ApplyIndent(doc, "") +} + +// ApplyIndent mutates a JSON document according to the patch, and returns the new +// document indented. +func (p Patch) ApplyIndent(doc []byte, indent string) ([]byte, error) { + if len(doc) == 0 { + return doc, nil + } + + var pd container + if doc[0] == '[' { + pd = &partialArray{} + } else { + pd = &partialDoc{} + } + + err := json.Unmarshal(doc, pd) + + if err != nil { + return nil, err + } + + err = nil + + var accumulatedCopySize int64 + + for _, op := range p { + switch op.Kind() { + case "add": + err = p.add(&pd, op) + case "remove": + err = p.remove(&pd, op) + case "replace": + err = p.replace(&pd, op) + case "move": + err = p.move(&pd, op) + case "test": + err = p.test(&pd, op) + case "copy": + err = p.copy(&pd, op, &accumulatedCopySize) + default: + err = fmt.Errorf("Unexpected kind: %s", op.Kind()) + } + + if err != nil { + return nil, err + } + } + + if indent != "" { + return json.MarshalIndent(pd, "", indent) + } + + return json.Marshal(pd) +} + +// From http://tools.ietf.org/html/rfc6901#section-4 : +// +// Evaluation of each reference token begins by decoding any escaped +// character sequence. This is performed by first transforming any +// occurrence of the sequence '~1' to '/', and then transforming any +// occurrence of the sequence '~0' to '~'. + +var ( + rfc6901Decoder = strings.NewReplacer("~1", "/", "~0", "~") +) + +func decodePatchKey(k string) string { + return rfc6901Decoder.Replace(k) +} diff --git a/vendor/k8s.io/klog/v2/internal/verbosity/verbosity.go b/vendor/k8s.io/klog/v2/internal/verbosity/verbosity.go deleted file mode 100644 index 40ec27d87..000000000 --- a/vendor/k8s.io/klog/v2/internal/verbosity/verbosity.go +++ /dev/null @@ -1,303 +0,0 @@ -/* -Copyright 2013 Google Inc. All Rights Reserved. -Copyright 2022 The Kubernetes 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 verbosity - -import ( - "bytes" - "errors" - "flag" - "fmt" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" -) - -// New returns a struct that implements -v and -vmodule support. Changing and -// checking these settings is thread-safe, with all concurrency issues handled -// internally. -func New() *VState { - vs := new(VState) - - // The two fields must have a pointer to the overal struct for their - // implementation of Set. - vs.vmodule.vs = vs - vs.verbosity.vs = vs - - return vs -} - -// Value is an extension that makes it possible to use the values in pflag. -type Value interface { - flag.Value - Type() string -} - -func (vs *VState) V() Value { - return &vs.verbosity -} - -func (vs *VState) VModule() Value { - return &vs.vmodule -} - -// VState contains settings and state. Some of its fields can be accessed -// through atomic read/writes, in other cases a mutex must be held. -type VState struct { - mu sync.Mutex - - // These flags are modified only under lock, although verbosity may be fetched - // safely using atomic.LoadInt32. - vmodule moduleSpec // The state of the -vmodule flag. - verbosity levelSpec // V logging level, the value of the -v flag/ - - // pcs is used in V to avoid an allocation when computing the caller's PC. - pcs [1]uintptr - // vmap is a cache of the V Level for each V() call site, identified by PC. - // It is wiped whenever the vmodule flag changes state. - vmap map[uintptr]Level - // filterLength stores the length of the vmodule filter chain. If greater - // than zero, it means vmodule is enabled. It may be read safely - // using sync.LoadInt32, but is only modified under mu. - filterLength int32 -} - -// Level must be an int32 to support atomic read/writes. -type Level int32 - -type levelSpec struct { - vs *VState - l Level -} - -// get returns the value of the level. -func (l *levelSpec) get() Level { - return Level(atomic.LoadInt32((*int32)(&l.l))) -} - -// set sets the value of the level. -func (l *levelSpec) set(val Level) { - atomic.StoreInt32((*int32)(&l.l), int32(val)) -} - -// String is part of the flag.Value interface. -func (l *levelSpec) String() string { - return strconv.FormatInt(int64(l.l), 10) -} - -// Get is part of the flag.Getter interface. It returns the -// verbosity level as int32. -func (l *levelSpec) Get() interface{} { - return int32(l.l) -} - -// Type is part of pflag.Value. -func (l *levelSpec) Type() string { - return "Level" -} - -// Set is part of the flag.Value interface. -func (l *levelSpec) Set(value string) error { - v, err := strconv.ParseInt(value, 10, 32) - if err != nil { - return err - } - l.vs.mu.Lock() - defer l.vs.mu.Unlock() - l.vs.set(Level(v), l.vs.vmodule.filter, false) - return nil -} - -// moduleSpec represents the setting of the -vmodule flag. -type moduleSpec struct { - vs *VState - filter []modulePat -} - -// modulePat contains a filter for the -vmodule flag. -// It holds a verbosity level and a file pattern to match. -type modulePat struct { - pattern string - literal bool // The pattern is a literal string - level Level -} - -// match reports whether the file matches the pattern. It uses a string -// comparison if the pattern contains no metacharacters. -func (m *modulePat) match(file string) bool { - if m.literal { - return file == m.pattern - } - match, _ := filepath.Match(m.pattern, file) - return match -} - -func (m *moduleSpec) String() string { - // Lock because the type is not atomic. TODO: clean this up. - // Empty instances don't have and don't need a lock (can - // happen when flag uses introspection). - if m.vs != nil { - m.vs.mu.Lock() - defer m.vs.mu.Unlock() - } - var b bytes.Buffer - for i, f := range m.filter { - if i > 0 { - b.WriteRune(',') - } - fmt.Fprintf(&b, "%s=%d", f.pattern, f.level) - } - return b.String() -} - -// Get is part of the (Go 1.2) flag.Getter interface. It always returns nil for this flag type since the -// struct is not exported. -func (m *moduleSpec) Get() interface{} { - return nil -} - -// Type is part of pflag.Value -func (m *moduleSpec) Type() string { - return "pattern=N,..." -} - -var errVmoduleSyntax = errors.New("syntax error: expect comma-separated list of filename=N") - -// Set will sets module value -// Syntax: -vmodule=recordio=2,file=1,gfs*=3 -func (m *moduleSpec) Set(value string) error { - var filter []modulePat - for _, pat := range strings.Split(value, ",") { - if len(pat) == 0 { - // Empty strings such as from a trailing comma can be ignored. - continue - } - patLev := strings.Split(pat, "=") - if len(patLev) != 2 || len(patLev[0]) == 0 || len(patLev[1]) == 0 { - return errVmoduleSyntax - } - pattern := patLev[0] - v, err := strconv.ParseInt(patLev[1], 10, 32) - if err != nil { - return errors.New("syntax error: expect comma-separated list of filename=N") - } - if v < 0 { - return errors.New("negative value for vmodule level") - } - if v == 0 { - continue // Ignore. It's harmless but no point in paying the overhead. - } - // TODO: check syntax of filter? - filter = append(filter, modulePat{pattern, isLiteral(pattern), Level(v)}) - } - m.vs.mu.Lock() - defer m.vs.mu.Unlock() - m.vs.set(m.vs.verbosity.l, filter, true) - return nil -} - -// isLiteral reports whether the pattern is a literal string, that is, has no metacharacters -// that require filepath.Match to be called to match the pattern. -func isLiteral(pattern string) bool { - return !strings.ContainsAny(pattern, `\*?[]`) -} - -// set sets a consistent state for V logging. -// The mutex must be held. -func (vs *VState) set(l Level, filter []modulePat, setFilter bool) { - // Turn verbosity off so V will not fire while we are in transition. - vs.verbosity.set(0) - // Ditto for filter length. - atomic.StoreInt32(&vs.filterLength, 0) - - // Set the new filters and wipe the pc->Level map if the filter has changed. - if setFilter { - vs.vmodule.filter = filter - vs.vmap = make(map[uintptr]Level) - } - - // Things are consistent now, so enable filtering and verbosity. - // They are enabled in order opposite to that in V. - atomic.StoreInt32(&vs.filterLength, int32(len(filter))) - vs.verbosity.set(l) -} - -// Enabled checks whether logging is enabled at the given level. This must be -// called with depth=0 when the caller of enabled will do the logging and -// higher values when more stack levels need to be skipped. -// -// The mutex will be locked only if needed. -func (vs *VState) Enabled(level Level, depth int) bool { - // This function tries hard to be cheap unless there's work to do. - // The fast path is two atomic loads and compares. - - // Here is a cheap but safe test to see if V logging is enabled globally. - if vs.verbosity.get() >= level { - return true - } - - // It's off globally but vmodule may still be set. - // Here is another cheap but safe test to see if vmodule is enabled. - if atomic.LoadInt32(&vs.filterLength) > 0 { - // Now we need a proper lock to use the logging structure. The pcs field - // is shared so we must lock before accessing it. This is fairly expensive, - // but if V logging is enabled we're slow anyway. - vs.mu.Lock() - defer vs.mu.Unlock() - if runtime.Callers(depth+2, vs.pcs[:]) == 0 { - return false - } - // runtime.Callers returns "return PCs", but we want - // to look up the symbolic information for the call, - // so subtract 1 from the PC. runtime.CallersFrames - // would be cleaner, but allocates. - pc := vs.pcs[0] - 1 - v, ok := vs.vmap[pc] - if !ok { - v = vs.setV(pc) - } - return v >= level - } - return false -} - -// setV computes and remembers the V level for a given PC -// when vmodule is enabled. -// File pattern matching takes the basename of the file, stripped -// of its .go suffix, and uses filepath.Match, which is a little more -// general than the *? matching used in C++. -// Mutex is held. -func (vs *VState) setV(pc uintptr) Level { - fn := runtime.FuncForPC(pc) - file, _ := fn.FileLine(pc) - // The file is something like /a/b/c/d.go. We want just the d. - file = strings.TrimSuffix(file, ".go") - if slash := strings.LastIndex(file, "/"); slash >= 0 { - file = file[slash+1:] - } - for _, filter := range vs.vmodule.filter { - if filter.match(file) { - vs.vmap[pc] = filter.level - return filter.level - } - } - vs.vmap[pc] = 0 - return 0 -} diff --git a/vendor/k8s.io/klog/v2/klogr/README.md b/vendor/k8s.io/klog/v2/klogr/README.md new file mode 100644 index 000000000..c43fa81b1 --- /dev/null +++ b/vendor/k8s.io/klog/v2/klogr/README.md @@ -0,0 +1,19 @@ +# Minimal Go logging using klog + +This package implements the [logr interface](https://github.com/go-logr/logr) +in terms of Kubernetes' [klog](https://github.com/kubernetes/klog). This +provides a relatively minimalist API to logging in Go, backed by a well-proven +implementation. + +Because klogr was implemented before klog itself added supported for +structured logging, the default in klogr is to serialize key/value +pairs with JSON and log the result as text messages via klog. This +does not work well when klog itself forwards output to a structured +logger. + +Therefore the recommended approach is to let klogr pass all log +messages through to klog and deal with structured logging there. Just +beware that the output of klog without a structured logger is meant to +be human-readable, in contrast to the JSON-based traditional format. + +This is a BETA grade implementation. diff --git a/vendor/k8s.io/klog/v2/klogr/klogr.go b/vendor/k8s.io/klog/v2/klogr/klogr.go new file mode 100644 index 000000000..a154960cd --- /dev/null +++ b/vendor/k8s.io/klog/v2/klogr/klogr.go @@ -0,0 +1,208 @@ +// Package klogr implements github.com/go-logr/logr.Logger in terms of +// k8s.io/klog. +package klogr + +import ( + "bytes" + "encoding/json" + "fmt" + "sort" + "strings" + + "github.com/go-logr/logr" + + "k8s.io/klog/v2" + "k8s.io/klog/v2/internal/serialize" +) + +const ( + // nameKey is used to log the `WithName` values as an additional attribute. + nameKey = "logger" +) + +// Option is a functional option that reconfigures the logger created with New. +type Option func(*klogger) + +// Format defines how log output is produced. +type Format string + +const ( + // FormatSerialize tells klogr to turn key/value pairs into text itself + // before invoking klog. Key/value pairs are sorted by key. + FormatSerialize Format = "Serialize" + + // FormatKlog tells klogr to pass all text messages and key/value pairs + // directly to klog. Klog itself then serializes in a human-readable + // format and optionally passes on to a structure logging backend. + FormatKlog Format = "Klog" +) + +// WithFormat selects the output format. +func WithFormat(format Format) Option { + return func(l *klogger) { + l.format = format + } +} + +// New returns a logr.Logger which serializes output itself +// and writes it via klog. +// +// Deprecated: this uses a custom, out-dated output format. Use textlogger.NewLogger instead. +func New() logr.Logger { + return NewWithOptions(WithFormat(FormatSerialize)) +} + +// NewWithOptions returns a logr.Logger which serializes as determined +// by the WithFormat option and writes via klog. The default is +// FormatKlog. +// +// Deprecated: FormatSerialize is out-dated. For FormatKlog, use textlogger.NewLogger instead. +func NewWithOptions(options ...Option) logr.Logger { + l := klogger{ + level: 0, + values: nil, + format: FormatKlog, + } + for _, option := range options { + option(&l) + } + return logr.New(&l) +} + +type klogger struct { + level int + callDepth int + + // hasPrefix is true if the first entry in values is the special + // nameKey key/value. Such an entry gets added and later updated in + // WithName. + hasPrefix bool + + values []interface{} + format Format +} + +func (l *klogger) Init(info logr.RuntimeInfo) { + l.callDepth += info.CallDepth +} + +func flatten(kvList ...interface{}) string { + keys := make([]string, 0, len(kvList)) + vals := make(map[string]interface{}, len(kvList)) + for i := 0; i < len(kvList); i += 2 { + k, ok := kvList[i].(string) + if !ok { + panic(fmt.Sprintf("key is not a string: %s", pretty(kvList[i]))) + } + var v interface{} + if i+1 < len(kvList) { + v = kvList[i+1] + } + // Only print each key once... + if _, seen := vals[k]; !seen { + keys = append(keys, k) + } + // ... with the latest value. + vals[k] = v + } + sort.Strings(keys) + buf := bytes.Buffer{} + for i, k := range keys { + v := vals[k] + if i > 0 { + buf.WriteRune(' ') + } + buf.WriteString(pretty(k)) + buf.WriteString("=") + buf.WriteString(pretty(v)) + } + return buf.String() +} + +func pretty(value interface{}) string { + if err, ok := value.(error); ok { + if _, ok := value.(json.Marshaler); !ok { + value = err.Error() + } + } + buffer := &bytes.Buffer{} + encoder := json.NewEncoder(buffer) + encoder.SetEscapeHTML(false) + if err := encoder.Encode(value); err != nil { + return fmt.Sprintf("<>", err) + } + return strings.TrimSpace(buffer.String()) +} + +func (l *klogger) Info(level int, msg string, kvList ...interface{}) { + switch l.format { + case FormatSerialize: + msgStr := flatten("msg", msg) + merged := serialize.MergeKVs(l.values, kvList) + kvStr := flatten(merged...) + klog.VDepth(l.callDepth+1, klog.Level(level)).InfoDepth(l.callDepth+1, msgStr, " ", kvStr) + case FormatKlog: + merged := serialize.MergeKVs(l.values, kvList) + klog.VDepth(l.callDepth+1, klog.Level(level)).InfoSDepth(l.callDepth+1, msg, merged...) + } +} + +func (l *klogger) Enabled(level int) bool { + return klog.VDepth(l.callDepth+1, klog.Level(level)).Enabled() +} + +func (l *klogger) Error(err error, msg string, kvList ...interface{}) { + msgStr := flatten("msg", msg) + var loggableErr interface{} + if err != nil { + loggableErr = serialize.ErrorToString(err) + } + switch l.format { + case FormatSerialize: + errStr := flatten("error", loggableErr) + merged := serialize.MergeKVs(l.values, kvList) + kvStr := flatten(merged...) + klog.ErrorDepth(l.callDepth+1, msgStr, " ", errStr, " ", kvStr) + case FormatKlog: + merged := serialize.MergeKVs(l.values, kvList) + klog.ErrorSDepth(l.callDepth+1, err, msg, merged...) + } +} + +// WithName returns a new logr.Logger with the specified name appended. klogr +// uses '.' characters to separate name elements. Callers should not pass '.' +// in the provided name string, but this library does not actually enforce that. +func (l klogger) WithName(name string) logr.LogSink { + if l.hasPrefix { + // Copy slice and modify value. No length checks and type + // assertions are needed because hasPrefix is only true if the + // first two elements exist and are key/value strings. + v := make([]interface{}, 0, len(l.values)) + v = append(v, l.values...) + prefix, _ := v[1].(string) + prefix = prefix + "." + name + v[1] = prefix + l.values = v + } else { + // Preprend new key/value pair. + v := make([]interface{}, 0, 2+len(l.values)) + v = append(v, nameKey, name) + v = append(v, l.values...) + l.values = v + l.hasPrefix = true + } + return &l +} + +func (l klogger) WithValues(kvList ...interface{}) logr.LogSink { + l.values = serialize.WithValues(l.values, kvList) + return &l +} + +func (l klogger) WithCallDepth(depth int) logr.LogSink { + l.callDepth += depth + return &l +} + +var _ logr.LogSink = &klogger{} +var _ logr.CallDepthLogSink = &klogger{} diff --git a/vendor/k8s.io/klog/v2/textlogger/options.go b/vendor/k8s.io/klog/v2/textlogger/options.go deleted file mode 100644 index b1c4eefb3..000000000 --- a/vendor/k8s.io/klog/v2/textlogger/options.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright 2021 The Kubernetes 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 textlogger - -import ( - "flag" - "io" - "os" - "strconv" - "time" - - "k8s.io/klog/v2/internal/verbosity" -) - -// Config influences logging in a text logger. To make this configurable via -// command line flags, instantiate this once per program and use AddFlags to -// bind command line flags to the instance before passing it to NewTestContext. -// -// Must be constructed with NewConfig. -type Config struct { - vstate *verbosity.VState - co configOptions -} - -// Verbosity returns a value instance that can be used to query (via String) or -// modify (via Set) the verbosity threshold. This is thread-safe and can be -// done at runtime. -func (c *Config) Verbosity() flag.Value { - return c.vstate.V() -} - -// VModule returns a value instance that can be used to query (via String) or -// modify (via Set) the vmodule settings. This is thread-safe and can be done -// at runtime. -func (c *Config) VModule() flag.Value { - return c.vstate.VModule() -} - -// ConfigOption implements functional parameters for NewConfig. -type ConfigOption func(co *configOptions) - -type configOptions struct { - verbosityFlagName string - vmoduleFlagName string - verbosityDefault int - fixedTime *time.Time - unwind func(int) (string, int) - output io.Writer -} - -// VerbosityFlagName overrides the default -v for the verbosity level. -func VerbosityFlagName(name string) ConfigOption { - return func(co *configOptions) { - - co.verbosityFlagName = name - } -} - -// VModulFlagName overrides the default -vmodule for the per-module -// verbosity levels. -func VModuleFlagName(name string) ConfigOption { - return func(co *configOptions) { - co.vmoduleFlagName = name - } -} - -// Verbosity overrides the default verbosity level of 0. -// See https://github.com/kubernetes/community/blob/9406b4352fe2d5810cb21cc3cb059ce5886de157/contributors/devel/sig-instrumentation/logging.md#logging-conventions -// for log level conventions in Kubernetes. -func Verbosity(level int) ConfigOption { - return func(co *configOptions) { - co.verbosityDefault = level - } -} - -// Output overrides stderr as the output stream. -func Output(output io.Writer) ConfigOption { - return func(co *configOptions) { - co.output = output - } -} - -// FixedTime overrides the actual time with a fixed time. Useful only for testing. -// -// # Experimental -// -// Notice: This function is EXPERIMENTAL and may be changed or removed in a -// later release. -func FixedTime(ts time.Time) ConfigOption { - return func(co *configOptions) { - co.fixedTime = &ts - } -} - -// Backtrace overrides the default mechanism for determining the call site. -// The callback is invoked with the number of function calls between itself -// and the call site. It must return the file name and line number. An empty -// file name indicates that the information is unknown. -// -// # Experimental -// -// Notice: This function is EXPERIMENTAL and may be changed or removed in a -// later release. -func Backtrace(unwind func(skip int) (filename string, line int)) ConfigOption { - return func(co *configOptions) { - co.unwind = unwind - } -} - -// NewConfig returns a configuration with recommended defaults and optional -// modifications. Command line flags are not bound to any FlagSet yet. -func NewConfig(opts ...ConfigOption) *Config { - c := &Config{ - vstate: verbosity.New(), - co: configOptions{ - verbosityFlagName: "v", - vmoduleFlagName: "vmodule", - verbosityDefault: 0, - unwind: runtimeBacktrace, - output: os.Stderr, - }, - } - for _, opt := range opts { - opt(&c.co) - } - - // Cannot fail for this input. - _ = c.Verbosity().Set(strconv.FormatInt(int64(c.co.verbosityDefault), 10)) - return c -} - -// AddFlags registers the command line flags that control the configuration. -// -// The default flag names are the same as in klog, so unless those defaults -// are changed, either klog.InitFlags or Config.AddFlags can be used for the -// same flag set, but not both. -func (c *Config) AddFlags(fs *flag.FlagSet) { - fs.Var(c.Verbosity(), c.co.verbosityFlagName, "number for the log level verbosity of the testing logger") - fs.Var(c.VModule(), c.co.vmoduleFlagName, "comma-separated list of pattern=N log level settings for files matching the patterns") -} diff --git a/vendor/k8s.io/klog/v2/textlogger/textlogger.go b/vendor/k8s.io/klog/v2/textlogger/textlogger.go deleted file mode 100644 index 0b55a2994..000000000 --- a/vendor/k8s.io/klog/v2/textlogger/textlogger.go +++ /dev/null @@ -1,187 +0,0 @@ -/* -Copyright 2019 The Kubernetes Authors. -Copyright 2020 Intel Corporation. - -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 textlogger contains an implementation of the logr interface which is -// producing the exact same output as klog. It does not route output through -// klog (i.e. ignores [k8s.io/klog/v2.InitFlags]). Instead, all settings must be -// configured through its own [NewConfig] and [Config.AddFlags]. -package textlogger - -import ( - "runtime" - "strconv" - "strings" - "time" - - "github.com/go-logr/logr" - - "k8s.io/klog/v2/internal/buffer" - "k8s.io/klog/v2/internal/serialize" - "k8s.io/klog/v2/internal/severity" - "k8s.io/klog/v2/internal/verbosity" -) - -var ( - // TimeNow is used to retrieve the current time. May be changed for testing. - TimeNow = time.Now -) - -const ( - // nameKey is used to log the `WithName` values as an additional attribute. - nameKey = "logger" -) - -// NewLogger constructs a new logger. -// -// Verbosity can be modified at any time through the Config.V and -// Config.VModule API. -func NewLogger(c *Config) logr.Logger { - return logr.New(&tlogger{ - values: nil, - config: c, - }) -} - -type tlogger struct { - callDepth int - - // hasPrefix is true if the first entry in values is the special - // nameKey key/value. Such an entry gets added and later updated in - // WithName. - hasPrefix bool - - values []interface{} - groups string - config *Config -} - -func (l *tlogger) Init(info logr.RuntimeInfo) { - l.callDepth = info.CallDepth -} - -func (l *tlogger) WithCallDepth(depth int) logr.LogSink { - newLogger := *l - newLogger.callDepth += depth - return &newLogger -} - -func (l *tlogger) Enabled(level int) bool { - return l.config.vstate.Enabled(verbosity.Level(level), 1+l.callDepth) -} - -func (l *tlogger) Info(_ int, msg string, kvList ...interface{}) { - l.print(nil, severity.InfoLog, msg, kvList) -} - -func (l *tlogger) Error(err error, msg string, kvList ...interface{}) { - l.print(err, severity.ErrorLog, msg, kvList) -} - -func (l *tlogger) print(err error, s severity.Severity, msg string, kvList []interface{}) { - // Determine caller. - // +1 for this frame, +1 for Info/Error. - skip := l.callDepth + 2 - file, line := l.config.co.unwind(skip) - if file == "" { - file = "???" - line = 1 - } else if slash := strings.LastIndex(file, "/"); slash >= 0 { - file = file[slash+1:] - } - l.printWithInfos(file, line, time.Now(), err, s, msg, kvList) -} - -func runtimeBacktrace(skip int) (string, int) { - _, file, line, ok := runtime.Caller(skip + 1) - if !ok { - return "", 0 - } - return file, line -} - -func (l *tlogger) printWithInfos(file string, line int, now time.Time, err error, s severity.Severity, msg string, kvList []interface{}) { - // Only create a new buffer if we don't have one cached. - b := buffer.GetBuffer() - defer buffer.PutBuffer(b) - - // Format header. - if l.config.co.fixedTime != nil { - now = *l.config.co.fixedTime - } - b.FormatHeader(s, file, line, now) - - // The message is always quoted, even if it contains line breaks. - // If developers want multi-line output, they should use a small, fixed - // message and put the multi-line output into a value. - b.WriteString(strconv.Quote(msg)) - if err != nil { - serialize.KVFormat(&b.Buffer, "err", err) - } - serialize.MergeAndFormatKVs(&b.Buffer, l.values, kvList) - if b.Len() == 0 || b.Bytes()[b.Len()-1] != '\n' { - b.WriteByte('\n') - } - _, _ = l.config.co.output.Write(b.Bytes()) -} - -func (l *tlogger) WriteKlogBuffer(data []byte) { - _, _ = l.config.co.output.Write(data) -} - -// WithName returns a new logr.Logger with the specified name appended. klogr -// uses '/' characters to separate name elements. Callers should not pass '/' -// in the provided name string, but this library does not actually enforce that. -func (l *tlogger) WithName(name string) logr.LogSink { - clone := *l - if l.hasPrefix { - // Copy slice and modify value. No length checks and type - // assertions are needed because hasPrefix is only true if the - // first two elements exist and are key/value strings. - v := make([]interface{}, 0, len(l.values)) - v = append(v, l.values...) - prefix, _ := v[1].(string) - v[1] = prefix + "." + name - clone.values = v - } else { - // Preprend new key/value pair. - v := make([]interface{}, 0, 2+len(l.values)) - v = append(v, nameKey, name) - v = append(v, l.values...) - clone.values = v - clone.hasPrefix = true - } - return &clone -} - -func (l *tlogger) WithValues(kvList ...interface{}) logr.LogSink { - clone := *l - clone.values = serialize.WithValues(l.values, kvList) - return &clone -} - -// KlogBufferWriter is implemented by the textlogger LogSink. -type KlogBufferWriter interface { - // WriteKlogBuffer takes a pre-formatted buffer prepared by klog and - // writes it unchanged to the output stream. Can be used with - // klog.WriteKlogBuffer when setting a logger through - // klog.SetLoggerWithOptions. - WriteKlogBuffer([]byte) -} - -var _ logr.LogSink = &tlogger{} -var _ logr.CallDepthLogSink = &tlogger{} -var _ KlogBufferWriter = &tlogger{} diff --git a/vendor/k8s.io/klog/v2/textlogger/textlogger_slog.go b/vendor/k8s.io/klog/v2/textlogger/textlogger_slog.go deleted file mode 100644 index c888ef8a6..000000000 --- a/vendor/k8s.io/klog/v2/textlogger/textlogger_slog.go +++ /dev/null @@ -1,52 +0,0 @@ -//go:build go1.21 -// +build go1.21 - -/* -Copyright 2023 The Kubernetes 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 textlogger - -import ( - "context" - "log/slog" - - "github.com/go-logr/logr" - - "k8s.io/klog/v2/internal/serialize" - "k8s.io/klog/v2/internal/sloghandler" -) - -func (l *tlogger) Handle(ctx context.Context, record slog.Record) error { - return sloghandler.Handle(ctx, record, l.groups, l.printWithInfos) -} - -func (l *tlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink { - clone := *l - clone.values = serialize.WithValues(l.values, sloghandler.Attrs2KVList(l.groups, attrs)) - return &clone -} - -func (l *tlogger) WithGroup(name string) logr.SlogSink { - clone := *l - if clone.groups != "" { - clone.groups += "." + name - } else { - clone.groups = name - } - return &clone -} - -var _ logr.SlogSink = &tlogger{} diff --git a/vendor/modules.txt b/vendor/modules.txt index 2dd9d43fc..40ed8e528 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -157,17 +157,13 @@ github.com/argoproj/argo-cd/v3/util/regex github.com/argoproj/argo-cd/v3/util/security github.com/argoproj/argo-cd/v3/util/versions github.com/argoproj/argo-cd/v3/util/workloadidentity -# github.com/argoproj/gitops-engine v0.7.1-0.20250905153922-d96c3d51e4c4 -## explicit; go 1.23.5 +# github.com/argoproj/gitops-engine v0.7.3 +## explicit; go 1.17 github.com/argoproj/gitops-engine/internal/kubernetes_vendor/pkg/api/v1/endpoints github.com/argoproj/gitops-engine/internal/kubernetes_vendor/pkg/util/hash github.com/argoproj/gitops-engine/pkg/diff -github.com/argoproj/gitops-engine/pkg/diff/internal/fieldmanager github.com/argoproj/gitops-engine/pkg/health github.com/argoproj/gitops-engine/pkg/sync/common -github.com/argoproj/gitops-engine/pkg/sync/hook -github.com/argoproj/gitops-engine/pkg/sync/hook/helm -github.com/argoproj/gitops-engine/pkg/sync/resource github.com/argoproj/gitops-engine/pkg/utils/io github.com/argoproj/gitops-engine/pkg/utils/json github.com/argoproj/gitops-engine/pkg/utils/kube @@ -269,6 +265,9 @@ github.com/emirpasic/gods/lists/arraylist github.com/emirpasic/gods/trees github.com/emirpasic/gods/trees/binaryheap github.com/emirpasic/gods/utils +# github.com/evanphx/json-patch v5.9.11+incompatible +## explicit +github.com/evanphx/json-patch # github.com/evanphx/json-patch/v5 v5.9.11 ## explicit; go 1.18 github.com/evanphx/json-patch/v5 @@ -1520,8 +1519,7 @@ k8s.io/klog/v2/internal/dbg k8s.io/klog/v2/internal/serialize k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler -k8s.io/klog/v2/internal/verbosity -k8s.io/klog/v2/textlogger +k8s.io/klog/v2/klogr # k8s.io/kube-aggregator v0.33.4 => k8s.io/kube-aggregator v0.33.4 ## explicit; go 1.24.0 k8s.io/kube-aggregator/pkg/apis/apiregistration