├── release └── changelog │ └── internal │ └── testdata │ ├── ignore │ ├── non-yaml.txt │ └── more-fragments │ │ └── ignored.yaml │ ├── invalid_entry │ └── fragment1.yaml │ ├── invalid_yaml │ └── fragment1.yaml │ └── valid │ ├── fragment1.yaml │ └── fragment2.yml ├── changelog └── generated │ ├── v1.39.1.md │ ├── v1.39.2.md │ ├── v1.42.0.md │ ├── v1.36.0.md │ ├── v1.34.0.md │ ├── v1.37.0.md │ ├── v1.35.0.md │ ├── v1.15.0.md │ ├── v1.12.0.md │ ├── v1.39.0.md │ ├── v1.9.0.md │ ├── v1.32.0.md │ └── v1.29.0.md ├── testdata ├── helm │ └── memcached-operator │ │ ├── helm-charts │ │ └── memcached │ │ │ ├── .helmignore │ │ │ ├── templates │ │ │ ├── pdb.yaml │ │ │ ├── svc.yaml │ │ │ └── NOTES.txt │ │ │ └── Chart.yaml │ │ ├── config │ │ ├── prometheus │ │ │ └── kustomization.yaml │ │ ├── network-policy │ │ │ └── kustomization.yaml │ │ ├── samples │ │ │ └── kustomization.yaml │ │ ├── scorecard │ │ │ ├── bases │ │ │ │ └── config.yaml │ │ │ ├── patches │ │ │ │ └── basic.config.yaml │ │ │ └── kustomization.yaml │ │ ├── rbac │ │ │ ├── metrics_reader_role.yaml │ │ │ ├── service_account.yaml │ │ │ ├── metrics_auth_role_binding.yaml │ │ │ ├── metrics_auth_role.yaml │ │ │ ├── role_binding.yaml │ │ │ ├── leader_election_role_binding.yaml │ │ │ ├── leader_election_role.yaml │ │ │ ├── memcached_admin_role.yaml │ │ │ └── memcached_viewer_role.yaml │ │ ├── manager │ │ │ └── kustomization.yaml │ │ ├── manifests │ │ │ └── kustomization.yaml │ │ ├── crd │ │ │ └── kustomization.yaml │ │ └── default │ │ │ ├── metrics_service.yaml │ │ │ └── manager_metrics_patch.yaml │ │ ├── .gitignore │ │ ├── watches.yaml │ │ ├── Dockerfile │ │ ├── bundle │ │ ├── manifests │ │ │ ├── memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ ├── memcached-operator-memcached-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ ├── memcached-operator-memcached-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ ├── memcached-operator-controller-manager-metrics-service_v1_service.yaml │ │ │ ├── memcached-operator-memcached-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ └── memcached-operator-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml │ │ └── metadata │ │ │ └── annotations.yaml │ │ ├── PROJECT │ │ └── bundle.Dockerfile └── go │ └── v4 │ ├── memcached-operator │ ├── config │ │ ├── network-policy │ │ │ └── kustomization.yaml │ │ ├── webhook │ │ │ ├── kustomization.yaml │ │ │ ├── service.yaml │ │ │ ├── manifests.yaml │ │ │ └── kustomizeconfig.yaml │ │ ├── samples │ │ │ ├── kustomization.yaml │ │ │ └── cache_v1alpha1_memcached.yaml │ │ ├── certmanager │ │ │ ├── kustomization.yaml │ │ │ ├── kustomizeconfig.yaml │ │ │ ├── issuer.yaml │ │ │ ├── certificate-webhook.yaml │ │ │ └── certificate-metrics.yaml │ │ ├── scorecard │ │ │ ├── bases │ │ │ │ └── config.yaml │ │ │ ├── patches │ │ │ │ └── basic.config.yaml │ │ │ └── kustomization.yaml │ │ ├── default │ │ │ ├── manager_metrics_patch.yaml │ │ │ └── metrics_service.yaml │ │ ├── rbac │ │ │ ├── metrics_reader_role.yaml │ │ │ ├── service_account.yaml │ │ │ ├── metrics_auth_role_binding.yaml │ │ │ ├── metrics_auth_role.yaml │ │ │ ├── role_binding.yaml │ │ │ ├── leader_election_role_binding.yaml │ │ │ ├── leader_election_role.yaml │ │ │ ├── memcached_admin_role.yaml │ │ │ └── memcached_viewer_role.yaml │ │ ├── manager │ │ │ └── kustomization.yaml │ │ ├── prometheus │ │ │ ├── kustomization.yaml │ │ │ └── monitor_tls_patch.yaml │ │ └── crd │ │ │ ├── kustomizeconfig.yaml │ │ │ └── kustomization.yaml │ ├── .dockerignore │ ├── bundle │ │ ├── manifests │ │ │ ├── memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ ├── memcached-operator-webhook-service_v1_service.yaml │ │ │ ├── memcached-operator-memcached-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ ├── memcached-operator-memcached-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ ├── memcached-operator-controller-manager-metrics-service_v1_service.yaml │ │ │ ├── memcached-operator-memcached-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ └── memcached-operator-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml │ │ └── metadata │ │ │ └── annotations.yaml │ ├── .github │ │ └── workflows │ │ │ ├── test.yml │ │ │ ├── lint.yml │ │ │ └── test-e2e.yml │ ├── .gitignore │ ├── hack │ │ └── boilerplate.go.txt │ ├── .devcontainer │ │ ├── devcontainer.json │ │ └── post-install.sh │ └── bundle.Dockerfile │ └── monitoring │ └── memcached-operator │ ├── config │ ├── network-policy │ │ └── kustomization.yaml │ ├── webhook │ │ ├── kustomization.yaml │ │ ├── service.yaml │ │ ├── manifests.yaml │ │ └── kustomizeconfig.yaml │ ├── samples │ │ ├── kustomization.yaml │ │ └── cache_v1alpha1_memcached.yaml │ ├── certmanager │ │ ├── kustomization.yaml │ │ ├── kustomizeconfig.yaml │ │ ├── issuer.yaml │ │ ├── certificate-webhook.yaml │ │ └── certificate-metrics.yaml │ ├── scorecard │ │ ├── bases │ │ │ └── config.yaml │ │ ├── patches │ │ │ └── basic.config.yaml │ │ └── kustomization.yaml │ ├── default │ │ ├── manager_metrics_patch.yaml │ │ └── metrics_service.yaml │ ├── rbac │ │ ├── metrics_reader_role.yaml │ │ ├── service_account.yaml │ │ ├── prometheus_role.yaml │ │ ├── metrics_auth_role_binding.yaml │ │ ├── prometheus_role_binding.yaml │ │ ├── metrics_auth_role.yaml │ │ ├── role_binding.yaml │ │ ├── leader_election_role_binding.yaml │ │ ├── leader_election_role.yaml │ │ ├── memcached_admin_role.yaml │ │ └── memcached_viewer_role.yaml │ ├── manager │ │ └── kustomization.yaml │ ├── prometheus │ │ ├── kustomization.yaml │ │ └── monitor_tls_patch.yaml │ └── crd │ │ ├── kustomizeconfig.yaml │ │ └── kustomization.yaml │ ├── .dockerignore │ ├── bundle │ ├── manifests │ │ ├── memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ ├── memcached-operator-prometheus-role_rbac.authorization.k8s.io_v1_role.yaml │ │ ├── memcached-operator-prometheus-role-binding_rbac.authorization.k8s.io_v1_rolebinding.yaml │ │ ├── memcached-operator-webhook-service_v1_service.yaml │ │ ├── memcached-operator-memcached-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ ├── memcached-operator-memcached-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ ├── memcached-operator-controller-manager-metrics-service_v1_service.yaml │ │ ├── memcached-operator-memcached-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ └── memcached-operator-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml │ └── metadata │ │ └── annotations.yaml │ ├── .github │ └── workflows │ │ ├── test.yml │ │ ├── lint.yml │ │ └── test-e2e.yml │ ├── .gitignore │ ├── hack │ └── boilerplate.go.txt │ ├── .devcontainer │ ├── devcontainer.json │ └── post-install.sh │ ├── docs │ └── monitoring │ │ └── metrics.md │ └── bundle.Dockerfile ├── website ├── content │ └── en │ │ ├── search.md │ │ ├── community │ │ └── _index.md │ │ ├── build │ │ └── images │ │ │ ├── Asset 1.png │ │ │ ├── Asset 2.png │ │ │ ├── logo-sm.svg │ │ │ └── arrow.svg │ │ └── docs │ │ ├── testing-operators │ │ └── _index.md │ │ ├── _index.md │ │ ├── building-operators │ │ ├── golang │ │ │ ├── references │ │ │ │ └── _index.md │ │ │ ├── _index.md │ │ │ └── installation.md │ │ ├── ansible │ │ │ ├── reference │ │ │ │ └── _index.md │ │ │ ├── OWNERS │ │ │ └── _index.md │ │ ├── helm │ │ │ ├── _index.md │ │ │ ├── reference │ │ │ │ ├── _index.md │ │ │ │ └── advanced_features │ │ │ │ │ └── _index.md │ │ │ └── installation.md │ │ └── _index.md │ │ ├── images │ │ ├── architecture.png │ │ ├── operator_logo_sdk_color.png │ │ ├── operator-capability-level.png │ │ └── operator-capability-level-transparent-bg.png │ │ ├── upgrading-sdk-version │ │ ├── v1.12.0.md │ │ ├── v1.19.0.md │ │ ├── v1.20.0.md │ │ ├── v1.27.0.md │ │ ├── v1.29.0.md │ │ ├── v1.32.0.md │ │ ├── v1.39.1.md │ │ ├── v1.39.2.md │ │ ├── v1.42.0.md │ │ ├── v1.8.0.md │ │ ├── v1.15.0.md │ │ ├── v1.35.0.md │ │ ├── v1.13.0.md │ │ ├── v1.30.0.md │ │ ├── v1.26.0.md │ │ ├── v1.24.0.md │ │ ├── _index.md │ │ ├── v1.9.0.md │ │ ├── v1.34.0.md │ │ ├── v1.37.0.md │ │ ├── v1.1.0.md │ │ └── v1.10.0.md │ │ ├── cli │ │ ├── _index.md │ │ ├── operator-sdk_completion_powershell.md │ │ ├── operator-sdk_version.md │ │ ├── operator-sdk_create.md │ │ ├── operator-sdk_generate_kustomize.md │ │ ├── operator-sdk_run.md │ │ ├── operator-sdk_olm_install.md │ │ ├── operator-sdk_olm.md │ │ ├── operator-sdk_generate.md │ │ ├── operator-sdk_completion_fish.md │ │ └── operator-sdk_olm_uninstall.md │ │ ├── contribution-guidelines │ │ ├── _index.md │ │ ├── faq.md │ │ └── changelog.md │ │ ├── advanced-topics │ │ └── _index.md │ │ ├── best-practices │ │ └── _index.md │ │ └── olm-integration │ │ └── _index.md ├── layouts │ ├── docs │ │ ├── single.html │ │ └── list.html │ ├── _default │ │ ├── single.html │ │ └── baseof.html │ ├── build │ │ └── single.html │ ├── partials │ │ ├── hooks │ │ │ ├── head-end.html │ │ │ └── body-end.html │ │ └── navbar-version-selector.html │ ├── shortcodes │ │ ├── table.html │ │ ├── kube-version.html │ │ └── client-go-version.html │ └── 404.html ├── static │ ├── ao-flow.png │ ├── architecture.png │ ├── favicons │ │ ├── favicon.ico │ │ ├── tile70x70.png │ │ ├── pwa-192x192.png │ │ ├── pwa-512x512.png │ │ ├── tile150x150.png │ │ ├── tile310x150.png │ │ ├── tile310x310.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ └── apple-touch-icon-180x180.png │ ├── operator_logo_sdk_color.png │ ├── operator-capability-level.png │ └── operator-capability-level-transparent-bg.png ├── assets │ └── scss │ │ └── _functions.scss └── scripts │ ├── set_menu_version.sh │ ├── update_download_url.sh │ └── update_latest_release_compat.sh ├── .ci └── gpg │ └── secring.auto.gpg ├── internal ├── validate │ ├── testdata │ │ ├── errors.sh │ │ ├── fails.sh │ │ └── passes.sh │ └── suite_test.go ├── scorecard │ ├── testdata │ │ ├── bundle.tar.gz │ │ ├── bundle │ │ │ ├── tests │ │ │ │ └── scorecard │ │ │ │ │ └── kuttl │ │ │ │ │ ├── kuttl-test.yaml │ │ │ │ │ └── list-pods │ │ │ │ │ ├── 00-assert.yaml │ │ │ │ │ └── 00-pod.yaml │ │ │ └── metadata │ │ │ │ └── annotations.yaml │ │ ├── generate-bundle-tarball.sh │ │ └── pod.yaml │ └── scorecard_suite_test.go ├── generate │ ├── testdata │ │ ├── memcached-operator.package.yaml │ │ └── go │ │ │ ├── PROJECT │ │ │ └── api │ │ │ ├── shared │ │ │ ├── doc.go │ │ │ └── memcached_types.go │ │ │ ├── v1alpha1 │ │ │ └── doc.go │ │ │ └── v1alpha2 │ │ │ └── doc.go │ ├── collector │ │ └── collector_suite_test.go │ ├── packagemanifest │ │ └── packagemanifest_suite_test.go │ └── clusterserviceversion │ │ ├── bases │ │ └── definitions │ │ │ └── definitions_suite_test.go │ │ └── clusterserviceversion_suite_test.go ├── plugins │ ├── helm │ │ └── v1 │ │ │ ├── chartutil │ │ │ └── testdata │ │ │ │ ├── test-chart-1.2.0.tgz │ │ │ │ ├── test-chart-1.2.3.tgz │ │ │ │ └── test-chart │ │ │ │ ├── templates │ │ │ │ ├── serviceaccount.yaml │ │ │ │ ├── service.yaml │ │ │ │ └── tests │ │ │ │ │ └── test-connection.yaml │ │ │ │ └── .helmignore │ │ │ └── scaffolds │ │ │ └── doc.go │ └── plugins.go ├── cmd │ ├── operator-sdk │ │ ├── pkgmantobundle │ │ │ ├── testdata │ │ │ │ └── packagemanifests │ │ │ │ │ ├── 0.0.1 │ │ │ │ │ ├── memcached-operator-controller-manager_v1_serviceaccount.yaml │ │ │ │ │ ├── memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ │ │ ├── memcached-operator-controller-manager-metrics-service_v1_service.yaml │ │ │ │ │ └── memcached-operator-manager-config_v1_configmap.yaml │ │ │ │ │ ├── 0.0.2 │ │ │ │ │ ├── memcached-operator-controller-manager_v1_serviceaccount.yaml │ │ │ │ │ ├── memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml │ │ │ │ │ ├── memcached-operator-controller-manager-metrics-service_v1_service.yaml │ │ │ │ │ └── memcached-operator-manager-config_v1_configmap.yaml │ │ │ │ │ └── memcached-operator.package.yaml │ │ │ └── pkgmantobundle_suite_test.go │ │ ├── generate │ │ │ ├── packagemanifests │ │ │ │ ├── testdata │ │ │ │ │ └── PROJECT │ │ │ │ └── packagemanifests_suite_test.go │ │ │ └── internal │ │ │ │ └── genutil_suite_test.go │ │ ├── cli │ │ │ └── cli_suite_test.go │ │ ├── olm │ │ │ └── olm_suite_test.go │ │ ├── run │ │ │ ├── run_suite_test.go │ │ │ └── packagemanifests │ │ │ │ └── packagemanifests_suite_test.go │ │ ├── bundle │ │ │ ├── bundle_suite_test.go │ │ │ └── validate │ │ │ │ ├── cmd_suite_test.go │ │ │ │ └── internal │ │ │ │ └── logger.go │ │ ├── alpha │ │ │ └── config3alphato3 │ │ │ │ └── suite_test.go │ │ └── scorecard │ │ │ └── scorecard_suite_test.go │ └── helm-operator │ │ └── version │ │ └── version_suite_test.go ├── markers │ └── markers.go ├── flags │ └── flags.go ├── helm │ ├── client │ │ └── doc.go │ ├── internal │ │ └── types │ │ │ └── doc.go │ ├── flags │ │ └── suite_test.go │ ├── release │ │ └── doc.go │ └── controller │ │ └── doc.go ├── olm │ ├── client │ │ └── client_suite_test.go │ ├── operator │ │ ├── operator_suite_test.go │ │ └── registry │ │ │ ├── registry_suite_test.go │ │ │ └── configmap │ │ │ └── configmap_suite_test.go │ └── installer │ │ └── installer_suite_test.go ├── registry │ ├── registry_suite_test.go │ └── logger.go ├── annotations │ └── metrics │ │ └── metrics_suite_test.go └── bindata │ └── olm │ └── versions.go ├── OWNERS ├── tools └── tools.go ├── .gitmodules ├── hack ├── generate │ └── samples │ │ └── internal │ │ └── helm │ │ ├── testdata │ │ └── memcached-0.0.2.tgz │ │ └── generate.go ├── check-license.sh └── check-links.sh ├── .github ├── workflows │ ├── clean-unused-disk-space.sh │ ├── olm-check.yml │ ├── rerun.yml │ ├── markdown-link-check-config.json │ ├── check-docs-only.sh │ └── freshen-images │ │ └── tags.sh ├── ISSUE_TEMPLATE.md ├── dependabot.yml └── ISSUE_TEMPLATE │ ├── feature-request.md │ └── doc-report.md ├── .cncf-maintainers ├── images ├── scorecard-storage │ └── Dockerfile └── scorecard-untar │ └── Dockerfile ├── SECURITY.md ├── proposals └── README.md ├── config └── crd │ └── bases │ └── _.yaml ├── netlify.toml └── test └── e2e ├── go └── scorecard_test.go └── helm └── scorecard_test.go /release/changelog/internal/testdata/ignore/non-yaml.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /changelog/generated/v1.39.1.md: -------------------------------------------------------------------------------- 1 | ## v1.39.1 2 | 3 | No changes for this release! 4 | -------------------------------------------------------------------------------- /changelog/generated/v1.39.2.md: -------------------------------------------------------------------------------- 1 | ## v1.39.2 2 | 3 | No changes for this release! 4 | -------------------------------------------------------------------------------- /changelog/generated/v1.42.0.md: -------------------------------------------------------------------------------- 1 | ## v1.42.0 2 | 3 | No changes for this release! 4 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/helm-charts/memcached/.helmignore: -------------------------------------------------------------------------------- 1 | .git 2 | OWNERS 3 | -------------------------------------------------------------------------------- /website/content/en/search.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Search Results 3 | layout: search 4 | --- 5 | -------------------------------------------------------------------------------- /website/layouts/docs/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Render "content" }} 3 | {{ end }} -------------------------------------------------------------------------------- /website/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Render "content" }} 3 | {{ end }} -------------------------------------------------------------------------------- /website/layouts/build/single.html: -------------------------------------------------------------------------------- 1 | {{ define "main" }} 2 | {{ .Render "content" }} 3 | {{ end }} -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/prometheus/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - monitor.yaml 3 | 4 | 5 | -------------------------------------------------------------------------------- /.ci/gpg/secring.auto.gpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/.ci/gpg/secring.auto.gpg -------------------------------------------------------------------------------- /internal/validate/testdata/errors.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | >&2 echo -n "validator runtime error" 4 | exit 1 5 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/network-policy/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - allow-metrics-traffic.yaml 3 | -------------------------------------------------------------------------------- /website/content/en/community/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Community 3 | # menu: 4 | # main: 5 | # weight: 5 6 | --- 7 | -------------------------------------------------------------------------------- /website/static/ao-flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/ao-flow.png -------------------------------------------------------------------------------- /website/assets/scss/_functions.scss: -------------------------------------------------------------------------------- 1 | $font_size: 16; 2 | @function rem($pixels){ 3 | @return $pixels / $font_size + rem; 4 | } -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | approvers: 2 | - sdk-admins 3 | - sdk-approvers 4 | reviewers: 5 | - sdk-admins 6 | - sdk-approvers 7 | - sdk-reviewers 8 | -------------------------------------------------------------------------------- /tools/tools.go: -------------------------------------------------------------------------------- 1 | // +build tools 2 | 3 | package tools 4 | 5 | import ( 6 | _ "github.com/maxbrunsfeld/counterfeiter/v6" 7 | ) 8 | -------------------------------------------------------------------------------- /website/static/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/architecture.png -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "website/themes/docsy"] 2 | path = website/themes/docsy 3 | url = https://github.com/asmacdo/docsy.git 4 | 5 | -------------------------------------------------------------------------------- /website/static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/favicon.ico -------------------------------------------------------------------------------- /website/static/favicons/tile70x70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/tile70x70.png -------------------------------------------------------------------------------- /website/static/favicons/pwa-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/pwa-192x192.png -------------------------------------------------------------------------------- /website/static/favicons/pwa-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/pwa-512x512.png -------------------------------------------------------------------------------- /website/static/favicons/tile150x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/tile150x150.png -------------------------------------------------------------------------------- /website/static/favicons/tile310x150.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/tile310x150.png -------------------------------------------------------------------------------- /website/static/favicons/tile310x310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/tile310x310.png -------------------------------------------------------------------------------- /internal/scorecard/testdata/bundle.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/internal/scorecard/testdata/bundle.tar.gz -------------------------------------------------------------------------------- /website/content/en/build/images/Asset 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/content/en/build/images/Asset 1.png -------------------------------------------------------------------------------- /website/content/en/build/images/Asset 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/content/en/build/images/Asset 2.png -------------------------------------------------------------------------------- /website/static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /website/static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /website/static/operator_logo_sdk_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/operator_logo_sdk_color.png -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/network-policy/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - allow-webhook-traffic.yaml 3 | - allow-metrics-traffic.yaml 4 | -------------------------------------------------------------------------------- /website/content/en/docs/testing-operators/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Testing Operators 3 | weight: 3 4 | description: How to test your operators 5 | --- 6 | -------------------------------------------------------------------------------- /website/static/operator-capability-level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/operator-capability-level.png -------------------------------------------------------------------------------- /release/changelog/internal/testdata/invalid_entry/fragment1.yaml: -------------------------------------------------------------------------------- 1 | entries: 2 | - description: Addition description 0 3 | kind: addition 4 | breaking: true -------------------------------------------------------------------------------- /website/content/en/docs/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Operator SDK Documentation 3 | linkTitle: Documentation 4 | menu: 5 | main: 6 | weight: 2 7 | --- 8 | 9 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/golang/references/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Go-based Operator Reference 3 | linkTitle: Reference 4 | weight: 100 5 | --- -------------------------------------------------------------------------------- /website/content/en/docs/images/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/content/en/docs/images/architecture.png -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/network-policy/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - allow-webhook-traffic.yaml 3 | - allow-metrics-traffic.yaml 4 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.12.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.12.0 3 | weight: 998988000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.19.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.19.0 3 | weight: 998981000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.20.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.20.0 3 | weight: 998980000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.27.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.27.0 3 | weight: 998973000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.29.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.29.0 3 | weight: 998971000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.32.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.32.0 3 | weight: 998968000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.39.1.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.39.1 3 | weight: 998960999 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.39.2.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.39.2 3 | weight: 998960998 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.42.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.42.0 3 | weight: 998958000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.8.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.8.0 3 | weight: 998992000 4 | --- 5 | 6 | There are no migrations for this release! 🎉 7 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/ansible/reference/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ansible Based Operator Reference 3 | linkTitle: Reference 4 | weight: 200 5 | --- 6 | -------------------------------------------------------------------------------- /website/static/favicons/apple-touch-icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/favicons/apple-touch-icon-180x180.png -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/webhook/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manifests.yaml 3 | - service.yaml 4 | 5 | configurations: 6 | - kustomizeconfig.yaml 7 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/golang/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Go 3 | weight: 2 4 | description: Guide to building a Go-based Operator using Operator SDK 5 | --- 6 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Command Line Interface 3 | linkTitle: Commands 4 | weight: 7 5 | description: Working with the operator-sdk CLI 6 | --- 7 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.dockerignore: -------------------------------------------------------------------------------- 1 | # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file 2 | # Ignore build and test binaries. 3 | bin/ 4 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/helm/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Helm 3 | weight: 3 4 | description: Guide to building a Helm Based Operator using Operator SDK 5 | --- 6 | -------------------------------------------------------------------------------- /website/content/en/docs/images/operator_logo_sdk_color.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/content/en/docs/images/operator_logo_sdk_color.png -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/webhook/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manifests.yaml 3 | - service.yaml 4 | 5 | configurations: 6 | - kustomizeconfig.yaml 7 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/ansible/OWNERS: -------------------------------------------------------------------------------- 1 | approvers: 2 | - fabianvf 3 | - jmrodri 4 | - asmacdo 5 | reviewers: 6 | - fabianvf 7 | - jmrodri 8 | - asmacdo 9 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/ansible/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Ansible 3 | weight: 1 4 | description: Guide to building a Ansible Based Operator using Operator SDK 5 | --- 6 | -------------------------------------------------------------------------------- /website/content/en/docs/images/operator-capability-level.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/content/en/docs/images/operator-capability-level.png -------------------------------------------------------------------------------- /website/static/operator-capability-level-transparent-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/static/operator-capability-level-transparent-bg.png -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.dockerignore: -------------------------------------------------------------------------------- 1 | # More info: https://docs.docker.com/engine/reference/builder/#dockerignore-file 2 | # Ignore build and test binaries. 3 | bin/ 4 | -------------------------------------------------------------------------------- /hack/generate/samples/internal/helm/testdata/memcached-0.0.2.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/hack/generate/samples/internal/helm/testdata/memcached-0.0.2.tgz -------------------------------------------------------------------------------- /internal/generate/testdata/memcached-operator.package.yaml: -------------------------------------------------------------------------------- 1 | channels: 2 | - currentCSV: memcached-operator.v0.0.1 3 | name: alpha 4 | defaultChannel: alpha 5 | packageName: memcached-operator 6 | -------------------------------------------------------------------------------- /internal/plugins/helm/v1/chartutil/testdata/test-chart-1.2.0.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/internal/plugins/helm/v1/chartutil/testdata/test-chart-1.2.0.tgz -------------------------------------------------------------------------------- /internal/plugins/helm/v1/chartutil/testdata/test-chart-1.2.3.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/internal/plugins/helm/v1/chartutil/testdata/test-chart-1.2.3.tgz -------------------------------------------------------------------------------- /website/content/en/docs/contribution-guidelines/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: How to Contribute 3 | linkTitle: Contribution Guide 4 | weight: 11 5 | description: Contribute to Operator SDK 6 | --- 7 | -------------------------------------------------------------------------------- /changelog/generated/v1.36.0.md: -------------------------------------------------------------------------------- 1 | ## v1.36.0 2 | 3 | ### Changes 4 | 5 | - - Upgrade Kubernetes dependencies from `1.28` to `1.29`. ([#6736](https://github.com/operator-framework/operator-sdk/pull/6736)) 6 | -------------------------------------------------------------------------------- /website/content/en/docs/advanced-topics/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Advanced Topics" 3 | linkTitle: "Advanced Topics" 4 | weight: 9 5 | date: 2021-10-05 6 | description: > 7 | Advanced Topics. 8 | --- 9 | -------------------------------------------------------------------------------- /internal/scorecard/testdata/bundle/tests/scorecard/kuttl/kuttl-test.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kudo.dev/v1beta1 2 | kind: TestSuite 3 | parallel: 4 4 | timeout: 120 5 | startControlPlane: false 6 | suppressLog: events 7 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/samples/kustomization.yaml: -------------------------------------------------------------------------------- 1 | ## Append samples of your project ## 2 | resources: 3 | - cache_v1alpha1_memcached.yaml 4 | # +kubebuilder:scaffold:manifestskustomizesamples 5 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/samples/kustomization.yaml: -------------------------------------------------------------------------------- 1 | ## Append samples of your project ## 2 | resources: 3 | - cache_v1alpha1_memcached.yaml 4 | # +kubebuilder:scaffold:manifestskustomizesamples 5 | -------------------------------------------------------------------------------- /website/layouts/partials/hooks/head-end.html: -------------------------------------------------------------------------------- 1 | {{ with .Site.Params.algolia_docsearch }} 2 | 3 | {{ end }} 4 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/certmanager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - issuer.yaml 3 | - certificate-webhook.yaml 4 | - certificate-metrics.yaml 5 | 6 | configurations: 7 | - kustomizeconfig.yaml 8 | -------------------------------------------------------------------------------- /website/content/en/docs/images/operator-capability-level-transparent-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/operator-framework/operator-sdk/HEAD/website/content/en/docs/images/operator-capability-level-transparent-bg.png -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/samples/kustomization.yaml: -------------------------------------------------------------------------------- 1 | ## Append samples of your project ## 2 | resources: 3 | - cache_v1alpha1_memcached.yaml 4 | # +kubebuilder:scaffold:manifestskustomizesamples 5 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/scorecard/bases/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: scorecard.operatorframework.io/v1alpha3 2 | kind: Configuration 3 | metadata: 4 | name: config 5 | stages: 6 | - parallel: true 7 | tests: [] 8 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/certmanager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - issuer.yaml 3 | - certificate-webhook.yaml 4 | - certificate-metrics.yaml 5 | 6 | configurations: 7 | - kustomizeconfig.yaml 8 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/scorecard/bases/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: scorecard.operatorframework.io/v1alpha3 2 | kind: Configuration 3 | metadata: 4 | name: config 5 | stages: 6 | - parallel: true 7 | tests: [] 8 | -------------------------------------------------------------------------------- /website/content/en/docs/best-practices/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Best Practices" 3 | linkTitle: "Best Practices" 4 | weight: 10 5 | description: > 6 | Best practices, conventions and recommendations to work with SDK 7 | --- 8 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Building Operators" 3 | linkTitle: "Building Operators" 4 | weight: 3 5 | date: 2020-07-09 6 | description: > 7 | Building operators using Operator SDK. 8 | --- -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/helm/reference/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Reference for Helm-based Operators 3 | linkTitle: Reference 4 | weight: 400 5 | description: Detailed information about Helm-based operators 6 | --- 7 | -------------------------------------------------------------------------------- /changelog/generated/v1.34.0.md: -------------------------------------------------------------------------------- 1 | ## v1.34.0 2 | 3 | ### Bug Fixes 4 | 5 | - (helm/v1) Fix an issue that multi-arch images cannot be built from the project Makefile. ([#6661](https://github.com/operator-framework/operator-sdk/pull/6661)) 6 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/scorecard/bases/config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: scorecard.operatorframework.io/v1alpha3 2 | kind: Configuration 3 | metadata: 4 | name: config 5 | stages: 6 | - parallel: true 7 | tests: [] 8 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Binaries for programs and plugins 3 | *.exe 4 | *.exe~ 5 | *.dll 6 | *.so 7 | *.dylib 8 | bin 9 | 10 | # editor and IDE paraphernalia 11 | .idea 12 | *.swp 13 | *.swo 14 | *~ 15 | -------------------------------------------------------------------------------- /internal/generate/testdata/go/PROJECT: -------------------------------------------------------------------------------- 1 | domain: example.com 2 | projectName: memcached-operator 3 | repo: github.com/example/memcached-operator 4 | resources: 5 | - group: cache 6 | kind: Memcached 7 | version: v1alpha1 8 | version: 3-alpha 9 | -------------------------------------------------------------------------------- /internal/scorecard/testdata/bundle/tests/scorecard/kuttl/list-pods/00-assert.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | labels: 5 | app: nginx 6 | spec: 7 | containers: 8 | - name: nginx 9 | image: nginx:1.7.9 10 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/watches.yaml: -------------------------------------------------------------------------------- 1 | # Use the 'create api' subcommand to add watches to this file. 2 | - group: cache.example.com 3 | version: v1alpha1 4 | kind: Memcached 5 | chart: helm-charts/memcached 6 | # +kubebuilder:scaffold:watch 7 | -------------------------------------------------------------------------------- /internal/scorecard/testdata/bundle/tests/scorecard/kuttl/list-pods/00-pod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: pod-1 5 | labels: 6 | app: nginx 7 | spec: 8 | containers: 9 | - name: nginx 10 | image: nginx:1.7.9 11 | -------------------------------------------------------------------------------- /internal/scorecard/testdata/generate-bundle-tarball.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -eu 4 | 5 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" 6 | 7 | pushd "${DIR}/bundle" 8 | tar zcvf "${DIR}/bundle.tar.gz" * 9 | popd 10 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/default/manager_metrics_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch adds the args to allow exposing the metrics endpoint using HTTPS 2 | - op: add 3 | path: /spec/template/spec/containers/0/args/0 4 | value: --metrics-bind-address=:8443 5 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/metrics_reader_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: metrics-reader 5 | rules: 6 | - nonResourceURLs: 7 | - "/metrics" 8 | verbs: 9 | - get 10 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/Dockerfile: -------------------------------------------------------------------------------- 1 | # Build the manager binary 2 | FROM quay.io/operator-framework/helm-operator:v1.42.0 3 | 4 | ENV HOME=/opt/helm 5 | COPY watches.yaml ${HOME}/watches.yaml 6 | COPY helm-charts ${HOME}/helm-charts 7 | WORKDIR ${HOME} 8 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/metrics_reader_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: metrics-reader 5 | rules: 6 | - nonResourceURLs: 7 | - "/metrics" 8 | verbs: 9 | - get 10 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.1/memcached-operator-controller-manager_v1_serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-controller-manager 6 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.2/memcached-operator-controller-manager_v1_serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-controller-manager 6 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/default/manager_metrics_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch adds the args to allow exposing the metrics endpoint using HTTPS 2 | - op: add 3 | path: /spec/template/spec/containers/0/args/0 4 | value: --metrics-bind-address=:8443 5 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/metrics_reader_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: metrics-reader 5 | rules: 6 | - nonResourceURLs: 7 | - "/metrics" 8 | verbs: 9 | - get 10 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manager.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | images: 6 | - name: controller 7 | newName: quay.io/example/memcached-operator 8 | newTag: v0.0.1 9 | -------------------------------------------------------------------------------- /website/layouts/shortcodes/table.html: -------------------------------------------------------------------------------- 1 | {{ $htmlTable := .Inner | markdownify }} 2 | {{ $class := .Get 0 }} 3 | {{ $old := "" }} 4 | {{ $new := printf "
" $class }} 5 | {{ $htmlTable := replace $htmlTable $old $new }} 6 | {{ $htmlTable | safeHTML }} 7 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manager.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | images: 6 | - name: controller 7 | newName: quay.io/example/memcached-operator 8 | newTag: v0.0.1 9 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/helm/reference/advanced_features/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Advanced Features of Helm-based Operators 3 | linkTitle: Advanced Features 4 | weight: 300 5 | description: Descriptions of the advanced features of Helm-based operators 6 | --- 7 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/service_account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: controller-manager 8 | namespace: system 9 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/manager/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - manager.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | images: 6 | - name: controller 7 | newName: quay.io/example/memcached-operator 8 | newTag: v0.0.1 9 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/service_account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: controller-manager 8 | namespace: system 9 | -------------------------------------------------------------------------------- /website/content/en/docs/olm-integration/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Operator SDK Integration with Operator Lifecycle Manager 3 | linkTitle: OLM Integration 4 | weight: 8 5 | description: Use operator-sdk to install OLM, package operators for OLM, and install and run Operators with OLM 6 | --- 7 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/service_account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: controller-manager 8 | namespace: system 9 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/manifests/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # These resources constitute the fully configured set of manifests 2 | # used to generate the 'manifests/' directory in a bundle. 3 | resources: 4 | - bases/memcached-operator.clusterserviceversion.yaml 5 | - ../default 6 | - ../samples 7 | - ../scorecard 8 | -------------------------------------------------------------------------------- /internal/plugins/helm/v1/chartutil/testdata/test-chart/templates/serviceaccount.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.serviceAccount.create -}} 2 | apiVersion: v1 3 | kind: ServiceAccount 4 | metadata: 5 | name: {{ include "test-chart.serviceAccountName" . }} 6 | labels: 7 | {{ include "test-chart.labels" . | nindent 4 }} 8 | {{- end -}} 9 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/memcached-operator.package.yaml: -------------------------------------------------------------------------------- 1 | channels: 2 | - currentCSV: memcached-operator.v0.0.1 3 | name: memcached-operator.v0.0.1 4 | - currentCSV: memcached-operator.v0.0.2 5 | name: memcached-operator.v0.0.2 6 | defaultChannel: alpha 7 | packageName: memcached-operator 8 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/certmanager/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This configuration is for teaching kustomize how to update name ref substitution 2 | nameReference: 3 | - kind: Issuer 4 | group: cert-manager.io 5 | fieldSpecs: 6 | - kind: Certificate 7 | group: cert-manager.io 8 | path: spec/issuerRef/name 9 | -------------------------------------------------------------------------------- /.github/workflows/clean-unused-disk-space.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | echo "Removing unused system files to gain more disk space" 6 | rm -fr /opt/hostedtoolcache 7 | cd /opt 8 | find . -maxdepth 1 -mindepth 1 '!' -path ./containerd '!' -path ./actionarchivecache '!' -path ./runner '!' -path ./runner-cache -exec rm -rf '{}' ';' -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/certmanager/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This configuration is for teaching kustomize how to update name ref substitution 2 | nameReference: 3 | - kind: Issuer 4 | group: cert-manager.io 5 | fieldSpecs: 6 | - kind: Certificate 7 | group: cert-manager.io 8 | path: spec/issuerRef/name 9 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/scorecard/patches/basic.config.yaml: -------------------------------------------------------------------------------- 1 | - op: add 2 | path: /stages/0/tests/- 3 | value: 4 | entrypoint: 5 | - scorecard-test 6 | - basic-check-spec 7 | image: quay.io/operator-framework/scorecard-test:v1.42.0 8 | labels: 9 | suite: basic 10 | test: basic-check-spec-test 11 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/scorecard/patches/basic.config.yaml: -------------------------------------------------------------------------------- 1 | - op: add 2 | path: /stages/0/tests/- 3 | value: 4 | entrypoint: 5 | - scorecard-test 6 | - basic-check-spec 7 | image: quay.io/operator-framework/scorecard-test:v1.42.0 8 | labels: 9 | suite: basic 10 | test: basic-check-spec-test 11 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/prometheus_role.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | name: prometheus-role 6 | namespace: system 7 | rules: 8 | - apiGroups: [""] 9 | resources: 10 | - services 11 | - endpoints 12 | - pods 13 | verbs: ["get", "list"] 14 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/scorecard/patches/basic.config.yaml: -------------------------------------------------------------------------------- 1 | - op: add 2 | path: /stages/0/tests/- 3 | value: 4 | entrypoint: 5 | - scorecard-test 6 | - basic-check-spec 7 | image: quay.io/operator-framework/scorecard-test:v1.42.0 8 | labels: 9 | suite: basic 10 | test: basic-check-spec-test 11 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle/manifests/memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/crd/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # This kustomization.yaml is not intended to be run by itself, 2 | # since it depends on service name and namespace that are out of this kustomize package. 3 | # It should be run by config/default 4 | resources: 5 | - bases/cache.example.com_memcacheds.yaml 6 | # +kubebuilder:scaffold:crdkustomizeresource 7 | -------------------------------------------------------------------------------- /.cncf-maintainers: -------------------------------------------------------------------------------- 1 | approvers: 2 | - OchiengEd 3 | - acornett21 4 | - anik120 5 | - camilamacedo86 6 | - grokspawn 7 | - jberkhahn 8 | - joelanford 9 | - oceanc80 10 | - rashmigottipati 11 | reviewers: 12 | - OchiengEd 13 | - acornett21 14 | - anik120 15 | - camilamacedo86 16 | - grokspawn 17 | - jberkhahn 18 | - joelanford 19 | - oceanc80 20 | - rashmigottipati 21 | -------------------------------------------------------------------------------- /images/scorecard-storage/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docker.io/busybox:1.36 2 | 3 | ## Create a new non-root user to run as 4 | ENV HOME=/opt/scorecard-untar \ 5 | USER_NAME=scorecard-untar \ 6 | USER_UID=1001 7 | 8 | RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd 9 | 10 | WORKDIR ${HOME} 11 | 12 | USER ${USER_UID} 13 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/manifests/memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /website/layouts/_default/baseof.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{ partial "head.html" . }} 5 | 6 | 7 | {{ partial "navbar.html" . }} 8 | {{ block "main" . }} 9 | {{ end }} 10 | {{ partial "footer.html" . }} 11 | 12 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/manifests/memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /images/scorecard-untar/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi9/ubi:9.5 2 | 3 | ## Create a new non-root user to run as 4 | ENV HOME=/opt/scorecard-untar \ 5 | USER_NAME=scorecard-untar \ 6 | USER_UID=1001 7 | 8 | RUN echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd 9 | 10 | WORKDIR ${HOME} 11 | 12 | USER ${USER_UID} 13 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.1/memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.2/memcached-operator-metrics-reader_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-metrics-reader 6 | rules: 7 | - nonResourceURLs: 8 | - /metrics 9 | verbs: 10 | - get 11 | -------------------------------------------------------------------------------- /website/content/en/build/images/logo-sm.svg: -------------------------------------------------------------------------------- 1 | Asset 8 -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Operator SDK makes a constant stream of releases. In general, this means that security 6 | updates will be made in minor releases for the most recent major release only. 7 | 8 | ## Reporting a Vulnerability 9 | 10 | To report a vulnerability, please follow the instructions at 11 | https://access.redhat.com/security/team/contact 12 | -------------------------------------------------------------------------------- /internal/validate/testdata/fails.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cat < 3 |
4 |

