├── ci ├── oss_compliance │ ├── osa_included.md │ └── oss_compliance.go ├── teardown-kind.sh ├── setup-kind.sh ├── check-code-and-docs-gen.sh ├── changelog.sh └── tools.go ├── codegen ├── templates │ ├── repo │ │ └── .gitignore.tmpl │ ├── chart │ │ ├── Chart.yamltmpl │ │ ├── values.schema.jsontmpl │ │ └── values.yamltmpl │ ├── code │ │ └── types │ │ │ ├── README.md │ │ │ ├── doc.gotmpl │ │ │ ├── type_helpers.gotmpl │ │ │ └── register.gotmpl │ ├── build │ │ ├── Dockerfile.tmpl │ │ ├── user_setup.tmpl │ │ └── entrypoint.tmpl │ └── hack │ │ ├── boilerplate.go.txt.tmpl │ │ └── create_cr_yaml.gotmpl ├── test │ ├── chart │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── all-volumes │ │ │ ├── templates │ │ │ │ └── rbac.yaml │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── conditional-crds │ │ │ ├── Chart.yaml │ │ │ ├── values.yaml │ │ │ └── templates │ │ │ │ └── things.test.io_crds.yaml │ │ ├── env-priority │ │ │ ├── templates │ │ │ │ └── rbac.yaml │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── extra-volumes │ │ │ ├── templates │ │ │ │ └── rbac.yaml │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── static-volumes │ │ │ ├── templates │ │ │ │ └── rbac.yaml │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── conditional-sidecar │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── conditional-volumes │ │ │ ├── templates │ │ │ │ └── rbac.yaml │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── image-pull-secrets │ │ │ ├── templates │ │ │ │ └── rbac.yaml │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ ├── Chart.yaml │ │ ├── namespaced-rbac │ │ │ ├── Chart.yaml │ │ │ └── values.yaml │ │ └── values.yaml │ ├── chart-envvars │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-no-desc │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-readiness │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-sidecar │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-svcport │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-sidecar-svcport │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── name_override_chart │ │ ├── templates │ │ │ └── rbac.yaml │ │ └── Chart.yaml │ ├── chart-deployment-strategy │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-pod-security-context │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ ├── chart-conditional-deployment-strategy │ │ ├── templates │ │ │ └── rbac.yaml │ │ ├── Chart.yaml │ │ └── values.yaml │ └── api │ │ └── things.test.io │ │ └── v1 │ │ ├── mocks │ │ ├── doc.go │ │ ├── types.go │ │ ├── register.go │ │ ├── client_providers.go │ │ └── zz_generated.deepcopy.go │ │ ├── doc.go │ │ ├── type_helpers.go │ │ ├── register.go │ │ └── proto_deepcopy.go ├── render │ ├── export_tests.go │ ├── NOTES.md │ ├── render_suite_test.go │ ├── kube_codegen_renderer.go │ ├── render.go │ ├── things.test.io_v1_crds.yaml │ ├── export_test.go │ ├── README.md │ ├── build_renderer.go │ └── mockgen.go ├── model │ ├── build.go │ └── package_names.go ├── doc │ └── doc_suite_test.go ├── codegen_suite_test.go ├── kuberesource │ └── kuberesource_suite_test.go └── util │ ├── make.go │ ├── stringutils │ └── pluralize.go │ ├── proto.go │ ├── packages.go │ └── kubectl.go ├── pkg ├── ezkube │ ├── doc.go │ ├── ezkube_suite_test.go │ ├── object.go │ ├── creationtimestamp.go │ ├── funcs.go │ └── gvk.go ├── multicluster │ ├── constants.go │ ├── register │ │ ├── register_suite_test.go │ │ └── internal │ │ │ └── internal_suite_test.go │ ├── kubeconfig │ │ ├── kubeconfig_suite_test.go │ │ ├── interfaces.go │ │ ├── remote.go │ │ └── errors.go │ ├── internal │ │ └── k8s │ │ │ ├── certificates.k8s.io │ │ │ └── v1beta1 │ │ │ │ └── type_helpers.go │ │ │ ├── apiextensions.k8s.io │ │ │ ├── v1 │ │ │ │ └── type_helpers.go │ │ │ └── v1beta1 │ │ │ │ └── type_helpers.go │ │ │ ├── admissionregistration.k8s.io │ │ │ └── v1 │ │ │ │ └── type_helpers.go │ │ │ ├── core │ │ │ └── v1 │ │ │ │ └── type_helpers.go │ │ │ └── rbac.authorization.k8s.io │ │ │ └── v1 │ │ │ └── type_helpers.go │ ├── client.go │ ├── reconcile.go │ └── handler.go ├── api │ └── multicluster.solo.io │ │ └── v1alpha1 │ │ ├── type_helpers.go │ │ ├── doc.go │ │ ├── proto_deepcopy.go │ │ └── register.go ├── crdutils │ └── crdutils_suite_test.go ├── resource │ ├── resource_suite_test.go │ ├── resource.go │ └── client.go ├── verifier │ └── verifier_suite_test.go ├── controllerutils │ └── controllerutils_suite_test.go ├── kube_jsonpb │ ├── README.md │ └── internal │ │ └── testprotos │ │ ├── regenerate.bash │ │ └── jsonpb_proto │ │ └── test3.proto ├── stats │ ├── metrics.go │ ├── pprof.go │ └── server.go ├── utils │ ├── strings.go │ ├── logger.go │ └── in_cluster_namespace.go ├── handler │ └── register_queue_handler.go ├── predicate │ ├── predicate_label_matching.go │ ├── predicate_logging.go │ └── predicate_simple.go └── equalityutils │ └── deep_equal.go ├── changelog ├── v0.0.1 │ └── 1.yaml ├── v0.17.5 │ └── relay.yaml ├── v0.0.5 │ └── incorrect-dir.yaml ├── v0.23.1 │ └── generic-client-fixes.yaml ├── v0.0.4 │ └── k8s-csr-api.yaml ├── v0.19.2 │ └── logging-improvements.yaml ├── v0.22.10 │ └── fix-empty-values-bug.yaml ├── v0.26.1 │ ├── manage-protoc-from-bin.yaml │ ├── support-proto-optionals.yaml │ └── fix-workqueue-panic.yaml ├── v0.5.0 │ ├── comment.yaml │ ├── one-proto-compile.yaml │ ├── set-kube-constructor.yaml │ ├── inputsnapshot.yaml │ ├── cluster-domain.yaml │ ├── expose-local-domain-override.yaml │ ├── outputsnapshot_reconciler.yaml │ └── upgrades.yaml ├── v0.22.14 │ ├── crd-category.yaml │ └── wrap-error.yaml ├── v0.22.2 │ └── combined-snapshot.yaml ├── v0.17.6 │ └── cluster-snapshot-clone.yaml ├── v0.19.7 │ └── limit-protoc.yaml ├── v0.17.23 │ └── move-common-gloo-mesh-protos.yaml ├── v0.19.0 │ ├── custom-protoc-flags.yaml │ ├── logging-improvements.yaml │ └── floating-user-id.yaml ├── v0.22.11 │ └── fix-helm-empty-docs.yaml ├── v0.22.9 │ └── fix-empty-values-bug.yaml ├── v0.17.11 │ └── fix-data-races.yaml ├── v0.34.0 │ ├── fix-formatting.yaml │ ├── svc-port-name.yaml │ ├── remove-hardcoded-annotations.yaml │ └── readiness-probe.yaml ├── v0.0.2 │ ├── kubeconfig-secret.yaml │ ├── cluster-scoped-resources.yaml │ └── dynamic-k8s-clients.yaml ├── v0.18.4 │ └── probes.yaml ├── v0.23.5 │ ├── fix-k8s-in-codegen.yaml │ ├── shallow-copy.yaml │ └── mem-efficient-set.yaml ├── v0.29.0 │ ├── ginkgo-v2.yaml │ └── retry-options.yaml ├── v0.17.15 │ └── less-races.yaml ├── v0.19.1 │ ├── crdutils-notfound.yaml │ └── crdutils.yaml ├── v0.22.27 │ └── fix-set-interface.yaml ├── v0.38.4 │ └── sets-shallowcopy.yaml ├── v0.39.1 │ ├── fix-template.yaml │ └── efficient-union.yaml ├── v0.4.2 │ └── eks-client-from-session.yaml ├── v0.10.0 │ └── bump-k8s-0.18.x.yaml ├── v0.17.10 │ └── fix-data-races.yaml ├── v0.17.3 │ ├── check-gpl-licenses.yaml │ └── anyvendor-update.yaml ├── v0.17.7 │ └── fix-waitforcachesync.yaml ├── v0.23.8 │ ├── no-new-T.yaml │ └── fix-multicluster-watch-error.yaml ├── v0.3.2 │ └── finalizer.yaml ├── v0.34.3 │ ├── svc-port-name-test.yaml │ └── ns-rbac-by-helm-flag.yaml ├── v0.1.3 │ └── fix-test-util.yaml ├── v0.19.8 │ └── add-to-scheme-change.yaml ├── v0.22.7 │ ├── fix-verifier-cache.yaml │ └── add-admin-service-template.yaml ├── v0.15.2 │ ├── any-crd.yaml │ ├── nil-kubeconfigs.yaml │ └── custom-templates.yaml ├── v0.17.14 │ └── sets-unsorted-list.yaml ├── v0.22.8 │ └── fix-loop-shadow.yaml ├── v0.38.2 │ └── less-snapshot-allocs.yaml ├── v0.17.21 │ ├── fix-allow-disable-openapi-validation.yaml │ └── allow-disable-openapi-validation.yaml ├── v0.18.5 │ └── bump-anyvendor.yaml ├── v0.2.1 │ └── remove-helm-2-hook.yaml ├── v0.20.0 │ └── crd-v1.yaml ├── v0.23.4 │ └── obscure-default-helm-value.yaml ├── v0.23.6 │ └── json-gen-prefix.yaml ├── v0.29.2 │ └── helm-gen-bugs.yaml ├── v0.30.1 │ ├── input-reconciler-options.yaml │ ├── extra-env.yaml │ ├── expose-overrides-fields.yaml │ └── custom-operator-namespace.yaml ├── v0.0.3 │ └── generated-headers.yaml ├── v0.22.21 │ └── add-alias-helm.yaml ├── v0.13.4 │ └── generate_gvk.yaml ├── v0.17.1 │ └── update-k8s-19.yaml ├── v0.18.3 │ └── clone.yaml ├── v0.29.4 │ ├── fix-sidecar-key.yaml │ └── update-cue.yaml ├── v0.40.1 │ └── sets-union-addRlock.yaml ├── v0.17.4 │ └── relay.yaml ├── v0.21.5 │ └── fix-unstructured-map.yaml ├── v0.22.19 │ └── update-go-to-1.18.yaml ├── v0.1.0 │ ├── mc-watch.yaml │ ├── cluster-config.yaml │ └── deepcopy.yaml ├── v0.1.2 │ └── helm-env.yaml ├── v0.17.22 │ └── fix-collector.yaml ├── v0.28.2 │ ├── 428-helm-codegen-fixes.yaml │ └── docs-helm-descs.yaml ├── v0.3.1 │ └── cluster-registration.yaml ├── v0.36.3 │ └── add-target-ref.yaml ├── v0.8.1 │ └── cluster-deregistration.yaml ├── v0.13.0 │ └── fix-kubeloader.yaml ├── v0.17.8 │ └── helm-dependency-condition.yaml ├── v0.2.0 │ ├── multi-cluster-manager.yaml │ └── non-blocking-reconciler.yaml ├── v0.21.4 │ └── skip-crd-in-helm-test.yaml ├── v0.22.1 │ └── cue-package-rename.yaml ├── v0.22.3 │ └── fix-snapshot-groups.yaml ├── v0.27.2 │ ├── escape-go-template-operators.yaml │ ├── schema-json.yaml │ ├── yaml-comments.yaml │ ├── remove-product-specific-helm-docs-tag.yaml.yaml │ └── add-namespace-to-cluster-roles.yaml ├── v0.28.1 │ ├── 424-yaml-comments-bugs.yaml │ └── add-namespace-to-cluster-roles.yaml ├── v0.29.5 │ ├── 440-chart-yaml-indent-2-space.yaml │ └── fix-input-templates.yaml ├── v0.33.0 │ ├── copy-metadata-on-status-upsert.yaml │ ├── conditional_crd_rendering.yaml │ └── fix-portal-platform-chart-installation.yaml ├── v0.36.5 │ └── add-target-ref.yaml ├── v0.40.6 │ ├── deployment-overrides-docs-change.yaml │ └── default-release-namespace-for-namespaced-rbac.yaml ├── v0.6.0 │ ├── reqeue-deletes.yaml │ └── fix-upsert.yaml ├── v0.11.1 │ ├── json-deepcopy.yaml │ └── kubernetescluster-provider-info.yaml ├── v0.12.2 │ └── reconciler-manual-trigger.yaml ├── v0.12.3 │ └── cluster-name-restriction.yaml ├── v0.14.0 │ └── ripout-gogo.yaml ├── v0.18.0 │ └── sidecars.yaml ├── v0.18.2 │ └── probes.yaml ├── v0.19.5 │ └── redact-secret-output.yaml ├── v0.22.4 │ └── fix-helm-docs-generation.yaml ├── v0.8.0 │ ├── fix-service.yaml │ ├── fix-go-tool-versioning.yaml │ └── kubecluster-cr.yaml ├── v0.17.13 │ └── helm-values-doc-operator-values-ordering.yaml ├── v0.22.26 │ ├── generic-client.yaml │ └── remove-admin-service.yaml ├── v0.34.10 │ └── fix-skip-template.yaml ├── v0.1.1 │ └── imports-for-group-status.yaml ├── v0.12.4 │ └── validation-schemas.yaml ├── v0.13.2 │ └── snapshot-merge-clone.yaml ├── v0.17.17 │ └── remove-controller-runtime-config-dep.yaml ├── v0.21.6 │ └── cue-module-rename.yaml ├── v0.23.3 │ └── allow-unknown-fields.yaml ├── v0.27.1 │ └── helm-gen-enhancements.yaml ├── v0.29.1 │ └── operator-name-override.yaml ├── v0.31.2 │ ├── slices.yaml │ └── sort-helm-values.yaml ├── v0.34.2 │ └── svc-port-name.yaml ├── v0.38.3 │ └── add-godeltapprof.yaml ├── v0.7.2 │ └── typed-object-refs.yaml ├── v0.11.0 │ ├── eks-client-list-clusters.yaml │ └── multicluster-registration-in-memory.yaml ├── v0.13.1 │ ├── verifier-debug.yaml │ ├── short-names.yaml │ ├── validation-schema-preserve-unknown-fields-false.yaml │ └── snapshot-merge-clone.yaml ├── v0.31.0 │ ├── fix-helm-docs.yaml │ └── optional-operator-namespace.yaml ├── v0.37.1 │ └── update-protoc-gen-openapi.yaml ├── v0.7.1 │ └── helm-chart-dependencies.yaml ├── v0.13.5 │ └── bump-go-utils.yaml ├── v0.18.1 │ ├── remove-extraneous-options.yaml │ ├── fix-docsgen-extra-helm-overrides.yaml │ └── operator-expose-securitycontext.yaml ├── v0.19.10 │ └── add-chart-only-gen-flag.yaml ├── v0.4.0 │ ├── extract-kube-clients.yaml │ └── mockgen-directive.yaml ├── v0.40.5 │ ├── image-pull-secrets.yaml │ ├── allow_ignored_kube_markers.yaml │ └── globalFloatingUserId_in_delpoyment_templates.yaml ├── v0.16.1 │ ├── fix-equality.yaml │ └── protoc-go-opt.yaml ├── v0.17.2 │ ├── kubeconfig-loader-check-recommended.yaml │ └── fix-equality-segfault.yaml ├── v0.19.3 │ └── add-enable-op-flag.yaml ├── v0.19.9 │ ├── clone-functions.yaml │ └── add-to-scheme-change.yaml ├── v0.21.2 │ └── always-include-schema-field.yaml ├── v0.34.1 │ └── container-ports.yaml ├── v0.43.1 │ └── input-reconciler-unique-names.yaml ├── v0.21.1 │ └── add-merge-function.yaml ├── v0.40.2 │ ├── env-template-sources.yaml │ └── disable-kube-markers.yaml ├── v0.17.12 │ └── helm-values-doc-operator-values.yaml ├── v0.19.6 │ └── redact-secret-annotations.yaml ├── v0.21.3 │ └── skip-crd-in-helm-test.yaml ├── v0.24.1 │ └── add-service-account-extra-annotations.yaml ├── v0.36.4 │ └── remove-extra-field.yaml ├── v0.4.1 │ └── eks-client-from-session.yaml ├── v0.16.2 │ └── fix-proto-conflicts.yaml ├── v0.17.9 │ └── custom-service-type.yaml ├── v0.33.1 │ ├── namespace-rbac-bug-fix.yaml │ ├── namespace-rbac.yaml │ └── conditional-sidecar.yaml ├── v0.12.1 │ └── kubernetes-cluster-status-settings.yaml ├── v0.15.1 │ └── ripout-gogo.yaml ├── v0.17.16 │ ├── proto-compiler-optimization.yaml │ ├── better-errgroup-yaml-fix.yaml │ └── annotations-labels.yaml ├── v0.17.18 │ └── in-memory-input-snap-list-opts.yaml ├── v0.22.13 │ └── wrap-error.yaml ├── v0.22.5 │ └── lowercase-service-port-name.yaml ├── v0.2.3 │ └── kubernetes-cluster-crd.yaml ├── v0.22.25 │ └── verifier-factory.yaml ├── v0.22.28 │ └── fix-set-interface.yaml ├── v0.3.3 │ └── fix-chartgen.yaml ├── v0.30.2 │ └── fix-intstr-handling.yaml ├── v0.23.7 │ └── mem-efficient-set-keys.yaml ├── v0.29.3 │ └── 8450-operator-enabled-dependson.yaml ├── v0.29.6 │ ├── remove-actions-cache.yaml │ └── github-actions-deprecations.yaml ├── v0.36.2 │ └── codegen-only-option.yaml ├── v0.13.6 │ └── validation-schema-proto-any.yaml ├── v0.14.1 │ └── ripout-gogo.yaml ├── v0.19.4 │ └── verify-resource-exists-snapshot.yaml ├── v0.2.2 │ └── upsert-env.yaml ├── v0.34.9 │ ├── conditional-vol.yaml │ └── conditional-env.yaml ├── v0.40.7 │ └── issue-582.yaml ├── v0.6.1 │ └── fix-simple-cluster-registration.yaml ├── v0.17.19 │ ├── labels-and-annotations-as-helm-values.yaml │ └── fix-metrics.yaml ├── v0.28.3 │ └── omitChildren-helm-docs-gen-bug.yaml ├── v0.34.7 │ └── conditional-crds.yaml ├── v0.34.8 │ └── feature-crd.yaml ├── v0.38.5 │ └── conditional-strategy.yaml ├── v0.21.0 │ └── dev-logging.yaml ├── v0.22.17 │ └── copy-uid-on-update.yaml ├── v0.37.0 │ └── protoc-gen.yaml ├── v0.22.16 │ └── print-helm-map-custom-values.yaml ├── v0.17.0 │ └── update-k8s-19.yaml ├── v0.17.20 │ ├── support-helm-overrides.yaml │ └── allow-disable-openapi-validation.yaml ├── v0.38.6 │ └── fix-conditional-strategy.yaml ├── v0.22.18 │ └── allow-users-to-set-container-security-context-4000.yaml ├── v0.36.1 │ └── readinessprobe-scheme-field.yaml ├── v0.22.24 │ └── verifier-factory.yaml ├── v0.22.6 │ └── upsert-immutable.yaml ├── v0.40.4 │ └── env-priority.yaml ├── v0.15.0 │ └── ripout-gogo.yaml ├── v0.24.0 │ └── typed-object.yaml ├── v0.22.12 │ └── skip-descriptions.yaml ├── v0.38.1 │ └── codegen-pod-security-context.yaml ├── v0.16.0 │ ├── generate-both-snapshots.yaml │ └── snapshot-deltas.yaml ├── v0.34.4 │ └── ns-rbac-resource-naming-fix.yaml ├── v0.34.6 │ └── gme-12164_fix-platform-helm-install.yaml ├── v0.22.20 │ └── snapshot_ui_and_endpoint_improvements.yaml ├── v0.23.9 │ └── disable-openapi-type-validaiton.yaml ├── v0.27.0 │ └── support-k8s-1.25.yaml ├── v0.31.1 │ ├── custom-operator-namespace-rbac.yaml │ └── generated-code-filter-comment.yaml ├── v0.13.3 │ └── fix-snapshot-merge-clone.yaml ├── v0.23.0 │ └── remove-admin-service.yaml ├── v0.25.0 │ └── secrets-watch-namespaces.yaml ├── v0.22.23 │ └── cluster-register-retry.yaml ├── v0.22.30 │ └── edge-generics.yaml ├── v0.3.0 │ └── contrib-set.yaml ├── v0.34.5 │ └── bump-proto-imports-timeout.yaml ├── v0.40.3 │ └── replace-package-name-for-hashing.yaml ├── v0.35.0 │ └── fix-AppendErrHandler-not-appending-errors-to-original-object.yaml ├── v0.22.15 │ └── fix-external-spec-types.yaml ├── v0.26.0 │ └── clustername-via-annotations.yaml ├── v0.12.0 │ └── check-crd-access.yaml ├── v0.22.29 │ └── reinstate-admin-service.yaml ├── v0.23.2 │ └── product-specific-helm-docs-tag.yaml ├── v0.22.0 │ └── cue-package-rename.yaml ├── v0.43.2 │ └── clustername-via-generated-name.yaml ├── v0.7.0 │ ├── local-resource-id.yaml │ ├── proto-package-override.yaml │ └── apply-multicluster.yaml ├── v0.38.0 │ └── sets-v2-iter.yaml ├── v0.43.3 │ └── helm-minify-json-schems.yaml ├── v0.44.1 │ └── cve-go-1-24-6.yaml ├── v0.43.0 │ └── go-124.yaml ├── v0.32.0 │ └── k8s-1.27-upgrade.yaml ├── v0.39.0 │ └── bump-k8s-v0.29.yaml ├── v0.40.0 │ └── bump-k8s-v0.30.yaml ├── v0.45.0 │ └── bump-k8s.yaml ├── v0.44.0 │ └── k8s-133.yaml └── v0.30.0 │ └── update-controller-runtime.yaml ├── .gitignore ├── contrib ├── tests │ └── tests_suite_test.go ├── codegen │ └── funcs │ │ └── funcs_suite_test.go ├── pkg │ ├── output │ │ └── errhandlers │ │ │ └── err_handlers_suite_test.go │ └── snapshot │ │ └── redact.go └── README.md ├── .github └── pull_request_template.md ├── README.md ├── api ├── generate.go └── multicluster │ └── v1alpha1 │ └── group.go └── test └── matchers └── proto.go /ci/oss_compliance/osa_included.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /codegen/templates/repo/.gitignore.tmpl: -------------------------------------------------------------------------------- 1 | build/_output/ 2 | -------------------------------------------------------------------------------- /codegen/templates/chart/Chart.yamltmpl: -------------------------------------------------------------------------------- 1 | [[ toYaml .Data ]] 2 | -------------------------------------------------------------------------------- /codegen/test/chart/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-envvars/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-no-desc/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-readiness/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-sidecar/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-svcport/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/all-volumes/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /pkg/ezkube/doc.go: -------------------------------------------------------------------------------- 1 | // Types and Functions designed to make kube easy. 2 | 3 | package ezkube 4 | -------------------------------------------------------------------------------- /codegen/test/chart-sidecar-svcport/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-crds/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | {} 4 | -------------------------------------------------------------------------------- /codegen/test/chart/env-priority/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/extra-volumes/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/static-volumes/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/name_override_chart/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-deployment-strategy/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart-pod-security-context/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-sidecar/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | {} 4 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-volumes/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/image-pull-secrets/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /changelog/v0.0.1/1.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Initialize new repository 4 | -------------------------------------------------------------------------------- /codegen/templates/chart/values.schema.jsontmpl: -------------------------------------------------------------------------------- 1 | [[- $values := .BuildChartValues -]] 2 | [[- toJsonSchema $values -]] -------------------------------------------------------------------------------- /codegen/test/chart-conditional-deployment-strategy/templates/rbac.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-crds/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | installValue: true 4 | 5 | -------------------------------------------------------------------------------- /changelog/v0.17.5/relay.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Bootstrap - Fix blocking cache wait. -------------------------------------------------------------------------------- /codegen/templates/code/types/README.md: -------------------------------------------------------------------------------- 1 | # Types 2 | 3 | This directory contains the templates used to generate Kubernetes types. -------------------------------------------------------------------------------- /changelog/v0.0.5/incorrect-dir.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Generated CSR api in the wrong dir. 4 | -------------------------------------------------------------------------------- /changelog/v0.23.1/generic-client-fixes.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix the generic client. 4 | -------------------------------------------------------------------------------- /changelog/v0.0.4/k8s-csr-api.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add csr api to generated kube clients.ga 4 | -------------------------------------------------------------------------------- /changelog/v0.19.2/logging-improvements.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Small logging improvements. 4 | -------------------------------------------------------------------------------- /changelog/v0.22.10/fix-empty-values-bug.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Allow custom values per operator -------------------------------------------------------------------------------- /changelog/v0.26.1/manage-protoc-from-bin.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: manage protoc from .bin folder. -------------------------------------------------------------------------------- /changelog/v0.5.0/comment.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix comments in generated .proto files 4 | -------------------------------------------------------------------------------- /changelog/v0.22.14/crd-category.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add CRD category to CRD generation options. -------------------------------------------------------------------------------- /changelog/v0.22.2/combined-snapshot.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add subsnapshots to snapshot history. -------------------------------------------------------------------------------- /changelog/v0.17.6/cluster-snapshot-clone.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add a ClusterSnapshot Clone function. -------------------------------------------------------------------------------- /changelog/v0.19.7/limit-protoc.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Adds env var to limit concurrent protoc processes. 4 | -------------------------------------------------------------------------------- /changelog/v0.17.23/move-common-gloo-mesh-protos.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Move gloo-mesh common protos into skv2. -------------------------------------------------------------------------------- /changelog/v0.19.0/custom-protoc-flags.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Support providing custom flags to `protoc`. 4 | -------------------------------------------------------------------------------- /changelog/v0.22.11/fix-helm-empty-docs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Document the custom helm values per operator -------------------------------------------------------------------------------- /changelog/v0.22.9/fix-empty-values-bug.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix bug where nil values would cause segfault. -------------------------------------------------------------------------------- /changelog/v0.17.11/fix-data-races.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix data race by cloning items when cloning a snapshot. -------------------------------------------------------------------------------- /changelog/v0.34.0/fix-formatting.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Fix formatting of operator template files. 5 | -------------------------------------------------------------------------------- /codegen/render/export_tests.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | func EscapeGoTemplateOperators(d map[string]interface{}) { 4 | escapeGoTemplateOperators(d) 5 | } 6 | -------------------------------------------------------------------------------- /changelog/v0.0.2/kubeconfig-secret.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Introduce kube config secrets to kickoff multicluster work. -------------------------------------------------------------------------------- /changelog/v0.18.4/probes.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix regex string used to match import statements in proto compiler. 4 | -------------------------------------------------------------------------------- /changelog/v0.23.5/fix-k8s-in-codegen.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Don't pass k8s field through lowerCamelCase. -------------------------------------------------------------------------------- /changelog/v0.29.0/ginkgo-v2.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: DEPENDENCY_BUMP 3 | dependencyOwner: onsi 4 | dependencyRepo: ginkgo 5 | dependencyTag: v2.8.1 -------------------------------------------------------------------------------- /changelog/v0.17.15/less-races.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Utils/Changes that allow resolving races in downstream projects. 4 | -------------------------------------------------------------------------------- /changelog/v0.19.1/crdutils-notfound.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix a bug in the CRD Not Found logic of the previous PR. 4 | 5 | -------------------------------------------------------------------------------- /changelog/v0.22.27/fix-set-interface.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix generic set Find() function to use ResourceId, rather than T. -------------------------------------------------------------------------------- /changelog/v0.38.4/sets-shallowcopy.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: 4 | description: > 5 | "" 6 | skipCI: "false" 7 | -------------------------------------------------------------------------------- /changelog/v0.39.1/fix-template.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: "Fix snapshot template" 4 | issueLink: https://github.com/solo-io/skv2/issues/563 -------------------------------------------------------------------------------- /changelog/v0.4.2/eks-client-from-session.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Restore ClientFromClientsetProvider in client_providers. 4 | -------------------------------------------------------------------------------- /changelog/v0.10.0/bump-k8s-0.18.x.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Bump k8s 0.18.x 4 | issueLink: https://github.com/solo-io/skv2/issues/118 -------------------------------------------------------------------------------- /changelog/v0.17.10/fix-data-races.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix data race caused by proto4 Clone during k8s object deepcopy. 4 | -------------------------------------------------------------------------------- /changelog/v0.17.3/check-gpl-licenses.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add GPL License check that will fail CI if any GPL licenses exist. -------------------------------------------------------------------------------- /changelog/v0.17.7/fix-waitforcachesync.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Bootstrap - ensure caches are started before calling start funcs. -------------------------------------------------------------------------------- /changelog/v0.23.8/no-new-T.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Don't use new(T) in generic reconciler. It instantiates a `nil` object. 4 | -------------------------------------------------------------------------------- /changelog/v0.3.2/finalizer.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix fainlizing reconciler such that it won't reconcile finalized resources. 4 | -------------------------------------------------------------------------------- /changelog/v0.34.3/svc-port-name-test.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Add test for conditional sidecars with service ports 5 | -------------------------------------------------------------------------------- /ci/teardown-kind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | #Delete all kind clusters 6 | kind get clusters | while read -r r; do kind delete cluster --name "$r"; done 7 | exit 0 -------------------------------------------------------------------------------- /changelog/v0.1.3/fix-test-util.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix multicluster test util so we get a config with the given current context. 4 | -------------------------------------------------------------------------------- /changelog/v0.19.1/crdutils.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add CRD Utilities to allow downstream projects verify if CRDs need upgrades. 4 | 5 | -------------------------------------------------------------------------------- /changelog/v0.19.8/add-to-scheme-change.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Update clients go template so that we use AddToScheme from the SchemeBuilder 4 | -------------------------------------------------------------------------------- /changelog/v0.22.7/fix-verifier-cache.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix verifier cache to the yaml 4 | issueLink: https://github.com/solo-io/skv2/issues/327 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build artifacts 2 | _output/ 3 | vendor*/ 4 | other.things.test.io* 5 | 6 | .idea/ 7 | .vscode/ 8 | # ignore packr files 9 | *-packr.g 10 | gomock_reflect_*/ 11 | -------------------------------------------------------------------------------- /changelog/v0.0.2/cluster-scoped-resources.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Support cluster scoped CRDs. 4 | issueLink: https://github.com/solo-io/skv2/issues/3 -------------------------------------------------------------------------------- /changelog/v0.15.2/any-crd.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix proto.Any in jsonschemas. 4 | issueLink: https://github.com/solo-io/skv2/issues/188 5 | -------------------------------------------------------------------------------- /changelog/v0.17.14/sets-unsorted-list.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/229 4 | description: Add UnsortedList to sets. -------------------------------------------------------------------------------- /changelog/v0.22.8/fix-loop-shadow.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix List filter variable code shadow 4 | issueLink: https://github.com/solo-io/skv2/issues/328 -------------------------------------------------------------------------------- /changelog/v0.26.1/support-proto-optionals.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add support for proto3 optional field types by upgrading protoc-gen-ext. 4 | -------------------------------------------------------------------------------- /changelog/v0.38.2/less-snapshot-allocs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Use make + len for snapshot copies to avoid allocations from growing the maps. 4 | -------------------------------------------------------------------------------- /changelog/v0.17.21/fix-allow-disable-openapi-validation.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: "Fix issue with how path elements were handled for array types." 4 | -------------------------------------------------------------------------------- /changelog/v0.18.5/bump-anyvendor.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Bump github.com/solo-io/anyvendor to release, fixing an "unknown revision" go mod error. 4 | -------------------------------------------------------------------------------- /changelog/v0.2.1/remove-helm-2-hook.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Remove Helm 2 crd-install hook 4 | issueLink: https://github.com/solo-io/skv2/issues/38 5 | -------------------------------------------------------------------------------- /changelog/v0.20.0/crd-v1.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Upgrade CRD generation to use V1. 4 | issueLink: https://github.com/solo-io/skv2/issues/300 5 | -------------------------------------------------------------------------------- /changelog/v0.23.4/obscure-default-helm-value.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Allow helm docs to hide default values if the tag `hideValue` is set. -------------------------------------------------------------------------------- /changelog/v0.23.6/json-gen-prefix.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Check for go package prefix (instead of exact match) in json marshal/unmarshal template. 4 | -------------------------------------------------------------------------------- /changelog/v0.29.2/helm-gen-bugs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Fix some helm generation bugs. 4 | issueLink: https://github.com/solo-io/skv2/issues/434 -------------------------------------------------------------------------------- /changelog/v0.30.1/input-reconciler-options.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Pass through the reconciler options in input reconciler template 5 | -------------------------------------------------------------------------------- /codegen/templates/build/Dockerfile.tmpl: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | COPY {{ .Repository }}-linux-amd64 /usr/local/bin/{{ .Repository }} 4 | 5 | ENTRYPOINT ["/usr/local/bin/{{ .Repository }}"] 6 | -------------------------------------------------------------------------------- /changelog/v0.0.2/dynamic-k8s-clients.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add basic dynamic kube clients.g 4 | issueLink: https://github.com/solo-io/skv2/issues/6 5 | 6 | -------------------------------------------------------------------------------- /changelog/v0.0.3/generated-headers.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add support for generated code headers.g 4 | issueLink: https://github.com/solo-io/skv2/issues/8 5 | -------------------------------------------------------------------------------- /changelog/v0.22.21/add-alias-helm.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Expose Alias in Helm chart dependencies. 4 | issueLink: https://github.com/solo-io/skv2/issues/352 -------------------------------------------------------------------------------- /changelog/v0.5.0/one-proto-compile.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/skv2/issues/73 4 | description: Compile protos only once per proto command -------------------------------------------------------------------------------- /changelog/v0.5.0/set-kube-constructor.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add constructor for sets from KubeList. 4 | issueLink: https://github.com/solo-io/skv2/issues/67 -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/mocks/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by MockGen. DO NOT EDIT. 2 | // Source: ./doc.go 3 | 4 | // Package mock_v1 is a generated GoMock package. 5 | package mock_v1 6 | -------------------------------------------------------------------------------- /changelog/v0.13.4/generate_gvk.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/172 4 | description: Add a GVK method to generated Go structs. 5 | -------------------------------------------------------------------------------- /changelog/v0.17.1/update-k8s-19.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Import boostrap and stats utils from gloo-mesh. 4 | issueLink: https://github.com/solo-io/skv2/issues/203 -------------------------------------------------------------------------------- /changelog/v0.18.3/clone.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/269 4 | description: Add Clone method to sets and Snapshot 5 | 6 | 7 | -------------------------------------------------------------------------------- /changelog/v0.29.4/fix-sidecar-key.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix parent sidecar key rendered in values.yaml. 4 | issueLink: https://github.com/solo-io/skv2/issues/438 5 | -------------------------------------------------------------------------------- /changelog/v0.40.1/sets-union-addRlock.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | "Adds Read Lock to ShallowCopy and Union methods on sets" 5 | skipCI: "false" 6 | -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/mocks/types.go: -------------------------------------------------------------------------------- 1 | // Code generated by MockGen. DO NOT EDIT. 2 | // Source: ./types.go 3 | 4 | // Package mock_v1 is a generated GoMock package. 5 | package mock_v1 6 | -------------------------------------------------------------------------------- /changelog/v0.17.4/relay.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Implement interoperability with Relay (skv2-enterprise). 4 | issueLink: https://github.com/solo-io/skv2/issues/213 -------------------------------------------------------------------------------- /changelog/v0.21.5/fix-unstructured-map.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix CRD rendering for unstructured map fields 4 | issueLink: https://github.com/solo-io/skv2/issues/311 5 | -------------------------------------------------------------------------------- /changelog/v0.22.19/update-go-to-1.18.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Update go version to 1.18 for module. 4 | issueLink: https://github.com/solo-io/skv2/issues/349 5 | -------------------------------------------------------------------------------- /changelog/v0.5.0/inputsnapshot.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add contrib template for generated Input Snapshot. 4 | issueLink: https://github.com/solo-io/skv2/issues/70 -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/mocks/register.go: -------------------------------------------------------------------------------- 1 | // Code generated by MockGen. DO NOT EDIT. 2 | // Source: ./register.go 3 | 4 | // Package mock_v1 is a generated GoMock package. 5 | package mock_v1 6 | -------------------------------------------------------------------------------- /changelog/v0.1.0/mc-watch.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/16 4 | description: Add a ClusterWatcher with hooks for multicluster reconcilers. -------------------------------------------------------------------------------- /changelog/v0.1.2/helm-env.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/30 4 | description: Allow setting env var name/value in generated helm charts. 5 | -------------------------------------------------------------------------------- /changelog/v0.17.22/fix-collector.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: "Fix an issue with the way imports are parsed from proto files." 4 | issueLink: https://github.com/solo-io/skv2/issues/258 -------------------------------------------------------------------------------- /changelog/v0.23.5/shallow-copy.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add `ShallowCopy` function to `Snapshot`. 4 | issueLink: https://github.com/solo-io/skv2/issues/380 5 | 6 | 7 | -------------------------------------------------------------------------------- /changelog/v0.28.2/428-helm-codegen-fixes.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fixes some bugs generating schema.json and helm docs 4 | issueLink: https://github.com/solo-io/skv2/issues/428 -------------------------------------------------------------------------------- /changelog/v0.3.1/cluster-registration.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Transfer cluster registration code from SMH into skv2 4 | issueLink: https://github.com/solo-io/skv2/issues/21 5 | -------------------------------------------------------------------------------- /changelog/v0.36.3/add-target-ref.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/529 4 | description: Add clone of TargetRef API from upstream K8s Gateway API -------------------------------------------------------------------------------- /changelog/v0.5.0/cluster-domain.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Expose cluster_domain field on KubernetesCluster CRD. 4 | issueLink: https://github.com/solo-io/skv2/issues/74 5 | -------------------------------------------------------------------------------- /changelog/v0.8.1/cluster-deregistration.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add cluster deregistration functionality. 4 | issueLink: https://github.com/solo-io/skv2/issues/116 5 | -------------------------------------------------------------------------------- /codegen/model/build.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | type Build struct { 4 | // path to the main.go file 5 | MainFile string 6 | 7 | // push image after build 8 | Push bool 9 | 10 | Image 11 | } 12 | -------------------------------------------------------------------------------- /changelog/v0.13.0/fix-kubeloader.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Allow passing in kubeconfig path to kube loader. 4 | issueLink: https://github.com/solo-io/skv2/issues/153 5 | -------------------------------------------------------------------------------- /changelog/v0.17.8/helm-dependency-condition.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/218 4 | description: Add `condition` to Helm dependency struct. 5 | -------------------------------------------------------------------------------- /changelog/v0.2.0/multi-cluster-manager.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/33 4 | description: MultiCluster watcher should not start manager. 5 | 6 | 7 | -------------------------------------------------------------------------------- /changelog/v0.21.4/skip-crd-in-helm-test.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix nil deref error in `sets.Key()`. 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/1938 5 | -------------------------------------------------------------------------------- /changelog/v0.22.1/cue-package-rename.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix infinite recursions when generating crd schemas for protos. 4 | issueLink: https://github.com/solo-io/skv2/issues/315 -------------------------------------------------------------------------------- /changelog/v0.22.3/fix-snapshot-groups.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix bug where resources had wrong groups in generated snapshot. 4 | issueLink: https://github.com/solo-io/skv2/issues/317 -------------------------------------------------------------------------------- /changelog/v0.22.7/add-admin-service-template.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add the Admin Service template for the operator. 4 | issueLink: https://github.com/solo-io/skv2/issues/322 -------------------------------------------------------------------------------- /changelog/v0.27.2/escape-go-template-operators.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Sanitize CRD descriptions for go templates. 4 | issueLink: https://github.com/solo-io/skv2/issues/410 -------------------------------------------------------------------------------- /changelog/v0.28.1/424-yaml-comments-bugs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fixes some bugs generating values.yaml inline docs comments 4 | issueLink: https://github.com/solo-io/skv2/issues/424 -------------------------------------------------------------------------------- /changelog/v0.29.5/440-chart-yaml-indent-2-space.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: chart values are indented 2 spaces instead of 4 4 | issueLink: https://github.com/solo-io/skv2/issues/440 5 | -------------------------------------------------------------------------------- /changelog/v0.33.0/copy-metadata-on-status-upsert.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | "Copy metadata from the existing object to the upserted object when upserting a status." -------------------------------------------------------------------------------- /changelog/v0.34.0/svc-port-name.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/488 4 | description: > 5 | Allow service port names to contain hyphens. 6 | -------------------------------------------------------------------------------- /changelog/v0.36.5/add-target-ref.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/529 4 | description: rename TargetRefWithSectionName, add PolicyTargetReference -------------------------------------------------------------------------------- /changelog/v0.40.6/deployment-overrides-docs-change.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | "Change the helm docs description for deploymentOverrides." 5 | skipCI: "false" 6 | -------------------------------------------------------------------------------- /changelog/v0.6.0/reqeue-deletes.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: DeletionReconciler can now requeue events by returning an error. 4 | issueLink: https://github.com/solo-io/skv2/issues/85 -------------------------------------------------------------------------------- /changelog/v0.11.1/json-deepcopy.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Support generated Deepcopy methods for non-proto resources. 4 | issueLink: https://github.com/solo-io/skv2/issues/136 5 | -------------------------------------------------------------------------------- /changelog/v0.12.2/reconciler-manual-trigger.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Expose manual triggers on generated reconcilers. 4 | issueLink: https://github.com/solo-io/skv2/issues/147 5 | -------------------------------------------------------------------------------- /changelog/v0.12.3/cluster-name-restriction.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Do not allow cluster names with '.' characters. 4 | issueLink: https://github.com/solo-io/skv2/issues/149 5 | -------------------------------------------------------------------------------- /changelog/v0.14.0/ripout-gogo.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Ripout gogo proto in favor of golang proto 4 | issueLink: https://github.com/solo-io/gloo/issues/3926 5 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.18.0/sidecars.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/skv2/issues/252 4 | description: Adds support for multiple deployment containers via sidecars. 5 | -------------------------------------------------------------------------------- /changelog/v0.18.2/probes.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/264 4 | description: Adds liveness and readiness probes to the operator container config. 5 | -------------------------------------------------------------------------------- /changelog/v0.19.5/redact-secret-output.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/287 4 | description: Redact secret data from JSON marshal of secrets in Output snapshot. -------------------------------------------------------------------------------- /changelog/v0.22.14/wrap-error.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Update the groups passed throughout codegen after it's been properly 5 | initialized with proto value. 6 | -------------------------------------------------------------------------------- /changelog/v0.22.4/fix-helm-docs-generation.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix bug where helm docs were being generated to the wrong place. 4 | issueLink: https://github.com/solo-io/skv2/issues/319 -------------------------------------------------------------------------------- /changelog/v0.27.2/schema-json.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Adds ability to generate json schema for chart 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7186 5 | -------------------------------------------------------------------------------- /changelog/v0.8.0/fix-service.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Stop generating service for Operators that have no service ports defined. 4 | issueLink: https://github.com/solo-io/skv2/issues/111 5 | -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/mocks/client_providers.go: -------------------------------------------------------------------------------- 1 | // Code generated by MockGen. DO NOT EDIT. 2 | // Source: ./client_providers.go 3 | 4 | // Package mock_v1 is a generated GoMock package. 5 | package mock_v1 6 | -------------------------------------------------------------------------------- /changelog/v0.17.13/helm-values-doc-operator-values-ordering.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/226 4 | description: Make ordering of operator values deterministic. 5 | -------------------------------------------------------------------------------- /changelog/v0.23.8/fix-multicluster-watch-error.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/390 4 | description: Handle manager creation errors in multi cluster watcher. 5 | -------------------------------------------------------------------------------- /changelog/v0.27.2/yaml-comments.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Adds ability to have inline comments in chart yaml 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7185 5 | -------------------------------------------------------------------------------- /changelog/v0.28.1/add-namespace-to-cluster-roles.yaml: -------------------------------------------------------------------------------- 1 | 2 | changelog: 3 | - type: NON_USER_FACING 4 | description: Sort yaml alphabetically for helm values 5 | issueLink: https://github.com/solo-io/skv2/issues/426 6 | -------------------------------------------------------------------------------- /changelog/v0.22.26/generic-client.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add generic versions of the client.Client` 4 | issueLink: https://github.com/solo-io/skv2/issues/360 5 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.23.5/mem-efficient-set.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Modify resource Sets to use a single internal set to improve memory efficiency. 4 | issueLink: https://github.com/solo-io/skv2/issues/383 -------------------------------------------------------------------------------- /changelog/v0.34.10/fix-skip-template.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/514 4 | description: Respect the SkipCRDManifest and SkipTemplatedCRDManifest flags on Groups. 5 | -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/mocks/zz_generated.deepcopy.go: -------------------------------------------------------------------------------- 1 | // Code generated by MockGen. DO NOT EDIT. 2 | // Source: ./zz_generated.deepcopy.go 3 | 4 | // Package mock_v1 is a generated GoMock package. 5 | package mock_v1 6 | -------------------------------------------------------------------------------- /changelog/v0.1.1/imports-for-group-status.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Check for the Go Package of the status field when calculating imports_for_group 4 | issueLink: https://github.com/solo-io/skv2/issues/29 5 | -------------------------------------------------------------------------------- /changelog/v0.12.4/validation-schemas.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add support for generating validation schemas for inclusion in CRDs. 4 | issueLink: https://github.com/solo-io/skv2/issues/145 5 | -------------------------------------------------------------------------------- /changelog/v0.13.2/snapshot-merge-clone.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix a break that was caused by removing the built-in `goimports` functionality 4 | issueLink: https://github.com/solo-io/skv2/issues/166 5 | -------------------------------------------------------------------------------- /changelog/v0.17.17/remove-controller-runtime-config-dep.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Removes controller runtime dependency, to unblock projects that import skv2 that have a `kubeconfig` go flag. 4 | -------------------------------------------------------------------------------- /changelog/v0.17.3/anyvendor-update.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - dependencyOwner: solo-io 3 | dependencyRepo: anyvendor 4 | dependencyTag: v0.0.3 5 | description: Update anyvendor to pick up codegen flake fix. 6 | type: DEPENDENCY_BUMP -------------------------------------------------------------------------------- /changelog/v0.21.6/cue-module-rename.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Depend on solo-io/cue fork directly 4 | issueLink: https://github.com/solo-io/solo-apis/issues/257 5 | resolvesIssue: false 6 | -------------------------------------------------------------------------------- /changelog/v0.23.3/allow-unknown-fields.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: > 4 | Allow unknown fields in Unmarshaller unless StrictUnmarshal is enabled. 5 | issueLink: https://github.com/solo-io/skv2/issues/372 -------------------------------------------------------------------------------- /changelog/v0.27.1/helm-gen-enhancements.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Helm gen enhancements to support new gloo-platform-chart. 4 | issueLink: https://github.com/solo-io/skv2/issues/407 5 | 6 | -------------------------------------------------------------------------------- /changelog/v0.29.1/operator-name-override.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Allow name override on operator without changing name of resources. 4 | issueLink: https://github.com/solo-io/skv2/issues/432 -------------------------------------------------------------------------------- /changelog/v0.31.2/slices.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10495 4 | description: > 5 | Don't generate docs entries for slice elements. 6 | -------------------------------------------------------------------------------- /changelog/v0.34.2/svc-port-name.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/488 4 | description: > 5 | Allow service port names to contain hyphens for sidecar services. 6 | -------------------------------------------------------------------------------- /changelog/v0.38.3/add-godeltapprof.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | "adds godeltapprof to the debug endpoints, to be used with pyroscope or grafana cloud profiler" 5 | skipCI: "false" 6 | -------------------------------------------------------------------------------- /changelog/v0.5.0/expose-local-domain-override.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Expose clusterDomainOverride on default cluster registrant. 4 | issueLink: https://github.com/solo-io/skv2/issues/76 5 | -------------------------------------------------------------------------------- /changelog/v0.7.2/typed-object-refs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add dependencies to model.Chart for declaring Helm chart dependencies. 4 | issueLink: https://github.com/solo-io/skv2/issues/106 5 | -------------------------------------------------------------------------------- /codegen/templates/code/types/doc.gotmpl: -------------------------------------------------------------------------------- 1 | // Package {{.Version}} contains API Schema definitions for the {{.Group}} {{.Version}} API group 2 | // +k8s:deepcopy-gen=package,register 3 | // +groupName={{.Group}} 4 | package {{.Version}} 5 | -------------------------------------------------------------------------------- /codegen/test/chart/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /changelog/v0.11.0/eks-client-list-clusters.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Use ListClustersPagesWithContext for safer paging on EKSClient. 4 | issueLink: https://github.com/solo-io/skv2/issues/133 5 | -------------------------------------------------------------------------------- /changelog/v0.13.1/verifier-debug.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/159 4 | description: Add a verifier option for writing a debug log when a resource is unavailable. 5 | -------------------------------------------------------------------------------- /changelog/v0.31.0/fix-helm-docs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7838 4 | description: Removes duplicate rows in Helm ref docs & alphabetizes table rows -------------------------------------------------------------------------------- /changelog/v0.37.1/update-protoc-gen-openapi.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/541 4 | resolvesIssue: true 5 | description: > 6 | Updates protoc-gen-openapi to v0.2.1. 7 | -------------------------------------------------------------------------------- /changelog/v0.7.1/helm-chart-dependencies.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add dependencies to model.Chart for declaring Helm chart dependencies. 4 | issueLink: https://github.com/solo-io/skv2/issues/105 5 | -------------------------------------------------------------------------------- /changelog/v0.13.5/bump-go-utils.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - dependencyOwner: solo-io 3 | dependencyRepo: go-utils 4 | dependencyTag: v0.20.0 5 | description: Update go-utils to version to the one without kubernetes deps 6 | type: DEPENDENCY_BUMP -------------------------------------------------------------------------------- /changelog/v0.18.1/remove-extraneous-options.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/263 4 | description: Remove extraneous `extra{Pod/Deployment/Service}{Labels/Annotations}` Helm values. 5 | -------------------------------------------------------------------------------- /changelog/v0.19.10/add-chart-only-gen-flag.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Add ChartOnly option for codegen so that we do not have to do a full 5 | generation when we only want to generate charts 6 | -------------------------------------------------------------------------------- /changelog/v0.34.0/remove-hardcoded-annotations.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/skv2/issues/490 4 | description: Remove hardcoded prometheus pod annotations from operator templates. 5 | -------------------------------------------------------------------------------- /changelog/v0.4.0/extract-kube-clients.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Extract generated Kubernetes clientsets to https://github.com/solo-io/external-apis 4 | issueLink: https://github.com/solo-io/skv2/issues/54 -------------------------------------------------------------------------------- /changelog/v0.40.5/image-pull-secrets.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/574 4 | description: > 5 | Add support for multiple ImagePullSecret references 6 | skipCI: "false" 7 | -------------------------------------------------------------------------------- /codegen/test/chart-envvars/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart-no-desc/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart-readiness/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart-sidecar/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart-svcport/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /changelog/v0.16.1/fix-equality.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: > 4 | Fix the case where proto.Message types are passed in by value rather than by pointer. 5 | issueLink: https://github.com/solo-io/skv2/issues/199 6 | -------------------------------------------------------------------------------- /changelog/v0.17.2/kubeconfig-loader-check-recommended.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/205 4 | description: Add recommended kubeconfig directory path to kubeconfig loader loading rules. 5 | -------------------------------------------------------------------------------- /changelog/v0.19.3/add-enable-op-flag.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/284 4 | description: Add enable flag to operator to enable/disable creation of the operator deployment/service. -------------------------------------------------------------------------------- /changelog/v0.19.9/clone-functions.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - dependencyOwner: solo-io 3 | dependencyRepo: protoc-gen-ext 4 | dependencyTag: v0.0.16 5 | description: Update protoc-gen-ext to pick up Clone() functions 6 | type: DEPENDENCY_BUMP -------------------------------------------------------------------------------- /changelog/v0.21.2/always-include-schema-field.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Add the Schema field with preserve unknown fields even if we should not render schemas 4 | issueLink: https://github.com/solo-io/skv2/issues/306 5 | -------------------------------------------------------------------------------- /changelog/v0.27.2/remove-product-specific-helm-docs-tag.yaml.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Removes the `product` tag to a helm values struct 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7123 -------------------------------------------------------------------------------- /changelog/v0.30.1/extra-env.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/447 4 | resolvesIssue: true 5 | description: > 6 | "Allow setting extra env vars as passthrough values" 7 | -------------------------------------------------------------------------------- /changelog/v0.31.2/sort-helm-values.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10495 4 | description: > 5 | Sort helm values by description if keys are the same. 6 | -------------------------------------------------------------------------------- /changelog/v0.33.0/conditional_crd_rendering.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9019 4 | description: > 5 | Add support for conditional rendering of CRDs. 6 | -------------------------------------------------------------------------------- /changelog/v0.34.1/container-ports.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/495 4 | description: > 5 | Allow users to configure container ports for the `container` and `sidecar`. 6 | -------------------------------------------------------------------------------- /changelog/v0.43.1/input-reconciler-unique-names.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/590 4 | resolvesIssue: false 5 | description: Give each reconciler loop a unique name based on kind 6 | -------------------------------------------------------------------------------- /codegen/test/chart/all-volumes/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart/env-priority/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart/extra-volumes/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart/static-volumes/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/name_override_chart/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /changelog/v0.18.1/fix-docsgen-extra-helm-overrides.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix the helm docs to display `extraPodAnnotations` instead of `customPodAnnotations`. 4 | issueLink: https://github.com/solo-io/skv2/issues/246 5 | -------------------------------------------------------------------------------- /changelog/v0.21.1/add-merge-function.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Adds a `Merge` function to Snapshot and ClusterSnapshot so that two snapshots can be merged. 4 | issueLink: https://github.com/solo-io/skv2/issues/302 5 | -------------------------------------------------------------------------------- /changelog/v0.28.2/docs-helm-descs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Add missing and update existing Helm field descriptions. 4 | skipCI: true 5 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7572 -------------------------------------------------------------------------------- /changelog/v0.40.2/env-template-sources.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/565 4 | description: > 5 | Add support for other sources in templated env vars field. 6 | skipCI: "false" 7 | -------------------------------------------------------------------------------- /codegen/test/chart-deployment-strategy/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart-sidecar-svcport/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-volumes/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart/image-pull-secrets/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /codegen/test/chart/namespaced-rbac/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /pkg/multicluster/constants.go: -------------------------------------------------------------------------------- 1 | package multicluster 2 | 3 | const ( 4 | // LocalCluster is the clusterName for the local cluster 5 | // (the main cluster from which registered clusters are processed by the ClusterWatcher). 6 | LocalCluster = "" 7 | ) 8 | -------------------------------------------------------------------------------- /changelog/v0.13.1/short-names.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Set a `model.Resource.ShortNames` field to a list of strings to set additional aliases for a resource. 4 | issueLink: https://github.com/solo-io/skv2/issues/164 5 | -------------------------------------------------------------------------------- /changelog/v0.17.12/helm-values-doc-operator-values.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh/issues/1361 4 | description: Add generation of documentation for Helm values. 5 | resolvesIssue: false 6 | -------------------------------------------------------------------------------- /changelog/v0.19.6/redact-secret-annotations.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/289 4 | description: Redact secret annotations in case of kubectl apply from JSON marshal of secrets in Output snapshot. -------------------------------------------------------------------------------- /changelog/v0.21.3/skip-crd-in-helm-test.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Provide a way to specify skipping of CRD parsing for a file. This will 5 | allow us to not run include a CRD as part of our helm test. 6 | -------------------------------------------------------------------------------- /changelog/v0.24.1/add-service-account-extra-annotations.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add serviceAccount.extraAnnotations to operator deployment. 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/5989 5 | -------------------------------------------------------------------------------- /changelog/v0.36.4/remove-extra-field.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/532 4 | description: > 5 | Remove extra `enabled` field so generated docs don't have duplicate `enabled` descriptions. 6 | -------------------------------------------------------------------------------- /changelog/v0.4.1/eks-client-from-session.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Expose EksClient constructor from session, allowing users to configure AWS client settings. 4 | issueLink: https://github.com/solo-io/skv2/issues/57 5 | -------------------------------------------------------------------------------- /codegen/render/NOTES.md: -------------------------------------------------------------------------------- 1 | # Notes for using skv2/render 2 | 3 | As no main file is generated, the user is responsible 4 | for running 5 | 6 | 7 | ``` 8 | "sigs.k8s.io/controller-runtime/pkg/log" 9 | 10 | { 11 | 12 | 13 | } 14 | 15 | 16 | ``` -------------------------------------------------------------------------------- /codegen/test/chart-pod-security-context/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /changelog/v0.16.2/fix-proto-conflicts.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: > 4 | Fixes proto conflicts caused by discovery.proto in downstream projects. 5 | issueLink: https://github.com/solo-io/gloo/issues/4068 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.17.9/custom-service-type.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/220 4 | description: Expose the service type on generated helm charts such that it can be configured by user helm values. 5 | -------------------------------------------------------------------------------- /changelog/v0.33.1/namespace-rbac-bug-fix.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10521 4 | description: > 5 | Fixes whitespace issue in operator rbac template. 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.8.0/fix-go-tool-versioning.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Follow the [recommended approach](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module) 5 | for go tool versioning. -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Package v1 contains API Schema definitions for the things.test.io v1 API group 4 | // +k8s:deepcopy-gen=package,register 5 | // +groupName=things.test.io 6 | package v1 7 | -------------------------------------------------------------------------------- /changelog/v0.12.1/kubernetes-cluster-status-settings.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Extend KubernetesCluster CRD status with namespace and policy rules it was registered with. 4 | issueLink: https://github.com/solo-io/skv2/issues/142 5 | -------------------------------------------------------------------------------- /changelog/v0.13.1/validation-schema-preserve-unknown-fields-false.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Set `spec.preserveUnknownFields` to false for CRD's with validation schemas. 4 | issueLink: https://github.com/solo-io/skv2/issues/155 5 | -------------------------------------------------------------------------------- /changelog/v0.15.1/ripout-gogo.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Allow providing options to control which objects have their status updated by calls to an input snaphot's SyncStatus method. 4 | issueLink: https://github.com/solo-io/skv2/issues/182 -------------------------------------------------------------------------------- /changelog/v0.17.16/proto-compiler-optimization.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/gloo/issues/4559 4 | resolvesIssue: false 5 | description: Adds memoization to proto compilation to reduce execution time. 6 | -------------------------------------------------------------------------------- /changelog/v0.17.18/in-memory-input-snap-list-opts.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Respect the list options in the inMemorySnapshotBuilder. 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/502 5 | resolvesIssue: false 6 | -------------------------------------------------------------------------------- /changelog/v0.22.13/wrap-error.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Wrap reconcile error instead of logging before returning to avoid reduntant error logging 4 | issueLink: https://github.com/solo-io/dev-portal/issues2159 5 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.22.5/lowercase-service-port-name.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Ensure that all port names are lowercased, due to the k8s restriction that 4 | names for ports must only contain lowercase alphanumeric characters and -. -------------------------------------------------------------------------------- /changelog/v0.29.4/update-cue.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: DEPENDENCY_BUMP 3 | dependencyOwner: solo-io 4 | dependencyRepo: cue 5 | dependencyTag: v0.4.7 6 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7807 7 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.29.5/fix-input-templates.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix compilation errors in input reconciler and input snapshot templates when running with k8s 1.25 libraries. 4 | issueLink: https://github.com/solo-io/gloo/issues/6833 5 | -------------------------------------------------------------------------------- /codegen/test/chart-conditional-deployment-strategy/Chart.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | apiVersion: v1 4 | home: https://docs.solo.io/skv2/latest 5 | name: Painting Operator 6 | sources: 7 | - https://github.com/solo-io/skv2 8 | version: v0.0.1 9 | -------------------------------------------------------------------------------- /changelog/v0.2.3/kubernetes-cluster-crd.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/15 4 | resolvesIssue: false 5 | description: Add kubernetes cluster resource to skv2, along with a couple smaller core API pieces. 6 | -------------------------------------------------------------------------------- /changelog/v0.22.25/verifier-factory.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add generic versions of the reconciler, and sets. These are placed in `/v2` 4 | issueLink: https://github.com/solo-io/skv2/issues/360 5 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.22.28/fix-set-interface.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: | 4 | Resolve "the object has been modified; please apply your changes to the latest version and try again" errors. 5 | issueLink: https://github.com/solo-io/skv2/issues/365 -------------------------------------------------------------------------------- /changelog/v0.27.2/add-namespace-to-cluster-roles.yaml: -------------------------------------------------------------------------------- 1 | 2 | changelog: 3 | - type: NON_USER_FACING 4 | description: Adds namespace suffix to cluster roles so they do not conflict with multiple installations 5 | issueLink: https://github.com/solo-io/skv2/issues/414 6 | -------------------------------------------------------------------------------- /changelog/v0.3.3/fix-chartgen.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix bug that causes chart generation to produce no files when a `FilterTemplate` function is not provided in the `codegen.Command`. 4 | issueLink: https://github.com/solo-io/skv2/issues/47 -------------------------------------------------------------------------------- /changelog/v0.30.2/fix-intstr-handling.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9194 4 | description: intstr.IntOrString fields now output the correct schema instead of an object 5 | skipCI: false 6 | -------------------------------------------------------------------------------- /changelog/v0.33.1/namespace-rbac.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10521 4 | description: > 5 | Add the ability to specify namespace-scoped rbac policies. 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.1.0/cluster-config.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: | 4 | Add functions to build temporary ClientConfig from different cloud provider cluster resources 5 | issueLink: https://github.com/solo-io/skv2/issues/25 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.18.1/operator-expose-securitycontext.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/260 4 | description: Expose Deployment container's `securityContext`. If not specified, default to `runAsNonRoot":" true`. 5 | -------------------------------------------------------------------------------- /changelog/v0.19.0/logging-improvements.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Remove noisy "added outut {{ resource.Kind }} " logs for output snapshot. 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/702 5 | resolvesIssue: false 6 | 7 | -------------------------------------------------------------------------------- /changelog/v0.23.7/mem-efficient-set-keys.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Make `sets.Key()` much more memory efficient by using a `sync.Pool` to 4 | reuse buffers, and switching from string concatenation to `strings.Builder`. 5 | 6 | 7 | -------------------------------------------------------------------------------- /changelog/v0.29.3/8450-operator-enabled-dependson.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Added ability for one operator to be not enabled if another operator is also not enabled 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/8450 -------------------------------------------------------------------------------- /changelog/v0.29.6/remove-actions-cache.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/solo-projects/issues/4708 4 | resolvesIssue: false 5 | description: Removed actions/cache as this is made redundant by actions/setup-go@v4. 6 | -------------------------------------------------------------------------------- /changelog/v0.33.1/conditional-sidecar.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9850 4 | resolvesIssue: false 5 | description: > 6 | Allows specifying conditional volume, service or sidecars. 7 | -------------------------------------------------------------------------------- /changelog/v0.36.2/codegen-only-option.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/526 4 | description: | 5 | Adds an option which enables adding new API resources without publishing them to helm charts and snapshots. -------------------------------------------------------------------------------- /codegen/doc/doc_suite_test.go: -------------------------------------------------------------------------------- 1 | package doc_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestDoc(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Doc Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.13.6/validation-schema-proto-any.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/171 4 | description: Prevent k8s from validating proto.Any fields (since it's unstructured) by removing 'properties' and 'required' fields. 5 | -------------------------------------------------------------------------------- /changelog/v0.14.1/ripout-gogo.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix break in reflect.DeepEqual caused by new proto messages which have non deterministic fields (https://github.com/golang/protobuf/issues/1173). 4 | issueLink: https://github.com/solo-io/skv2/issues/180 -------------------------------------------------------------------------------- /changelog/v0.34.0/readiness-probe.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/11314 4 | resolvesIssue: false 5 | description: Use custom type for readiness probe to allow passing in templates for values. -------------------------------------------------------------------------------- /changelog/v0.19.0/floating-user-id.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/881 4 | resolvesIssue: false 5 | description: Adds the `floatingUserId` and the `runAsUser` to the user-facing helm values. 6 | -------------------------------------------------------------------------------- /changelog/v0.19.4/verify-resource-exists-snapshot.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/987 4 | description: Add check that if crd does not exist, do not attempt to sync the output snapshot for that resource. -------------------------------------------------------------------------------- /changelog/v0.2.2/upsert-env.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: Allow different types of Env vars in Chart deployment gen. 4 | - type: NEW_FEATURE 5 | description: Generate Upsert method on clients. 6 | issueLink: https://github.com/solo-io/skv2/issues/41 7 | -------------------------------------------------------------------------------- /changelog/v0.34.9/conditional-vol.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/11921 4 | resolvesIssue: false 5 | description: | 6 | Adds support for conditional volumes and mounts. 7 | skipCI: false 8 | -------------------------------------------------------------------------------- /changelog/v0.40.7/issue-582.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/582 4 | description: > 5 | Support extraVolumes/extraVolumeMounts fields which can be passed in by the user from helm values. 6 | skipCI: "false" 7 | -------------------------------------------------------------------------------- /changelog/v0.6.1/fix-simple-cluster-registration.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Differentiate between local and remote kube configs during streamlined cluster registration powered by RegistrationOptions. 4 | issueLink: https://github.com/solo-io/skv2/issues/88 5 | -------------------------------------------------------------------------------- /codegen/codegen_suite_test.go: -------------------------------------------------------------------------------- 1 | package codegen_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestCodegen(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Codegen Suite") 13 | } 14 | -------------------------------------------------------------------------------- /contrib/tests/tests_suite_test.go: -------------------------------------------------------------------------------- 1 | package tests_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestTests(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Tests Suite") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/ezkube/ezkube_suite_test.go: -------------------------------------------------------------------------------- 1 | package ezkube_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestEzkube(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Ezkube Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.17.19/labels-and-annotations-as-helm-values.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Allow pod, deployment, or service labels and annotations to be helm values. 4 | issueLink: https://github.com/solo-io/gloo-mesh/issues/1450 5 | resolvesIssue: false 6 | -------------------------------------------------------------------------------- /changelog/v0.28.3/omitChildren-helm-docs-gen-bug.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fixes bug where the helm documentation's field name would be wrong if the tag omitChildren and json are both used 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/7833 -------------------------------------------------------------------------------- /changelog/v0.29.6/github-actions-deprecations.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/solo-projects/issues/4708 4 | resolvesIssue: false 5 | description: Updated various github actions due to deprecated methods, images, or libraries. 6 | -------------------------------------------------------------------------------- /changelog/v0.30.1/expose-overrides-fields.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9345 4 | resolvesIssue: false 5 | description: > 6 | "Expose DeploymentOverrides and ServiceOverrides in values.yaml" 7 | -------------------------------------------------------------------------------- /changelog/v0.34.7/conditional-crds.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/505 4 | description: > 5 | Adds support for conditional CRDs. This allows users to specify a condition that must be true for the CRD to be installed. 6 | -------------------------------------------------------------------------------- /changelog/v0.34.8/feature-crd.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/12370 4 | resolvesIssue: false 5 | description: | 6 | Render feature flag environment variables for containers. 7 | skipCI: false 8 | -------------------------------------------------------------------------------- /changelog/v0.38.5/conditional-strategy.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/15710 4 | resolvesIssue: false 5 | description: | 6 | Adds support for conditional deployment strategy. 7 | skipCI: false 8 | -------------------------------------------------------------------------------- /codegen/render/render_suite_test.go: -------------------------------------------------------------------------------- 1 | package render_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestRender(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Render Suite") 13 | } 14 | -------------------------------------------------------------------------------- /contrib/codegen/funcs/funcs_suite_test.go: -------------------------------------------------------------------------------- 1 | package funcs_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestFuncs(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Funcs Suite") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/api/multicluster.solo.io/v1alpha1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1alpha1 5 | 6 | // KubernetesClusterSlice represents a slice of *KubernetesCluster 7 | type KubernetesClusterSlice []*KubernetesCluster 8 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Please include a thorough summary of the changes. 4 | 5 | This fixes ... \ This new feature can be used to ... 6 | 7 | # Context 8 | 9 | Summary of issue 10 | 11 | Description and justification of any interesting decisions made 12 | -------------------------------------------------------------------------------- /changelog/v0.21.0/dev-logging.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | Change Logging options to be more clear. This will only affect bootstrap.Start() and 5 | bootstrap.StartMulti() functions. 6 | issueLink: https://github.com/solo-io/skv2/issues/304 7 | -------------------------------------------------------------------------------- /changelog/v0.22.17/copy-uid-on-update.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/344 4 | resolvesIssue: false 5 | description: > 6 | Ensure the uid of the resource being writen is the same as the uid that exists when doing a status update -------------------------------------------------------------------------------- /changelog/v0.34.9/conditional-env.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/12370 4 | resolvesIssue: false 5 | description: | 6 | Add support for conditional template environment variables. 7 | skipCI: false 8 | -------------------------------------------------------------------------------- /changelog/v0.37.0/protoc-gen.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/16049 4 | resolvesIssue: false 5 | description: > 6 | "Enable CRD schema generation using protoc-gen-openapi" 7 | skipCI: "false" 8 | -------------------------------------------------------------------------------- /pkg/api/multicluster.solo.io/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Package v1alpha1 contains API Schema definitions for the multicluster.solo.io v1alpha1 API group 4 | // +k8s:deepcopy-gen=package,register 5 | // +groupName=multicluster.solo.io 6 | package v1alpha1 7 | -------------------------------------------------------------------------------- /pkg/crdutils/crdutils_suite_test.go: -------------------------------------------------------------------------------- 1 | package crdutils_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestCrdutils(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Crdutils Suite") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/resource/resource_suite_test.go: -------------------------------------------------------------------------------- 1 | package resource_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestResource(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Resource Suite") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/verifier/verifier_suite_test.go: -------------------------------------------------------------------------------- 1 | package verifier_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestVerifier(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Verifier Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.11.0/multicluster-registration-in-memory.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: For cluster registration, represent all kubeconfigs as clientcmd.ClientConfig to allow passing in memory kubeconfigs. 4 | issueLink: https://github.com/solo-io/skv2/issues/134 5 | -------------------------------------------------------------------------------- /changelog/v0.22.16/print-helm-map-custom-values.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/3877 4 | resolvesIssue: false 5 | description: > 6 | When generating helm docs with mapped custom values, print them out explicitly. 7 | -------------------------------------------------------------------------------- /changelog/v0.26.1/fix-workqueue-panic.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: > 4 | Convert ResourceIds to a string before adding them to the reconcile queue, to avoid panic caused by ClusterResourceIds being unhashable. 5 | issueLink: https://github.com/solo-io/skv2/issues/404 6 | -------------------------------------------------------------------------------- /changelog/v0.16.1/protoc-go-opt.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Expose protoc's cmd line flag "go_opt" in skv2's top level Command in order to specify mappings between proto files and corresponding generated Go code. 4 | issueLink: https://github.com/solo-io/skv2/issues/192 5 | -------------------------------------------------------------------------------- /changelog/v0.17.0/update-k8s-19.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Update to k8s 0.19. Methods that previously took runtime.Object and type-asserted to metav1.Object now take client.Object 4 | issueLink: https://github.com/solo-io/gloo/issues/3582 5 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.17.20/support-helm-overrides.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: "Helm Chart: Support the ability to allow the user to provide arbitrary overrides to operator deloyments and services in their helm values." 4 | issueLink: https://github.com/solo-io/skv2/issues/246 5 | -------------------------------------------------------------------------------- /changelog/v0.38.6/fix-conditional-strategy.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/15710 4 | resolvesIssue: false 5 | description: | 6 | Avoid setting deployment strategy to null when no condition is evaluated. 7 | skipCI: false 8 | -------------------------------------------------------------------------------- /ci/setup-kind.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | if [ "$1" == "" ]; then 6 | echo "please provide a name for the 'remote' cluster" 7 | exit 0 8 | fi 9 | 10 | kind create cluster --name skv2-test-master 11 | kind create cluster --name "$1" 12 | 13 | kubectl config use-context kind-skv2-test-master -------------------------------------------------------------------------------- /pkg/multicluster/register/register_suite_test.go: -------------------------------------------------------------------------------- 1 | package register_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestRegister(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Register Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.22.18/allow-users-to-set-container-security-context-4000.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Allows the default container security context to be overriden or omitted. 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/4000 5 | resolvesIssue: false 6 | -------------------------------------------------------------------------------- /changelog/v0.36.1/readinessprobe-scheme-field.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/521 4 | resolvesIssue: false 5 | description: | 6 | Support scheme field for readiness probes. By default it is HTTP and an optional field. 7 | skipCI: false -------------------------------------------------------------------------------- /pkg/multicluster/register/internal/internal_suite_test.go: -------------------------------------------------------------------------------- 1 | package internal_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestInternal(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Internal Suite") 13 | } 14 | -------------------------------------------------------------------------------- /codegen/kuberesource/kuberesource_suite_test.go: -------------------------------------------------------------------------------- 1 | package kuberesource_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestKuberesource(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Kuberesource Suite") 13 | } 14 | -------------------------------------------------------------------------------- /pkg/multicluster/kubeconfig/kubeconfig_suite_test.go: -------------------------------------------------------------------------------- 1 | package kubeconfig_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestKubeconfig(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Kubeconfig Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.39.1/efficient-union.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | "Makes the `Union` method in v2 sets more efficient. If the input set is sorted by resource ID, we can take advantage of this to 5 | do a more efficient Union while keeping the Unioned set in sorted order. 6 | -------------------------------------------------------------------------------- /contrib/pkg/output/errhandlers/err_handlers_suite_test.go: -------------------------------------------------------------------------------- 1 | package errhandlers_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestCodegen(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Error Handlers Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.17.2/fix-equality-segfault.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/207 4 | description: >- 5 | Fix equality for protos, since we were using the `proto.Equals` on k8s resources that implemented the interface 6 | but should have been using reflection. 7 | -------------------------------------------------------------------------------- /pkg/controllerutils/controllerutils_suite_test.go: -------------------------------------------------------------------------------- 1 | package controllerutils_test 2 | 3 | import ( 4 | "testing" 5 | 6 | . "github.com/onsi/ginkgo/v2" 7 | . "github.com/onsi/gomega" 8 | ) 9 | 10 | func TestControllerutils(t *testing.T) { 11 | RegisterFailHandler(Fail) 12 | RunSpecs(t, "Controllerutils Suite") 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.34.3/ns-rbac-by-helm-flag.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10521 4 | description: > 5 | Add the ability to toggle between generating a ClusterRole/Binding or Role/Binding for namespace-scoped rbac policies. 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.22.24/verifier-factory.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: | 4 | Adds a factory for creating verifiers. This factory allows the caller to reset all caches simultaneously. 5 | This can be used when CRDs are added to the cluster later. 6 | issueLink: https://github.com/solo-io/skv2/issues/356 -------------------------------------------------------------------------------- /changelog/v0.22.6/upsert-immutable.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Add UpsertImmutable function as controller-runtime > 0.9.0 Create function modifies the passed in obj. 5 | - type: NON_USER_FACING 6 | description: Update controller-runtime library to 0.9.x and associated kubernetes libraries. -------------------------------------------------------------------------------- /changelog/v0.33.0/fix-portal-platform-chart-installation.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10786 4 | description: > 5 | Add the ability to specify an operator namespace using a value path. (e.g. `$.Values.common.namespace`) 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.40.4/env-priority.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Reorder the priority of the environment variables to be loaded in the following order: 5 | 1. Templated environment variables 6 | 2. Environment variables 7 | 3. Extra environment variables 8 | skipCI: "false" 9 | -------------------------------------------------------------------------------- /changelog/v0.15.0/ripout-gogo.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Update contrib/Snapshot code generation to support "Hybrid" input reconciler which reconciles events generated from both a multicluster client (remote clusters) and a local manager (local cluster). 4 | issueLink: https://github.com/solo-io/skv2/issues/178 -------------------------------------------------------------------------------- /changelog/v0.24.0/typed-object.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: | 4 | Change the definition of resource.TypedObject and deprecated it in favor of client.Object 5 | to make it easier to use snapshot with objects coming from controller runtime. 6 | issueLink: https://github.com/solo-io/skv2/issues/395 -------------------------------------------------------------------------------- /changelog/v0.22.12/skip-descriptions.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: > 4 | Add a new `SkipSchemaDescriptions` flag for Groups. If set to true, descriptions will 5 | not be included in generated openapi schemas. This can be used to reduce CRD size. 6 | issueLink: https://github.com/solo-io/skv2/issues/333 7 | -------------------------------------------------------------------------------- /changelog/v0.38.1/codegen-pod-security-context.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/15710 4 | resolvesIssue: false 5 | description: | 6 | Add support for configuring custom strategy and pod-level security context for operator deployments. 7 | skipCI: false 8 | -------------------------------------------------------------------------------- /pkg/resource/resource.go: -------------------------------------------------------------------------------- 1 | package resource 2 | 3 | import ( 4 | "github.com/solo-io/skv2/pkg/ezkube" 5 | "sigs.k8s.io/controller-runtime/pkg/client" 6 | ) 7 | 8 | func ToClientKey(res ezkube.ResourceId) client.ObjectKey { 9 | return client.ObjectKey{ 10 | Namespace: res.GetNamespace(), 11 | Name: res.GetName(), 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /changelog/v0.16.0/generate-both-snapshots.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | Always generate both single and multi cluster snapshots for homogenous snapshots. This change removes the MultiCluster option for `HomogenousSnapshotResources` and is therefore breaking. 5 | issueLink: https://github.com/solo-io/skv2/issues/190 -------------------------------------------------------------------------------- /changelog/v0.34.4/ns-rbac-resource-naming-fix.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/10521 4 | description: > 5 | Adds helm release information to k8s resources that use namespace-scoped rbac policies so we support multiple installations of a helm chart. 6 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.34.6/gme-12164_fix-platform-helm-install.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/12164 4 | resolvesIssue: false 5 | description: Prefix some lines declaring new vars with '#' in helm templates to avoid printing variable values in yaml. See issue description for more context. 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SKv2 2 | 3 | Please see the following projects for SKv2 usage: 4 | 5 | * [codegen/cmd_test.go](codegen/cmd_test.go) & [codegen/render/kube_crud_test.go](codegen/render/kube_crud_test.go) (local test project) 6 | * https://github.com/solo-io/service-mesh-hub 7 | * https://github.com/solo-io/wasme 8 | * https://github.com/solo-io/dev-portal (private) 9 | -------------------------------------------------------------------------------- /changelog/v0.22.20/snapshot_ui_and_endpoint_improvements.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Improved snapshot endpoints. Added new params to snapshots/output & snapshots/input including format, clusters, namespaces, and resourceTypes. Improved UI to utilize these new options. 4 | issueLink: https://github.com/solo-io/skv2/issues/347 -------------------------------------------------------------------------------- /changelog/v0.17.16/better-errgroup-yaml-fix.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix issue where `toYaml` function in templates would produce weird result on string arrays. 4 | issueLink: https://github.com/solo-io/skv2/issues/234 5 | - type: NON_USER_FACING 6 | description: Switch to using `errgroup` which reports all errors encountered. 7 | -------------------------------------------------------------------------------- /changelog/v0.23.9/disable-openapi-type-validaiton.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/5711 4 | description: > 5 | Adds a new proto option `disable_openapi_type_validation`, which allows for a type-less openapi schema type, 6 | which is useful for protobuf types such as `google.protobuf.Value`. -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1 5 | 6 | // PaintSlice represents a slice of *Paint 7 | type PaintSlice []*Paint 8 | 9 | // ClusterResourceSlice represents a slice of *ClusterResource 10 | type ClusterResourceSlice []*ClusterResource 11 | -------------------------------------------------------------------------------- /changelog/v0.11.1/kubernetescluster-provider-info.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: | 4 | Extend KubernetesCluster CRD with ProviderInfo field containing metadata about cloud provided clusters. 5 | Also extend registration interfaces to allow passing in ProviderInfo. 6 | issueLink: https://github.com/solo-io/skv2/issues/139 7 | -------------------------------------------------------------------------------- /changelog/v0.5.0/outputsnapshot_reconciler.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add contrib template for generated Input Reconciler. 4 | issueLink: https://github.com/solo-io/skv2/issues/78 5 | - type: NEW_FEATURE 6 | description: Add contrib template for generated Output Snapshot. 7 | issueLink: https://github.com/solo-io/skv2/issues/77 -------------------------------------------------------------------------------- /changelog/v0.19.9/add-to-scheme-change.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Update DeepEqual function to check for generated Equal() functions. 4 | issueLink: github.com/solo-io/skv2/issues/295 5 | - type: FIX 6 | description: Update Upsert function to use scheme.New() rather than DeepCopy(). 7 | issueLink: github.com/solo-io/skv2/issues/296 8 | -------------------------------------------------------------------------------- /changelog/v0.40.5/allow_ignored_kube_markers.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/18119 4 | resolvesIssue: false 5 | description: | 6 | Allows the user to define one or more kube markers to ignore. This is useful when using protos that contain 7 | unsupported kubebuilder decorators. -------------------------------------------------------------------------------- /changelog/v0.27.0/support-k8s-1.25.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/5158 4 | description: | 5 | Go dependencies updated to k8s v1.25; support k8s versions pre-v1.24, v1.24, and post-v1.24 6 | that gradually change how metadata.clusterName is accessed (i.e. deprecation -> removal) -------------------------------------------------------------------------------- /changelog/v0.31.1/custom-operator-namespace-rbac.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: HELM 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9491 4 | resolvesIssue: false 5 | description: > 6 | Updated the operator rbac template to write the `ClusterRoleBinding` resource to the custom operator namespace 7 | if it is provided in the operator values. 8 | -------------------------------------------------------------------------------- /changelog/v0.40.6/default-release-namespace-for-namespaced-rbac.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: "If namespacedRbac.namespaces is an empty list but namespacedRbac.resources is not, we will use a sane default of the Release.Namespace instead of ignoring the namespacedRbac.resources input." 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/15739 -------------------------------------------------------------------------------- /changelog/v0.13.3/fix-snapshot-merge-clone.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Fix for snapshot.Clone and snapshot.Merge to include Clusters field. 4 | issueLink: https://github.com/solo-io/skv2/issues/166 5 | - type: FIX 6 | description: Fix template imports broken by removal of builtin goimports. 7 | issueLink: https://github.com/solo-io/skv2/issues/168 8 | -------------------------------------------------------------------------------- /changelog/v0.23.0/remove-admin-service.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: | 4 | Re-remove the AdminService model underneath operators; this functionality will now be done directly by 5 | GME and other projects that need it with overrides. 6 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/4209 7 | resolvesIssue: false 8 | -------------------------------------------------------------------------------- /changelog/v0.30.1/custom-operator-namespace.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9491 4 | resolvesIssue: false 5 | description: > 6 | Allows setting a optional operator namespace on the operator that will be used when applying the 7 | deployment, service account, and service for said operator. 8 | -------------------------------------------------------------------------------- /changelog/v0.6.0/fix-upsert.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add controllerutils.ObjectsEqual for "Relevant" object equality. 4 | issueLink: https://github.com/solo-io/skv2/issues/82 5 | - type: FIX 6 | description: Upsert now properly assets objects are non-equal before performing an update. 7 | issueLink: https://github.com/solo-io/skv2/issues/81 8 | -------------------------------------------------------------------------------- /changelog/v0.17.19/fix-metrics.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Allow passing CustomImports directly to Protoc compiler. 4 | issueLink: https://github.com/solo-io/skv2/issues/242 5 | - type: FIX 6 | description: Fix panic caused by missing metrics initialization when running proto compiler directly. 7 | issueLink: https://github.com/solo-io/skv2/issues/241 8 | -------------------------------------------------------------------------------- /changelog/v0.25.0/secrets-watch-namespaces.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | NewClusterWatcher now takes in a third argument (`watchNamespaces`) to constrain the namespaces in which 5 | secrets will be watched. If empty, then all namespaces will be watched (which is the existing behavior). 6 | issueLink: https://github.com/solo-io/skv2/issues/399 7 | -------------------------------------------------------------------------------- /codegen/util/make.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "os" 5 | "os/exec" 6 | "path/filepath" 7 | ) 8 | 9 | func RunMake(target string, opts ...func(*exec.Cmd)) error { 10 | cmd := exec.Command("make", "-B", "-C", filepath.Dir(GoModPath()), target) 11 | cmd.Stderr = os.Stderr 12 | cmd.Stdout = os.Stdout 13 | for _, opt := range opts { 14 | opt(cmd) 15 | } 16 | return cmd.Run() 17 | } 18 | -------------------------------------------------------------------------------- /changelog/v0.4.0/mockgen-directive.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Adds the option to place `go:generate` directives for MockGen at the top of generated files. 4 | issueLink: https://github.com/solo-io/skv2/issues/50 5 | - type: BREAKING_CHANGE 6 | description: Generate client_providers in a `providers` subpackage 7 | issueLink: https://github.com/solo-io/skv2/issues/52 -------------------------------------------------------------------------------- /codegen/render/kube_codegen_renderer.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "github.com/solo-io/skv2/codegen/util" 5 | ) 6 | 7 | // runs kubernetes code-generator.sh 8 | // cannot be used to write output to memory 9 | // also generates deecopy code 10 | func KubeCodegen(group Group) error { 11 | return util.KubeCodegen(group.Group, group.Version, group.ApiRoot, group.Generators.Strings()) 12 | } 13 | -------------------------------------------------------------------------------- /changelog/v0.22.23/cluster-register-retry.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Adds a fibonacci-based retry mechanism to the `ReconcileSecret` function. Previously, if a cluster manager failed to start (for whatever reason) it would both a) fail b) break compute with dirty data. This resolves both such problems. 4 | issueLink: https://github.com/solo-io/gloo/issues/6081 5 | resolvesIssue: false -------------------------------------------------------------------------------- /pkg/multicluster/internal/k8s/certificates.k8s.io/v1beta1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1beta1 5 | 6 | import ( 7 | . "k8s.io/api/certificates/v1beta1" 8 | ) 9 | 10 | // CertificateSigningRequestSlice represents a slice of *CertificateSigningRequest 11 | type CertificateSigningRequestSlice []*CertificateSigningRequest 12 | -------------------------------------------------------------------------------- /pkg/resource/client.go: -------------------------------------------------------------------------------- 1 | package resource 2 | 3 | import "sigs.k8s.io/controller-runtime/pkg/client" 4 | 5 | //go:generate mockgen -source ./client.go -destination ./mocks/client.go 6 | 7 | // right now this just allows us to generate mocks for the client. 8 | // (ilackarms): eventually it might make sense to put clients for non-kube backends in this package 9 | type Client interface { 10 | client.Client 11 | } 12 | -------------------------------------------------------------------------------- /changelog/v0.22.30/edge-generics.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/solo-projects/issues/3946 4 | resolvesIssue: false 5 | description: > 6 | Use generic groups for the gloo-fed input reconcilers and snapshots so we can remove our dependency on external-apis groups. 7 | Also, update the deepcopy generation to account for the package structure used by gloo-fed. -------------------------------------------------------------------------------- /pkg/multicluster/internal/k8s/apiextensions.k8s.io/v1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1 5 | 6 | import ( 7 | . "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" 8 | ) 9 | 10 | // CustomResourceDefinitionSlice represents a slice of *CustomResourceDefinition 11 | type CustomResourceDefinitionSlice []*CustomResourceDefinition 12 | -------------------------------------------------------------------------------- /changelog/v0.3.0/contrib-set.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/44 4 | description: Add generation for set types and gomega matchers for those sets. Also create structure for contributions to skv2. 5 | - type: BREAKING_CHANGE 6 | issueLink: https://github.com/solo-io/skv2/issues/46 7 | description: Added the ability to provide multiple custom codegen templates. 8 | -------------------------------------------------------------------------------- /codegen/templates/build/user_setup.tmpl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -x 3 | 4 | # ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be) 5 | mkdir -p ${HOME} 6 | chown ${USER_UID}:0 ${HOME} 7 | chmod ug+rwx ${HOME} 8 | 9 | # runtime user will need to be able to self-insert in /etc/passwd 10 | chmod g+rw /etc/passwd 11 | 12 | # no need for this script to remain in the image after running 13 | rm $0 14 | -------------------------------------------------------------------------------- /pkg/multicluster/internal/k8s/admissionregistration.k8s.io/v1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1 5 | 6 | import ( 7 | . "k8s.io/api/admissionregistration/v1" 8 | ) 9 | 10 | // ValidatingWebhookConfigurationSlice represents a slice of *ValidatingWebhookConfiguration 11 | type ValidatingWebhookConfigurationSlice []*ValidatingWebhookConfiguration 12 | -------------------------------------------------------------------------------- /pkg/multicluster/internal/k8s/apiextensions.k8s.io/v1beta1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1beta1 5 | 6 | import ( 7 | . "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" 8 | ) 9 | 10 | // CustomResourceDefinitionSlice represents a slice of *CustomResourceDefinition 11 | type CustomResourceDefinitionSlice []*CustomResourceDefinition 12 | -------------------------------------------------------------------------------- /changelog/v0.31.1/generated-code-filter-comment.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Generated Kubernetes resource code that includes filters now has an additional comment with how to use the filter. 5 | This is needed as our filter code is opposite of regular predicate-style filtering (e.g. if a filter returns true, it is 6 | excluded rather than included), to prevent confusion for developers. -------------------------------------------------------------------------------- /codegen/templates/chart/values.yamltmpl: -------------------------------------------------------------------------------- 1 | [[- $values := .BuildChartValues ]] 2 | [[- $customValues := toNode $values.CustomValues $values.ValuesInlineDocs ]] 3 | [[- range $_, $operator := $values.Operators ]] 4 | [[- $customValues = mergeNodes $customValues (toNode (get_operator_values $operator) $values.ValuesInlineDocs) (toNode (get_operator_custom_values $operator) $values.ValuesInlineDocs) ]] 5 | [[- end ]] 6 | [[- fromNode $customValues ]] 7 | -------------------------------------------------------------------------------- /changelog/v0.2.0/non-blocking-reconciler.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: | 4 | Implement options struct for reconcile Loop, and by extension generated reconcilers. The only option currently is 5 | whether or now to `WaitForCacheSync`. The default will be false. This means that the `RunReconciler` function no 6 | longer needs to be called in a go routine. 7 | issueLink: https://github.com/solo-io/skv2/issues/35 -------------------------------------------------------------------------------- /changelog/v0.34.5/bump-proto-imports-timeout.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: DEPENDENCY_BUMP 3 | dependencyOwner: golang 4 | dependencyRepo: golang 5 | dependencyTag: v1.21.1 6 | - type: NON_USER_FACING 7 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/11090 8 | description: > 9 | Bump time before declaring a deadlock when processing proto imports to 15s instead of 5s. 10 | resolvesIssue: false -------------------------------------------------------------------------------- /codegen/test/chart-envvars/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /codegen/test/chart-readiness/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /changelog/v0.31.0/optional-operator-namespace.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/9491 4 | resolvesIssue: false 5 | description: > 6 | Remove optional operator namespace from operator options. Instead, set the operator namespace in the 7 | operator values and if the namespace exists it will be used, otherwise the default release namespace will be used. 8 | -------------------------------------------------------------------------------- /changelog/v0.40.3/replace-package-name-for-hashing.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/17070 4 | resolvesIssue: false 5 | description: > 6 | Add option to find and replace portion of the package name of a proto as it is used in the hash function. 7 | It is used to provide an option for users to maintain the hashing logic when the package name of a proto changes. -------------------------------------------------------------------------------- /codegen/render/render.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/solo-io/skv2/codegen/model" 7 | ) 8 | 9 | type Group = model.Group 10 | 11 | type Resource = model.Resource 12 | 13 | type Field = model.Field 14 | 15 | type HeaderOverride interface { 16 | Generate() string 17 | } 18 | 19 | type OutFile struct { 20 | Path string 21 | Permission os.FileMode 22 | Content string // set by Renderer 23 | } 24 | -------------------------------------------------------------------------------- /codegen/test/chart/all-volumes/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /codegen/test/chart/extra-volumes/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /codegen/test/chart/static-volumes/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /changelog/v0.17.20/allow-disable-openapi-validation.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: "Allow disabling OpenAPI Schema generation for proto files. CRDs which use protos for which validation has been disabled will have their corresponding OpenAPI schemas use `type: object` and `x-kubernetes-preserve-unknown-fields: true` to disable admission validation for CR schemas." 4 | issueLink: https://github.com/solo-io/skv2/issues/244 5 | -------------------------------------------------------------------------------- /changelog/v0.35.0/fix-AppendErrHandler-not-appending-errors-to-original-object.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/skv2/issues/517 4 | description: Fix issue where the AppendErrHandler was not appending errors to the original object. 5 | - type: BREAKING_CHANGE 6 | issueLink: https://github.com/solo-io/skv2/issues/517 7 | description: Usages of AppendErrHandler will now need to pass it by reference (&). 8 | -------------------------------------------------------------------------------- /codegen/test/chart-deployment-strategy/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-volumes/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /changelog/v0.22.15/fix-external-spec-types.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/3624 4 | resolvesIssue: false 5 | description: > 6 | skv2 outputs had numerous syntactical errors when generating code 7 | for groups that contain resources whose Spec and/or Status fields 8 | are types inported from elsewhere, rather than generated by the current 9 | .proto 10 | -------------------------------------------------------------------------------- /codegen/templates/code/types/type_helpers.gotmpl: -------------------------------------------------------------------------------- 1 | // Definitions for the Kubernetes types 2 | package {{ .Version }} 3 | 4 | import ( 5 | {{- if $.CustomTypesImportPath }} 6 | . "{{ $.CustomTypesImportPath }}" 7 | {{- end}} 8 | ) 9 | 10 | {{- range $resource := $.Resources }} 11 | 12 | // {{ $resource.Kind }}Slice represents a slice of *{{ $resource.Kind }} 13 | type {{ $resource.Kind }}Slice []*{{ $resource.Kind }} 14 | 15 | {{- end }} 16 | -------------------------------------------------------------------------------- /codegen/test/chart-pod-security-context/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /codegen/test/chart/env-priority/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: 6 | - name: ENV_VAR 7 | value: default 8 | extraEnvs: {} 9 | floatingUserId: false 10 | image: 11 | registry: gcr.io/painter 12 | repository: painter 13 | tag: v0.0.1 14 | ports: {} 15 | runAsUser: 10101 16 | serviceOverrides: null 17 | serviceType: "" 18 | sidecars: {} 19 | 20 | -------------------------------------------------------------------------------- /codegen/test/chart-svcport/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: 14 | foo-bar: 9900 15 | runAsUser: 10101 16 | serviceOverrides: null 17 | serviceType: "" 18 | sidecars: {} 19 | 20 | -------------------------------------------------------------------------------- /codegen/test/chart-conditional-deployment-strategy/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: {} 18 | 19 | -------------------------------------------------------------------------------- /pkg/kube_jsonpb/README.md: -------------------------------------------------------------------------------- 1 | This package is copied from https://github.com/golang/protobuf/commit/4846b58453b3708320bdb524f25cc5a1d9cda4d4 2 | 3 | 4 | ## Customizations 5 | 6 | 1. Serialize `int64` and `uint64` to integers, not strings. 7 | 8 | - removed [lines 547-549 from `encode.go`](https://github.com/golang/protobuf/blob/4846b58453b3708320bdb524f25cc5a1d9cda4d4/jsonpb/encode.go#L547-L549) 9 | 10 | 2. Removed `decode.go` as we don't need a custom unmarshaller -------------------------------------------------------------------------------- /codegen/templates/build/entrypoint.tmpl: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # This is documented here: 4 | # https://docs.openshift.com/container-platform/3.11/creating_images/guidelines.html#openshift-specific-guidelines 5 | 6 | if ! whoami &>/dev/null; then 7 | if [ -w /etc/passwd ]; then 8 | echo "${USER_NAME:-{{.OperatorName}}}:x:$(id -u):$(id -g):${USER_NAME:-{{.OperatorName}}} user:${HOME}:/sbin/nologin" >> /etc/passwd 9 | fi 10 | fi 11 | 12 | exec ${OPERATOR} $@ 13 | 14 | -------------------------------------------------------------------------------- /changelog/v0.22.26/remove-admin-service.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: | 4 | Remove unused admin service from Operator definitions. Following the refactor in #324, admin service generation 5 | wasn't actually being used in generated templates; this PR reverts those changes to go back to one-off 6 | generated charts for use cases that need it. 7 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/4209 8 | resolvesIssue: false 9 | -------------------------------------------------------------------------------- /changelog/v0.26.0/clustername-via-annotations.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/5158 4 | description: > 5 | In the ClusterResourceId interface, ClusterName field is replaced with GetAnnotations method, 6 | since k8s v1.24+ removes the ClusterName field from resources. 7 | Now, a resource annotation of "cluster.solo.io/cluster" is expected to hold a string of the cluster name. -------------------------------------------------------------------------------- /codegen/test/chart/image-pull-secrets/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | imagePullSecrets: [] 14 | ports: {} 15 | runAsUser: 10101 16 | serviceOverrides: null 17 | serviceType: "" 18 | sidecars: {} 19 | 20 | -------------------------------------------------------------------------------- /pkg/ezkube/object.go: -------------------------------------------------------------------------------- 1 | package ezkube 2 | 3 | import ( 4 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 5 | "k8s.io/apimachinery/pkg/runtime" 6 | ) 7 | 8 | // the EzKube Object is a wrapper for a kubernetes runtime.Object 9 | // which contains Kubernetes metadata 10 | type Object interface { 11 | runtime.Object 12 | v1.Object 13 | } 14 | 15 | // the EzKube Object is a wrapper for a kubernetes List object 16 | type List interface { 17 | runtime.Object 18 | v1.ListInterface 19 | } 20 | -------------------------------------------------------------------------------- /pkg/stats/metrics.go: -------------------------------------------------------------------------------- 1 | package stats 2 | 3 | import ( 4 | "net/http" 5 | 6 | "github.com/prometheus/client_golang/prometheus/promhttp" 7 | "sigs.k8s.io/controller-runtime/pkg/metrics" 8 | ) 9 | 10 | func AddMetrics(mux *http.ServeMux) { 11 | handler := promhttp.HandlerFor(metrics.Registry, promhttp.HandlerOpts{ 12 | ErrorHandling: promhttp.HTTPErrorOnError, 13 | }) 14 | profileDescriptions["/metrics"] = "Prometheus metrics" 15 | 16 | mux.Handle("/metrics", handler) 17 | } 18 | -------------------------------------------------------------------------------- /changelog/v0.12.0/check-crd-access.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: '*Contrib:* Extend the options for the Input Snapshot Builder to verify that the backing CRD for a an input resource has been registered to the source cluster. Note that skv2 does not differentiate between non-CRD and CRD-based resources, meaning that the user should be careful not to unintentionally perform CRD checks for non-CRD resources.' 4 | issueLink: https://github.com/solo-io/skv2/issues/140 5 | -------------------------------------------------------------------------------- /codegen/test/chart/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | global: 4 | securitySettings: 5 | floatingUserId: false 6 | painter: 7 | deploymentOverrides: null 8 | env: null 9 | extraEnvs: {} 10 | floatingUserId: false 11 | image: 12 | pullPolicy: IfNotPresent 13 | registry: quay.io/solo-io 14 | repository: painter 15 | tag: v0.0.0 16 | ports: {} 17 | runAsUser: 10101 18 | serviceOverrides: null 19 | serviceType: "" 20 | sidecars: {} 21 | 22 | -------------------------------------------------------------------------------- /changelog/v0.16.0/snapshot-deltas.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: > 4 | Generated snapshots (and their constituent sets) are produced by translation loops idempotently. Sometimes we wish to take the 'diff' between two snapshots, for example to distribute snapshot updates over the network in an optimized fashion (using deltas). This change adds generated functions on our snapshots and sets to automatically produce these deltas. 5 | issueLink: https://github.com/solo-io/skv2/issues/194 -------------------------------------------------------------------------------- /changelog/v0.22.29/reinstate-admin-service.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: | 4 | Temporarily reinstate the AdminService abstraction removed in https://github.com/solo-io/skv2/pull/358; this 5 | change will be reintroduced in a follow-up release, along with a change to the Operator abstraction to allow 6 | a similar model for multiple Services under a single Operator. 7 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/4209 8 | resolvesIssue: false 9 | -------------------------------------------------------------------------------- /changelog/v0.23.2/product-specific-helm-docs-tag.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: > 4 | Add a `product` tag to a helm values struct, which functions similarly to the omitChildren tag. 5 | When the docs generation code is run, the value of the `product` tag is compared with 6 | the value of the PRODUCT env variable, and the rendered doc line for that field is 7 | skipped if they do not match. 8 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/4147 -------------------------------------------------------------------------------- /pkg/multicluster/internal/k8s/core/v1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1 5 | 6 | import ( 7 | . "k8s.io/api/core/v1" 8 | ) 9 | 10 | // SecretSlice represents a slice of *Secret 11 | type SecretSlice []*Secret 12 | 13 | // ServiceAccountSlice represents a slice of *ServiceAccount 14 | type ServiceAccountSlice []*ServiceAccount 15 | 16 | // NamespaceSlice represents a slice of *Namespace 17 | type NamespaceSlice []*Namespace 18 | -------------------------------------------------------------------------------- /changelog/v0.22.0/cue-package-rename.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | Prefix cue protos with solo.io to avoid protobuf registration conflicts 5 | when importing cue fork and istio (which depends on upstream cue) 6 | issueLink: https://github.com/solo-io/skv2/issues/315 7 | resolvesIssue: false 8 | - type: DEPENDENCY_BUMP 9 | dependencyOwner: solo-io 10 | dependencyRepo: cue 11 | dependencyTag: v0.4.3 12 | description: Update cue to avoid protobuf registration conflicts -------------------------------------------------------------------------------- /codegen/render/things.test.io_v1_crds.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apiextensions.k8s.io/v1beta1 2 | kind: CustomResourceDefinition 3 | metadata: 4 | labels: 5 | app: painting-app 6 | app.kubernetes.io/name: painting-app 7 | name: paints.things.test.io 8 | spec: 9 | group: things.test.io 10 | names: 11 | kind: Paint 12 | listKind: PaintList 13 | plural: paints 14 | singular: paint 15 | scope: Namespaced 16 | subresources: 17 | status: {} 18 | versions: 19 | - name: v1 20 | served: true 21 | storage: true 22 | -------------------------------------------------------------------------------- /changelog/v0.43.2/clustername-via-generated-name.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/16342 4 | description: > 5 | Updated the ClusterResourceId interface to exclusively use the metadata.generatedName field for storing 6 | cluster names, completely eliminating access to the annotations map which was causing race conditions. 7 | This avoids the race condition when multiple goroutines read/write to the annotations map concurrently. 8 | resolvesIssue: false -------------------------------------------------------------------------------- /changelog/v0.7.0/local-resource-id.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Introduce new `ezkube.ClusterResourceId` which implements `GetClusterName()`, `ezkube.ResourceId` now removes it from its interface. 4 | issueLink: https://github.com/solo-io/skv2/issues/90 5 | - type: NON_USER_FACING 6 | description: remove deprecated fields from ObjectRef. 7 | - type: NEW_FEATURE 8 | description: Added `ezkube` functions for easily constructing ObjectRefs. 9 | issueLink: https://github.com/solo-io/skv2/issues/91 10 | 11 | -------------------------------------------------------------------------------- /pkg/ezkube/creationtimestamp.go: -------------------------------------------------------------------------------- 1 | package ezkube 2 | 3 | import "sigs.k8s.io/controller-runtime/pkg/client" 4 | 5 | // CreationTimestampCompare returns an integer comparing two resources lexicographically. 6 | // The result will be 0 if a == b, -1 if a < b, and +1 if a > b. 7 | func CreationTimestampCompare(a, b client.Object) int { 8 | if a.GetCreationTimestamp().Time.Equal(b.GetCreationTimestamp().Time) { 9 | return 0 10 | } 11 | if a.GetCreationTimestamp().Time.Before(b.GetCreationTimestamp().Time) { 12 | return -1 13 | } 14 | return 1 15 | } 16 | -------------------------------------------------------------------------------- /pkg/ezkube/funcs.go: -------------------------------------------------------------------------------- 1 | package ezkube 2 | 3 | import "context" 4 | 5 | // package scoped utility functions for interacting with kubernetes REST APIs easily 6 | 7 | // Uses the provided client to update the resource of the object 8 | // by retrieving it from the server 9 | func UpdateResourceVersion(c RestClient, ctx context.Context, obj Object) error { 10 | clone := obj.DeepCopyObject().(Object) 11 | 12 | if err := c.Get(ctx, clone); err != nil { 13 | return err 14 | } 15 | 16 | obj.SetResourceVersion(clone.GetResourceVersion()) 17 | return nil 18 | } 19 | -------------------------------------------------------------------------------- /changelog/v0.29.0/retry-options.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | NewClusterWatcher now takes in an additional `RetryOptions` argument, which specifies how retries should be done if we fail to create or start the remote cluster manager. 5 | issueLink: https://github.com/solo-io/gloo/issues/7814 6 | resolvesIssue: false 7 | - type: DEPENDENCY_BUMP 8 | dependencyOwner: avast 9 | dependencyRepo: retry-go 10 | dependencyTag: v4.3.3 11 | description: Update to latest retry-go version, which supports infinite retry. -------------------------------------------------------------------------------- /changelog/v0.38.0/sets-v2-iter.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/skv2/issues/543 4 | description: > 5 | v2 sets have been refactored to use a slice as the backing data structure, allowing for faster GC time of entire sets, 6 | and more efficient iteration over the set. A few methods have been removed, namely `List` and `UnsortedList`, both which have been 7 | replaced with a more accurate name: "FilterOutAndCreateList". In addition, a `Filter` and `Iter` method have been added to v2 sets. 8 | skipCI: "false" 9 | -------------------------------------------------------------------------------- /codegen/test/chart/namespaced-rbac/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | painter: 14 | enabled: true 15 | namespacedRbac: 16 | namespaces: [] 17 | resources: 18 | - secrets 19 | ports: {} 20 | runAsUser: 10101 21 | serviceOverrides: null 22 | serviceType: "" 23 | sidecars: {} 24 | 25 | -------------------------------------------------------------------------------- /changelog/v0.17.21/allow-disable-openapi-validation.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: "Allow disabling OpenAPI Schema generation for proto files. Fields within protos which have been marked with the option `[(cue.opt).disable_openapi_validation = true]` will have their corresponding OpenAPI schemas use `type: object` and `x-kubernetes-preserve-unknown-fields: true` to disable validation for those fields. This supercedes and replaces the solution that was implemented in https://github.com/solo-io/skv2/issues/244." 4 | issueLink: https://github.com/solo-io/skv2/issues/253 5 | -------------------------------------------------------------------------------- /changelog/v0.15.2/nil-kubeconfigs.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NON_USER_FACING 3 | description: > 4 | Error on nil kubeconfigs when registering clusters. When registering clusters, we now create 5 | the KubernetesCluster CRD on the management cluster, which requires us to have the management 6 | cluster's kube config passed in to the registration options. 7 | issueLink: https://github.com/solo-io/skv2/issues/184 8 | - type: NON_USER_FACING 9 | description: > 10 | Make SnapshotTemplateParameters ConstructTemplate function public. 11 | issueLink: https://github.com/solo-io/skv2/issues/184 -------------------------------------------------------------------------------- /changelog/v0.40.2/disable-kube-markers.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/17005 4 | resolvesIssue: false 5 | description: | 6 | Adds support for disabling kubebuilder markers and validations to omit them from the generated OpenAPI schema. 7 | - type: DEPENDENCY_BUMP 8 | description: Updates protoc-gen-openapi to v0.2.4, though this is not explicitly necessary to pick up the disable_kube_markers option. 9 | dependencyOwner: solo-io 10 | dependencyRepo: protoc-gen-openapi 11 | dependencyTag: v0.2.4 12 | -------------------------------------------------------------------------------- /pkg/utils/strings.go: -------------------------------------------------------------------------------- 1 | // Util functions used by generated code. 2 | package utils 3 | 4 | // Helper functions to check a string from a slice of strings. 5 | func ContainsString(slice []string, s string) bool { 6 | for _, item := range slice { 7 | if item == s { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | // Helper functions to remove string from a slice of strings. 15 | func RemoveString(slice []string, s string) (result []string) { 16 | for _, item := range slice { 17 | if item == s { 18 | continue 19 | } 20 | result = append(result, item) 21 | } 22 | return 23 | } 24 | -------------------------------------------------------------------------------- /changelog/v0.17.16/annotations-labels.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/skv2/issues/236 4 | description: > 5 | Add the ability to pass in additional labels and annotations 6 | to the skv2-generated helm templates. 7 | - type: HELM 8 | description: > 9 | Add `$operator.extraPodAnnotations`, `$operator.extraPodLabels`, 10 | `$operator.extraDeploymentAnnotations`, `$operator.extraDeploymentLabels`, 11 | `$operator.extraServiceAnnotations` and `$operator.extraServiceLabels`. 12 | issueLink: https://github.com/solo-io/skv2/issues/236 13 | -------------------------------------------------------------------------------- /changelog/v0.7.0/proto-package-override.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: > 4 | When using proto-based types for the `Spec` and `Status` fields of a resource, we currently require that the 5 | messages for these types are defined in a proto package that matches the group name of the resource. 6 | This change adds a new `ProtoPackage` option that can be used to override the name of the proto packages we inspect 7 | when looking for the messages. If the options in unspecified, it defaults to the group name of the resource. 8 | issueLink: https://github.com/solo-io/skv2/issues/98 9 | 10 | -------------------------------------------------------------------------------- /changelog/v0.13.1/snapshot-merge-clone.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add Merge() functionality to Output Snapshots. 4 | issueLink: https://github.com/solo-io/skv2/issues/157 5 | - type: NEW_FEATURE 6 | description: Add Clone() functionality to Output Snapshots. 7 | issueLink: https://github.com/solo-io/skv2/issues/161 8 | - type: FIX 9 | description: Fix incredibly slow generation of some files by removing the built-in `Imports` formatting inside SKv2 file writer. Ensure to run `goimports` manually after running skv2 generation. 10 | issueLink: https://github.com/solo-io/skv2/issues/162 11 | -------------------------------------------------------------------------------- /codegen/render/export_test.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "github.com/solo-io/skv2/codegen/model/values" 5 | goyaml "gopkg.in/yaml.v3" 6 | ) 7 | 8 | // this file makes some private package members visible for testing 9 | 10 | func ToNode(v interface{}, commentsConfig yamlCommentsConfig) goyaml.Node { 11 | return toNode(v, commentsConfig) 12 | } 13 | 14 | func FromNode(n goyaml.Node) string { 15 | return fromNode(n) 16 | } 17 | 18 | func ToJSONSchema(values values.UserHelmValues) string { 19 | return toJSONSchema(values) 20 | } 21 | 22 | func MergeNodes(nodes ...goyaml.Node) goyaml.Node { 23 | return mergeNodes(nodes...) 24 | } 25 | -------------------------------------------------------------------------------- /codegen/util/stringutils/pluralize.go: -------------------------------------------------------------------------------- 1 | package stringutils 2 | 3 | import "github.com/gertd/go-pluralize" 4 | 5 | // Define cases for pluralizing which pluralize library does not handle 6 | var SpecialCases = map[string]string{ 7 | "schema": "schemas", 8 | } 9 | 10 | // Pluralize is the canonical pluralization function for SKv2. It should be used to special case 11 | // when we want a different result than the underlying pluralize library 12 | func Pluralize(s string) string { 13 | c := pluralize.NewClient() 14 | for singular, plural := range SpecialCases { 15 | c.AddIrregularRule(singular, plural) 16 | } 17 | return c.Plural(s) 18 | } 19 | -------------------------------------------------------------------------------- /codegen/test/chart-sidecar/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: {} 14 | runAsUser: 10101 15 | serviceOverrides: null 16 | serviceType: "" 17 | sidecars: 18 | fooBar: 19 | env: null 20 | extraEnvs: {} 21 | image: 22 | pullPolicy: IfNotPresent 23 | registry: quay.io/solo-io 24 | repository: painter 25 | tag: v0.0.0 26 | 27 | -------------------------------------------------------------------------------- /codegen/templates/hack/boilerplate.go.txt.tmpl: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright The Project Authors. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ -------------------------------------------------------------------------------- /pkg/multicluster/internal/k8s/rbac.authorization.k8s.io/v1/type_helpers.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // Definitions for the Kubernetes types 4 | package v1 5 | 6 | import ( 7 | . "k8s.io/api/rbac/v1" 8 | ) 9 | 10 | // RoleSlice represents a slice of *Role 11 | type RoleSlice []*Role 12 | 13 | // RoleBindingSlice represents a slice of *RoleBinding 14 | type RoleBindingSlice []*RoleBinding 15 | 16 | // ClusterRoleSlice represents a slice of *ClusterRole 17 | type ClusterRoleSlice []*ClusterRole 18 | 19 | // ClusterRoleBindingSlice represents a slice of *ClusterRoleBinding 20 | type ClusterRoleBindingSlice []*ClusterRoleBinding 21 | -------------------------------------------------------------------------------- /pkg/multicluster/kubeconfig/interfaces.go: -------------------------------------------------------------------------------- 1 | package kubeconfig 2 | 3 | import ( 4 | "k8s.io/client-go/rest" 5 | "k8s.io/client-go/tools/clientcmd" 6 | clientcmdapi "k8s.io/client-go/tools/clientcmd/api" 7 | ) 8 | 9 | //go:generate mockgen -destination ./mocks/mock_interfaces.go -source ./interfaces.go 10 | 11 | type KubeLoader interface { 12 | GetRestConfigForContext(path string, context string) (*rest.Config, error) 13 | GetRawConfigForContext(path, context string) (clientcmdapi.Config, error) 14 | GetClientConfigForContext(path, context string) (clientcmd.ClientConfig, error) 15 | GetRestConfigFromBytes(config []byte) (*rest.Config, error) 16 | } 17 | -------------------------------------------------------------------------------- /changelog/v0.40.5/globalFloatingUserId_in_delpoyment_templates.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | issueLink: https://github.com/solo-io/gloo/issues/5034 4 | resolvesIssue: false 5 | description: | 6 | Adds the ability to render deployments templates with a reference global floatingUserId field. This field is used to globally unset 7 | the runAsUser field in container securityContexts (like the painter's floatingUserId) and supresses the rendering of the 8 | pod's securityContext. This feature is enabled by setting the GlobalFloatingUserIdPath in the Operator to the path of the global field, 9 | and defaults to an empty string. -------------------------------------------------------------------------------- /changelog/v0.1.0/deepcopy.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: |2 4 | 5 | Implement custom generation of Deepcopy methods for Kubernetes types. Current limitations in the generation of standard Deepcopy code in with kube-codegen prevent compatibility with types containing Protobuf Oneofs. This change implements a naive solution, generating proto.Clone-based deepcopy methods. 6 | 7 | The use of the deepcopy codegen package is currently deprecated and disabled by default. set your `codegen.Command`'s `Generators` to []GeneratorTypes{GeneratorType_Deepcopy} to preserve the original behavior. 8 | issueLink: https://github.com/solo-io/skv2/issues/18 -------------------------------------------------------------------------------- /codegen/render/README.md: -------------------------------------------------------------------------------- 1 | ### Testing 2 | 3 | In order to run all tests in this package you must set the REMOTE_CLUSTER_CONTEXT env var to the name of a context in 4 | your kubeconfig. To quickly provision two [kind](https://github.com/kubernetes-sigs/kind) clusters for testing, run 5 | `./ci/setup-kind.sh `. This will create two kind clusters, `skv2-test-master` and 6 | ``, and set your current context to `kind-skv2-test-master`. To run the multicluster tests in this 7 | package, you can then use `REMOTE_CLUSTER_CONTEXT=kind- TEST_PKG=codegen/render make run-tests`. 8 | To cleanup the kind clusters, run `./ci/teardown-kind.sh`. -------------------------------------------------------------------------------- /codegen/util/proto.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "bytes" 5 | 6 | "github.com/golang/protobuf/jsonpb" 7 | "github.com/golang/protobuf/proto" 8 | "sigs.k8s.io/yaml" 9 | ) 10 | 11 | var JsonPbMarshaler = &jsonpb.Marshaler{} 12 | 13 | func UnmarshalYaml(data []byte, into proto.Message) error { 14 | jsn, err := yaml.YAMLToJSON([]byte(data)) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | return jsonpb.Unmarshal(bytes.NewBuffer(jsn), into) 20 | } 21 | 22 | func MarshalYaml(m proto.Message) ([]byte, error) { 23 | s, err := JsonPbMarshaler.MarshalToString(m) 24 | if err != nil { 25 | return nil, err 26 | } 27 | return yaml.JSONToYAML([]byte(s)) 28 | } 29 | -------------------------------------------------------------------------------- /changelog/v0.43.3/helm-minify-json-schems.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/20411 4 | description: > 5 | With this change, the `values.schema.json` file generated as part of the Helm chart generation is no longer 6 | prettified. This drastically reduces the size of the file and minimizes the changes of the new maximum file size 7 | limit [introduced by Helm](https://github.com/helm/helm/commit/e4da49785aa6e6ee2b86efd5dd9e43400318262b) in `v3.17.3`. 8 | There are no functional changes. Human users can still prettify the file using external tools (e.g. `jq`) if necessary. 9 | resolvesIssue: false 10 | -------------------------------------------------------------------------------- /codegen/test/chart-no-desc/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: 6 | - name: FOO 7 | value: BAR 8 | extraEnvs: {} 9 | floatingUserId: false 10 | image: 11 | pullPolicy: IfNotPresent 12 | registry: quay.io/solo-io 13 | repository: painter 14 | tag: v0.0.0 15 | ports: {} 16 | runAsUser: 10101 17 | serviceOverrides: null 18 | serviceType: "" 19 | sidecars: 20 | palette: 21 | env: null 22 | extraEnvs: {} 23 | image: 24 | pullPolicy: IfNotPresent 25 | registry: quay.io/solo-io 26 | repository: palette 27 | tag: v0.0.0 28 | 29 | -------------------------------------------------------------------------------- /codegen/test/chart-sidecar-svcport/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | painter: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: 9 | pullPolicy: IfNotPresent 10 | registry: quay.io/solo-io 11 | repository: painter 12 | tag: v0.0.0 13 | ports: 14 | foo-bar: 9900 15 | runAsUser: 10101 16 | serviceOverrides: null 17 | serviceType: "" 18 | sidecars: 19 | sidecarPainter: 20 | env: null 21 | extraEnvs: {} 22 | image: 23 | pullPolicy: IfNotPresent 24 | registry: quay.io/solo-io 25 | repository: painter 26 | tag: v0.0.0 27 | 28 | -------------------------------------------------------------------------------- /changelog/v0.15.2/custom-templates.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: > 4 | Make SnapshotTemplateParameters ConstructTemplate take in a params templateContents string instead 5 | of a templatePath string, as well as a mockgenDirective bool for additional customization. 6 | issueLink: https://github.com/solo-io/skv2/issues/184 7 | - type: NEW_FEATURE 8 | description: > 9 | Change hackClusterConfigForLocalTestingInKIND to just hackClusterConfigForLocalTesting, and remove 10 | the requirement that it be a KIND cluster. Respect the `--api-server-address` flag 11 | regardless of whether we use KIND. 12 | issueLink: https://github.com/solo-io/skv2/issues/176 -------------------------------------------------------------------------------- /pkg/kube_jsonpb/internal/testprotos/regenerate.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright 2020 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | # NOTE: The integration scripts deliberately do not check to 7 | # make sure that the test protos have been regenerated. 8 | # It is intentional that older versions of the .pb.go files 9 | # are checked in to ensure that they continue to function. 10 | # 11 | # Versions used: 12 | # protoc: v3.9.1 13 | # protoc-gen-go: v1.3.2 14 | 15 | for X in $(find . -name "*.proto" | sed "s|^\./||"); do 16 | protoc -I$(pwd) --go_out=paths=source_relative:. $X 17 | done -------------------------------------------------------------------------------- /codegen/test/chart/conditional-sidecar/values.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | glooAgent: 4 | deploymentOverrides: null 5 | env: null 6 | extraEnvs: {} 7 | floatingUserId: false 8 | image: {} 9 | ports: {} 10 | runAsUser: 10101 11 | serviceOverrides: null 12 | serviceType: "" 13 | sidecars: {} 14 | glooMgmtServer: 15 | deploymentOverrides: null 16 | env: null 17 | extraEnvs: {} 18 | floatingUserId: false 19 | image: 20 | registry: gcr.io/gloo-mesh 21 | repository: gloo-mesh-mgmt-server 22 | tag: 0.0.1 23 | ports: 24 | grpc: 9900 25 | runAsUser: 10101 26 | serviceOverrides: null 27 | serviceType: "" 28 | sidecars: {} 29 | 30 | -------------------------------------------------------------------------------- /changelog/v0.44.1/cve-go-1-24-6.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: DEPENDENCY_BUMP 3 | dependencyOwner: solo-io 4 | dependencyRepo: go-utils 5 | dependencyTag: v0.28.6 6 | issueLink: https://github.com/solo-io/solo-projects/issues/8512 7 | resolvesIssue: false 8 | - type: DEPENDENCY_BUMP 9 | dependencyOwner: solo-io 10 | dependencyRepo: k8s-utils 11 | dependencyTag: v0.11.1 12 | issueLink: https://github.com/solo-io/solo-projects/issues/8512 13 | resolvesIssue: false 14 | - type: DEPENDENCY_BUMP 15 | dependencyOwner: golang 16 | dependencyRepo: go 17 | dependencyTag: v1.24.6 18 | description: "Update Go to 1.24.6" 19 | issueLink: https://github.com/solo-io/solo-projects/issues/8512 20 | resolvesIssue: false 21 | -------------------------------------------------------------------------------- /ci/check-code-and-docs-gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -ex 4 | 5 | go mod tidy 6 | 7 | if [[ $(git status --porcelain | wc -l) -ne 0 ]]; then 8 | echo "Need to run go mod tidy before committing" 9 | git diff 10 | exit 1; 11 | fi 12 | 13 | if [ ! -f .gitignore ]; then 14 | echo "_output" > .gitignore 15 | fi 16 | 17 | set +e 18 | 19 | REGENERATE_CLIENTS=1 make generated-code -B > /dev/null 20 | if [[ $? -ne 0 ]]; then 21 | echo "Go code generation failed" 22 | exit 1; 23 | fi 24 | 25 | if [[ $(git status --porcelain | wc -l) -ne 0 ]]; then 26 | echo "Generating code produced a non-empty diff" 27 | echo "Try running 'make install-go-tools generated-code -B' then re-pushing." 28 | git status --porcelain 29 | git diff | cat 30 | exit 1; 31 | fi -------------------------------------------------------------------------------- /pkg/utils/logger.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/go-logr/logr" 7 | logf "sigs.k8s.io/controller-runtime/pkg/log" 8 | ) 9 | 10 | type loggerKey struct{} 11 | 12 | // store the logger in the context for propagation to children 13 | func ContextWithLogger(ctx context.Context, logger logr.Logger) context.Context { 14 | return context.WithValue(ctx, loggerKey{}, logger) 15 | } 16 | 17 | // retrieve the logger from the context 18 | // returns the default logger if not set 19 | func LoggerFromContext(ctx context.Context) logr.Logger { 20 | logger := ctx.Value(loggerKey{}) 21 | if logger == nil { 22 | return logf.Log 23 | } 24 | log, ok := logger.(logr.Logger) 25 | if !ok { 26 | return logf.Log 27 | } 28 | return log 29 | } 30 | -------------------------------------------------------------------------------- /ci/changelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | CURRENT_VERSION=$(git describe --tags --always --abbrev=0) 6 | OLD_VERSION=$(echo -n $CURRENT_VERSION | sed -E 's/.*[^0-9]([0-9]+)$/\1/') 7 | NEW_VERSION=$((OLD_VERSION + 1)) 8 | NEXT_VERSION=$(echo -n $CURRENT_VERSION | sed -E "s/$OLD_VERSION$/$NEW_VERSION/") 9 | BRANCH_NAME=$(git symbolic-ref -q HEAD | sed 's#^.*/##') 10 | DESCRIPTION=${DESCRIPTION:=""} 11 | SKIP_CI=${SKIP_CI:-"false"} 12 | 13 | mkdir -p "changelog/$NEXT_VERSION" 14 | 15 | cat < "changelog/$NEXT_VERSION/$BRANCH_NAME.yaml" 16 | changelog: 17 | - type: NON_USER_FACING 18 | issueLink: ${ISSUE_LINK} 19 | description: > 20 | "${DESCRIPTION}" 21 | skipCI: "${SKIP_CI}" 22 | EOF 23 | echo Created "changelog/$NEXT_VERSION/$BRANCH_NAME.yaml" 24 | -------------------------------------------------------------------------------- /pkg/ezkube/gvk.go: -------------------------------------------------------------------------------- 1 | package ezkube 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/rotisserie/eris" 7 | "k8s.io/apimachinery/pkg/runtime/schema" 8 | ) 9 | 10 | // parses a string returned by a gvk.String() back into a gvk 11 | func ParseGroupVersionKindString(gvk string) (schema.GroupVersionKind, error) { 12 | parts := strings.Split(gvk, ", Kind=") 13 | if len(parts) != 2 { 14 | return schema.GroupVersionKind{}, eris.Errorf("invalid gkv string (missing ', Kind='): %v", gvk) 15 | } 16 | gv, kind := parts[0], parts[1] 17 | groupVersion, err := schema.ParseGroupVersion(gv) 18 | if err != nil { 19 | return schema.GroupVersionKind{}, err 20 | } 21 | return schema.GroupVersionKind{ 22 | Group: groupVersion.Group, 23 | Version: groupVersion.Version, 24 | Kind: kind, 25 | }, nil 26 | } 27 | -------------------------------------------------------------------------------- /changelog/v0.7.0/apply-multicluster.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: NEW_FEATURE 3 | description: Add controllerutils.UpdateStatus method for updating an object status IFF it is not equal to the existing object's status. 4 | issueLink: https://github.com/solo-io/skv2/issues/86 5 | - type: NEW_FEATURE 6 | description: Add SyncStatuses method to input snapshots. Use this to update the status of objects in an input snapshot (in memory), then apply the differences by running `inputSnapshot.SyncStatuses`. 7 | issueLink: https://github.com/solo-io/skv2/issues/95 8 | - type: NEW_FEATURE 9 | description: Add ApplyMultiCluster function to output snapshot to automaticaly apply resources across multiple clusters using a multicluster client and the `ClusterName` field on the resources. 10 | issueLink: https://github.com/solo-io/skv2/issues/94 11 | 12 | -------------------------------------------------------------------------------- /codegen/test/chart/conditional-crds/templates/things.test.io_crds.yaml: -------------------------------------------------------------------------------- 1 | # Code generated by skv2. DO NOT EDIT. 2 | 3 | 4 | {{- if $.Values.installValue }} 5 | apiVersion: apiextensions.k8s.io/v1 6 | kind: CustomResourceDefinition 7 | metadata: 8 | annotations: 9 | crd.solo.io/specHash: 8523302ab12f9228 10 | labels: 11 | app: "" 12 | app.kubernetes.io/name: "" 13 | name: paints.things.test.io 14 | spec: 15 | group: things.test.io 16 | names: 17 | kind: Paint 18 | listKind: PaintList 19 | plural: paints 20 | singular: paint 21 | scope: Namespaced 22 | versions: 23 | - name: v1 24 | schema: 25 | openAPIV3Schema: 26 | type: object 27 | x-kubernetes-preserve-unknown-fields: true 28 | served: true 29 | storage: false 30 | subresources: 31 | status: {} 32 | --- 33 | {{- end }} 34 | 35 | -------------------------------------------------------------------------------- /pkg/handler/register_queue_handler.go: -------------------------------------------------------------------------------- 1 | package handler 2 | 3 | import ( 4 | "context" 5 | "sync" 6 | 7 | apqueue "github.com/solo-io/skv2/pkg/workqueue" 8 | "k8s.io/client-go/util/workqueue" 9 | "sigs.k8s.io/controller-runtime/pkg/event" 10 | "sigs.k8s.io/controller-runtime/pkg/handler" 11 | "sigs.k8s.io/controller-runtime/pkg/reconcile" 12 | ) 13 | 14 | // QueueRegisteringHandler registers the queue on the first create event 15 | // it receives to a multi cluster queue registry. 16 | func QueueRegisteringHandler(cluster string, queues *apqueue.MultiClusterQueues) handler.EventHandler { 17 | do := &sync.Once{} 18 | return &handler.Funcs{ 19 | CreateFunc: func(ctx context.Context, _ event.CreateEvent, queue workqueue.TypedRateLimitingInterface[reconcile.Request]) { 20 | do.Do(func() { 21 | queues.Set(cluster, queue) 22 | }) 23 | }, 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /pkg/stats/pprof.go: -------------------------------------------------------------------------------- 1 | package stats 2 | 3 | import ( 4 | "net/http" 5 | "net/http/pprof" 6 | 7 | deltapprof "github.com/grafana/pyroscope-go/godeltaprof/http/pprof" 8 | ) 9 | 10 | func AddPprof(mux *http.ServeMux) { 11 | mux.HandleFunc("/debug/pprof/", pprof.Index) 12 | mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline) 13 | mux.HandleFunc("/debug/pprof/profile", pprof.Profile) 14 | mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol) 15 | mux.HandleFunc("/debug/pprof/trace", pprof.Trace) 16 | mux.HandleFunc("/debug/pprof/delta_heap", deltapprof.Heap) 17 | mux.HandleFunc("/debug/pprof/delta_threadcreate", deltapprof.Mutex) 18 | mux.HandleFunc("/debug/pprof/delta_block", deltapprof.Block) 19 | 20 | profileDescriptions["/debug/pprof/"] = `PProf related things:
21 | full goroutine stack dump 22 | ` 23 | } 24 | -------------------------------------------------------------------------------- /changelog/v0.43.0/go-124.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | Bump dependencies to support Go 1.24 5 | issueLink: https://github.com/solo-io/solo-projects/issues/7609 6 | resolvesIssue: false 7 | - dependencyOwner: solo-io 8 | dependencyRepo: go-utils 9 | dependencyTag: v0.28.4 10 | type: DEPENDENCY_BUMP 11 | - dependencyOwner: solo-io 12 | dependencyRepo: anyvendor 13 | dependencyTag: v0.2.0 14 | type: DEPENDENCY_BUMP 15 | - dependencyOwner: solo-io 16 | dependencyRepo: k8s-utils 17 | dependencyTag: v0.10.0 18 | type: DEPENDENCY_BUMP 19 | - dependencyOwner: solo-io 20 | dependencyRepo: protoc-gen-ext 21 | dependencyTag: v0.1.0 22 | type: DEPENDENCY_BUMP 23 | - dependencyOwner: solo-io 24 | dependencyRepo: protoc-gen-openapi 25 | dependencyTag: v0.3.0 26 | type: DEPENDENCY_BUMP -------------------------------------------------------------------------------- /contrib/pkg/snapshot/redact.go: -------------------------------------------------------------------------------- 1 | package snapshot 2 | 3 | import ( 4 | v1 "k8s.io/api/core/v1" 5 | "sigs.k8s.io/controller-runtime/pkg/client" 6 | ) 7 | 8 | const ( 9 | redactedString = "" 10 | ) 11 | 12 | // RedactSecretData returns a copy with sensitive information redacted 13 | func RedactSecretData(obj client.Object) client.Object { 14 | if sec, ok := obj.(*v1.Secret); ok { 15 | redacted := sec.DeepCopyObject().(*v1.Secret) 16 | for k := range redacted.Data { 17 | redacted.Data[k] = []byte(redactedString) 18 | } 19 | 20 | // Also need to check for kubectl apply, last applied config. 21 | // Secret data can be found there as well if that's how the secret is created 22 | for key, _ := range redacted.Annotations { 23 | if key == v1.LastAppliedConfigAnnotation { 24 | redacted.Annotations[key] = redactedString 25 | } 26 | } 27 | return redacted 28 | } 29 | return obj 30 | } 31 | -------------------------------------------------------------------------------- /changelog/v0.8.0/kubecluster-cr.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: FIX 3 | description: Call reconcileFunc synchronously in input reconciler. 4 | issueLink: https://github.com/solo-io/skv2/issues/102 5 | - type: BREAKING_CHANGE 6 | description: Call reconcileFunc synchronously in input reconciler. 7 | issueLink: https://github.com/solo-io/skv2/issues/102 8 | - type: BREAKING_CHANGE 9 | description: Introduce ClusterDomain parameter for cluster registrant. Rename "LocalClusterDomainOverride" to "APIServerAddress". 10 | issueLink: https://github.com/solo-io/skv2/issues/99 11 | - type: NEW_FEATURE 12 | description: Cluster registration now creates a KubernetesCluster resource. 13 | issueLink: https://github.com/solo-io/skv2/issues/99 14 | - type: NEW_FEATURE 15 | description: Exposed KubernetesCluster codegen group. 16 | issueLink: https://github.com/solo-io/skv2/issues/100 17 | 18 | 19 | -------------------------------------------------------------------------------- /codegen/render/build_renderer.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import "github.com/solo-io/skv2/codegen/model" 4 | 5 | // renders files used to build the operator 6 | type BuildRenderer struct { 7 | templateRenderer 8 | } 9 | 10 | var defaultBuildInputs = func(build model.Build) inputTemplates { 11 | return inputTemplates{ 12 | "build/Dockerfile.tmpl": { 13 | Path: build.Repository + "/Dockerfile", 14 | }, 15 | } 16 | } 17 | 18 | func RenderBuild(build model.Build) ([]OutFile, error) { 19 | defaultBuildRenderer := BuildRenderer{ 20 | templateRenderer: DefaultTemplateRenderer, 21 | } 22 | return defaultBuildRenderer.Render(build) 23 | } 24 | 25 | func (r BuildRenderer) Render(build model.Build) ([]OutFile, error) { 26 | templatesToRender := defaultBuildInputs(build) 27 | 28 | files, err := r.renderCoreTemplates(templatesToRender, build) 29 | if err != nil { 30 | return nil, err 31 | } 32 | 33 | return files, nil 34 | } 35 | -------------------------------------------------------------------------------- /pkg/stats/server.go: -------------------------------------------------------------------------------- 1 | package stats 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | "net/http" 7 | ) 8 | 9 | func MustStartServerBackground( 10 | snapshotHistory SnapshotHistory, 11 | port uint32, 12 | addHandlers ...func(mux *http.ServeMux, profiles map[string]string), 13 | ) { 14 | go func() { 15 | if err := StartServer(snapshotHistory, port, addHandlers...); err != nil { 16 | log.Fatal(err) 17 | } 18 | }() 19 | } 20 | 21 | func StartServer( 22 | snapshotHistory SnapshotHistory, 23 | port uint32, 24 | addHandlers ...func(mux *http.ServeMux, profiles map[string]string), 25 | ) error { 26 | mux := http.NewServeMux() 27 | index := NewIndex(snapshotHistory) 28 | mux.HandleFunc("/", index.Generate) 29 | AddPprof(mux) 30 | AddMetrics(mux) 31 | AddSnapshots(mux, snapshotHistory) 32 | for _, h := range addHandlers { 33 | h(mux, profileDescriptions) 34 | } 35 | return http.ListenAndServe(fmt.Sprintf(":%v", port), mux) 36 | } 37 | -------------------------------------------------------------------------------- /ci/oss_compliance/oss_compliance.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/solo-io/go-list-licenses/pkg/license" 8 | ) 9 | 10 | func main() { 11 | packages := []string{ 12 | "github.com/solo-io/skv2/pkg/resource", 13 | "github.com/solo-io/skv2/pkg/utils", 14 | "github.com/solo-io/skv2/pkg/source", 15 | "github.com/solo-io/skv2/pkg/stats", 16 | "github.com/solo-io/skv2/pkg/verifier", 17 | "github.com/solo-io/skv2/pkg/workqueue", 18 | } 19 | 20 | // dependencies for this package which are used on mac, and will not be present in linux CI 21 | macOnlyDependencies := []string{ 22 | "github.com/mitchellh/go-homedir", 23 | "github.com/containerd/continuity", 24 | "golang.org/x/sys/unix", 25 | } 26 | 27 | app := license.Cli(packages, macOnlyDependencies) 28 | if err := app.Execute(); err != nil { 29 | fmt.Errorf("unable to run oss compliance check: %v\n", err) 30 | os.Exit(1) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /codegen/model/package_names.go: -------------------------------------------------------------------------------- 1 | package model 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | 7 | "github.com/solo-io/skv2/codegen/util/stringutils" 8 | ) 9 | 10 | var ( 11 | // function for determining the relative path of generated api types package 12 | TypesRelativePath = func(kind, version string) string { 13 | return fmt.Sprintf("pkg/apis/%v/%v", strings.ToLower(stringutils.Pluralize(kind)), version) 14 | } 15 | 16 | // function for determining the relative path of generated schduler package 17 | SchedulerRelativePath = "pkg/scheduler" 18 | 19 | // function for determining the relative path of generated finalizer package 20 | FinalizerRelativePath = "pkg/finalizer" 21 | 22 | // function for determining the relative path of generated parameters package 23 | ParametersRelativePath = "pkg/parameters" 24 | 25 | // function for determining the relative path of generated metrics package 26 | MetricsRelativePath = "pkg/metrics" 27 | ) 28 | -------------------------------------------------------------------------------- /pkg/multicluster/kubeconfig/remote.go: -------------------------------------------------------------------------------- 1 | package kubeconfig 2 | 3 | import ( 4 | "k8s.io/client-go/tools/clientcmd/api" 5 | ) 6 | 7 | func BuildRemoteCfg( 8 | remoteCluster *api.Cluster, 9 | remoteCtx *api.Context, 10 | clusterName, token string, 11 | ) api.Config { 12 | return api.Config{ 13 | Kind: "Secret", 14 | APIVersion: "kubernetes_core", 15 | Preferences: api.Preferences{}, 16 | Clusters: map[string]*api.Cluster{ 17 | clusterName: remoteCluster, 18 | }, 19 | AuthInfos: map[string]*api.AuthInfo{ 20 | clusterName: { 21 | Token: token, 22 | }, 23 | }, 24 | Contexts: map[string]*api.Context{ 25 | clusterName: { 26 | LocationOfOrigin: remoteCtx.LocationOfOrigin, 27 | Cluster: clusterName, 28 | AuthInfo: clusterName, 29 | Namespace: remoteCtx.Namespace, 30 | Extensions: remoteCtx.Extensions, 31 | }, 32 | }, 33 | CurrentContext: clusterName, 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /codegen/render/mockgen.go: -------------------------------------------------------------------------------- 1 | package render 2 | 3 | import ( 4 | "fmt" 5 | "path/filepath" 6 | "regexp" 7 | "strings" 8 | ) 9 | 10 | func PrependMockgenDirective(files []OutFile) { 11 | // prepend each .go file with a go:generate directive to run mockgen on the file 12 | for i, file := range files { 13 | if !strings.HasSuffix(file.Path, ".go") { 14 | continue 15 | } 16 | // only add the directive if the file contains interfaces 17 | if !containsInterface(file.Content) { 18 | continue 19 | } 20 | 21 | baseFile := filepath.Base(file.Path) 22 | mockgenComment := fmt.Sprintf("//go:generate mockgen -source ./%v -destination mocks/%v", baseFile, baseFile) 23 | 24 | file.Content = fmt.Sprintf("%v\n\n%v", mockgenComment, file.Content) 25 | files[i] = file 26 | } 27 | } 28 | 29 | var interfaceRegex = regexp.MustCompile("type .* interface") 30 | 31 | func containsInterface(content string) bool { 32 | return interfaceRegex.MatchString(content) 33 | } 34 | -------------------------------------------------------------------------------- /api/generate.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/solo-io/skv2/api/k8s" 7 | "github.com/solo-io/skv2/api/multicluster/v1alpha1" 8 | "github.com/solo-io/skv2/codegen/skv2_anyvendor" 9 | 10 | "github.com/solo-io/skv2/codegen" 11 | "github.com/solo-io/skv2/codegen/model" 12 | ) 13 | 14 | func main() { 15 | log.Println("starting kube client generation") 16 | 17 | skv2Imports := skv2_anyvendor.CreateDefaultMatchOptions([]string{ 18 | "api/**/*.proto", 19 | }) 20 | 21 | groups := []model.Group{ 22 | v1alpha1.Group, 23 | } 24 | 25 | // add internal k8s groups we depend on 26 | groups = append(groups, k8s.Groups()...) 27 | 28 | skv2Cmd := codegen.Command{ 29 | AppName: "skv2", 30 | Groups: groups, 31 | AnyVendorConfig: skv2Imports, 32 | RenderProtos: true, 33 | } 34 | if err := skv2Cmd.Execute(); err != nil { 35 | log.Fatal(err) 36 | } 37 | 38 | log.Printf("Finished generating multicluster apis\n") 39 | } 40 | -------------------------------------------------------------------------------- /pkg/multicluster/client.go: -------------------------------------------------------------------------------- 1 | package multicluster 2 | 3 | import ( 4 | "github.com/rotisserie/eris" 5 | "sigs.k8s.io/controller-runtime/pkg/client" 6 | ) 7 | 8 | // Client exposes client.Client for multiple clusters. 9 | type Client interface { 10 | // List available clusters 11 | ClusterSet 12 | 13 | // Cluster returns a client.Client for the given cluster. 14 | Cluster(name string) (client.Client, error) 15 | } 16 | 17 | type mcClient struct { 18 | managers ManagerSet 19 | } 20 | 21 | var _ Client = &mcClient{} 22 | 23 | func NewClient(managers ManagerSet) *mcClient { 24 | return &mcClient{managers: managers} 25 | } 26 | 27 | func (c *mcClient) Cluster(name string) (client.Client, error) { 28 | mgr, err := c.managers.Cluster(name) 29 | if err != nil { 30 | return nil, eris.Wrapf(err, "failed to get client for cluster %v", name) 31 | } 32 | return mgr.GetClient(), nil 33 | } 34 | 35 | func (c *mcClient) ListClusters() []string { 36 | return c.managers.ListClusters() 37 | } 38 | -------------------------------------------------------------------------------- /changelog/v0.32.0/k8s-1.27-upgrade.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | issueLink: https://github.com/solo-io/gloo/issues/8214 4 | resolvesIssue: false 5 | description: Upgrade Kubernetes dependencies to 1.27.X 6 | - type: DEPENDENCY_BUMP 7 | dependencyOwner: k8s.io 8 | dependencyRepo: api 9 | dependencyTag: v0.27.3 10 | - type: DEPENDENCY_BUMP 11 | dependencyOwner: k8s.io 12 | dependencyRepo: apiextensions-apiserver 13 | dependencyTag: v0.27.3 14 | - type: DEPENDENCY_BUMP 15 | dependencyOwner: k8s.io 16 | dependencyRepo: apimachinery 17 | dependencyTag: v0.27.3 18 | - type: DEPENDENCY_BUMP 19 | dependencyOwner: k8s.io 20 | dependencyRepo: client-go 21 | dependencyTag: v0.27.3 22 | - type: DEPENDENCY_BUMP 23 | dependencyOwner: k8s.io 24 | dependencyRepo: code-generator 25 | dependencyTag: v0.27.3 26 | - type: DEPENDENCY_BUMP 27 | dependencyOwner: sigs.k8s.io 28 | dependencyRepo: controller-runtime 29 | dependencyTag: v0.15.0 -------------------------------------------------------------------------------- /pkg/multicluster/reconcile.go: -------------------------------------------------------------------------------- 1 | package multicluster 2 | 3 | import ( 4 | "context" 5 | 6 | "github.com/solo-io/skv2/pkg/ezkube" 7 | "github.com/solo-io/skv2/pkg/reconcile" 8 | "sigs.k8s.io/controller-runtime/pkg/predicate" 9 | ) 10 | 11 | type Reconciler interface { 12 | // reconcile an object 13 | // requeue the object if returning an error, or a non-zero "requeue-after" duration 14 | Reconcile(cluster string, object ezkube.Object) (reconcile.Result, error) 15 | } 16 | 17 | type DeletionReconciler interface { 18 | // we received a reconcile request for an object that was removed from the cache 19 | // requeue the object if returning an error, 20 | ReconcileDeletion(cluster string, request reconcile.Request) error 21 | } 22 | 23 | // Loop runs resource reconcilers until the context gets cancelled 24 | type Loop interface { 25 | // AddReconciler adds a reconciler to a slice of reconcilers that will be run against 26 | AddReconciler(ctx context.Context, reconciler Reconciler, predicates ...predicate.Predicate) 27 | } 28 | -------------------------------------------------------------------------------- /pkg/utils/in_cluster_namespace.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "fmt" 5 | "io/ioutil" 6 | "os" 7 | ) 8 | 9 | const inClusterNamespacePath = "/var/run/secrets/kubernetes.io/serviceaccount/namespace" 10 | 11 | // returns the namespace in which the current process is executing, if running inside k8s 12 | // else, return err 13 | func GetInClusterNamesapce() (string, error) { 14 | // Check whether the namespace file exists. 15 | // If not, we are not running in cluster so can't guess the namespace. 16 | _, err := os.Stat(inClusterNamespacePath) 17 | if os.IsNotExist(err) { 18 | return "", fmt.Errorf("not running in-cluster, please specify LeaderElectionNamespace") 19 | } else if err != nil { 20 | return "", fmt.Errorf("error checking namespace file: %v", err) 21 | } 22 | 23 | // Load the namespace file and return its content 24 | namespace, err := ioutil.ReadFile(inClusterNamespacePath) 25 | if err != nil { 26 | return "", fmt.Errorf("error reading namespace file: %v", err) 27 | } 28 | return string(namespace), nil 29 | } 30 | -------------------------------------------------------------------------------- /pkg/multicluster/kubeconfig/errors.go: -------------------------------------------------------------------------------- 1 | package kubeconfig 2 | 3 | import ( 4 | "github.com/rotisserie/eris" 5 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 6 | ) 7 | 8 | var ( 9 | /* 10 | KubeConfig Secret errors. 11 | */ 12 | 13 | FailedToConvertKubeConfigToSecret = func(err error) error { 14 | return eris.Wrap(err, "Could not serialize KubeConfig to yaml while generating secret.") 15 | } 16 | FailedToConvertSecretToKubeConfig = func(err error) error { 17 | return eris.Wrapf(err, "Could not deserialize string to KubeConfig while generating KubeConfig") 18 | } 19 | FailedToConvertSecretToClientConfig = func(err error) error { 20 | return eris.Wrap(err, "Could not convert config to ClientConfig") 21 | } 22 | SecretHasNoKubeConfig = func(meta metav1.ObjectMeta) error { 23 | return eris.Errorf("kube config secret %s.%s has no KubeConfig value for key %v", 24 | meta.Namespace, meta.Name, Key) 25 | } 26 | FailedToConvertSecretToRestConfig = func(err error) error { 27 | return eris.Wrap(err, "Could not convert config to *rest.Config") 28 | } 29 | ) 30 | -------------------------------------------------------------------------------- /test/matchers/proto.go: -------------------------------------------------------------------------------- 1 | package matchers 2 | 3 | import ( 4 | "github.com/golang/protobuf/proto" 5 | "github.com/onsi/gomega/format" 6 | "github.com/onsi/gomega/types" 7 | ) 8 | 9 | func MatchProto(msg proto.Message) types.GomegaMatcher { 10 | return &protoMatcherImpl{ 11 | msg: msg, 12 | } 13 | } 14 | 15 | type protoMatcherImpl struct { 16 | msg proto.Message 17 | } 18 | 19 | func (p *protoMatcherImpl) Match(actual interface{}) (success bool, err error) { 20 | msg, ok := actual.(proto.Message) 21 | if !ok { 22 | return false, nil 23 | } 24 | return proto.Equal(msg, p.msg), nil 25 | } 26 | 27 | func (p *protoMatcherImpl) FailureMessage(actual interface{}) (message string) { 28 | msg, ok := actual.(proto.Message) 29 | if !ok { 30 | format.Message(actual, "To be identical to", p.msg.String()) 31 | } 32 | return format.Message(msg.String(), "To be identical to", p.msg.String()) 33 | } 34 | 35 | func (p *protoMatcherImpl) NegatedFailureMessage(actual interface{}) (message string) { 36 | return format.Message(actual, "Not to be identical to", p.msg) 37 | } 38 | -------------------------------------------------------------------------------- /pkg/api/multicluster.solo.io/v1alpha1/proto_deepcopy.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // This file contains generated Deepcopy methods for proto-based Spec and Status fields 4 | 5 | package v1alpha1 6 | 7 | import ( 8 | proto "github.com/golang/protobuf/proto" 9 | "github.com/solo-io/protoc-gen-ext/pkg/clone" 10 | ) 11 | 12 | // DeepCopyInto for the KubernetesCluster.Spec 13 | func (in *KubernetesClusterSpec) DeepCopyInto(out *KubernetesClusterSpec) { 14 | var p *KubernetesClusterSpec 15 | if h, ok := interface{}(in).(clone.Cloner); ok { 16 | p = h.Clone().(*KubernetesClusterSpec) 17 | } else { 18 | p = proto.Clone(in).(*KubernetesClusterSpec) 19 | } 20 | *out = *p 21 | } 22 | 23 | // DeepCopyInto for the KubernetesCluster.Status 24 | func (in *KubernetesClusterStatus) DeepCopyInto(out *KubernetesClusterStatus) { 25 | var p *KubernetesClusterStatus 26 | if h, ok := interface{}(in).(clone.Cloner); ok { 27 | p = h.Clone().(*KubernetesClusterStatus) 28 | } else { 29 | p = proto.Clone(in).(*KubernetesClusterStatus) 30 | } 31 | *out = *p 32 | } 33 | -------------------------------------------------------------------------------- /changelog/v0.39.0/bump-k8s-v0.29.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: "Bump dependencies to support Kubernetes 1.29" 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/14822 5 | - type: DEPENDENCY_BUMP 6 | dependencyOwner: sigs.k8s.io 7 | dependencyRepo: controller-runtime 8 | dependencyTag: v0.17.4 9 | - type: DEPENDENCY_BUMP 10 | dependencyOwner: k8s.io 11 | dependencyRepo: api 12 | dependencyTag: v0.29.2 13 | description: pulled in by sigs.k8s.io/sontroller-runtime 14 | - type: DEPENDENCY_BUMP 15 | dependencyOwner: k8s.io 16 | dependencyRepo: apiextensions-apiserver 17 | dependencyTag: v0.29.2 18 | description: pulled in by sigs.k8s.io/sontroller-runtime 19 | - type: DEPENDENCY_BUMP 20 | dependencyOwner: k8s.io 21 | dependencyRepo: client-go 22 | dependencyTag: v0.29.2 23 | description: pulled in by sigs.k8s.io/sontroller-runtime 24 | - type: DEPENDENCY_BUMP 25 | dependencyOwner: k8s.io 26 | dependencyRepo: code-generator 27 | dependencyTag: v0.29.2 28 | description: pulled in by sigs.k8s.io/sontroller-runtime -------------------------------------------------------------------------------- /changelog/v0.40.0/bump-k8s-v0.30.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: "Bump dependencies to support Kubernetes 1.30" 4 | issueLink: https://github.com/solo-io/gloo-mesh-enterprise/issues/14822 5 | - type: DEPENDENCY_BUMP 6 | dependencyOwner: sigs.k8s.io 7 | dependencyRepo: controller-runtime 8 | dependencyTag: v0.18.2 9 | - type: DEPENDENCY_BUMP 10 | dependencyOwner: k8s.io 11 | dependencyRepo: api 12 | dependencyTag: v0.30.0 13 | description: pulled in by sigs.k8s.io/sontroller-runtime 14 | - type: DEPENDENCY_BUMP 15 | dependencyOwner: k8s.io 16 | dependencyRepo: apiextensions-apiserver 17 | dependencyTag: v0.30.0 18 | description: pulled in by sigs.k8s.io/sontroller-runtime 19 | - type: DEPENDENCY_BUMP 20 | dependencyOwner: k8s.io 21 | dependencyRepo: client-go 22 | dependencyTag: v0.30.0 23 | description: pulled in by sigs.k8s.io/sontroller-runtime 24 | - type: DEPENDENCY_BUMP 25 | dependencyOwner: k8s.io 26 | dependencyRepo: code-generator 27 | dependencyTag: v0.30.0 28 | description: pulled in by sigs.k8s.io/sontroller-runtime -------------------------------------------------------------------------------- /pkg/predicate/predicate_label_matching.go: -------------------------------------------------------------------------------- 1 | package predicate 2 | 3 | import ( 4 | v1 "k8s.io/apimachinery/pkg/apis/meta/v1" 5 | "k8s.io/apimachinery/pkg/labels" 6 | "sigs.k8s.io/controller-runtime/pkg/event" 7 | "sigs.k8s.io/controller-runtime/pkg/predicate" 8 | ) 9 | 10 | var _ predicate.Predicate = LabelMatcher{} 11 | 12 | // LabelMatcher filters events by the event's object labels 13 | type LabelMatcher struct { 14 | Selector labels.Selector 15 | } 16 | 17 | func (p LabelMatcher) matches(meta v1.Object) bool { 18 | if meta != nil { 19 | return p.Selector.Matches(labels.Set(meta.GetLabels())) 20 | } 21 | return false 22 | } 23 | 24 | func (p LabelMatcher) Create(e event.CreateEvent) bool { 25 | return p.matches(e.Object) 26 | } 27 | 28 | func (p LabelMatcher) Delete(e event.DeleteEvent) bool { 29 | return p.matches(e.Object) 30 | } 31 | 32 | func (p LabelMatcher) Update(e event.UpdateEvent) bool { 33 | return p.matches(e.ObjectOld) || p.matches(e.ObjectNew) 34 | } 35 | 36 | func (p LabelMatcher) Generic(e event.GenericEvent) bool { 37 | return p.matches(e.Object) 38 | } 39 | -------------------------------------------------------------------------------- /changelog/v0.5.0/upgrades.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Move client constructor to multicluster package. 4 | issueLink: https://github.com/solo-io/skv2/issues/60 5 | - type: NEW_FEATURE 6 | description: Generate type_helpers.go with helper functions for generated types. 7 | issueLink: https://github.com/solo-io/skv2/issues/61 8 | - type: FIX 9 | description: Allow sets to be threadsafe. 10 | issueLink: https://github.com/solo-io/skv2/issues/62 11 | - type: NEW_FEATURE 12 | description: Add Find method to sets 13 | issueLink: https://github.com/solo-io/skv2/issues/63 14 | - type: NEW_FEATURE 15 | description: Add ClusterObjectRef to core API types. 16 | issueLink: https://github.com/solo-io/skv2/issues/64 17 | - type: NEW_FEATURE 18 | description: Support top-level custom templates. 19 | issueLink: https://github.com/solo-io/skv2/issues/65 20 | - type: NON_USER_FACING 21 | description: Upsert runs transition function before updating upserted object's resource version when performing an update. 22 | 23 | -------------------------------------------------------------------------------- /pkg/equalityutils/deep_equal.go: -------------------------------------------------------------------------------- 1 | package equalityutils 2 | 3 | import ( 4 | "reflect" 5 | 6 | "github.com/solo-io/protoc-gen-ext/pkg/equality" 7 | protoV2 "google.golang.org/protobuf/proto" 8 | ) 9 | 10 | // DeepEqual should be used in place of reflect.DeepEqual when the type of an object is unknown and may be a proto message. 11 | // see https://github.com/golang/protobuf/issues/1173 for details on why reflect.DeepEqual no longer works for proto messages 12 | func DeepEqual(val1, val2 interface{}) bool { 13 | // Check if one of our types has an equal function, and use that 14 | if protoVal1, protoVal1IsEqualizer := val1.(equality.Equalizer); protoVal1IsEqualizer { 15 | return protoVal1.Equal(val2) 16 | } else if protoVal2, protoVal2IsEqualizer := val2.(equality.Equalizer); protoVal2IsEqualizer { 17 | return protoVal2.Equal(val1) 18 | } 19 | 20 | protoVal1, isProto := val1.(protoV2.Message) 21 | if isProto { 22 | protoVal2, isProto := val2.(protoV2.Message) 23 | if !isProto { 24 | return false // different types 25 | } 26 | return protoV2.Equal(protoVal1, protoVal2) 27 | } 28 | return reflect.DeepEqual(val1, val2) 29 | } 30 | -------------------------------------------------------------------------------- /api/multicluster/v1alpha1/group.go: -------------------------------------------------------------------------------- 1 | package v1alpha1 2 | 3 | import ( 4 | "github.com/solo-io/skv2/codegen/model" 5 | "github.com/solo-io/skv2/contrib" 6 | "k8s.io/apimachinery/pkg/runtime/schema" 7 | ) 8 | 9 | // export group 10 | var Group = model.Group{ 11 | GroupVersion: schema.GroupVersion{ 12 | Group: "multicluster.solo.io", 13 | Version: "v1alpha1", 14 | }, 15 | Module: "github.com/solo-io/skv2", 16 | Resources: []model.Resource{ 17 | { 18 | Kind: "KubernetesCluster", 19 | Spec: model.Field{ 20 | Type: model.Type{ 21 | Name: "KubernetesClusterSpec", 22 | }, 23 | }, 24 | Status: &model.Field{ 25 | Type: model.Type{ 26 | Name: "KubernetesClusterStatus", 27 | }, 28 | }, 29 | Stored: true, 30 | }, 31 | }, 32 | RenderManifests: true, 33 | RenderValidationSchemas: true, 34 | RenderController: true, 35 | RenderClients: true, 36 | RenderTypes: true, 37 | MockgenDirective: true, 38 | ApiRoot: "pkg/api", 39 | CustomTemplates: contrib.AllGroupCustomTemplates, 40 | SkipConditionalCRDLoading: true, 41 | } 42 | -------------------------------------------------------------------------------- /pkg/multicluster/handler.go: -------------------------------------------------------------------------------- 1 | package multicluster 2 | 3 | import ( 4 | "context" 5 | 6 | "sigs.k8s.io/controller-runtime/pkg/manager" 7 | ) 8 | 9 | // ClusterHandler is passed to RunClusterWatcher to handle select cluster events. 10 | // It is implemented internally by skv2 components but can be implemented by the user for specialized use cases. 11 | type ClusterHandler interface { 12 | // AddCluster is called when a new cluster is identified by a cluster watch. 13 | // The provided context is cancelled when a cluster is removed, so any teardown behavior for removed clusters 14 | // should take place when ctx is cancelled. 15 | AddCluster(ctx context.Context, cluster string, mgr manager.Manager) 16 | } 17 | 18 | // ClusterRemovedHandler can be implemented by ClusterHandlers to perform cleanup when a cluster is deleted. 19 | // NOTE: in most cases, cleanup should be handled when the cluster manager's context is cancelled without 20 | // the need for implementing ClusterRemovedHandler. 21 | type ClusterRemovedHandler interface { 22 | // RemoveCluster is called when a cluster watch identifies a cluster as deleted. 23 | RemoveCluster(cluster string) 24 | } 25 | -------------------------------------------------------------------------------- /pkg/kube_jsonpb/internal/testprotos/jsonpb_proto/test3.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | syntax = "proto3"; 6 | 7 | option go_package = "github.com/solo-io/skv2/pkg/jsonpb/internal/testprotos/jsonpb_proto"; 8 | 9 | package jsonpb_test; 10 | 11 | message Simple3 { 12 | double dub = 1; 13 | } 14 | 15 | message SimpleSlice3 { 16 | repeated string slices = 1; 17 | } 18 | 19 | message SimpleMap3 { 20 | map stringy = 1; 21 | } 22 | 23 | message SimpleNull3 { 24 | Simple3 simple = 1; 25 | } 26 | 27 | enum Numeral { 28 | UNKNOWN = 0; 29 | ARABIC = 1; 30 | ROMAN = 2; 31 | } 32 | 33 | message Mappy { 34 | map nummy = 1; 35 | map strry = 2; 36 | map objjy = 3; 37 | map buggy = 4; 38 | map booly = 5; 39 | map enumy = 6; 40 | map s32booly = 7; 41 | map s64booly = 8; 42 | map u32booly = 9; 43 | map u64booly = 10; 44 | } -------------------------------------------------------------------------------- /pkg/predicate/predicate_logging.go: -------------------------------------------------------------------------------- 1 | package predicate 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/go-logr/logr" 7 | "sigs.k8s.io/controller-runtime/pkg/event" 8 | "sigs.k8s.io/controller-runtime/pkg/predicate" 9 | ) 10 | 11 | var _ predicate.Predicate = EventLogger{} 12 | 13 | // EventLogger logs the event 14 | type EventLogger struct { 15 | Logger logr.Logger 16 | } 17 | 18 | func (h EventLogger) Create(e event.CreateEvent) bool { 19 | h.Logger.Info(fmt.Sprintf("create %T: %v.%v", e.Object, e.Object.GetName(), e.Object.GetNamespace())) 20 | return true 21 | } 22 | 23 | func (h EventLogger) Delete(e event.DeleteEvent) bool { 24 | h.Logger.Info(fmt.Sprintf("delete %T: %v.%v", e.Object, e.Object.GetName(), e.Object.GetNamespace())) 25 | return true 26 | } 27 | 28 | func (h EventLogger) Update(e event.UpdateEvent) bool { 29 | h.Logger.Info(fmt.Sprintf("update %T: %v.%v", e.ObjectNew, e.ObjectNew.GetName(), e.ObjectNew.GetNamespace())) 30 | return true 31 | } 32 | 33 | func (h EventLogger) Generic(e event.GenericEvent) bool { 34 | h.Logger.Info(fmt.Sprintf("generic %T: %v.%v", e.Object, e.Object.GetName(), e.Object.GetNamespace())) 35 | return true 36 | } 37 | -------------------------------------------------------------------------------- /ci/tools.go: -------------------------------------------------------------------------------- 1 | //go:build tools 2 | // +build tools 3 | 4 | /* 5 | Copyright 2019 The Kubernetes Authors. 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // This package imports things required by build scripts, to force `go mod` to see them as dependencies 18 | package tools 19 | 20 | import ( 21 | _ "github.com/envoyproxy/protoc-gen-validate" 22 | _ "github.com/golang/mock/mockgen" 23 | _ "github.com/golang/protobuf/protoc-gen-go" 24 | _ "github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc" 25 | _ "github.com/solo-io/protoc-gen-ext" 26 | _ "github.com/solo-io/protoc-gen-openapi" 27 | _ "golang.org/x/tools/cmd/goimports" 28 | _ "k8s.io/code-generator" 29 | ) 30 | -------------------------------------------------------------------------------- /changelog/v0.45.0/bump-k8s.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | Bump dependencies to support Kubernetes 1.34 5 | issueLink: https://github.com/solo-io/solo-projects/issues/8681 6 | resolvesIssue: false 7 | - type: DEPENDENCY_BUMP 8 | dependencyOwner: k8s.io 9 | dependencyRepo: api 10 | dependencyTag: v0.34.2 11 | - type: DEPENDENCY_BUMP 12 | dependencyOwner: k8s.io 13 | dependencyRepo: apimachinery 14 | dependencyTag: v0.34.2 15 | - type: DEPENDENCY_BUMP 16 | dependencyOwner: k8s.io 17 | dependencyRepo: apiextensions-apiserver 18 | dependencyTag: v0.34.2 19 | - type: DEPENDENCY_BUMP 20 | dependencyOwner: k8s.io 21 | dependencyRepo: client-go 22 | dependencyTag: v0.34.2 23 | - type: DEPENDENCY_BUMP 24 | dependencyOwner: solo-io 25 | dependencyRepo: go-utils 26 | dependencyTag: v0.28.5 27 | - type: DEPENDENCY_BUMP 28 | dependencyOwner: golang 29 | dependencyRepo: go 30 | dependencyTag: v1.25.5 31 | - type: DEPENDENCY_BUMP 32 | dependencyOwner: solo.io 33 | dependencyRepo: go-utils 34 | dependencyTag: v0.29.0 35 | - type: DEPENDENCY_BUMP 36 | dependencyOwner: solo.io 37 | dependencyRepo: k8a-utils 38 | dependencyTag: v0.12.0 39 | -------------------------------------------------------------------------------- /codegen/templates/code/types/register.gotmpl: -------------------------------------------------------------------------------- 1 | // NOTE: Boilerplate only. Ignore this file. 2 | // Used to register the Go types with the Kubernetes 3 | // internal scheme 4 | package {{.Version}} 5 | 6 | import ( 7 | "k8s.io/apimachinery/pkg/runtime/schema" 8 | "sigs.k8s.io/controller-runtime/pkg/scheme" 9 | "k8s.io/apimachinery/pkg/runtime" 10 | ) 11 | 12 | // AddToSchemes may be used to add all resources defined in the project to a Scheme 13 | 14 | // AddToScheme adds all Resources to the Scheme 15 | 16 | var ( 17 | // SchemeGroupVersion is group version used to register these objects 18 | SchemeGroupVersion = schema.GroupVersion{Group: "{{.Group}}", Version: "{{.Version}}"} 19 | 20 | // SchemeBuilder is used to add go types to the GroupVersionKind scheme 21 | SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} 22 | 23 | ) 24 | 25 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 26 | func Resource(resource string) schema.GroupResource { 27 | return SchemeGroupVersion.WithResource(resource).GroupResource() 28 | } 29 | 30 | func AddToScheme(s *runtime.Scheme) error { 31 | return SchemeBuilder.AddToScheme(s) 32 | } 33 | -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/register.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // NOTE: Boilerplate only. Ignore this file. 4 | // Used to register the Go types with the Kubernetes 5 | // internal scheme 6 | package v1 7 | 8 | import ( 9 | "k8s.io/apimachinery/pkg/runtime" 10 | "k8s.io/apimachinery/pkg/runtime/schema" 11 | "sigs.k8s.io/controller-runtime/pkg/scheme" 12 | ) 13 | 14 | // AddToSchemes may be used to add all resources defined in the project to a Scheme 15 | 16 | // AddToScheme adds all Resources to the Scheme 17 | 18 | var ( 19 | // SchemeGroupVersion is group version used to register these objects 20 | SchemeGroupVersion = schema.GroupVersion{Group: "things.test.io", Version: "v1"} 21 | 22 | // SchemeBuilder is used to add go types to the GroupVersionKind scheme 23 | SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} 24 | ) 25 | 26 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 27 | func Resource(resource string) schema.GroupResource { 28 | return SchemeGroupVersion.WithResource(resource).GroupResource() 29 | } 30 | 31 | func AddToScheme(s *runtime.Scheme) error { 32 | return SchemeBuilder.AddToScheme(s) 33 | } 34 | -------------------------------------------------------------------------------- /changelog/v0.44.0/k8s-133.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: > 4 | Bump dependencies to support Kubernetes 1.33.1 5 | issueLink: https://github.com/solo-io/solo-projects/issues/8102 6 | resolvesIssue: false 7 | - type: DEPENDENCY_BUMP 8 | dependencyOwner: k8s.io 9 | dependencyRepo: api 10 | dependencyTag: v0.33.1 11 | - type: DEPENDENCY_BUMP 12 | dependencyOwner: k8s.io 13 | dependencyRepo: apimachinery 14 | dependencyTag: v0.33.1 15 | - type: DEPENDENCY_BUMP 16 | dependencyOwner: k8s.io 17 | dependencyRepo: apiextensions-apiserver 18 | dependencyTag: v0.33.1 19 | - type: DEPENDENCY_BUMP 20 | dependencyOwner: k8s.io 21 | dependencyRepo: client-go 22 | dependencyTag: v0.33.1 23 | - type: DEPENDENCY_BUMP 24 | dependencyOwner: sigs.k8s.io 25 | dependencyRepo: controller-runtime 26 | dependencyTag: v0.21.0 27 | - type: DEPENDENCY_BUMP 28 | dependencyOwner: google 29 | dependencyRepo: protobuf 30 | dependencyTag: v1.36.5 31 | - type: DEPENDENCY_BUMP 32 | dependencyOwner: solo-io 33 | dependencyRepo: go-utils 34 | dependencyTag: v0.28.5 35 | - type: DEPENDENCY_BUMP 36 | dependencyOwner: solo-io 37 | dependencyRepo: k8s-utils 38 | dependencyTag: v0.11.0 39 | -------------------------------------------------------------------------------- /pkg/api/multicluster.solo.io/v1alpha1/register.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // NOTE: Boilerplate only. Ignore this file. 4 | // Used to register the Go types with the Kubernetes 5 | // internal scheme 6 | package v1alpha1 7 | 8 | import ( 9 | "k8s.io/apimachinery/pkg/runtime" 10 | "k8s.io/apimachinery/pkg/runtime/schema" 11 | "sigs.k8s.io/controller-runtime/pkg/scheme" 12 | ) 13 | 14 | // AddToSchemes may be used to add all resources defined in the project to a Scheme 15 | 16 | // AddToScheme adds all Resources to the Scheme 17 | 18 | var ( 19 | // SchemeGroupVersion is group version used to register these objects 20 | SchemeGroupVersion = schema.GroupVersion{Group: "multicluster.solo.io", Version: "v1alpha1"} 21 | 22 | // SchemeBuilder is used to add go types to the GroupVersionKind scheme 23 | SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} 24 | ) 25 | 26 | // Resource takes an unqualified resource and returns a Group qualified GroupResource 27 | func Resource(resource string) schema.GroupResource { 28 | return SchemeGroupVersion.WithResource(resource).GroupResource() 29 | } 30 | 31 | func AddToScheme(s *runtime.Scheme) error { 32 | return SchemeBuilder.AddToScheme(s) 33 | } 34 | -------------------------------------------------------------------------------- /codegen/util/packages.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "crypto/md5" 5 | "fmt" 6 | "strings" 7 | 8 | "github.com/solo-io/skv2/codegen/model" 9 | ) 10 | 11 | // gets the go package for the group's types 12 | func GoPackage(grp model.Group) string { 13 | if grp.CustomTypesImportPath != "" { 14 | return grp.CustomTypesImportPath 15 | } 16 | 17 | grp.ApiRoot = strings.Trim(grp.ApiRoot, "/") 18 | 19 | s := strings.ReplaceAll( 20 | strings.Join([]string{ 21 | grp.Module, 22 | grp.ApiRoot, 23 | grp.Group, 24 | grp.Version, 25 | }, "/"), 26 | "//", "/", 27 | ) 28 | 29 | return s 30 | } 31 | 32 | // gets the go package for the group's generated code. 33 | // same as GoPackage if the types do not come from custom imports 34 | func GeneratedGoPackage(grp model.Group) string { 35 | s := strings.ReplaceAll( 36 | strings.Join([]string{ 37 | GetGoModule(), 38 | grp.ApiRoot, 39 | grp.Group, 40 | grp.Version, 41 | }, "/"), 42 | "//", "/", 43 | ) 44 | 45 | return s 46 | } 47 | 48 | // Generate a package alias, eg 'import alias github.com/my/package' 49 | // TODO: Do something prettier if this works 50 | func AliasFor(pkg string) string { 51 | return fmt.Sprintf("i%x", md5.Sum([]byte(pkg))) 52 | } 53 | -------------------------------------------------------------------------------- /changelog/v0.30.0/update-controller-runtime.yaml: -------------------------------------------------------------------------------- 1 | changelog: 2 | - type: BREAKING_CHANGE 3 | description: Update Status API signature to comply with controller-runtime v0.14.x API breakage 4 | issueLink: https://github.com/solo-io/skv2/issues/419 5 | - type: DEPENDENCY_BUMP 6 | dependencyOwner: sigs.k8s.io 7 | dependencyRepo: controller-runtime 8 | dependencyTag: v0.14.4 9 | description: Contains breaking API changes from controller-runtile v0.13 10 | - type: DEPENDENCY_BUMP 11 | dependencyOwner: k8s.io 12 | dependencyRepo: api 13 | dependencyTag: v0.26.4 14 | description: pulled in by sigs.k8s.io/sontroller-runtime 15 | - type: DEPENDENCY_BUMP 16 | dependencyOwner: k8s.io 17 | dependencyRepo: apiextensions-apiserver 18 | dependencyTag: v0.26.4 19 | description: pulled in by sigs.k8s.io/sontroller-runtime 20 | - type: DEPENDENCY_BUMP 21 | dependencyOwner: k8s.io 22 | dependencyRepo: client-go 23 | dependencyTag: v0.26.4 24 | description: pulled in by sigs.k8s.io/sontroller-runtime 25 | - type: DEPENDENCY_BUMP 26 | dependencyOwner: k8s.io 27 | dependencyRepo: code-generator 28 | dependencyTag: v0.26.4 29 | description: pulled in by sigs.k8s.io/sontroller-runtime 30 | -------------------------------------------------------------------------------- /codegen/templates/hack/create_cr_yaml.gotmpl: -------------------------------------------------------------------------------- 1 | // run this file in order to generate a kubernetes-YAML file for your project's top-level CRD 2 | package main 3 | 4 | import ( 5 | "io/ioutil" 6 | "log" 7 | "path/filepath" 8 | 9 | "sigs.k8s.io/yaml" 10 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 11 | 12 | "github.com/solo-io/skv2/codegen/util" 13 | 14 | {{.Version}} "{{.TypesImportPath}}" 15 | ) 16 | 17 | //go:generate go run create_cr_yaml.go 18 | 19 | // TODO: modify this object and re-run the script in order to produce the output YAML file 20 | var Example{{$.Kind}} = &{{$.Version}}.{{$.Kind}}{ 21 | ObjectMeta: metav1.ObjectMeta{ 22 | Name: "example", 23 | }, 24 | TypeMeta: metav1.TypeMeta{ 25 | Kind: "{{$.Kind}}", 26 | APIVersion: "{{$.ApiVersion}}", 27 | }, 28 | Spec: {{$.Version}}.{{$.Kind}}Spec{ 29 | // fill me in! 30 | }, 31 | } 32 | 33 | // modify this string to change the output file path 34 | var OutputFile = filepath.Join(util.MustGetThisDir(), "..", "deploy", "{{ lower $.Kind }}_example.yaml") 35 | 36 | func main() { 37 | yam, err := yaml.Marshal(Example{{$.Kind}}) 38 | if err != nil { 39 | log.Fatal(err) 40 | } 41 | 42 | err = ioutil.WriteFile(OutputFile, yam, 0644) 43 | if err != nil { 44 | log.Fatal(err) 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /codegen/test/api/things.test.io/v1/proto_deepcopy.go: -------------------------------------------------------------------------------- 1 | // Code generated by skv2. DO NOT EDIT. 2 | 3 | // This file contains generated Deepcopy methods for proto-based Spec and Status fields 4 | 5 | package v1 6 | 7 | import ( 8 | proto "github.com/golang/protobuf/proto" 9 | "github.com/solo-io/protoc-gen-ext/pkg/clone" 10 | ) 11 | 12 | // DeepCopyInto for the Paint.Spec 13 | func (in *PaintSpec) DeepCopyInto(out *PaintSpec) { 14 | var p *PaintSpec 15 | if h, ok := interface{}(in).(clone.Cloner); ok { 16 | p = h.Clone().(*PaintSpec) 17 | } else { 18 | p = proto.Clone(in).(*PaintSpec) 19 | } 20 | *out = *p 21 | } 22 | 23 | // DeepCopyInto for the Paint.Status 24 | func (in *PaintStatus) DeepCopyInto(out *PaintStatus) { 25 | var p *PaintStatus 26 | if h, ok := interface{}(in).(clone.Cloner); ok { 27 | p = h.Clone().(*PaintStatus) 28 | } else { 29 | p = proto.Clone(in).(*PaintStatus) 30 | } 31 | *out = *p 32 | } 33 | 34 | // DeepCopyInto for the ClusterResource.Spec 35 | func (in *ClusterResourceSpec) DeepCopyInto(out *ClusterResourceSpec) { 36 | var p *ClusterResourceSpec 37 | if h, ok := interface{}(in).(clone.Cloner); ok { 38 | p = h.Clone().(*ClusterResourceSpec) 39 | } else { 40 | p = proto.Clone(in).(*ClusterResourceSpec) 41 | } 42 | *out = *p 43 | } 44 | -------------------------------------------------------------------------------- /contrib/README.md: -------------------------------------------------------------------------------- 1 | ## Contributions 2 | 3 | Contributions to skv2 are welcome! Extensions to skv2 which are common across projects but not intended to be universally applied should be placed int the `contrib` directory. 4 | 5 | * Templates should go in `contrib/codegen/templates/` (e.g. `contrib/codegen/templates/sets.go.tmpl`) 6 | * Libraries imported by contrib templates should go in `contrib/pkg/` (e.g. `contrib/pkg/sets.go`) 7 | * Test code should be added to `contrib/tests/*_test.go` where `*` is the name of the template (e.g. `contrib/tests/sets_test.go`) 8 | * A `CustomTemplate` should be added to `contrib/custom_templates.go` like so: 9 | 10 | ```go 11 | /* 12 | Sets custom template 13 | */ 14 | const ( 15 | SetOutputFilename = "sets/sets.go" 16 | SetCustomTemplatePath = "sets/sets.gotmpl" 17 | ) 18 | 19 | var Sets = func() model.CustomTemplates { 20 | templateContents, err := templatesBox.FindString(SetCustomTemplatePath) 21 | if err != nil { 22 | panic(err) 23 | } 24 | setsTemplates := model.CustomTemplates{ 25 | Templates: map[string]string{SetOutputFilename: templateContents}, 26 | } 27 | // register sets 28 | AllCustomTemplates = append(AllCustomTemplates, setsTemplates) 29 | 30 | return setsTemplates 31 | }() 32 | ``` 33 | 34 | Note: to test generated -------------------------------------------------------------------------------- /pkg/predicate/predicate_simple.go: -------------------------------------------------------------------------------- 1 | package predicate 2 | 3 | import ( 4 | "sigs.k8s.io/controller-runtime/pkg/client" 5 | "sigs.k8s.io/controller-runtime/pkg/event" 6 | "sigs.k8s.io/controller-runtime/pkg/predicate" 7 | ) 8 | 9 | var _ predicate.Predicate = SimplePredicate{} 10 | 11 | type SimpleEventFilterFunc func(obj client.Object) bool 12 | 13 | func (f SimpleEventFilterFunc) FilterEvent(obj client.Object) bool { 14 | return f(obj) 15 | } 16 | 17 | // SimpleEventFilter filters events for a single object type 18 | type SimpleEventFilter interface { 19 | // return True to filter out the event 20 | FilterEvent(obj client.Object) bool 21 | } 22 | 23 | // SimplePredicate filters events based on a ShouldSync function 24 | type SimplePredicate struct { 25 | Filter SimpleEventFilter 26 | } 27 | 28 | func (p SimplePredicate) Create(e event.CreateEvent) bool { 29 | return !p.Filter.FilterEvent(e.Object) 30 | } 31 | 32 | func (p SimplePredicate) Delete(e event.DeleteEvent) bool { 33 | return !p.Filter.FilterEvent(e.Object) 34 | } 35 | 36 | func (p SimplePredicate) Update(e event.UpdateEvent) bool { 37 | return !p.Filter.FilterEvent(e.ObjectNew) 38 | } 39 | 40 | func (p SimplePredicate) Generic(e event.GenericEvent) bool { 41 | return !p.Filter.FilterEvent(e.Object) 42 | } 43 | -------------------------------------------------------------------------------- /codegen/util/kubectl.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | "os" 7 | "os/exec" 8 | 9 | "github.com/pkg/errors" 10 | ) 11 | 12 | func KubectlApply(manifest []byte, extraArgs ...string) error { 13 | return Kubectl(bytes.NewBuffer(manifest), append([]string{"apply", "-f", "-"}, extraArgs...)...) 14 | } 15 | 16 | func KubectlDelete(manifest []byte, extraArgs ...string) error { 17 | return Kubectl(bytes.NewBuffer(manifest), append([]string{"delete", "-f", "-"}, extraArgs...)...) 18 | } 19 | 20 | func Kubectl(stdin io.Reader, args ...string) error { 21 | kubectl := KubectlCmd(stdin, args...) 22 | 23 | return kubectl.Run() 24 | } 25 | 26 | func KubectlOut(stdin io.Reader, args ...string) (string, error) { 27 | kubectl := KubectlCmd(stdin, args...) 28 | 29 | out := &bytes.Buffer{} 30 | kubectl.Stdout = out 31 | kubectl.Stderr = out 32 | err := kubectl.Run() 33 | 34 | if err != nil { 35 | return "", errors.Wrap(err, out.String()) 36 | } 37 | 38 | return out.String(), nil 39 | } 40 | 41 | func KubectlCmd(stdin io.Reader, args ...string) *exec.Cmd { 42 | kubectl := exec.Command("kubectl", args...) 43 | if stdin != nil { 44 | kubectl.Stdin = stdin 45 | } 46 | kubectl.Stdout = os.Stdout 47 | kubectl.Stderr = os.Stderr 48 | kubectl.Env = os.Environ() 49 | return kubectl 50 | } 51 | --------------------------------------------------------------------------------