Not found

5 |

Oops! This page doesn't exist. Try going back to our home page.

6 | 7 |

You can learn how to make a 404 page like this in Custom 404 Pages.

8 |
9 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /changelog/generated/v1.37.0.md: -------------------------------------------------------------------------------- 1 | ## v1.37.0 2 | 3 | ### Removals 4 | 5 | - **Breaking change**: Remove the Quarkus plugin (java-operator-plugins integration). ([#6824](https://github.com/operator-framework/operator-sdk/pull/6824)) 6 | - **Breaking change**: (hybrid.helm/v1-alpha) Remove hybrid-helm v1-alpha support, due to low adoption, in favor of maintenance simplicity. ([#6833](https://github.com/operator-framework/operator-sdk/pull/6833)) 7 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/metrics_auth_role.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | name: metrics-auth-role 5 | rules: 6 | - apiGroups: 7 | - authentication.k8s.io 8 | resources: 9 | - tokenreviews 10 | verbs: 11 | - create 12 | - apiGroups: 13 | - authorization.k8s.io 14 | resources: 15 | - subjectaccessreviews 16 | verbs: 17 | - create 18 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.15.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.15.0 3 | weight: 998985000 4 | --- 5 | 6 | ## Update ansible collection ``community.kubernetes`` to ``kubernetes.core`` 7 | 8 | Add the ``kubernetes.core`` collection (>= 2.2.0) to the requrements.yml file 9 | - name: kubernetes.core 10 | version: "2.2.0" 11 | 12 | _See [#5249](https://github.com/operator-framework/operator-sdk/pull/5249) for more details._ 13 | -------------------------------------------------------------------------------- /config/crd/bases/_.yaml: -------------------------------------------------------------------------------- 1 | 2 | --- 3 | apiVersion: apiextensions.k8s.io/v1beta1 4 | kind: CustomResourceDefinition 5 | metadata: 6 | annotations: 7 | controller-gen.kubebuilder.io/version: v0.3.0 8 | creationTimestamp: null 9 | spec: 10 | group: "" 11 | names: 12 | kind: "" 13 | plural: "" 14 | scope: "" 15 | status: 16 | acceptedNames: 17 | kind: "" 18 | plural: "" 19 | conditions: null 20 | storedVersions: null 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /website/layouts/partials/navbar-version-selector.html: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /.github/workflows/markdown-link-check-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignorePatterns": [ 3 | { "pattern": "^https://github.com/.+" }, 4 | { "pattern": "^mailto:" } 5 | ], 6 | 7 | "httpHeaders": [ 8 | { 9 | "urls": ["https://docs.github.com"], 10 | "headers": { 11 | "User-Agent": "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0" 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.35.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.35.0 3 | weight: 998965000 4 | --- 5 | 6 | ## Fix helm-operator scaffolding that was broken in 1.34.0, 1.34.1, and 1.34.2 7 | 8 | Users who scaffolded a helm-operator project with 1.34.0, 1.34.1, or 1.34.2 9 | need re-generate the project in order to get a fixed `config/rbac/role.yaml` file. 10 | 11 | _See [#6769](https://github.com/operator-framework/operator-sdk/pull/6769) for more details._ 12 | -------------------------------------------------------------------------------- /changelog/generated/v1.35.0.md: -------------------------------------------------------------------------------- 1 | ## v1.35.0 2 | 3 | ### Changes 4 | 5 | - For Ansible-based operators, upgrade the version of the Ansible Operator Plugin used in operator-sdk to v1.34.2. ([#6749](https://github.com/operator-framework/operator-sdk/pull/6749)) 6 | 7 | ### Bug Fixes 8 | 9 | - (helm/v1) Fix broken helm-operator role scaffolding which causes reconciler to hang due to lack of permissions. ([#6769](https://github.com/operator-framework/operator-sdk/pull/6769)) 10 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/generate/packagemanifests/testdata/PROJECT: -------------------------------------------------------------------------------- 1 | domain: example.com 2 | layout: go.kubebuilder.io/v3-alpha 3 | projectName: memcached-operator 4 | repo: github.com/example/memcached-operator 5 | resources: 6 | - crdVersion: v1 7 | group: cache 8 | kind: Memcached 9 | version: v1alpha1 10 | webhookVersion: v1 11 | version: 3-alpha 12 | plugins: 13 | manifests.sdk.operatorframework.io/v2: {} 14 | scorecard.sdk.operatorframework.io/v2: {} 15 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/webhook/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: webhook-service 8 | namespace: system 9 | spec: 10 | ports: 11 | - port: 443 12 | protocol: TCP 13 | targetPort: 9443 14 | selector: 15 | control-plane: controller-manager 16 | app.kubernetes.io/name: memcached-operator 17 | -------------------------------------------------------------------------------- /changelog/generated/v1.15.0.md: -------------------------------------------------------------------------------- 1 | ## v1.15.0 2 | 3 | ### Changes 4 | 5 | - Bumped community.kubernetes to kubernetes.core >= 2.2.0. Added the kubernetes.core collection to requirements. ([#5249](https://github.com/operator-framework/operator-sdk/pull/5249)) 6 | 7 | ### Bug Fixes 8 | 9 | - For Ansible operators, if an API endpoint has a "/" in server path component the ansible binary will no longer throw error. ([#5308](https://github.com/operator-framework/operator-sdk/pull/5308)) 10 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/webhook/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: webhook-service 8 | namespace: system 9 | spec: 10 | ports: 11 | - port: 443 12 | protocol: TCP 13 | targetPort: 9443 14 | selector: 15 | control-plane: controller-manager 16 | app.kubernetes.io/name: memcached-operator 17 | -------------------------------------------------------------------------------- /website/layouts/partials/hooks/body-end.html: -------------------------------------------------------------------------------- 1 | {{ with .Site.Params.algolia_docsearch }} 2 | 3 | 10 | {{ end }} 11 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: manager-rolebinding 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: ClusterRole 11 | name: manager-role 12 | subjects: 13 | - kind: ServiceAccount 14 | name: controller-manager 15 | namespace: system 16 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: manager-rolebinding 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: ClusterRole 11 | name: manager-role 12 | subjects: 13 | - kind: ServiceAccount 14 | name: controller-manager 15 | namespace: system 16 | -------------------------------------------------------------------------------- /internal/plugins/helm/v1/chartutil/testdata/test-chart/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *~ 18 | # Various IDEs 19 | .project 20 | .idea/ 21 | *.tmproj 22 | .vscode/ 23 | -------------------------------------------------------------------------------- /internal/plugins/helm/v1/chartutil/testdata/test-chart/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "test-chart.fullname" . }} 5 | labels: 6 | {{- include "test-chart.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "test-chart.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: manager-rolebinding 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: ClusterRole 11 | name: manager-role 12 | subjects: 13 | - kind: ServiceAccount 14 | name: controller-manager 15 | namespace: system 16 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.13.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.13.0 3 | weight: 998987000 4 | --- 5 | 6 | ## (Optional) Update local version of `ansible-runner` 7 | 8 | `ansible-runner` 2.0+ includes a backwards incompatible change in the command signature, so in order to use `make run` with Ansible-based operators, users will need to upgrade their local version of `ansible-runner` to 2.0.2+ 9 | 10 | _See [#5205](https://github.com/operator-framework/operator-sdk/pull/5205) for more details._ 11 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/leader_election_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: leader-election-rolebinding 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: Role 11 | name: leader-election-role 12 | subjects: 13 | - kind: ServiceAccount 14 | name: controller-manager 15 | namespace: system 16 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/leader_election_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: leader-election-rolebinding 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: Role 11 | name: leader-election-role 12 | subjects: 13 | - kind: ServiceAccount 14 | name: controller-manager 15 | namespace: system 16 | -------------------------------------------------------------------------------- /website/content/en/docs/contribution-guidelines/faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: FAQ 3 | weight: 200 4 | --- 5 | 6 | #### Q: If I find a problem, should I file a Pull Request or an Issue? 7 | 8 | A: We suggest that you start by filing an issue to potentially save 9 | contributors the implementation time if the change cannot be accepted 10 | for some reason. However, if it is easier to just submit a PR that is 11 | always fine. If you do choose to start with a Pull Request, please make 12 | sure that the motivation is included. 13 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.1/memcached-operator-controller-manager-metrics-service_v1_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | control-plane: controller-manager 7 | name: memcached-operator-controller-manager-metrics-service 8 | spec: 9 | ports: 10 | - name: https 11 | port: 8443 12 | targetPort: https 13 | selector: 14 | control-plane: controller-manager 15 | status: 16 | loadBalancer: {} 17 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.2/memcached-operator-controller-manager-metrics-service_v1_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | control-plane: controller-manager 7 | name: memcached-operator-controller-manager-metrics-service 8 | spec: 9 | ports: 10 | - name: https 11 | port: 8443 12 | targetPort: https 13 | selector: 14 | control-plane: controller-manager 15 | status: 16 | loadBalancer: {} 17 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/leader_election_role_binding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: leader-election-rolebinding 8 | roleRef: 9 | apiGroup: rbac.authorization.k8s.io 10 | kind: Role 11 | name: leader-election-role 12 | subjects: 13 | - kind: ServiceAccount 14 | name: controller-manager 15 | namespace: system 16 | -------------------------------------------------------------------------------- /changelog/generated/v1.12.0.md: -------------------------------------------------------------------------------- 1 | ## v1.12.0 2 | 3 | ### Additions 4 | 5 | - If an optional UniqueID is provided by a user in the scorecard config and the user generates XML output the UID will be appended to the test result output. ([#5092](https://github.com/operator-framework/operator-sdk/pull/5092)) 6 | 7 | ### Bug Fixes 8 | 9 | - Preserve the order of `webhookdefinitions` while generating bundles, by sorting `webhookDescriptions` in CSV generator. ([#5177](https://github.com/operator-framework/operator-sdk/pull/5177)) 10 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/manifests/memcached-operator-prometheus-role-binding_rbac.authorization.k8s.io_v1_rolebinding.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: RoleBinding 3 | metadata: 4 | creationTimestamp: null 5 | name: memcached-operator-prometheus-role-binding 6 | roleRef: 7 | apiGroup: rbac.authorization.k8s.io 8 | kind: Role 9 | name: memcached-operator-prometheus-role 10 | subjects: 11 | - kind: ServiceAccount 12 | name: prometheus-k8s 13 | namespace: monitoring 14 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.30.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.30.0 3 | weight: 998970000 4 | --- 5 | 6 | ## Header text for the migration section 7 | 8 | Body of the migration section. This should be formatted as markdown and can 9 | span multiple lines. 10 | 11 | Using the YAML string '|' operator means that newlines in this string will 12 | be honored and interpretted as newlines in the rendered markdown. 13 | 14 | _See [#6426](https://github.com/operator-framework/operator-sdk/pull/6426) for more details._ 15 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | test: 9 | name: Run on Ubuntu 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Clone the code 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Go 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version-file: go.mod 19 | 20 | - name: Running Tests 21 | run: | 22 | go mod tidy 23 | make test 24 | -------------------------------------------------------------------------------- /internal/plugins/helm/v1/chartutil/testdata/test-chart/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "test-chart.fullname" . }}-test-connection" 5 | labels: 6 | {{ include "test-chart.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test-success 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "test-chart.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | test: 9 | name: Run on Ubuntu 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Clone the code 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Go 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version-file: go.mod 19 | 20 | - name: Running Tests 21 | run: | 22 | go mod tidy 23 | make test 24 | -------------------------------------------------------------------------------- /website/layouts/shortcodes/kube-version.html: -------------------------------------------------------------------------------- 1 | {{- $siteURL := .Page.Site.BaseURL -}} 2 | {{- $done := false -}} 3 | {{- range .Page.Site.Params.versions -}} 4 | {{- $verUrl := printf "%s/" .url -}} 5 | {{- if eq $verUrl $siteURL -}} 6 | {{- $done = true -}} 7 | {{- .kube_version -}} 8 | {{- end -}} 9 | {{- end -}} 10 | {{- if eq $done false -}} 11 | {{- range where .Page.Site.Params.versions "version" "Latest Release" -}} 12 | {{- .kube_version -}} 13 | {{- end -}} 14 | {{- end -}} 15 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | lint: 9 | name: Run on Ubuntu 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Clone the code 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Go 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version-file: go.mod 19 | 20 | - name: Run linter 21 | uses: golangci/golangci-lint-action@v8 22 | with: 23 | version: v2.1.0 24 | -------------------------------------------------------------------------------- /hack/check-license.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | source "hack/lib/common.sh" 8 | 9 | echo "Checking for license header..." 10 | allfiles=$(listFiles|grep -v ./internal/bindata/...) 11 | licRes="" 12 | for file in $allfiles; do 13 | if ! head -n3 "${file}" | grep -Eq "(Copyright|generated|GENERATED|Licensed)" ; then 14 | licRes="${licRes}\n"$(echo -e " ${file}") 15 | fi 16 | done 17 | if [ -n "${licRes}" ]; then 18 | echo -e "license header checking failed:\n${licRes}" 19 | exit 255 20 | fi 21 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/default/metrics_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | control-plane: controller-manager 6 | app.kubernetes.io/name: memcached-operator 7 | app.kubernetes.io/managed-by: kustomize 8 | name: controller-manager-metrics-service 9 | namespace: system 10 | spec: 11 | ports: 12 | - name: https 13 | port: 8443 14 | protocol: TCP 15 | targetPort: 8443 16 | selector: 17 | control-plane: controller-manager 18 | app.kubernetes.io/name: memcached-operator 19 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/default/metrics_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | control-plane: controller-manager 6 | app.kubernetes.io/name: memcached-operator 7 | app.kubernetes.io/managed-by: kustomize 8 | name: controller-manager-metrics-service 9 | namespace: system 10 | spec: 11 | ports: 12 | - name: https 13 | port: 8443 14 | protocol: TCP 15 | targetPort: 8443 16 | selector: 17 | control-plane: controller-manager 18 | app.kubernetes.io/name: memcached-operator 19 | -------------------------------------------------------------------------------- /website/layouts/shortcodes/client-go-version.html: -------------------------------------------------------------------------------- 1 | {{- $siteURL := .Page.Site.BaseURL -}} 2 | {{- $done := false -}} 3 | {{- range .Page.Site.Params.versions -}} 4 | {{- $verUrl := printf "%s/" .url -}} 5 | {{- if eq $verUrl $siteURL -}} 6 | {{- $done = true -}} 7 | {{- .client_go_version -}} 8 | {{- end -}} 9 | {{- end -}} 10 | {{- if eq $done false -}} 11 | {{- range where .Page.Site.Params.versions "version" "Latest Release" -}} 12 | {{- .client_go_version -}} 13 | {{- end -}} 14 | {{- end -}} -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | lint: 9 | name: Run on Ubuntu 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Clone the code 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Go 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version-file: go.mod 19 | 20 | - name: Run linter 21 | uses: golangci/golangci-lint-action@v8 22 | with: 23 | version: v2.1.0 24 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | bin/* 8 | Dockerfile.cross 9 | 10 | # Test binary, built with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Go workspace file 17 | go.work 18 | 19 | # Kubernetes Generated files - skip generated files, except for vendored files 20 | !vendor/**/zz_generated.* 21 | 22 | # editor and IDE paraphernalia 23 | .idea 24 | .vscode 25 | *.swp 26 | *.swo 27 | *~ 28 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/manifests/memcached-operator-webhook-service_v1_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-webhook-service 9 | spec: 10 | ports: 11 | - port: 443 12 | protocol: TCP 13 | targetPort: 9443 14 | selector: 15 | app.kubernetes.io/name: memcached-operator 16 | control-plane: controller-manager 17 | status: 18 | loadBalancer: {} 19 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/scorecard/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - bases/config.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | patches: 6 | - path: patches/basic.config.yaml 7 | target: 8 | group: scorecard.operatorframework.io 9 | kind: Configuration 10 | name: config 11 | version: v1alpha3 12 | - path: patches/olm.config.yaml 13 | target: 14 | group: scorecard.operatorframework.io 15 | kind: Configuration 16 | name: config 17 | version: v1alpha3 18 | # +kubebuilder:scaffold:patches 19 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/scorecard/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - bases/config.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | patches: 6 | - path: patches/basic.config.yaml 7 | target: 8 | group: scorecard.operatorframework.io 9 | kind: Configuration 10 | name: config 11 | version: v1alpha3 12 | - path: patches/olm.config.yaml 13 | target: 14 | group: scorecard.operatorframework.io 15 | kind: Configuration 16 | name: config 17 | version: v1alpha3 18 | # +kubebuilder:scaffold:patches 19 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/certmanager/issuer.yaml: -------------------------------------------------------------------------------- 1 | # The following manifest contains a self-signed issuer CR. 2 | # More information can be found at https://docs.cert-manager.io 3 | # WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. 4 | apiVersion: cert-manager.io/v1 5 | kind: Issuer 6 | metadata: 7 | labels: 8 | app.kubernetes.io/name: memcached-operator 9 | app.kubernetes.io/managed-by: kustomize 10 | name: selfsigned-issuer 11 | namespace: system 12 | spec: 13 | selfSigned: {} 14 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/prometheus/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - monitor.yaml 3 | 4 | # [PROMETHEUS-WITH-CERTS] The following patch configures the ServiceMonitor in ../prometheus 5 | # to securely reference certificates created and managed by cert-manager. 6 | # Additionally, ensure that you uncomment the [METRICS WITH CERTMANAGER] patch under config/default/kustomization.yaml 7 | # to mount the "metrics-server-cert" secret in the Manager Deployment. 8 | #patches: 9 | # - path: monitor_tls_patch.yaml 10 | # target: 11 | # kind: ServiceMonitor 12 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/default/metrics_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | labels: 5 | control-plane: controller-manager 6 | app.kubernetes.io/name: memcached-operator 7 | app.kubernetes.io/managed-by: kustomize 8 | name: controller-manager-metrics-service 9 | namespace: system 10 | spec: 11 | ports: 12 | - name: https 13 | port: 8443 14 | protocol: TCP 15 | targetPort: 8443 16 | selector: 17 | control-plane: controller-manager 18 | app.kubernetes.io/name: memcached-operator 19 | -------------------------------------------------------------------------------- /release/changelog/internal/testdata/invalid_yaml/fragment1.yaml: -------------------------------------------------------------------------------- 1 | - description: Addition description 0 2 | kind: addition 3 | breaking: false 4 | - description: Change description 0 5 | kind: change 6 | breaking: false 7 | - description: Removal description 0 8 | kind: removal 9 | breaking: true 10 | migration: 11 | header: Header for removal migration 0 12 | body: Body for removal migration 0 13 | - description: Deprecation description 0 14 | kind: deprecation 15 | breaking: false 16 | - description: Bugfix description 0 17 | kind: bugfix 18 | breaking: false -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/samples/cache_v1alpha1_memcached.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cache.example.com/v1alpha1 2 | kind: Memcached 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: memcached-sample 8 | spec: 9 | # TODO(user): edit the following value to ensure the number 10 | # of Pods/Instances your Operand must have on cluster 11 | size: 1 12 | 13 | # TODO(user): edit the following value to ensure the container has the right port to be initialized 14 | containerPort: 11211 15 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | bin/* 8 | Dockerfile.cross 9 | 10 | # Test binary, built with `go test -c` 11 | *.test 12 | 13 | # Output of the go coverage tool, specifically when used with LiteIDE 14 | *.out 15 | 16 | # Go workspace file 17 | go.work 18 | 19 | # Kubernetes Generated files - skip generated files, except for vendored files 20 | !vendor/**/zz_generated.* 21 | 22 | # editor and IDE paraphernalia 23 | .idea 24 | .vscode 25 | *.swp 26 | *.swo 27 | *~ 28 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/scorecard/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - bases/config.yaml 3 | apiVersion: kustomize.config.k8s.io/v1beta1 4 | kind: Kustomization 5 | patches: 6 | - path: patches/basic.config.yaml 7 | target: 8 | group: scorecard.operatorframework.io 9 | kind: Configuration 10 | name: config 11 | version: v1alpha3 12 | - path: patches/olm.config.yaml 13 | target: 14 | group: scorecard.operatorframework.io 15 | kind: Configuration 16 | name: config 17 | version: v1alpha3 18 | # +kubebuilder:scaffold:patches 19 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/manifests/memcached-operator-webhook-service_v1_service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-webhook-service 9 | spec: 10 | ports: 11 | - port: 443 12 | protocol: TCP 13 | targetPort: 9443 14 | selector: 15 | app.kubernetes.io/name: memcached-operator 16 | control-plane: controller-manager 17 | status: 18 | loadBalancer: {} 19 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/certmanager/issuer.yaml: -------------------------------------------------------------------------------- 1 | # The following manifest contains a self-signed issuer CR. 2 | # More information can be found at https://docs.cert-manager.io 3 | # WARNING: Targets CertManager v1.0. Check https://cert-manager.io/docs/installation/upgrading/ for breaking changes. 4 | apiVersion: cert-manager.io/v1 5 | kind: Issuer 6 | metadata: 7 | labels: 8 | app.kubernetes.io/name: memcached-operator 9 | app.kubernetes.io/managed-by: kustomize 10 | name: selfsigned-issuer 11 | namespace: system 12 | spec: 13 | selfSigned: {} 14 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/prometheus/kustomization.yaml: -------------------------------------------------------------------------------- 1 | resources: 2 | - monitor.yaml 3 | 4 | # [PROMETHEUS-WITH-CERTS] The following patch configures the ServiceMonitor in ../prometheus 5 | # to securely reference certificates created and managed by cert-manager. 6 | # Additionally, ensure that you uncomment the [METRICS WITH CERTMANAGER] patch under config/default/kustomization.yaml 7 | # to mount the "metrics-server-cert" secret in the Manager Deployment. 8 | #patches: 9 | # - path: monitor_tls_patch.yaml 10 | # target: 11 | # kind: ServiceMonitor 12 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/samples/cache_v1alpha1_memcached.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: cache.example.com/v1alpha1 2 | kind: Memcached 3 | metadata: 4 | labels: 5 | app.kubernetes.io/name: memcached-operator 6 | app.kubernetes.io/managed-by: kustomize 7 | name: memcached-sample 8 | spec: 9 | # TODO(user): edit the following value to ensure the number 10 | # of Pods/Instances your Operand must have on cluster 11 | size: 1 12 | 13 | # TODO(user): edit the following value to ensure the container has the right port to be initialized 14 | containerPort: 11211 15 | -------------------------------------------------------------------------------- /changelog/generated/v1.39.0.md: -------------------------------------------------------------------------------- 1 | ## v1.39.0 2 | 3 | ### Changes 4 | 5 | - For Go-based, Helm-based and Ansible-based operators this release moves to Kubernetes 1.31 API's and Kubebuilder v4 Scaffolding, specifically utilizing the v4.2.0 version. The update to Kubebuiler results in some scaffolding changes which more information can be found below: - Add support to protect project with [network policies](https://kubernetes.io/docs/concepts/services-networking/network-policies/) ([#3853](https://github.com/kubernetes-sigs/kubebuilder/pull/3853)). ([#6878](https://github.com/operator-framework/operator-sdk/pull/6878)) 6 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.26.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.26.0 3 | weight: 998974000 4 | --- 5 | 6 | ## update ansible operator Makefile's run target 7 | 8 | For an ansible operator, update the Makefile's run target to the 9 | following to fix a bug in its implementation. 10 | 11 | ``` 12 | .PHONY: run 13 | ANSIBLE_ROLES_PATH?="$(shell pwd)/roles" 14 | run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kube/config 15 | $(ANSIBLE_OPERATOR) run 16 | ``` 17 | 18 | _See [#6110](https://github.com/operator-framework/operator-sdk/pull/6110) for more details._ 19 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/default/manager_metrics_patch.yaml: -------------------------------------------------------------------------------- 1 | # This patch adds the args to allow exposing the metrics endpoint using HTTPS 2 | - op: add 3 | path: /spec/template/spec/containers/0/args/0 4 | value: --metrics-bind-address=:8443 5 | # This patch adds the args to allow securing the metrics endpoint 6 | - op: add 7 | path: /spec/template/spec/containers/0/args/0 8 | value: --metrics-secure 9 | # This patch adds the args to allow RBAC-based authn/authz the metrics endpoint 10 | - op: add 11 | path: /spec/template/spec/containers/0/args/0 12 | value: --metrics-require-rbac 13 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.24.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.24.0 3 | weight: 998976000 4 | --- 5 | 6 | ## Support for arm64 7 | 8 | In Ansible & Helm-based operators, if you need to support `arm64`, add the following 9 | 10 | `| sed 's/aarch64/arm64/'` 11 | 12 | on the following line 13 | 14 | `ARCH := $(shell uname -m | sed 's/x86_64/amd64/')` 15 | 16 | The resulting line should look like this 17 | 18 | `ARCH := $(shell uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/')` 19 | 20 | _See [#5480](https://github.com/operator-framework/operator-sdk/pull/5480) for more details._ 21 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.1/memcached-operator-manager-config_v1_configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | controller_manager_config.yaml: | 4 | apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 5 | kind: ControllerManagerConfig 6 | health: 7 | healthProbeBindAddress: :8081 8 | metrics: 9 | bindAddress: 127.0.0.1:8080 10 | webhook: 11 | port: 9443 12 | leaderElection: 13 | leaderElect: true 14 | resourceName: 86f835c3.example.com 15 | kind: ConfigMap 16 | metadata: 17 | name: memcached-operator-manager-config 18 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/testdata/packagemanifests/0.0.2/memcached-operator-manager-config_v1_configmap.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | controller_manager_config.yaml: | 4 | apiVersion: controller-runtime.sigs.k8s.io/v1alpha1 5 | kind: ControllerManagerConfig 6 | health: 7 | healthProbeBindAddress: :8081 8 | metrics: 9 | bindAddress: 127.0.0.1:8080 10 | webhook: 11 | port: 9443 12 | leaderElection: 13 | leaderElect: true 14 | resourceName: 86f835c3.example.com 15 | kind: ConfigMap 16 | metadata: 17 | name: memcached-operator-manager-config 18 | -------------------------------------------------------------------------------- /release/changelog/internal/testdata/ignore/more-fragments/ignored.yaml: -------------------------------------------------------------------------------- 1 | entries: 2 | - addition: Addition description 3 | kind: addition 4 | breaking: false 5 | - description: Change description 6 | kind: change 7 | breaking: false 8 | - description: Removal description 9 | kind: removal 10 | breaking: true 11 | migration: 12 | header: Header for removal migration 13 | body: Body for removal migration 14 | - description: Deprecation description 15 | kind: deprecation 16 | breaking: false 17 | - description: Bugfix description 18 | kind: bugfix 19 | breaking: false -------------------------------------------------------------------------------- /internal/scorecard/testdata/bundle/metadata/annotations.yaml: -------------------------------------------------------------------------------- 1 | annotations: 2 | operators.operatorframework.io.bundle.mediatype.v1: registry+v1 3 | operators.operatorframework.io.bundle.manifests.v1: manifests/ 4 | operators.operatorframework.io.bundle.metadata.v1: metadata/ 5 | operators.operatorframework.io.bundle.package.v1: memcached-operator 6 | operators.operatorframework.io.bundle.channels.v1: alpha,stable 7 | operators.operatorframework.io.bundle.channel.default.v1: stable 8 | operators.operatorframework.io.test.mediatype.v1: scorecard+v1 9 | operators.operatorframework.io.test.config.v1: tests/scorecard/ 10 | -------------------------------------------------------------------------------- /release/changelog/internal/testdata/valid/fragment1.yaml: -------------------------------------------------------------------------------- 1 | entries: 2 | - description: Addition description 0 3 | kind: addition 4 | breaking: false 5 | - description: Change description 0 6 | kind: change 7 | breaking: false 8 | - description: Removal description 0 9 | kind: removal 10 | breaking: true 11 | migration: 12 | header: Header for removal migration 0 13 | body: Body for removal migration 0 14 | - description: Deprecation description 0 15 | kind: deprecation 16 | breaking: false 17 | - description: Bugfix description 0 18 | kind: bugfix 19 | breaking: false -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle/metadata/annotations.yaml: -------------------------------------------------------------------------------- 1 | annotations: 2 | # Core bundle annotations. 3 | operators.operatorframework.io.bundle.mediatype.v1: registry+v1 4 | operators.operatorframework.io.bundle.manifests.v1: manifests/ 5 | operators.operatorframework.io.bundle.metadata.v1: metadata/ 6 | operators.operatorframework.io.bundle.package.v1: memcached-operator 7 | operators.operatorframework.io.bundle.channels.v1: alpha 8 | 9 | # Annotations for testing. 10 | operators.operatorframework.io.test.mediatype.v1: scorecard+v1 11 | operators.operatorframework.io.test.config.v1: tests/scorecard/ 12 | -------------------------------------------------------------------------------- /changelog/generated/v1.9.0.md: -------------------------------------------------------------------------------- 1 | ## v1.9.0 2 | 3 | ### Changes 4 | 5 | - **Breaking change**: For Ansible operators, if an API endpoint has path component in it then the ansible-operator binary will terminate early with an error, due to a bug in the proxy that would cause the operator to target the wrong cluster. ([#4987](https://github.com/operator-framework/operator-sdk/pull/4987)) 6 | 7 | ### Bug Fixes 8 | 9 | - For helm-based operators, empty patch requests generated from the 3-way merge are filtered to avoid unnecessary requests to the kube apiserver. ([#4957](https://github.com/operator-framework/operator-sdk/pull/4957)) 10 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/metadata/annotations.yaml: -------------------------------------------------------------------------------- 1 | annotations: 2 | # Core bundle annotations. 3 | operators.operatorframework.io.bundle.mediatype.v1: registry+v1 4 | operators.operatorframework.io.bundle.manifests.v1: manifests/ 5 | operators.operatorframework.io.bundle.metadata.v1: metadata/ 6 | operators.operatorframework.io.bundle.package.v1: memcached-operator 7 | operators.operatorframework.io.bundle.channels.v1: alpha 8 | 9 | # Annotations for testing. 10 | operators.operatorframework.io.test.mediatype.v1: scorecard+v1 11 | operators.operatorframework.io.test.config.v1: tests/scorecard/ 12 | -------------------------------------------------------------------------------- /netlify.toml: -------------------------------------------------------------------------------- 1 | # Hugo build configuration for Netlify 2 | # (https://gohugo.io/hosting-and-deployment/hosting-on-netlify/#configure-hugo-version-in-netlify) 3 | 4 | # Default build settings 5 | [build] 6 | publish = "public" 7 | base = "website" 8 | command = """ 9 | git submodule update -f --init --recursive themes/docsy && \ 10 | npm install postcss@^8.0.0 postcss-cli@^8.0.0 autoprefixer@^9.0.0 && \ 11 | ./scripts/set_menu_version.sh && \ 12 | hugo version && \ 13 | hugo 14 | """ 15 | 16 | # "production" environment specific build settings 17 | [build.environment] 18 | HUGO_ENV = "production" 19 | HUGO_VERSION = "0.73.0" 20 | -------------------------------------------------------------------------------- /.github/workflows/check-docs-only.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | # If running in Github actions: this should be set to "github.base_ref". 6 | : ${1?"the first argument must be set to a commit-ish reference"} 7 | 8 | # Patterns to ignore. 9 | declare -a DOC_PATTERNS 10 | DOC_PATTERNS=( 11 | "(\.md)" 12 | "(\.MD)" 13 | "(\.png)" 14 | "(\.pdf)" 15 | "(netlify\.toml)" 16 | "(website/)" 17 | "(changelog/)" 18 | "(OWNERS)" 19 | "(OWNERS_ALIASES)" 20 | "(LICENSE)" 21 | ) 22 | 23 | if ! git diff --name-only $1 | grep -qvE "$(IFS="|"; echo "${DOC_PATTERNS[*]}")"; then 24 | echo "true" 25 | exit 0 26 | fi 27 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/manifests/memcached-operator-memcached-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-admin-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - '*' 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds/status 20 | verbs: 21 | - get 22 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/metadata/annotations.yaml: -------------------------------------------------------------------------------- 1 | annotations: 2 | # Core bundle annotations. 3 | operators.operatorframework.io.bundle.mediatype.v1: registry+v1 4 | operators.operatorframework.io.bundle.manifests.v1: manifests/ 5 | operators.operatorframework.io.bundle.metadata.v1: metadata/ 6 | operators.operatorframework.io.bundle.package.v1: memcached-operator 7 | operators.operatorframework.io.bundle.channels.v1: alpha 8 | 9 | # Annotations for testing. 10 | operators.operatorframework.io.test.mediatype.v1: scorecard+v1 11 | operators.operatorframework.io.test.config.v1: tests/scorecard/ 12 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle/manifests/memcached-operator-memcached-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-admin-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - '*' 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds/status 20 | verbs: 21 | - get 22 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/crd/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD 2 | nameReference: 3 | - kind: Service 4 | version: v1 5 | fieldSpecs: 6 | - kind: CustomResourceDefinition 7 | version: v1 8 | group: apiextensions.k8s.io 9 | path: spec/conversion/webhook/clientConfig/service/name 10 | 11 | namespace: 12 | - kind: CustomResourceDefinition 13 | version: v1 14 | group: apiextensions.k8s.io 15 | path: spec/conversion/webhook/clientConfig/service/namespace 16 | create: false 17 | 18 | varReference: 19 | - path: metadata/annotations 20 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/helm-charts/memcached/templates/pdb.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: policy/v1 2 | kind: PodDisruptionBudget 3 | metadata: 4 | name: {{ template "memcached.fullname" . }} 5 | namespace: {{ .Release.Namespace }} 6 | annotations: 7 | helm.sh/hook: "post-upgrade, post-install" 8 | helm.sh/hook-delete-policy: "before-hook-creation" 9 | labels: 10 | {{ include "memcached.labels" . | indent 4 }} 11 | spec: 12 | selector: 13 | matchLabels: 14 | app.kubernetes.io/name: {{ include "memcached.name" . }} 15 | app.kubernetes.io/instance: {{ .Release.Name }} 16 | minAvailable: {{ .Values.pdbMinAvailable }} 17 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/manifests/memcached-operator-memcached-admin-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-admin-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - '*' 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds/status 20 | verbs: 21 | - get 22 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/hack/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025. 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 | */ -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/crd/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # This file is for teaching kustomize how to substitute name and namespace reference in CRD 2 | nameReference: 3 | - kind: Service 4 | version: v1 5 | fieldSpecs: 6 | - kind: CustomResourceDefinition 7 | version: v1 8 | group: apiextensions.k8s.io 9 | path: spec/conversion/webhook/clientConfig/service/name 10 | 11 | namespace: 12 | - kind: CustomResourceDefinition 13 | version: v1 14 | group: apiextensions.k8s.io 15 | path: spec/conversion/webhook/clientConfig/service/namespace 16 | create: false 17 | 18 | varReference: 19 | - path: metadata/annotations 20 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/hack/boilerplate.go.txt: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2025. 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 | */ -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/manifests/memcached-operator-memcached-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-viewer-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - apiGroups: 19 | - cache.example.com 20 | resources: 21 | - memcacheds/status 22 | verbs: 23 | - get 24 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle/manifests/memcached-operator-memcached-viewer-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-viewer-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - apiGroups: 19 | - cache.example.com 20 | resources: 21 | - memcacheds/status 22 | verbs: 23 | - get 24 | -------------------------------------------------------------------------------- /internal/validate/testdata/passes.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | cat < 3 |

{{ .Title }}

4 | {{ with .Params.description }}
{{ . | markdownify }}
{{ end }} 5 | {{ .Content }} 6 | {{ partial "section-index.html" . }} 7 | {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} 8 | {{ partial "feedback.html" .Site.Params.ui.feedback }} 9 |
10 | {{ end }} 11 | {{ if (.Site.DisqusShortname) }} 12 |
13 | {{ partial "disqus-comment.html" . }} 14 | {{ end }} 15 |
{{ partial "page-meta-lastmod.html" . }}
16 | 17 | {{ end }} 18 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/prometheus/monitor_tls_patch.yaml: -------------------------------------------------------------------------------- 1 | # Patch for Prometheus ServiceMonitor to enable secure TLS configuration 2 | # using certificates managed by cert-manager 3 | - op: replace 4 | path: /spec/endpoints/0/tlsConfig 5 | value: 6 | # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize 7 | serverName: SERVICE_NAME.SERVICE_NAMESPACE.svc 8 | insecureSkipVerify: false 9 | ca: 10 | secret: 11 | name: metrics-server-cert 12 | key: ca.crt 13 | cert: 14 | secret: 15 | name: metrics-server-cert 16 | key: tls.crt 17 | keySecret: 18 | name: metrics-server-cert 19 | key: tls.key 20 | -------------------------------------------------------------------------------- /website/content/en/build/images/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_completion_powershell.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk completion powershell" 3 | --- 4 | ## operator-sdk completion powershell 5 | 6 | Load powershell completions 7 | 8 | ``` 9 | operator-sdk completion powershell [flags] 10 | ``` 11 | 12 | ### Options 13 | 14 | ``` 15 | -h, --help help for powershell 16 | ``` 17 | 18 | ### Options inherited from parent commands 19 | 20 | ``` 21 | --plugins strings plugin keys to be used for this subcommand execution 22 | --verbose Enable verbose logging 23 | ``` 24 | 25 | ### SEE ALSO 26 | 27 | * [operator-sdk completion](../operator-sdk_completion) - Load completions for the specified shell 28 | 29 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/webhook/manifests.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: admissionregistration.k8s.io/v1 3 | kind: MutatingWebhookConfiguration 4 | metadata: 5 | name: mutating-webhook-configuration 6 | webhooks: 7 | - admissionReviewVersions: 8 | - v1 9 | clientConfig: 10 | service: 11 | name: webhook-service 12 | namespace: system 13 | path: /mutate-cache-example-com-v1alpha1-memcached 14 | failurePolicy: Fail 15 | name: mmemcached-v1alpha1.kb.io 16 | rules: 17 | - apiGroups: 18 | - cache.example.com 19 | apiVersions: 20 | - v1alpha1 21 | operations: 22 | - CREATE 23 | - UPDATE 24 | resources: 25 | - memcacheds 26 | sideEffects: None 27 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/prometheus/monitor_tls_patch.yaml: -------------------------------------------------------------------------------- 1 | # Patch for Prometheus ServiceMonitor to enable secure TLS configuration 2 | # using certificates managed by cert-manager 3 | - op: replace 4 | path: /spec/endpoints/0/tlsConfig 5 | value: 6 | # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize 7 | serverName: SERVICE_NAME.SERVICE_NAMESPACE.svc 8 | insecureSkipVerify: false 9 | ca: 10 | secret: 11 | name: metrics-server-cert 12 | key: ca.crt 13 | cert: 14 | secret: 15 | name: metrics-server-cert 16 | key: tls.crt 17 | keySecret: 18 | name: metrics-server-cert 19 | key: tls.key 20 | -------------------------------------------------------------------------------- /internal/generate/testdata/go/api/shared/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package shared 16 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Kubebuilder DevContainer", 3 | "image": "golang:1.24", 4 | "features": { 5 | "ghcr.io/devcontainers/features/docker-in-docker:2": {}, 6 | "ghcr.io/devcontainers/features/git:1": {} 7 | }, 8 | 9 | "runArgs": ["--network=host"], 10 | 11 | "customizations": { 12 | "vscode": { 13 | "settings": { 14 | "terminal.integrated.shell.linux": "/bin/bash" 15 | }, 16 | "extensions": [ 17 | "ms-kubernetes-tools.vscode-kubernetes-tools", 18 | "ms-azuretools.vscode-docker" 19 | ] 20 | } 21 | }, 22 | 23 | "onCreateCommand": "bash .devcontainer/post-install.sh" 24 | } 25 | 26 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Kubebuilder DevContainer", 3 | "image": "golang:1.24", 4 | "features": { 5 | "ghcr.io/devcontainers/features/docker-in-docker:2": {}, 6 | "ghcr.io/devcontainers/features/git:1": {} 7 | }, 8 | 9 | "runArgs": ["--network=host"], 10 | 11 | "customizations": { 12 | "vscode": { 13 | "settings": { 14 | "terminal.integrated.shell.linux": "/bin/bash" 15 | }, 16 | "extensions": [ 17 | "ms-kubernetes-tools.vscode-kubernetes-tools", 18 | "ms-azuretools.vscode-docker" 19 | ] 20 | } 21 | }, 22 | 23 | "onCreateCommand": "bash .devcontainer/post-install.sh" 24 | } 25 | 26 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/webhook/manifests.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: admissionregistration.k8s.io/v1 3 | kind: MutatingWebhookConfiguration 4 | metadata: 5 | name: mutating-webhook-configuration 6 | webhooks: 7 | - admissionReviewVersions: 8 | - v1 9 | clientConfig: 10 | service: 11 | name: webhook-service 12 | namespace: system 13 | path: /mutate-cache-example-com-v1alpha1-memcached 14 | failurePolicy: Fail 15 | name: mmemcached-v1alpha1.kb.io 16 | rules: 17 | - apiGroups: 18 | - cache.example.com 19 | apiVersions: 20 | - v1alpha1 21 | operations: 22 | - CREATE 23 | - UPDATE 24 | resources: 25 | - memcacheds 26 | sideEffects: None 27 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle/manifests/memcached-operator-memcached-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-editor-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - create 16 | - delete 17 | - get 18 | - list 19 | - patch 20 | - update 21 | - watch 22 | - apiGroups: 23 | - cache.example.com 24 | resources: 25 | - memcacheds/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_version.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk version" 3 | --- 4 | ## operator-sdk version 5 | 6 | Print the operator-sdk version 7 | 8 | ### Synopsis 9 | 10 | Print the operator-sdk version 11 | 12 | ``` 13 | operator-sdk version [flags] 14 | ``` 15 | 16 | ### Examples 17 | 18 | ``` 19 | operator-sdk version 20 | ``` 21 | 22 | ### Options 23 | 24 | ``` 25 | -h, --help help for version 26 | ``` 27 | 28 | ### Options inherited from parent commands 29 | 30 | ``` 31 | --plugins strings plugin keys to be used for this subcommand execution 32 | --verbose Enable verbose logging 33 | ``` 34 | 35 | ### SEE ALSO 36 | 37 | * [operator-sdk](../operator-sdk) - 38 | 39 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/_index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Upgrade SDK Version 3 | weight: 4 4 | description: Guide to upgrading sdk version for your operator 5 | --- 6 | 7 | ## Backwards Compatibility when Upgrading Operator-sdk version 8 | 9 | When upgrading your version of Operator-sdk, it is intended that post-1.0.0 minor versions (i.e. 1.y) are backwards compatible and strictly additive. Therefore, you 10 | only need to re-scaffold your operator with a newer version of Operator-SDK if you wish to take advantage of new features. If you do not wish to use new features, 11 | all that should be required is bumping the operator image dependency (if a Helm or Ansible operator) and rebuilding your operator image. 12 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.9.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.9.0 3 | weight: 998991000 4 | --- 5 | 6 | ## The ansible-operator binary will reject the kubeconfig if the server URL contains a path. 7 | 8 | There is currently no workaround other than running the operator as a pod in the cluster (where it will use the internal endpoint). The fix for this issue is currently blocked waiting on a fix to the apimachinery package. Once the upstream issue is merged then a proper fix will be done for ansible-operator. Work on this issue is being tracked here: https://github.com/operator-framework/operator-sdk/issues/4925 9 | 10 | _See [#4987](https://github.com/operator-framework/operator-sdk/pull/4987) for more details._ 11 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/manifests/memcached-operator-memcached-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-editor-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - create 16 | - delete 17 | - get 18 | - list 19 | - patch 20 | - update 21 | - watch 22 | - apiGroups: 23 | - cache.example.com 24 | resources: 25 | - memcacheds/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/helm-charts/memcached/templates/svc.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ template "memcached.fullname" . }} 5 | namespace: {{ .Release.Namespace }} 6 | labels: 7 | {{ include "memcached.labels" . | indent 4 }} 8 | annotations: 9 | {{ toYaml .Values.serviceAnnotations | indent 4 }} 10 | spec: 11 | clusterIP: None 12 | ports: 13 | - name: memcache 14 | port: 11211 15 | targetPort: memcache 16 | {{- if .Values.metrics.enabled }} 17 | - name: metrics 18 | port: 9150 19 | targetPort: metrics 20 | {{- end }} 21 | selector: 22 | app.kubernetes.io/name: {{ include "memcached.name" . }} 23 | app.kubernetes.io/instance: {{ .Release.Name }} 24 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/manifests/memcached-operator-memcached-editor-role_rbac.authorization.k8s.io_v1_clusterrole.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: rbac.authorization.k8s.io/v1 2 | kind: ClusterRole 3 | metadata: 4 | creationTimestamp: null 5 | labels: 6 | app.kubernetes.io/managed-by: kustomize 7 | app.kubernetes.io/name: memcached-operator 8 | name: memcached-operator-memcached-editor-role 9 | rules: 10 | - apiGroups: 11 | - cache.example.com 12 | resources: 13 | - memcacheds 14 | verbs: 15 | - create 16 | - delete 17 | - get 18 | - list 19 | - patch 20 | - update 21 | - watch 22 | - apiGroups: 23 | - cache.example.com 24 | resources: 25 | - memcacheds/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.34.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.34.0 3 | weight: 998966000 4 | --- 5 | 6 | ## To fix multi-arch build, replace docker-buildx target in project Makefile 7 | 8 | In the project `Makefile`, replace existing `docker-buildx` target with following definition. 9 | 10 | ```make 11 | docker-buildx: ## Build and push docker image for the manager for cross-platform support 12 | - docker buildx create --name project-v3-builder 13 | docker buildx use project-v3-builder 14 | - docker buildx build --push --platform=$(PLATFORMS) --tag ${IMG} -f Dockerfile . 15 | - docker buildx rm project-v3-builder 16 | ``` 17 | 18 | _See [#6661](https://github.com/operator-framework/operator-sdk/pull/6661) for more details._ 19 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.37.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.37.0 3 | weight: 998963000 4 | --- 5 | 6 | ## Migrate to the Quarkus extension provided bootstrap 7 | 8 | From now on, you can bootstrap your Quarkus-based operator 9 | with the provided Quarkus tools as described in the bootstrapping 10 | instructions - https://github.com/quarkiverse/quarkus-operator-sdk?tab=readme-ov-file#bootstrapping-a-project. 11 | 12 | _See [#6824](https://github.com/operator-framework/operator-sdk/pull/6824) for more details._ 13 | 14 | ## Remove hybrid-helm v1-alpha support 15 | 16 | As an operator author you can switch to a go-based operator. 17 | 18 | _See [#6833](https://github.com/operator-framework/operator-sdk/pull/6833) for more details._ 19 | -------------------------------------------------------------------------------- /internal/markers/markers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package markers 16 | 17 | const ( 18 | Prefix = "operator-sdk" 19 | ) 20 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/helm/installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation Guide 3 | linkTitle: Installation 4 | weight: 1 5 | --- 6 | 7 | ## Install `operator-sdk` 8 | 9 | Follow the steps in the [installation guide][install-guide] to learn how to install the `operator-sdk` CLI tool. 10 | 11 | ### Additional Prerequisites 12 | 13 | - [docker][docker_tool] version 17.03+. 14 | - [kubectl][kubectl_tool] and access to a Kubernetes cluster of a [compatible version][k8s-version-compat]. 15 | 16 | 17 | [install-guide]:/docs/installation/ 18 | [docker_tool]:https://docs.docker.com/install/ 19 | [kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/ 20 | [k8s-version-compat]:/docs/overview#kubernetes-version-compatibility 21 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.devcontainer/post-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | 4 | curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 5 | chmod +x ./kind 6 | mv ./kind /usr/local/bin/kind 7 | 8 | curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64 9 | chmod +x kubebuilder 10 | mv kubebuilder /usr/local/bin/ 11 | 12 | KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt) 13 | curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" 14 | chmod +x kubectl 15 | mv kubectl /usr/local/bin/kubectl 16 | 17 | docker network create -d=bridge --subnet=172.19.0.0/24 kind 18 | 19 | kind version 20 | kubebuilder version 21 | docker --version 22 | go version 23 | kubectl version --client 24 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/helm-charts/memcached/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | Memcached can be accessed via port 11211 on the following DNS name from within your cluster: 2 | {{ template "memcached.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local 3 | 4 | If you'd like to test your instance, forward the port locally: 5 | 6 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "memcached.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 7 | kubectl port-forward $POD_NAME 11211 8 | 9 | In another tab, attempt to set a key: 10 | 11 | $ echo -e 'set mykey 0 60 5\r\nhello\r' | nc localhost 11211 12 | 13 | You should see: 14 | 15 | STORED 16 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.devcontainer/post-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -x 3 | 4 | curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 5 | chmod +x ./kind 6 | mv ./kind /usr/local/bin/kind 7 | 8 | curl -L -o kubebuilder https://go.kubebuilder.io/dl/latest/linux/amd64 9 | chmod +x kubebuilder 10 | mv kubebuilder /usr/local/bin/ 11 | 12 | KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt) 13 | curl -LO "https://dl.k8s.io/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl" 14 | chmod +x kubectl 15 | mv kubectl /usr/local/bin/kubectl 16 | 17 | docker network create -d=bridge --subnet=172.19.0.0/24 kind 18 | 19 | kind version 20 | kubebuilder version 21 | docker --version 22 | go version 23 | kubectl version --client 24 | -------------------------------------------------------------------------------- /website/scripts/set_menu_version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script updates the hugo config's "version_menu" param 4 | # to the current ${MAJOR}.${MINOR} string. 5 | 6 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 7 | CONFIG_PATH="${DIR}/../config.toml" 8 | 9 | BRANCH_NAME="$(git rev-parse --abbrev-ref HEAD)" 10 | if [[ "$BRANCH_NAME" =~ v[0-9]+\.[0-9]+\.x ]]; then 11 | VERSION_MENU="$(echo $BRANCH_NAME | awk -F. '{ print v$1"."$2 }')" 12 | sed -i -E 's/version_menu = ".+"/version_menu = "'${VERSION_MENU}'"/g' "$CONFIG_PATH" 13 | 14 | # Ensure config.toml was updated. 15 | if ! grep -q "version_menu = \"${VERSION_MENU}\"" "$CONFIG_PATH"; then 16 | echo "$0 failed to update config.toml" 17 | exit 1 18 | fi 19 | fi 20 | -------------------------------------------------------------------------------- /website/scripts/update_download_url.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script updates the operator-sdk download link with the current release version. 4 | # This change should be committed in the prerelease commit. 5 | 6 | set -e 7 | 8 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 9 | DOC_PATH="${DIR}/../content/en/docs/installation/_index.md" 10 | 11 | VERSION="${1?"A Version is required"}" 12 | 13 | TARGET="export OPERATOR_SDK_DL_URL=https://github.com/operator-framework/operator-sdk/releases/download/" 14 | 15 | sed -i -E 's@('"${TARGET}"').+@\1'"${VERSION}"'@g' "$DOC_PATH" 16 | 17 | # Ensure the file was updated. 18 | if ! grep -q "${TARGET}${VERSION}" "$DOC_PATH"; then 19 | echo "$0 failed to update ${DOC_PATH}" 20 | exit 1 21 | fi 22 | -------------------------------------------------------------------------------- /internal/flags/flags.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package flags 16 | 17 | // global command-line flags 18 | const ( 19 | VerboseOpt = "verbose" 20 | ) 21 | -------------------------------------------------------------------------------- /internal/plugins/helm/v1/scaffolds/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2018 The Kubernetes 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 | */ 16 | 17 | // Package scaffolds contains libraries for scaffolding code to use with helm-operator 18 | package scaffolds 19 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: docker 4 | directory: "/images/custom-scorecard-tests" 5 | schedule: 6 | interval: daily 7 | - package-ecosystem: docker 8 | directory: "/images/helm-operator" 9 | schedule: 10 | interval: daily 11 | - package-ecosystem: docker 12 | directory: "/images/operator-sdk" 13 | schedule: 14 | interval: daily 15 | - package-ecosystem: docker 16 | directory: "/images/scorecard-test" 17 | schedule: 18 | interval: daily 19 | - package-ecosystem: docker 20 | directory: "/images/scorecard-test-kuttl" 21 | schedule: 22 | interval: daily 23 | - package-ecosystem: "github-actions" 24 | directory: "/" 25 | schedule: 26 | interval: daily 27 | 28 | -------------------------------------------------------------------------------- /internal/helm/client/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package client provides helper functions for API clients used by the helm 16 | // operator. 17 | package client 18 | -------------------------------------------------------------------------------- /internal/helm/internal/types/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package types contains types used by various components of the Helm 16 | // operator 17 | package types 18 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/docs/monitoring/metrics.md: -------------------------------------------------------------------------------- 1 | # Operator Metrics 2 | This document aims to help users that are not familiar with metrics exposed by this operator. 3 | The metrics documentation is auto-generated by the utility tool "monitoring/metricsdocs" and reflects all of the metrics that are exposed by the operator. 4 | 5 | ## Operator Metrics List 6 | ### memcached_deployment_size_undesired_count_total 7 | Total number of times the deployment size was not as desired. Type: Counter. 8 | ## Developing new metrics 9 | After developing new metrics or changing old ones, please run "make generate-metricsdocs" to regenerate this document. 10 | 11 | If you feel that the new metric doesn't follow these rules, please change "monitoring/metricsdocs" according to your needs. 12 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/crd/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # This kustomization.yaml is not intended to be run by itself, 2 | # since it depends on service name and namespace that are out of this kustomize package. 3 | # It should be run by config/default 4 | resources: 5 | - bases/cache.example.com_memcacheds.yaml 6 | # +kubebuilder:scaffold:crdkustomizeresource 7 | 8 | patches: 9 | # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. 10 | # patches here are for enabling the conversion webhook for each CRD 11 | # +kubebuilder:scaffold:crdkustomizewebhookpatch 12 | 13 | # [WEBHOOK] To enable webhook, uncomment the following section 14 | # the following config is for teaching kustomize how to do kustomization for CRDs. 15 | #configurations: 16 | #- kustomizeconfig.yaml 17 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle/manifests/memcached-operator-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: monitoring.coreos.com/v1 2 | kind: ServiceMonitor 3 | metadata: 4 | labels: 5 | app.kubernetes.io/managed-by: kustomize 6 | app.kubernetes.io/name: memcached-operator 7 | control-plane: controller-manager 8 | name: memcached-operator-controller-manager-metrics-monitor 9 | spec: 10 | endpoints: 11 | - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token 12 | path: /metrics 13 | port: https 14 | scheme: https 15 | tlsConfig: 16 | insecureSkipVerify: true 17 | selector: 18 | matchLabels: 19 | app.kubernetes.io/name: memcached-operator 20 | control-plane: controller-manager 21 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | # Core bundle labels. 4 | LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 5 | LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ 6 | LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ 7 | LABEL operators.operatorframework.io.bundle.package.v1=memcached-operator 8 | LABEL operators.operatorframework.io.bundle.channels.v1=alpha 9 | 10 | # Labels for testing. 11 | LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 12 | LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ 13 | 14 | # Copy files to locations specified by labels. 15 | COPY bundle/manifests /manifests/ 16 | COPY bundle/metadata /metadata/ 17 | COPY bundle/tests/scorecard /tests/scorecard/ 18 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/bundle.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | # Core bundle labels. 4 | LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 5 | LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ 6 | LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ 7 | LABEL operators.operatorframework.io.bundle.package.v1=memcached-operator 8 | LABEL operators.operatorframework.io.bundle.channels.v1=alpha 9 | 10 | # Labels for testing. 11 | LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 12 | LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ 13 | 14 | # Copy files to locations specified by labels. 15 | COPY bundle/manifests /manifests/ 16 | COPY bundle/metadata /metadata/ 17 | COPY bundle/tests/scorecard /tests/scorecard/ 18 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_create.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk create" 3 | --- 4 | ## operator-sdk create 5 | 6 | Scaffold a Kubernetes API or webhook 7 | 8 | ### Synopsis 9 | 10 | Scaffold a Kubernetes API or webhook. 11 | 12 | ### Options 13 | 14 | ``` 15 | -h, --help help for create 16 | ``` 17 | 18 | ### Options inherited from parent commands 19 | 20 | ``` 21 | --plugins strings plugin keys to be used for this subcommand execution 22 | --verbose Enable verbose logging 23 | ``` 24 | 25 | ### SEE ALSO 26 | 27 | * [operator-sdk](../operator-sdk) - 28 | * [operator-sdk create api](../operator-sdk_create_api) - Scaffold a Kubernetes API 29 | * [operator-sdk create webhook](../operator-sdk_create_webhook) - Scaffold a webhook for an API resource 30 | 31 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/crd/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # This kustomization.yaml is not intended to be run by itself, 2 | # since it depends on service name and namespace that are out of this kustomize package. 3 | # It should be run by config/default 4 | resources: 5 | - bases/cache.example.com_memcacheds.yaml 6 | # +kubebuilder:scaffold:crdkustomizeresource 7 | 8 | patches: 9 | # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. 10 | # patches here are for enabling the conversion webhook for each CRD 11 | # +kubebuilder:scaffold:crdkustomizewebhookpatch 12 | 13 | # [WEBHOOK] To enable webhook, uncomment the following section 14 | # the following config is for teaching kustomize how to do kustomization for CRDs. 15 | #configurations: 16 | #- kustomizeconfig.yaml 17 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle.Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | # Core bundle labels. 4 | LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 5 | LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ 6 | LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ 7 | LABEL operators.operatorframework.io.bundle.package.v1=memcached-operator 8 | LABEL operators.operatorframework.io.bundle.channels.v1=alpha 9 | 10 | # Labels for testing. 11 | LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 12 | LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ 13 | 14 | # Copy files to locations specified by labels. 15 | COPY bundle/manifests /manifests/ 16 | COPY bundle/metadata /metadata/ 17 | COPY bundle/tests/scorecard /tests/scorecard/ 18 | -------------------------------------------------------------------------------- /release/changelog/internal/testdata/valid/fragment2.yml: -------------------------------------------------------------------------------- 1 | entries: 2 | - description: Addition description 1 3 | kind: addition 4 | breaking: false 5 | pull_request_override: 999999 6 | - description: Change description 1 7 | kind: change 8 | breaking: false 9 | pull_request_override: 999999 10 | - description: Removal description 1 11 | kind: removal 12 | breaking: true 13 | pull_request_override: 999999 14 | migration: 15 | header: Header for removal migration 1 16 | body: Body for removal migration 1 17 | - description: Deprecation description 1 18 | kind: deprecation 19 | breaking: false 20 | pull_request_override: 999999 21 | - description: Bugfix description 1 22 | kind: bugfix 23 | breaking: false 24 | pull_request_override: 999999 25 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/leader_election_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions to do leader election. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: memcached-operator 7 | app.kubernetes.io/managed-by: kustomize 8 | name: leader-election-role 9 | rules: 10 | - apiGroups: 11 | - "" 12 | resources: 13 | - configmaps 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - create 19 | - update 20 | - patch 21 | - delete 22 | - apiGroups: 23 | - coordination.k8s.io 24 | resources: 25 | - leases 26 | verbs: 27 | - get 28 | - list 29 | - watch 30 | - create 31 | - update 32 | - patch 33 | - delete 34 | - apiGroups: 35 | - "" 36 | resources: 37 | - events 38 | verbs: 39 | - create 40 | - patch 41 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/leader_election_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions to do leader election. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: memcached-operator 7 | app.kubernetes.io/managed-by: kustomize 8 | name: leader-election-role 9 | rules: 10 | - apiGroups: 11 | - "" 12 | resources: 13 | - configmaps 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - create 19 | - update 20 | - patch 21 | - delete 22 | - apiGroups: 23 | - coordination.k8s.io 24 | resources: 25 | - leases 26 | verbs: 27 | - get 28 | - list 29 | - watch 30 | - create 31 | - update 32 | - patch 33 | - delete 34 | - apiGroups: 35 | - "" 36 | resources: 37 | - events 38 | verbs: 39 | - create 40 | - patch 41 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/leader_election_role.yaml: -------------------------------------------------------------------------------- 1 | # permissions to do leader election. 2 | apiVersion: rbac.authorization.k8s.io/v1 3 | kind: Role 4 | metadata: 5 | labels: 6 | app.kubernetes.io/name: memcached-operator 7 | app.kubernetes.io/managed-by: kustomize 8 | name: leader-election-role 9 | rules: 10 | - apiGroups: 11 | - "" 12 | resources: 13 | - configmaps 14 | verbs: 15 | - get 16 | - list 17 | - watch 18 | - create 19 | - update 20 | - patch 21 | - delete 22 | - apiGroups: 23 | - coordination.k8s.io 24 | resources: 25 | - leases 26 | verbs: 27 | - get 28 | - list 29 | - watch 30 | - create 31 | - update 32 | - patch 33 | - delete 34 | - apiGroups: 35 | - "" 36 | resources: 37 | - events 38 | verbs: 39 | - create 40 | - patch 41 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.1.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.1.0 3 | weight: 998999000 4 | --- 5 | 6 | ## Ansible Operator fact gathering causes performance regression 7 | 8 | To disable fact gathering by default for your operator, you will need to 9 | add the following entry to the manager container in`config/manager/manager.yaml`: 10 | 11 | ```yaml 12 | env: 13 | - name: ANSIBLE_GATHERING 14 | value: explicit 15 | ``` 16 | 17 | _See [#3933](https://github.com/operator-framework/operator-sdk/pull/3933) for more details._ 18 | 19 | ## Update scorecard-test-kuttl image to use latest kuttl 20 | 21 | The scorecard-test-kuttl image is updated to use kuttl:v0.5.2 22 | as the base image. 23 | 24 | _See [#3711](https://github.com/operator-framework/operator-sdk/pull/3711) for more details._ 25 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_generate_kustomize.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk generate kustomize" 3 | --- 4 | ## operator-sdk generate kustomize 5 | 6 | Contains subcommands that generate operator-framework kustomize data for the operator 7 | 8 | ### Options 9 | 10 | ``` 11 | -h, --help help for kustomize 12 | ``` 13 | 14 | ### Options inherited from parent commands 15 | 16 | ``` 17 | --plugins strings plugin keys to be used for this subcommand execution 18 | --verbose Enable verbose logging 19 | ``` 20 | 21 | ### SEE ALSO 22 | 23 | * [operator-sdk generate](../operator-sdk_generate) - Invokes a specific generator 24 | * [operator-sdk generate kustomize manifests](../operator-sdk_generate_kustomize_manifests) - Generates kustomize bases and a kustomization.yaml for operator-framework manifests 25 | 26 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/.github/workflows/test-e2e.yml: -------------------------------------------------------------------------------- 1 | name: E2E Tests 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | test-e2e: 9 | name: Run on Ubuntu 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Clone the code 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Go 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version-file: go.mod 19 | 20 | - name: Install the latest version of kind 21 | run: | 22 | curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 23 | chmod +x ./kind 24 | sudo mv ./kind /usr/local/bin/kind 25 | 26 | - name: Verify kind installation 27 | run: kind version 28 | 29 | - name: Running Test e2e 30 | run: | 31 | go mod tidy 32 | make test-e2e 33 | -------------------------------------------------------------------------------- /website/content/en/docs/upgrading-sdk-version/v1.10.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v1.10.0 3 | weight: 998990000 4 | --- 5 | 6 | ## (ansible/v1) Bump Kustomize version in helm project scaffolding to 3.8.7 7 | 8 | Ansible projects are now scaffolded with `Kustomize` version `3.8.7`. This version of kustomize requires that the path to patch file be provided with the `--path` flag in `add patch` command. In `molecule/default/prepare.yml` file, update the command under `Set pull policy`, to be: 9 | ```diff 10 | - name: Set pull policy 11 | - command: '{{ "{{ kustomize }}" }} edit add patch pull_policy/{{ "{{ operator_pull_policy }}" }}.yaml' 12 | + command: '{{ "{{ kustomize }}" }} edit add patch --path pull_policy/{{ "{{ operator_pull_policy }}" }}.yaml' 13 | ``` 14 | 15 | _See [#5057](https://github.com/operator-framework/operator-sdk/pull/5057) for more details._ 16 | -------------------------------------------------------------------------------- /changelog/generated/v1.32.0.md: -------------------------------------------------------------------------------- 1 | ## v1.32.0 2 | 3 | ### Additions 4 | 5 | - For Helm-based operators, whenever the operator encounters an error during reconcilliation, it would attempt to rollback the changes with the `--force` option. This behavior could have undesired side effects in some scenario. 6 | This change allows the users to change this behavior by adding the annotation, `helm.sdk.operatorframework.io/rollback-force: false` 7 | to the custom resource. ([#6546](https://github.com/operator-framework/operator-sdk/pull/6546)) 8 | 9 | ### Bug Fixes 10 | 11 | - (helm): Use informer cache label selectors to reduce memory consumption. ([#6377](https://github.com/operator-framework/operator-sdk/pull/6377)) 12 | - (helm): Fix bug with detection of owner reference support when setting up dynamic watches. ([#6377](https://github.com/operator-framework/operator-sdk/pull/6377)) 13 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/.github/workflows/test-e2e.yml: -------------------------------------------------------------------------------- 1 | name: E2E Tests 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | test-e2e: 9 | name: Run on Ubuntu 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Clone the code 13 | uses: actions/checkout@v4 14 | 15 | - name: Setup Go 16 | uses: actions/setup-go@v5 17 | with: 18 | go-version-file: go.mod 19 | 20 | - name: Install the latest version of kind 21 | run: | 22 | curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 23 | chmod +x ./kind 24 | sudo mv ./kind /usr/local/bin/kind 25 | 26 | - name: Verify kind installation 27 | run: kind version 28 | 29 | - name: Running Test e2e 30 | run: | 31 | go mod tidy 32 | make test-e2e 33 | -------------------------------------------------------------------------------- /internal/generate/testdata/go/api/v1alpha1/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package v1alpha1 contains API Schema definitions for the cache v1alpha1 API group 16 | // +k8s:deepcopy-gen=package,register 17 | // +groupName=cache.example.com 18 | package v1alpha1 19 | -------------------------------------------------------------------------------- /internal/generate/testdata/go/api/v1alpha2/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package v1alpha2 contains API Schema definitions for the cache v1alpha2 API group 16 | // +k8s:deepcopy-gen=package,register 17 | // +groupName=cache.example.com 18 | package v1alpha2 19 | -------------------------------------------------------------------------------- /website/content/en/docs/contribution-guidelines/changelog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Changelog 3 | weight: 25 4 | --- 5 | 6 | The Operator SDK project tracks changes across releases by maintaining a live changelog. This changelog is compiled via fragments located in `changelog/fragments` 7 | 8 | Contributors are asked to add these changelog fragments when creating pull requests by following this [template][changelog-template]. 9 | 10 | The changlog fragments document the following information: 11 | 12 | * Description of Changes 13 | * Types of Changes 14 | * One of: addition, change, deprecation, removal, bugfix 15 | * Migration Guide for Changes 16 | * These are required for breaking changes, and essential (but not required) for scaffolding-related changes. 17 | 18 | [changelog-template]: https://github.com/operator-framework/operator-sdk/blob/master/changelog/fragments/00-template.yaml 19 | -------------------------------------------------------------------------------- /website/content/en/docs/building-operators/golang/installation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Installation Guide 3 | linkTitle: Installation 4 | weight: 1 5 | --- 6 | 7 | ## Install `operator-sdk` 8 | 9 | Follow the steps in the [installation guide][install-guide] to learn how to install the `operator-sdk` CLI tool. 10 | 11 | ## Additional Prerequisites 12 | 13 | - [git][git_tool] 14 | - [go][go_tool] version 1.22 15 | - [docker][docker_tool] version 17.03+. 16 | - [kubectl][kubectl_tool] and access to a Kubernetes cluster of a [compatible version][k8s-version-compat]. 17 | 18 | 19 | [install-guide]:/docs/installation/ 20 | [git_tool]:https://git-scm.com/downloads 21 | [go_tool]:https://golang.org/dl/ 22 | [docker_tool]:https://docs.docker.com/install/ 23 | [kubectl_tool]:https://kubernetes.io/docs/tasks/tools/install-kubectl/ 24 | [k8s-version-compat]:/docs/overview#kubernetes-version-compatibility 25 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_run.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk run" 3 | --- 4 | ## operator-sdk run 5 | 6 | Run an Operator in a variety of environments 7 | 8 | ### Synopsis 9 | 10 | This command has subcommands that will deploy your Operator with OLM. 11 | 12 | ### Options 13 | 14 | ``` 15 | -h, --help help for run 16 | ``` 17 | 18 | ### Options inherited from parent commands 19 | 20 | ``` 21 | --plugins strings plugin keys to be used for this subcommand execution 22 | --verbose Enable verbose logging 23 | ``` 24 | 25 | ### SEE ALSO 26 | 27 | * [operator-sdk](../operator-sdk) - 28 | * [operator-sdk run bundle](../operator-sdk_run_bundle) - Deploy an Operator in the bundle format with OLM 29 | * [operator-sdk run bundle-upgrade](../operator-sdk_run_bundle-upgrade) - Upgrade an Operator previously installed in the bundle format with OLM 30 | 31 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/certmanager/certificate-webhook.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a self-signed issuer CR and a certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | apiVersion: cert-manager.io/v1 4 | kind: Certificate 5 | metadata: 6 | labels: 7 | app.kubernetes.io/name: memcached-operator 8 | app.kubernetes.io/managed-by: kustomize 9 | name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml 10 | namespace: system 11 | spec: 12 | # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize 13 | # replacements in the config/default/kustomization.yaml file. 14 | dnsNames: 15 | - SERVICE_NAME.SERVICE_NAMESPACE.svc 16 | - SERVICE_NAME.SERVICE_NAMESPACE.svc.cluster.local 17 | issuerRef: 18 | kind: Issuer 19 | name: selfsigned-issuer 20 | secretName: webhook-server-cert 21 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_olm_install.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk olm install" 3 | --- 4 | ## operator-sdk olm install 5 | 6 | Install Operator Lifecycle Manager in your cluster 7 | 8 | ``` 9 | operator-sdk olm install [flags] 10 | ``` 11 | 12 | ### Options 13 | 14 | ``` 15 | -h, --help help for install 16 | --timeout duration time to wait for the command to complete before failing (default 2m0s) 17 | --version string version of OLM resources to install (default "0.28.0") 18 | ``` 19 | 20 | ### Options inherited from parent commands 21 | 22 | ``` 23 | --plugins strings plugin keys to be used for this subcommand execution 24 | --verbose Enable verbose logging 25 | ``` 26 | 27 | ### SEE ALSO 28 | 29 | * [operator-sdk olm](../operator-sdk_olm) - Manage the Operator Lifecycle Manager installation in your cluster 30 | 31 | -------------------------------------------------------------------------------- /test/e2e/go/scorecard_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package e2e_go_test 16 | 17 | import ( 18 | . "github.com/onsi/ginkgo/v2" 19 | 20 | "github.com/operator-framework/operator-sdk/test/common" 21 | ) 22 | 23 | var _ = Describe("scorecard", common.ScorecardSpec(&tc, "go")) 24 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/bundle/manifests/memcached-operator-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: monitoring.coreos.com/v1 2 | kind: ServiceMonitor 3 | metadata: 4 | labels: 5 | app.kubernetes.io/managed-by: kustomize 6 | app.kubernetes.io/name: memcached-operator 7 | control-plane: controller-manager 8 | name: memcached-operator-controller-manager-metrics-monitor 9 | spec: 10 | endpoints: 11 | - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token 12 | path: /metrics 13 | port: https 14 | scheme: https 15 | tlsConfig: 16 | insecureSkipVerify: true 17 | serverName: memcached-operator-controller-manager-metrics-service.memcached-operator-system 18 | selector: 19 | matchLabels: 20 | app.kubernetes.io/name: memcached-operator 21 | control-plane: controller-manager 22 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/certmanager/certificate-metrics.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a self-signed issuer CR and a metrics certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | apiVersion: cert-manager.io/v1 4 | kind: Certificate 5 | metadata: 6 | labels: 7 | app.kubernetes.io/name: memcached-operator 8 | app.kubernetes.io/managed-by: kustomize 9 | name: metrics-certs # this name should match the one appeared in kustomizeconfig.yaml 10 | namespace: system 11 | spec: 12 | dnsNames: 13 | # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize 14 | # replacements in the config/default/kustomization.yaml file. 15 | - SERVICE_NAME.SERVICE_NAMESPACE.svc 16 | - SERVICE_NAME.SERVICE_NAMESPACE.svc.cluster.local 17 | issuerRef: 18 | kind: Issuer 19 | name: selfsigned-issuer 20 | secretName: metrics-server-cert 21 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/webhook/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # the following config is for teaching kustomize where to look at when substituting nameReference. 2 | # It requires kustomize v2.1.0 or newer to work properly. 3 | nameReference: 4 | - kind: Service 5 | version: v1 6 | fieldSpecs: 7 | - kind: MutatingWebhookConfiguration 8 | group: admissionregistration.k8s.io 9 | path: webhooks/clientConfig/service/name 10 | - kind: ValidatingWebhookConfiguration 11 | group: admissionregistration.k8s.io 12 | path: webhooks/clientConfig/service/name 13 | 14 | namespace: 15 | - kind: MutatingWebhookConfiguration 16 | group: admissionregistration.k8s.io 17 | path: webhooks/clientConfig/service/namespace 18 | create: true 19 | - kind: ValidatingWebhookConfiguration 20 | group: admissionregistration.k8s.io 21 | path: webhooks/clientConfig/service/namespace 22 | create: true 23 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/certmanager/certificate-webhook.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a self-signed issuer CR and a certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | apiVersion: cert-manager.io/v1 4 | kind: Certificate 5 | metadata: 6 | labels: 7 | app.kubernetes.io/name: memcached-operator 8 | app.kubernetes.io/managed-by: kustomize 9 | name: serving-cert # this name should match the one appeared in kustomizeconfig.yaml 10 | namespace: system 11 | spec: 12 | # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize 13 | # replacements in the config/default/kustomization.yaml file. 14 | dnsNames: 15 | - SERVICE_NAME.SERVICE_NAMESPACE.svc 16 | - SERVICE_NAME.SERVICE_NAMESPACE.svc.cluster.local 17 | issuerRef: 18 | kind: Issuer 19 | name: selfsigned-issuer 20 | secretName: webhook-server-cert 21 | -------------------------------------------------------------------------------- /hack/generate/samples/internal/helm/generate.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package helm 16 | 17 | import ( 18 | "path/filepath" 19 | ) 20 | 21 | func GenerateMemcachedSamples(binaryPath, rootPath string) { 22 | GenerateMemcachedSample(binaryPath, filepath.Join(rootPath, "helm")) 23 | } 24 | -------------------------------------------------------------------------------- /internal/plugins/plugins.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package plugins 16 | 17 | // DefaultNameQualifier is the Operator SDK plugin name suffix. Appending 18 | // this suffix to a short name, ex. "go", makes it fully qualified. 19 | const DefaultNameQualifier = ".sdk.operatorframework.io" 20 | -------------------------------------------------------------------------------- /internal/scorecard/testdata/pod.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: scorecard-test 5 | namespace: default 6 | spec: 7 | containers: 8 | - env: 9 | - name: NAMESPACE 10 | valueFrom: 11 | fieldRef: 12 | apiVersion: v1 13 | fieldPath: metadata.namespace 14 | image: quay.io/operator-framework/scorecard-test:dev 15 | imagePullPolicy: Always 16 | name: scorecard-test 17 | command: ["/usr/local/bin/scorecard-test"] 18 | args: ["basic-check-spec"] 19 | resources: {} 20 | volumeMounts: 21 | - mountPath: /scorecard 22 | name: scorecard-bundle 23 | readOnly: true 24 | dnsPolicy: ClusterFirst 25 | restartPolicy: Never 26 | securityContext: {} 27 | serviceAccount: default 28 | serviceAccountName: default 29 | volumes: 30 | - name: scorecard-bundle 31 | configMap: 32 | name: scorecard-bundle 33 | -------------------------------------------------------------------------------- /test/e2e/helm/scorecard_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package e2e_helm_test 16 | 17 | import ( 18 | . "github.com/onsi/ginkgo/v2" 19 | 20 | "github.com/operator-framework/operator-sdk/test/common" 21 | ) 22 | 23 | var _ = Describe("scorecard", common.ScorecardSpec(&tc, "helm")) 24 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/bundle/manifests/memcached-operator-controller-manager-metrics-monitor_monitoring.coreos.com_v1_servicemonitor.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: monitoring.coreos.com/v1 2 | kind: ServiceMonitor 3 | metadata: 4 | labels: 5 | app.kubernetes.io/managed-by: kustomize 6 | app.kubernetes.io/name: memcached-operator 7 | control-plane: controller-manager 8 | name: memcached-operator-controller-manager-metrics-monitor 9 | spec: 10 | endpoints: 11 | - bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token 12 | path: /metrics 13 | port: https 14 | scheme: https 15 | tlsConfig: 16 | insecureSkipVerify: true 17 | serverName: memcached-operator-controller-manager-metrics-service.memcached-operator-system 18 | selector: 19 | matchLabels: 20 | app.kubernetes.io/name: memcached-operator 21 | control-plane: controller-manager 22 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/certmanager/certificate-metrics.yaml: -------------------------------------------------------------------------------- 1 | # The following manifests contain a self-signed issuer CR and a metrics certificate CR. 2 | # More document can be found at https://docs.cert-manager.io 3 | apiVersion: cert-manager.io/v1 4 | kind: Certificate 5 | metadata: 6 | labels: 7 | app.kubernetes.io/name: memcached-operator 8 | app.kubernetes.io/managed-by: kustomize 9 | name: metrics-certs # this name should match the one appeared in kustomizeconfig.yaml 10 | namespace: system 11 | spec: 12 | dnsNames: 13 | # SERVICE_NAME and SERVICE_NAMESPACE will be substituted by kustomize 14 | # replacements in the config/default/kustomization.yaml file. 15 | - SERVICE_NAME.SERVICE_NAMESPACE.svc 16 | - SERVICE_NAME.SERVICE_NAMESPACE.svc.cluster.local 17 | issuerRef: 18 | kind: Issuer 19 | name: selfsigned-issuer 20 | secretName: metrics-server-cert 21 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/webhook/kustomizeconfig.yaml: -------------------------------------------------------------------------------- 1 | # the following config is for teaching kustomize where to look at when substituting nameReference. 2 | # It requires kustomize v2.1.0 or newer to work properly. 3 | nameReference: 4 | - kind: Service 5 | version: v1 6 | fieldSpecs: 7 | - kind: MutatingWebhookConfiguration 8 | group: admissionregistration.k8s.io 9 | path: webhooks/clientConfig/service/name 10 | - kind: ValidatingWebhookConfiguration 11 | group: admissionregistration.k8s.io 12 | path: webhooks/clientConfig/service/name 13 | 14 | namespace: 15 | - kind: MutatingWebhookConfiguration 16 | group: admissionregistration.k8s.io 17 | path: webhooks/clientConfig/service/namespace 18 | create: true 19 | - kind: ValidatingWebhookConfiguration 20 | group: admissionregistration.k8s.io 21 | path: webhooks/clientConfig/service/namespace 22 | create: true 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest a feature 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Feature Request 11 | 12 | #### Describe the problem you need a feature to resolve. 13 | 14 | 19 | 20 | #### Describe the solution you'd like. 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /internal/helm/flags/suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package flags_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestFlags(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Flags Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/helm/release/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package release provides interfaces and default implementations for a Helm 16 | // release manager, which is used by the Helm controller and reconciler to 17 | // manage Helm releases in a cluster based on watched custom resources. 18 | package release 19 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_olm.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk olm" 3 | --- 4 | ## operator-sdk olm 5 | 6 | Manage the Operator Lifecycle Manager installation in your cluster 7 | 8 | ### Options 9 | 10 | ``` 11 | -h, --help help for olm 12 | ``` 13 | 14 | ### Options inherited from parent commands 15 | 16 | ``` 17 | --plugins strings plugin keys to be used for this subcommand execution 18 | --verbose Enable verbose logging 19 | ``` 20 | 21 | ### SEE ALSO 22 | 23 | * [operator-sdk](../operator-sdk) - 24 | * [operator-sdk olm install](../operator-sdk_olm_install) - Install Operator Lifecycle Manager in your cluster 25 | * [operator-sdk olm status](../operator-sdk_olm_status) - Get the status of the Operator Lifecycle Manager installation in your cluster 26 | * [operator-sdk olm uninstall](../operator-sdk_olm_uninstall) - Uninstall Operator Lifecycle Manager from your cluster 27 | 28 | -------------------------------------------------------------------------------- /internal/validate/suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package validate 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestResult(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Output Result Tests") 27 | } 28 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/memcached_admin_role.yaml: -------------------------------------------------------------------------------- 1 | # This rule is not used by the project memcached-operator itself. 2 | # It is provided to allow the cluster admin to help manage permissions for users. 3 | # 4 | # Grants full permissions ('*') over cache.example.com. 5 | # This role is intended for users authorized to modify roles and bindings within the cluster, 6 | # enabling them to delegate specific permissions to other users or groups as needed. 7 | 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRole 10 | metadata: 11 | labels: 12 | app.kubernetes.io/name: memcached-operator 13 | app.kubernetes.io/managed-by: kustomize 14 | name: memcached-admin-role 15 | rules: 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds 20 | verbs: 21 | - '*' 22 | - apiGroups: 23 | - cache.example.com 24 | resources: 25 | - memcacheds/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/memcached_admin_role.yaml: -------------------------------------------------------------------------------- 1 | # This rule is not used by the project memcached-operator itself. 2 | # It is provided to allow the cluster admin to help manage permissions for users. 3 | # 4 | # Grants full permissions ('*') over cache.example.com. 5 | # This role is intended for users authorized to modify roles and bindings within the cluster, 6 | # enabling them to delegate specific permissions to other users or groups as needed. 7 | 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRole 10 | metadata: 11 | labels: 12 | app.kubernetes.io/name: memcached-operator 13 | app.kubernetes.io/managed-by: kustomize 14 | name: memcached-admin-role 15 | rules: 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds 20 | verbs: 21 | - '*' 22 | - apiGroups: 23 | - cache.example.com 24 | resources: 25 | - memcacheds/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/cli/cli_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package cli 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestVersion(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "CLI Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/olm/client/client_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package client 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestClient(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "check depErrors") 27 | } 28 | -------------------------------------------------------------------------------- /internal/registry/registry_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package registry 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestRegistry(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Registry Suite") 27 | } 28 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_generate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk generate" 3 | --- 4 | ## operator-sdk generate 5 | 6 | Invokes a specific generator 7 | 8 | ### Synopsis 9 | 10 | The 'operator-sdk generate' command invokes a specific generator to generate 11 | code or manifests. 12 | 13 | ### Options 14 | 15 | ``` 16 | -h, --help help for generate 17 | ``` 18 | 19 | ### Options inherited from parent commands 20 | 21 | ``` 22 | --plugins strings plugin keys to be used for this subcommand execution 23 | --verbose Enable verbose logging 24 | ``` 25 | 26 | ### SEE ALSO 27 | 28 | * [operator-sdk](../operator-sdk) - 29 | * [operator-sdk generate bundle](../operator-sdk_generate_bundle) - Generates bundle data for the operator 30 | * [operator-sdk generate kustomize](../operator-sdk_generate_kustomize) - Contains subcommands that generate operator-framework kustomize data for the operator 31 | 32 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/olm/olm_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package olm_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestOlm(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Olm Cmd Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/run/run_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package run_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestRun(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Run Cmd Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/helm/controller/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | // Package controller provides functions for creating and registering a Helm 16 | // controller with a `controller-runtime` manager. It also provides a Helm 17 | // reconciler implementation that can be used to create a Helm-based operator. 18 | package controller 19 | -------------------------------------------------------------------------------- /internal/olm/operator/operator_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package operator 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestOperator(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Operator Suite") 27 | } 28 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/memcached_admin_role.yaml: -------------------------------------------------------------------------------- 1 | # This rule is not used by the project memcached-operator itself. 2 | # It is provided to allow the cluster admin to help manage permissions for users. 3 | # 4 | # Grants full permissions ('*') over cache.example.com. 5 | # This role is intended for users authorized to modify roles and bindings within the cluster, 6 | # enabling them to delegate specific permissions to other users or groups as needed. 7 | 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRole 10 | metadata: 11 | labels: 12 | app.kubernetes.io/name: memcached-operator 13 | app.kubernetes.io/managed-by: kustomize 14 | name: memcached-admin-role 15 | rules: 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds 20 | verbs: 21 | - '*' 22 | - apiGroups: 23 | - cache.example.com 24 | resources: 25 | - memcacheds/status 26 | verbs: 27 | - get 28 | -------------------------------------------------------------------------------- /internal/annotations/metrics/metrics_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package metrics 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestMetrics(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Metrics Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/olm/installer/installer_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package installer 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestRegistry(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Installer Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/scorecard/scorecard_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package scorecard_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestScorecard(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Scorecard Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/generate/collector/collector_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package collector 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestCollector(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Collector Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/olm/operator/registry/registry_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package registry 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestRegistry(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Registry Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/bundle/bundle_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package bundle_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestBundle(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Bundle Cmd Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/bundle/validate/cmd_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package validate 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestValidate(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Validate Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/helm-operator/version/version_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package version_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestVersion(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Version Cmd Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/generate/internal/genutil_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package genutil 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestGenutil(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Collector Suite") 27 | } 28 | -------------------------------------------------------------------------------- /testdata/go/v4/memcached-operator/config/rbac/memcached_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # This rule is not used by the project memcached-operator itself. 2 | # It is provided to allow the cluster admin to help manage permissions for users. 3 | # 4 | # Grants read-only access to cache.example.com resources. 5 | # This role is intended for users who need visibility into these resources 6 | # without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing. 7 | 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRole 10 | metadata: 11 | labels: 12 | app.kubernetes.io/name: memcached-operator 13 | app.kubernetes.io/managed-by: kustomize 14 | name: memcached-viewer-role 15 | rules: 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds 20 | verbs: 21 | - get 22 | - list 23 | - watch 24 | - apiGroups: 25 | - cache.example.com 26 | resources: 27 | - memcacheds/status 28 | verbs: 29 | - get 30 | -------------------------------------------------------------------------------- /testdata/helm/memcached-operator/config/rbac/memcached_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # This rule is not used by the project memcached-operator itself. 2 | # It is provided to allow the cluster admin to help manage permissions for users. 3 | # 4 | # Grants read-only access to cache.example.com resources. 5 | # This role is intended for users who need visibility into these resources 6 | # without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing. 7 | 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRole 10 | metadata: 11 | labels: 12 | app.kubernetes.io/name: memcached-operator 13 | app.kubernetes.io/managed-by: kustomize 14 | name: memcached-viewer-role 15 | rules: 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds 20 | verbs: 21 | - get 22 | - list 23 | - watch 24 | - apiGroups: 25 | - cache.example.com 26 | resources: 27 | - memcacheds/status 28 | verbs: 29 | - get 30 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_completion_fish.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk completion fish" 3 | --- 4 | ## operator-sdk completion fish 5 | 6 | Load fish completions 7 | 8 | ``` 9 | operator-sdk completion fish [flags] 10 | ``` 11 | 12 | ### Examples 13 | 14 | ``` 15 | # To load completion for this session, execute: 16 | $ operator-sdk completion fish | source 17 | 18 | # To load completions for each session, execute once: 19 | $ operator-sdk completion fish > ~/.config/fish/completions/operator-sdk.fish 20 | 21 | ``` 22 | 23 | ### Options 24 | 25 | ``` 26 | -h, --help help for fish 27 | ``` 28 | 29 | ### Options inherited from parent commands 30 | 31 | ``` 32 | --plugins strings plugin keys to be used for this subcommand execution 33 | --verbose Enable verbose logging 34 | ``` 35 | 36 | ### SEE ALSO 37 | 38 | * [operator-sdk completion](../operator-sdk_completion) - Load completions for the specified shell 39 | 40 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/alpha/config3alphato3/suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package config3alphato3 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestInternal(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Internal Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/scorecard/scorecard_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package scorecard_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestScorecard(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Scorecard Cmd Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/generate/packagemanifest/packagemanifest_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package packagemanifest_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestGenerate(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Generate Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/olm/operator/registry/configmap/configmap_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package configmap_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestConfigmap(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Configmap Suite") 27 | } 28 | -------------------------------------------------------------------------------- /testdata/go/v4/monitoring/memcached-operator/config/rbac/memcached_viewer_role.yaml: -------------------------------------------------------------------------------- 1 | # This rule is not used by the project memcached-operator itself. 2 | # It is provided to allow the cluster admin to help manage permissions for users. 3 | # 4 | # Grants read-only access to cache.example.com resources. 5 | # This role is intended for users who need visibility into these resources 6 | # without permissions to modify them. It is ideal for monitoring purposes and limited-access viewing. 7 | 8 | apiVersion: rbac.authorization.k8s.io/v1 9 | kind: ClusterRole 10 | metadata: 11 | labels: 12 | app.kubernetes.io/name: memcached-operator 13 | app.kubernetes.io/managed-by: kustomize 14 | name: memcached-viewer-role 15 | rules: 16 | - apiGroups: 17 | - cache.example.com 18 | resources: 19 | - memcacheds 20 | verbs: 21 | - get 22 | - list 23 | - watch 24 | - apiGroups: 25 | - cache.example.com 26 | resources: 27 | - memcacheds/status 28 | verbs: 29 | - get 30 | -------------------------------------------------------------------------------- /internal/generate/testdata/go/api/shared/memcached_types.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package shared 16 | 17 | import ( 18 | v1 "k8s.io/api/core/v1" 19 | ) 20 | 21 | // UsefulType is a type shared between APIs. 22 | type UsefulType struct { 23 | // +operator-sdk:csv:customresourcedefinitions:type=spec 24 | Containers []v1.Container `json:"containers"` 25 | } 26 | -------------------------------------------------------------------------------- /internal/registry/logger.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package registry 16 | 17 | import ( 18 | "io" 19 | 20 | log "github.com/sirupsen/logrus" 21 | ) 22 | 23 | // DiscardLogger returns a logger that throws away input. 24 | func DiscardLogger() *log.Entry { 25 | logger := log.New() 26 | logger.SetOutput(io.Discard) 27 | return log.NewEntry(logger) 28 | } 29 | -------------------------------------------------------------------------------- /website/scripts/update_latest_release_compat.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # This script updates the latest release version's `kube_version` and `client_go_version` 4 | # variable to be up to date. This change should be committed in the prerelease commit. 5 | 6 | DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" 7 | CONFIG_PATH="${DIR}/../config.toml" 8 | 9 | KUBE_VERSION="$(cat Makefile | grep "export K8S_VERSION" | awk -F= '{ gsub(/ /,""); print $2 }')" 10 | CLIENT_GO_VERSION="$(cat go.mod | grep "k8s.io/client-go" | awk -F" " '{ print $2 }')" 11 | 12 | KUBE_MARKER="##LATEST_RELEASE_KUBE_VERSION##" 13 | CLIENT_GO_MARKER="##LATEST_RELEASE_CLIENT_GO_VERSION##" 14 | 15 | perl -0777 -pi -e $'s@'"${KUBE_MARKER}\\n kube_version = ".+'@'"${KUBE_MARKER}\\n kube_version = \"${KUBE_VERSION}\""'@g' ${CONFIG_PATH} 16 | perl -0777 -pi -e $'s@'"${CLIENT_GO_MARKER}\\n client_go_version = ".+'@'"${CLIENT_GO_MARKER}\\n client_go_version = \"${CLIENT_GO_VERSION}\""'@g' ${CONFIG_PATH} -------------------------------------------------------------------------------- /internal/generate/clusterserviceversion/bases/definitions/definitions_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package definitions 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestGenerator(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Definitions Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/generate/clusterserviceversion/clusterserviceversion_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package clusterserviceversion 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestGenerator(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Generator Suite") 27 | } 28 | -------------------------------------------------------------------------------- /hack/check-links.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | source ./hack/lib/common.sh 6 | 7 | header_text "Building the website" 8 | docker volume create sdk-html 9 | trap_add "docker volume rm sdk-html" EXIT 10 | docker run --rm -v "$(pwd):/src" -v sdk-html:/src/website/public klakegg/hugo:0.73.0-ext-ubuntu -s website 11 | 12 | header_text "Checking links" 13 | # For config explanation: https://github.com/gjtorikian/html-proofer#special-cases-for-the-command-line 14 | docker run --rm -v sdk-html:/target klakegg/html-proofer:3.19.2 /target \ 15 | --empty-alt-ignore \ 16 | --http-status-ignore 429 \ 17 | --allow_hash_href \ 18 | --typhoeus-config='{"ssl_verifypeer":false,"followlocation":true,"connecttimeout":600,"timeout":600}' \ 19 | --hydra-config='{"max_concurrency":5}' \ 20 | --url-ignore "/github.com\/operator-framework\/operator-sdk\/edit\/master\//,https://docs.github.com/en/get-started/quickstart/fork-a-repo,https://github.com/operator-framework/operator-sdk/settings/access" 21 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/bundle/validate/internal/logger.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package internal 16 | 17 | import ( 18 | "io" 19 | 20 | log "github.com/sirupsen/logrus" 21 | ) 22 | 23 | // NewLoggerTo returns a logger that writes logs to w. 24 | func NewLoggerTo(w io.Writer) *log.Logger { 25 | logger := log.New() 26 | logger.SetOutput(w) 27 | return logger 28 | } 29 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/pkgmantobundle/pkgmantobundle_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package pkgmantobundle 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestPackagemanifestsToBundle(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "pkgman-To-Bundle Suite") 27 | } 28 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/run/packagemanifests/packagemanifests_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package packagemanifests_test 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestRun(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Packagemanifests Cmd Suite") 27 | } 28 | -------------------------------------------------------------------------------- /changelog/generated/v1.29.0.md: -------------------------------------------------------------------------------- 1 | ## v1.29.0 2 | 3 | ### Changes 4 | 5 | - (scorecard): Update kuttl to v0.15.0 in the scorecard-test-kuttl image. ([#6401](https://github.com/operator-framework/operator-sdk/pull/6401)) 6 | - (ansible/v1): Bump the golang base image version in the ansible-operator Dockerfiles from 1.18 to 1.19. ([#6398](https://github.com/operator-framework/operator-sdk/pull/6398)) 7 | - (operator-sdk run bundle): Compress the bundle content, to avoid the configMap exceed max length error. The error will look like this: 8 | `... ConfigMap ... is invalid: []: Too long: must have at most 1048576 bytes`. 9 | Fixes issue [#6323](https://github.com/operator-framework/operator-sdk/issues/6323). ([#6408](https://github.com/operator-framework/operator-sdk/pull/6408)) 10 | 11 | ### Bug Fixes 12 | 13 | - (docs): Update the go version in the developer guide. The documentation wasn't updated when the go version was bumped to v1.19. ([#6101](https://github.com/operator-framework/operator-sdk/pull/6101)) 14 | -------------------------------------------------------------------------------- /website/content/en/docs/cli/operator-sdk_olm_uninstall.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "operator-sdk olm uninstall" 3 | --- 4 | ## operator-sdk olm uninstall 5 | 6 | Uninstall Operator Lifecycle Manager from your cluster 7 | 8 | ``` 9 | operator-sdk olm uninstall [flags] 10 | ``` 11 | 12 | ### Options 13 | 14 | ``` 15 | -h, --help help for uninstall 16 | --olm-namespace string namespace from where OLM is to be uninstalled. (default "olm") 17 | --timeout duration time to wait for the command to complete before failing (default 2m0s) 18 | --version string version of OLM resources to uninstall. 19 | ``` 20 | 21 | ### Options inherited from parent commands 22 | 23 | ``` 24 | --plugins strings plugin keys to be used for this subcommand execution 25 | --verbose Enable verbose logging 26 | ``` 27 | 28 | ### SEE ALSO 29 | 30 | * [operator-sdk olm](../operator-sdk_olm) - Manage the Operator Lifecycle Manager installation in your cluster 31 | 32 | -------------------------------------------------------------------------------- /internal/cmd/operator-sdk/generate/packagemanifests/packagemanifests_suite_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package packagemanifests 16 | 17 | import ( 18 | "testing" 19 | 20 | . "github.com/onsi/ginkgo/v2" 21 | . "github.com/onsi/gomega" 22 | ) 23 | 24 | func TestPackagemanifests(t *testing.T) { 25 | RegisterFailHandler(Fail) 26 | RunSpecs(t, "Packagemanifests Suite") 27 | } 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/doc-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Doc Report 3 | about: Raise an issue with the documentation. 4 | title: '' 5 | labels: kind/documentation 6 | assignees: '' 7 | 8 | --- 9 | 10 | 13 | 14 | ### What is the URL of the document? 15 | 16 | 17 | 18 | ### Which section(s) is the issue in? 19 | 20 | 21 | 22 | ### What needs fixing? 23 | 24 | 25 | 26 | #### Additional context 27 | 28 | 29 | -------------------------------------------------------------------------------- /internal/bindata/olm/versions.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Operator-SDK Authors 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | package olm 16 | 17 | var availableVersions = map[string]struct{}{ 18 | "0.25.0": {}, 19 | "0.26.0": {}, 20 | "0.27.0": {}, 21 | } 22 | 23 | // HasVersion returns whether version maps to released OLM manifests as bindata. 24 | func HasVersion(version string) bool { 25 | _, ok := availableVersions[version] 26 | return ok 27 | } 28 | --------------------------------------------------------------------------------