/
githubmirror
/
origin
Обзор
Документация
Войти
/
githubmirror
/
origin
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/extended/testdata/bindata.go
57 780 строк
2 MB
openshift-merge-bot[bot]
Merge pull request #31237 from jubittajohn/rebase-1.36
25 июл 2026, 09:56
Не верифицирован
25 июл 2026, 09:56
badf104
Код
Авторство
О чём код?
// Code generated for package testdata by go-bindata DO NOT EDIT. (@generated) // sources: // examples/db-templates/mariadb-ephemeral-template.json // examples/db-templates/mariadb-persistent-template.json // examples/db-templates/mysql-ephemeral-template.json // examples/db-templates/mysql-persistent-template.json // examples/db-templates/postgresql-ephemeral-template.json // examples/db-templates/postgresql-persistent-template.json // examples/db-templates/redis-ephemeral-template.json // examples/db-templates/redis-persistent-template.json // examples/image-streams/image-streams-centos7.json // examples/sample-app/application-template-dockerbuild.json // examples/sample-app/application-template-pullspecbuild.json // examples/sample-app/application-template-stibuild.json // examples/sample-app/cleanup.sh // examples/sample-app/github-webhook-example.json // examples/quickstarts/cakephp-mysql-persistent.json // examples/quickstarts/cakephp-mysql.json // examples/quickstarts/dancer-mysql-persistent.json // examples/quickstarts/dancer-mysql.json // examples/quickstarts/django-postgresql-persistent.json // examples/quickstarts/django-postgresql.json // examples/quickstarts/httpd.json // examples/quickstarts/nginx.json // examples/quickstarts/nodejs-postgresql-persistent.json // examples/quickstarts/nodejs-postgresql.json // examples/quickstarts/rails-postgresql-persistent.json // examples/quickstarts/rails-postgresql.json // examples/hello-openshift/Dockerfile // examples/hello-openshift/go.mod // examples/hello-openshift/hello-pod.json // examples/hello-openshift/hello-project.json // examples/jenkins/application-template.json // examples/jenkins/jenkins-ephemeral-template.json // examples/jenkins/jenkins-persistent-template.json // examples/jenkins/pipeline/bluegreen-pipeline.yaml // examples/jenkins/pipeline/maven-pipeline.yaml // examples/jenkins/pipeline/nodejs-sample-pipeline.yaml // examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml // examples/jenkins/pipeline/samplepipeline.yaml // examples/quickstarts/cakephp-mysql.json // test/extended/testdata/aggregator/kube-system-auth-reader.yaml // test/extended/testdata/aggregator/sample-apiserver-apiservice.yaml // test/extended/testdata/aggregator/sample-apiserver-authdelegator.yaml // test/extended/testdata/aggregator/sample-apiserver-authreader.yaml // test/extended/testdata/aggregator/sample-apiserver-rc.yaml // test/extended/testdata/aggregator/sample-apiserver-sa.yaml // test/extended/testdata/aggregator/sample-apiserver-service.yaml // test/extended/testdata/apiserver/operator-kube-apiserver-cr.yaml // test/extended/testdata/builds/application-template-custombuild.json // test/extended/testdata/builds/build-postcommit/docker.yaml // test/extended/testdata/builds/build-postcommit/imagestreams.yaml // test/extended/testdata/builds/build-postcommit/sti.yaml // test/extended/testdata/builds/build-pruning/default-group-build-config.yaml // test/extended/testdata/builds/build-pruning/default-legacy-build-config.yaml // test/extended/testdata/builds/build-pruning/errored-build-config.yaml // test/extended/testdata/builds/build-pruning/failed-build-config.yaml // test/extended/testdata/builds/build-pruning/failed-pipeline.yaml // test/extended/testdata/builds/build-pruning/imagestream.yaml // test/extended/testdata/builds/build-pruning/successful-build-config.yaml // test/extended/testdata/builds/build-pruning/successful-pipeline.yaml // test/extended/testdata/builds/build-quota/.s2i/bin/assemble // test/extended/testdata/builds/build-quota/Dockerfile // test/extended/testdata/builds/build-secrets/Dockerfile // test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/assemble // test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/run // test/extended/testdata/builds/build-secrets/s2i-binary-dir/Gemfile // test/extended/testdata/builds/build-secrets/s2i-binary-dir/config.ru // test/extended/testdata/builds/build-secrets/test-configmap-2.json // test/extended/testdata/builds/build-secrets/test-configmap.json // test/extended/testdata/builds/build-secrets/test-docker-build.json // test/extended/testdata/builds/build-secrets/test-is.json // test/extended/testdata/builds/build-secrets/test-s2i-build.json // test/extended/testdata/builds/build-secrets/test-secret-2.json // test/extended/testdata/builds/build-secrets/test-secret.json // test/extended/testdata/builds/build-timing/Dockerfile // test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/assemble // test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/run // test/extended/testdata/builds/build-timing/s2i-binary-dir/Gemfile // test/extended/testdata/builds/build-timing/s2i-binary-dir/config.ru // test/extended/testdata/builds/build-timing/test-docker-build.json // test/extended/testdata/builds/build-timing/test-is.json // test/extended/testdata/builds/build-timing/test-s2i-build.json // test/extended/testdata/builds/cluster-config/invalid-build-cluster-config.yaml // test/extended/testdata/builds/cluster-config/registry-blacklist.yaml // test/extended/testdata/builds/cluster-config/registry-whitelist.yaml // test/extended/testdata/builds/cluster-config.yaml // test/extended/testdata/builds/custom-build/Dockerfile // test/extended/testdata/builds/custom-build/Dockerfile.sample // test/extended/testdata/builds/custom-build/build.sh // test/extended/testdata/builds/docker-add/Dockerfile // test/extended/testdata/builds/docker-add/docker-add-env/Dockerfile // test/extended/testdata/builds/docker-add/docker-add-env/foo // test/extended/testdata/builds/incremental-auth-build.json // test/extended/testdata/builds/jenkins-pipeline/jenkins-ephemeral.json // test/extended/testdata/builds/jenkins-pipeline/jenkins-rhel.yaml // test/extended/testdata/builds/pullsecret/linked-nodejs-bc.yaml // test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml // test/extended/testdata/builds/s2i-environment-build-app/.s2i/environment // test/extended/testdata/builds/s2i-environment-build-app/Gemfile // test/extended/testdata/builds/s2i-environment-build-app/config.ru // test/extended/testdata/builds/simple-pipeline-bc.yaml // test/extended/testdata/builds/statusfail-assemble/.s2i/bin/assemble // test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml // test/extended/testdata/builds/statusfail-failedassemble.yaml // test/extended/testdata/builds/statusfail-fetchbuilderimage.yaml // test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml // test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml // test/extended/testdata/builds/statusfail-fetchsources2i.yaml // test/extended/testdata/builds/statusfail-genericreason.yaml // test/extended/testdata/builds/statusfail-oomkilled.yaml // test/extended/testdata/builds/statusfail-postcommithook.yaml // test/extended/testdata/builds/statusfail-pushtoregistry.yaml // test/extended/testdata/builds/subscription-content/build-imagestream.yaml // test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel7.yaml // test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel8.yaml // test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel9.yaml // test/extended/testdata/builds/subscription-content/secret-template.txt // test/extended/testdata/builds/test-auth-build.yaml // test/extended/testdata/builds/test-bc-with-pr-ref.yaml // test/extended/testdata/builds/test-build-app/Dockerfile // test/extended/testdata/builds/test-build-app/Gemfile // test/extended/testdata/builds/test-build-app/config.ru // test/extended/testdata/builds/test-build-cluster-config.yaml // test/extended/testdata/builds/test-build-podsvc.json // test/extended/testdata/builds/test-build-proxy.yaml // test/extended/testdata/builds/test-build-revision.json // test/extended/testdata/builds/test-build-search-registries.yaml // test/extended/testdata/builds/test-build.yaml // test/extended/testdata/builds/test-buildconfigsecretinjector.yaml // test/extended/testdata/builds/test-cds-dockerbuild.json // test/extended/testdata/builds/test-cds-sourcebuild.json // test/extended/testdata/builds/test-context-build.json // test/extended/testdata/builds/test-custom-build.yaml // test/extended/testdata/builds/test-docker-app/Dockerfile // test/extended/testdata/builds/test-docker-build-pullsecret.json // test/extended/testdata/builds/test-docker-build.json // test/extended/testdata/builds/test-docker-no-outputname.json // test/extended/testdata/builds/test-env-build.json // test/extended/testdata/builds/test-image-stream.json // test/extended/testdata/builds/test-imagechangetriggers.yaml // test/extended/testdata/builds/test-imageresolution-custom-build.yaml // test/extended/testdata/builds/test-imageresolution-docker-build.yaml // test/extended/testdata/builds/test-imageresolution-s2i-build.yaml // test/extended/testdata/builds/test-imagesource-buildconfig.yaml // test/extended/testdata/builds/test-nosrc-build.json // test/extended/testdata/builds/test-s2i-build-quota.json // test/extended/testdata/builds/test-s2i-build.json // test/extended/testdata/builds/test-s2i-no-outputname.json // test/extended/testdata/builds/test-symlink-build.yaml // test/extended/testdata/builds/valuefrom/failed-docker-build-value-from-config.yaml // test/extended/testdata/builds/valuefrom/failed-sti-build-value-from-config.yaml // test/extended/testdata/builds/valuefrom/successful-docker-build-value-from-config.yaml // test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml // test/extended/testdata/builds/valuefrom/test-configmap.yaml // test/extended/testdata/builds/valuefrom/test-is.json // test/extended/testdata/builds/valuefrom/test-secret.yaml // test/extended/testdata/builds/volumes/configmap.yaml // test/extended/testdata/builds/volumes/docker-buildconfig.yaml // test/extended/testdata/builds/volumes/docker-deployment.yaml // test/extended/testdata/builds/volumes/docker-imagestream.yaml // test/extended/testdata/builds/volumes/s2i-buildconfig.yaml // test/extended/testdata/builds/volumes/s2i-deployment.yaml // test/extended/testdata/builds/volumes/s2i-imagestream.yaml // test/extended/testdata/builds/volumes/secret.yaml // test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json // test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json // test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json // test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json // test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json // test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json // test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml // test/extended/testdata/builds/webhook/generic/testdata/push-generic.json // test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json // test/extended/testdata/builds/webhook/github/testdata/pingevent.json // test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json // test/extended/testdata/builds/webhook/github/testdata/pushevent.json // test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json // test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json // test/extended/testdata/cli/test-release-image-references.json // test/extended/testdata/cluster/master-vert.yaml // test/extended/testdata/cluster/quickstarts/cakephp-mysql.json // test/extended/testdata/cluster/quickstarts/dancer-mysql.json // test/extended/testdata/cluster/quickstarts/django-postgresql.json // test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json // test/extended/testdata/cluster/quickstarts/rails-postgresql.json // test/extended/testdata/cmd/hack/lib/cmd.sh // test/extended/testdata/cmd/hack/lib/compress.awk // test/extended/testdata/cmd/hack/lib/constants.sh // test/extended/testdata/cmd/hack/lib/init.sh // test/extended/testdata/cmd/hack/lib/log/output.sh // test/extended/testdata/cmd/hack/lib/log/stacktrace.sh // test/extended/testdata/cmd/hack/lib/log/system.sh // test/extended/testdata/cmd/hack/lib/test/junit.sh // test/extended/testdata/cmd/hack/lib/util/environment.sh // test/extended/testdata/cmd/hack/lib/util/misc.sh // test/extended/testdata/cmd/hack/lib/util/text.sh // test/extended/testdata/cmd/hack/lib/util/trap.sh // test/extended/testdata/cmd/test/cmd/authentication.sh // test/extended/testdata/cmd/test/cmd/builds.sh // test/extended/testdata/cmd/test/cmd/config.sh // test/extended/testdata/cmd/test/cmd/deployments.sh // test/extended/testdata/cmd/test/cmd/describer.sh // test/extended/testdata/cmd/test/cmd/edit.sh // test/extended/testdata/cmd/test/cmd/env.sh // test/extended/testdata/cmd/test/cmd/framework-test.sh // test/extended/testdata/cmd/test/cmd/get.sh // test/extended/testdata/cmd/test/cmd/image-lookup.sh // test/extended/testdata/cmd/test/cmd/images.sh // test/extended/testdata/cmd/test/cmd/printer.sh // test/extended/testdata/cmd/test/cmd/quota.sh // test/extended/testdata/cmd/test/cmd/secrets.sh // test/extended/testdata/cmd/test/cmd/set-data.sh // test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh // test/extended/testdata/cmd/test/cmd/setbuildhook.sh // test/extended/testdata/cmd/test/cmd/setbuildsecret.sh // test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json // test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild-dc.json // test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json // test/extended/testdata/cmd/test/cmd/testdata/application-template-mix.json // test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json // test/extended/testdata/cmd/test/cmd/testdata/external-service.yaml // test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json // test/extended/testdata/cmd/test/cmd/testdata/idling-dc.yaml // test/extended/testdata/cmd/test/cmd/testdata/idling-deployment.yaml // test/extended/testdata/cmd/test/cmd/testdata/idling-svc-route.yaml // test/extended/testdata/cmd/test/cmd/testdata/image-streams/image-streams-centos7.json // test/extended/testdata/cmd/test/cmd/testdata/jenkins/jenkins-ephemeral-template.json // test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json // test/extended/testdata/cmd/test/cmd/testdata/multiport-service.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json // test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile // test/extended/testdata/cmd/test/cmd/testdata/new-app/circular-is.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/circular.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/installable-stream.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid-build-strategy.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json // test/extended/testdata/cmd/test/cmd/testdata/new-app/template-minimal-expose.json // test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json // test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd-ns.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-namespaces.json // test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json // test/extended/testdata/cmd/test/cmd/testdata/new-app/template_multiple_resource_gvs.yaml // test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-env.env // test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-params.env // test/extended/testdata/cmd/test/cmd/testdata/oauthaccesstoken.yaml // test/extended/testdata/cmd/test/cmd/testdata/old-template.json // test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-no-extension-in-directory // test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-with-extension.json // test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/non-api-file // test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/yml-with-extension.yml // test/extended/testdata/cmd/test/cmd/testdata/resource-builder/json-no-extension // test/extended/testdata/cmd/test/cmd/testdata/resource-builder/yml-no-extension // test/extended/testdata/cmd/test/cmd/testdata/rollingupdate-daemonset.yaml // test/extended/testdata/cmd/test/cmd/testdata/services.yaml // test/extended/testdata/cmd/test/cmd/testdata/simple-deployment.yaml // test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml // test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml // test/extended/testdata/cmd/test/cmd/testdata/templates/basic-users-binding.json // test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.env // test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.json // test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook_list.json // test/extended/testdata/cmd/test/cmd/testdata/templates/multiline.txt // test/extended/testdata/cmd/test/cmd/testdata/templates/template-type-precision.json // test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.env // test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.yaml // test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml // test/extended/testdata/cmd/test/cmd/testdata/test-buildcli.json // test/extended/testdata/cmd/test/cmd/testdata/test-deployment-config.yaml // test/extended/testdata/cmd/test/cmd/testdata/test-deployment.yaml // test/extended/testdata/cmd/test/cmd/testdata/test-docker-build.json // test/extended/testdata/cmd/test/cmd/testdata/test-image-stream.json // test/extended/testdata/cmd/test/cmd/testdata/test-image.json // test/extended/testdata/cmd/test/cmd/testdata/test-multiarch-stream.yaml // test/extended/testdata/cmd/test/cmd/testdata/test-replication-controller.yaml // test/extended/testdata/cmd/test/cmd/testdata/test-route.json // test/extended/testdata/cmd/test/cmd/testdata/test-s2i-build.json // test/extended/testdata/cmd/test/cmd/testdata/test-service.json // test/extended/testdata/cmd/test/cmd/testdata/test-stream.yaml // test/extended/testdata/cmd/test/cmd/triggers.sh // test/extended/testdata/cmd/test/cmd/volumes.sh // test/extended/testdata/custom-secret-builder/Dockerfile // test/extended/testdata/custom-secret-builder/build.sh // test/extended/testdata/deployments/custom-deployment.yaml // test/extended/testdata/deployments/deployment-example.yaml // test/extended/testdata/deployments/deployment-history-limit.yaml // test/extended/testdata/deployments/deployment-ignores-deployer.yaml // test/extended/testdata/deployments/deployment-image-resolution-is.yaml // test/extended/testdata/deployments/deployment-image-resolution.yaml // test/extended/testdata/deployments/deployment-min-ready-seconds.yaml // test/extended/testdata/deployments/deployment-simple-sleep.yaml // test/extended/testdata/deployments/deployment-simple.yaml // test/extended/testdata/deployments/deployment-trigger.yaml // test/extended/testdata/deployments/deployment-with-ref-env.yaml // test/extended/testdata/deployments/failing-pre-hook.yaml // test/extended/testdata/deployments/generation-test.yaml // test/extended/testdata/deployments/multi-ict-deployment.yaml // test/extended/testdata/deployments/paused-deployment.yaml // test/extended/testdata/deployments/readiness-test.yaml // test/extended/testdata/deployments/tag-images-deployment.yaml // test/extended/testdata/deployments/test-deployment-broken.yaml // test/extended/testdata/deployments/test-deployment-test.yaml // test/extended/testdata/edge_topologies/baremetalhost-template.yaml // test/extended/testdata/edge_topologies/machine-template.yaml // test/extended/testdata/egress-firewall/ovnk-egressfirewall-test.yaml // test/extended/testdata/egress-firewall/ovnk-egressfirewall-wildcard-test.yaml // test/extended/testdata/egress-router-cni/egress-router-cni-v4-cr.yaml // test/extended/testdata/egress-router-cni/egress-router-cni-v6-cr.yaml // test/extended/testdata/forcepull-test.json // test/extended/testdata/gssapi/config/kubeconfig // test/extended/testdata/gssapi/config/oauth_config.json // test/extended/testdata/gssapi/fedora/base/Dockerfile // test/extended/testdata/gssapi/fedora/kerberos/Dockerfile // test/extended/testdata/gssapi/fedora/kerberos_configured/Dockerfile // test/extended/testdata/gssapi/proxy/Dockerfile // test/extended/testdata/gssapi/proxy/configure.sh // test/extended/testdata/gssapi/proxy/gssapiproxy-buildconfig.yaml // test/extended/testdata/gssapi/proxy/gssapiproxy-deploymentconfig.yaml // test/extended/testdata/gssapi/proxy/gssapiproxy-imagestream.yaml // test/extended/testdata/gssapi/proxy/gssapiproxy-service.yaml // test/extended/testdata/gssapi/proxy/healthz // test/extended/testdata/gssapi/proxy/kadm5.acl // test/extended/testdata/gssapi/proxy/kdc.conf // test/extended/testdata/gssapi/proxy/krb5.conf // test/extended/testdata/gssapi/proxy/proxy.conf // test/extended/testdata/gssapi/scripts/gssapi-tests.sh // test/extended/testdata/gssapi/scripts/test-wrapper.sh // test/extended/testdata/gssapi/ubuntu/base/Dockerfile // test/extended/testdata/gssapi/ubuntu/kerberos/Dockerfile // test/extended/testdata/gssapi/ubuntu/kerberos_configured/Dockerfile // test/extended/testdata/hello-builder/Dockerfile // test/extended/testdata/hello-builder/scripts/assemble // test/extended/testdata/hello-builder/scripts/run // test/extended/testdata/idling-echo-server-deployment.yaml // test/extended/testdata/idling-echo-server-rc.yaml // test/extended/testdata/idling-echo-server.yaml // test/extended/testdata/image/deployment-with-annotation-trigger.yaml // test/extended/testdata/image/test-image.json // test/extended/testdata/image-pull-secrets/dc-with-new-pull-secret.yaml // test/extended/testdata/image-pull-secrets/dc-with-old-pull-secret.yaml // test/extended/testdata/image-pull-secrets/pod-with-new-pull-secret.yaml // test/extended/testdata/image-pull-secrets/pod-with-no-pull-secret.yaml // test/extended/testdata/image-pull-secrets/pod-with-old-pull-secret.yaml // test/extended/testdata/image_ecosystem/perl-hotdeploy/index.pl // test/extended/testdata/image_ecosystem/perl-hotdeploy/lib/My/Test.pm // test/extended/testdata/image_ecosystem/perl-hotdeploy/perl.json // test/extended/testdata/ipsec/nmstate.yaml // test/extended/testdata/ipsec/nsconfig-machine-config.yaml // test/extended/testdata/ipsec/nsconfig-reboot-none-policy.yaml // test/extended/testdata/kernel/rt-tests-environment.yaml // test/extended/testdata/kernel/rt-tests-pod.yaml // test/extended/testdata/ldap/groupsync/ad/blacklist_ldap.txt // test/extended/testdata/ldap/groupsync/ad/blacklist_openshift.txt // test/extended/testdata/ldap/groupsync/ad/ldapgroupuids.txt // test/extended/testdata/ldap/groupsync/ad/osgroupuids.txt // test/extended/testdata/ldap/groupsync/ad/sync-config-dn-everywhere.yaml // test/extended/testdata/ldap/groupsync/ad/sync-config-paging.yaml // test/extended/testdata/ldap/groupsync/ad/sync-config-partially-user-defined.yaml // test/extended/testdata/ldap/groupsync/ad/sync-config-user-defined.yaml // test/extended/testdata/ldap/groupsync/ad/sync-config.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_blacklist_sync.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_dn_everywhere.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_partially_user_defined.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_prune.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_user_defined.yaml // test/extended/testdata/ldap/groupsync/ad/valid_all_openshift_blacklist_sync.yaml // test/extended/testdata/ldap/groupsync/ad/valid_whitelist_sync.yaml // test/extended/testdata/ldap/groupsync/ad/valid_whitelist_union_sync.yaml // test/extended/testdata/ldap/groupsync/ad/whitelist_ldap.txt // test/extended/testdata/ldap/groupsync/ad/whitelist_openshift.txt // test/extended/testdata/ldap/groupsync/augmented-ad/blacklist_ldap.txt // test/extended/testdata/ldap/groupsync/augmented-ad/blacklist_openshift.txt // test/extended/testdata/ldap/groupsync/augmented-ad/ldapgroupuids.txt // test/extended/testdata/ldap/groupsync/augmented-ad/osgroupuids.txt // test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-dn-everywhere.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-paging.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-partially-user-defined.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-user-defined.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/sync-config.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_blacklist_sync.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_delete_prune.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_dn_everywhere.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_partially_user_defined.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_prune.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_user_defined.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_openshift_blacklist_sync.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_whitelist_sync.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/valid_whitelist_union_sync.yaml // test/extended/testdata/ldap/groupsync/augmented-ad/whitelist_ldap.txt // test/extended/testdata/ldap/groupsync/augmented-ad/whitelist_openshift.txt // test/extended/testdata/ldap/groupsync/rfc2307/blacklist_ldap.txt // test/extended/testdata/ldap/groupsync/rfc2307/blacklist_openshift.txt // test/extended/testdata/ldap/groupsync/rfc2307/ldapgroupuids.txt // test/extended/testdata/ldap/groupsync/rfc2307/osgroupuids.txt // test/extended/testdata/ldap/groupsync/rfc2307/sync-config-dn-everywhere.yaml // test/extended/testdata/ldap/groupsync/rfc2307/sync-config-paging.yaml // test/extended/testdata/ldap/groupsync/rfc2307/sync-config-partially-user-defined.yaml // test/extended/testdata/ldap/groupsync/rfc2307/sync-config-tolerating.yaml // test/extended/testdata/ldap/groupsync/rfc2307/sync-config-user-defined.yaml // test/extended/testdata/ldap/groupsync/rfc2307/sync-config.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_blacklist_sync.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_dn_everywhere.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_partially_user_defined.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_prune.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_tolerating.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_user_defined.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_all_openshift_blacklist_sync.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_whitelist_sync.yaml // test/extended/testdata/ldap/groupsync/rfc2307/valid_whitelist_union_sync.yaml // test/extended/testdata/ldap/groupsync/rfc2307/whitelist_ldap.txt // test/extended/testdata/ldap/groupsync/rfc2307/whitelist_openshift.txt // test/extended/testdata/ldap/ldapserver-config-cm.yaml // test/extended/testdata/ldap/ldapserver-deployment.yaml // test/extended/testdata/ldap/ldapserver-scripts-cm.yaml // test/extended/testdata/ldap/ldapserver-service.yaml // test/extended/testdata/long_names/Dockerfile // test/extended/testdata/long_names/fixture.json // test/extended/testdata/machine_config/kubeletconfig/gcKC.yaml // test/extended/testdata/machine_config/machineconfig/0-infra-mc.yaml // test/extended/testdata/machine_config/machineconfig/0-master-mc.yaml // test/extended/testdata/machine_config/machineconfig/1-master-invalid-mc.yaml // test/extended/testdata/machine_config/machineconfig/1-worker-invalid-mc.yaml // test/extended/testdata/machine_config/machineconfigpool/customMCP.yaml // test/extended/testdata/machine_config/machineconfigpool/infra-mcp.yaml // test/extended/testdata/machine_config/machineconfigurations/managedbootimages-empty.yaml // test/extended/testdata/machine_config/machineconfigurations/nodedisruptionpolicy-rebootless-path.yaml // test/extended/testdata/machine_config/pinnedimage/customGCMCPpis.yaml // test/extended/testdata/machine_config/pinnedimage/customInvalidPis.yaml // test/extended/testdata/machine_config/pinnedimage/customMCPpis.yaml // test/extended/testdata/machine_config/pinnedimage/invalidPis.yaml // test/extended/testdata/machine_config/pinnedimage/masterInvalidPis.yaml // test/extended/testdata/machine_config/pinnedimage/masterPis.yaml // test/extended/testdata/machine_config/pinnedimage/pis.yaml // test/extended/testdata/marketplace/csc/02-csc.yaml // test/extended/testdata/marketplace/opsrc/02-opsrc.yaml // test/extended/testdata/mixed-api-versions.yaml // test/extended/testdata/multi-namespace-pipeline.yaml // test/extended/testdata/multi-namespace-template.yaml // test/extended/testdata/multinetpolicy/deny-ingress-pod-a.yml // test/extended/testdata/net-attach-defs/bridge-nad.yml // test/extended/testdata/net-attach-defs/macvlan-nad.yml // test/extended/testdata/net-attach-defs/whereabouts-nad.yml // test/extended/testdata/net-attach-defs/whereabouts-race-awake.yml // test/extended/testdata/net-attach-defs/whereabouts-race-sleepy.yml // test/extended/testdata/node/cnv-swap/cnv-hyperconverged.yaml // test/extended/testdata/node/cnv-swap/cnv-namespace.yaml // test/extended/testdata/node/cnv-swap/cnv-operatorgroup.yaml // test/extended/testdata/node/cnv-swap/cnv-subscription.yaml // test/extended/testdata/node/cnv-swap/kubelet-limitedswap-dropin.yaml // test/extended/testdata/node/cnv-swap/kubelet-noswap-dropin.yaml // test/extended/testdata/node/kubeletconfig/loggingKC.yaml // test/extended/testdata/node/machineconfigpool/customMCP.yaml // test/extended/testdata/node/nested_container/Dockerfile // test/extended/testdata/node/nested_container/containers.conf // test/extended/testdata/node/nested_container/run_tests.sh // test/extended/testdata/node/nested_container/skip_tests.sh // test/extended/testdata/node/node_e2e/pod-dev-fuse.yaml // test/extended/testdata/node_tuning/nto-stalld.yaml // test/extended/testdata/oauthserver/cabundle-cm.yaml // test/extended/testdata/oauthserver/oauth-network.yaml // test/extended/testdata/oauthserver/oauth-pod.yaml // test/extended/testdata/oauthserver/oauth-sa.yaml // test/extended/testdata/olm/operatorgroup.yaml // test/extended/testdata/olm/subscription.yaml // test/extended/testdata/poddisruptionbudgets/always-allow-policy-pdb.yaml // test/extended/testdata/poddisruptionbudgets/if-healthy-budget-policy-pdb.yaml // test/extended/testdata/poddisruptionbudgets/nginx-with-delayed-ready-deployment.yaml // test/extended/testdata/project/project-request-limits-quota.yaml // test/extended/testdata/releases/payload-1/etcd-operator/image-references // test/extended/testdata/releases/payload-1/etcd-operator/manifest.yaml // test/extended/testdata/releases/payload-1/image-registry/10_image-registry_crd.yaml // test/extended/testdata/releases/payload-1/image-registry/image-references // test/extended/testdata/releases/payload-1/image-registry/manifest.yaml // test/extended/testdata/roles/empty-role.yaml // test/extended/testdata/roles/policy-clusterroles.yaml // test/extended/testdata/roles/policy-roles.yaml // test/extended/testdata/router/ingress.yaml // test/extended/testdata/router/reencrypt-serving-cert.yaml // test/extended/testdata/router/router-common.yaml // test/extended/testdata/router/router-http-echo-server.yaml // test/extended/testdata/router/router-metrics.yaml // test/extended/testdata/run_policy/parallel-bc.yaml // test/extended/testdata/run_policy/serial-bc.yaml // test/extended/testdata/run_policy/serial-latest-only-bc.yaml // test/extended/testdata/s2i-dropcaps/root-access-build.yaml // test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile // test/extended/testdata/s2i-dropcaps/rootable-ruby/adduser // test/extended/testdata/s2i-dropcaps/rootable-ruby/assemble // test/extended/testdata/sample-image-stream.json // test/extended/testdata/samplepipeline-withenvs.yaml // test/extended/testdata/service-serving-cert/nginx-serving-cert.conf // test/extended/testdata/servicecidr.yaml // test/extended/testdata/signer-buildconfig.yaml // test/extended/testdata/stable-busybox.yaml // test/extended/testdata/templates/crunchydata-pod.json // test/extended/testdata/templates/guestbook.json // test/extended/testdata/templates/guestbook_list.json // test/extended/testdata/templates/templateinstance_badobject.yaml // test/extended/testdata/templates/templateinstance_objectkinds.yaml // test/extended/testdata/templates/templateinstance_readiness.yaml // test/extended/testdata/templates/templateservicebroker_bind.yaml // test/extended/testdata/test-buildcli.json // test/extended/testdata/test-cli-debug.yaml // test/extended/testdata/test-deployment-config.yaml // test/extended/testdata/test-deployment.yaml // test/extended/testdata/test-env-pod.json // test/extended/testdata/test-replication-controller.yaml // test/extended/testdata/test-secret.json // test/extended/testdata/verifyservice-pipeline-template.yaml // e2echart/e2e-chart-template.html // e2echart/non-spyglass-e2e-chart-template.html // e2echart/test-risk-analysis.html package testdata import ( "fmt" "io/ioutil" "os" "path/filepath" "strings" "time" ) type asset struct { bytes []byte info os.FileInfo } type bindataFileInfo struct { name string size int64 mode os.FileMode modTime time.Time } // Name return file name func (fi bindataFileInfo) Name() string { return fi.name } // Size return file size func (fi bindataFileInfo) Size() int64 { return fi.size } // Mode return file mode func (fi bindataFileInfo) Mode() os.FileMode { return fi.mode } // Mode return file modify time func (fi bindataFileInfo) ModTime() time.Time { return fi.modTime } // IsDir return file whether a directory func (fi bindataFileInfo) IsDir() bool { return fi.mode&os.ModeDir != 0 } // Sys return file is sys mode func (fi bindataFileInfo) Sys() interface{} { return nil } var _examplesDbTemplatesMariadbEphemeralTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "mariadb-ephemeral", "creationTimestamp": null, "annotations": { "description": "MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md", "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,mariadb" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-database_name": "{.data['database-name']}", "template.openshift.io/expose-password": "{.data['database-password']}", "template.openshift.io/expose-root_password": "{.data['database-root-password']}", "template.openshift.io/expose-username": "{.data['database-user']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-name": "${MYSQL_DATABASE}", "database-password": "${MYSQL_PASSWORD}", "database-root-password": "${MYSQL_ROOT_PASSWORD}", "database-user": "${MYSQL_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mariadb", "port": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_ROOT_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-root-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_DATABASE", "valueFrom": { "secretKeyRef": { "key": "database-name", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 30, "timeoutSeconds": 1 }, "name": "mariadb", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "emptyDir": { "medium": "" }, "name": "${DATABASE_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mariadb" ], "from": { "kind": "ImageStreamTag", "name": "mariadb:${MARIADB_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "mariadb", "required": true }, { "name": "MYSQL_USER", "displayName": "MariaDB Connection Username", "description": "Username for MariaDB user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "displayName": "MariaDB Connection Password", "description": "Password for the MariaDB connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_ROOT_PASSWORD", "displayName": "MariaDB root Password", "description": "Password for the MariaDB root user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_DATABASE", "displayName": "MariaDB Database Name", "description": "Name of the MariaDB database accessed.", "value": "sampledb", "required": true }, { "name": "MARIADB_VERSION", "displayName": "Version of MariaDB Image", "description": "Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest).", "value": "10.3-el8", "required": true } ], "labels": { "app.openshift.io/runtime": "mariadb", "template": "mariadb-ephemeral-template" } }`) func examplesDbTemplatesMariadbEphemeralTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesMariadbEphemeralTemplateJson, nil } func examplesDbTemplatesMariadbEphemeralTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesMariadbEphemeralTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/mariadb-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesMariadbPersistentTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "mariadb-persistent", "creationTimestamp": null, "annotations": { "description": "MariaDB database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB", "openshift.io/documentation-url": "https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md", "openshift.io/long-description": "This template provides a standalone MariaDB server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,mariadb" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-database_name": "{.data['database-name']}", "template.openshift.io/expose-password": "{.data['database-password']}", "template.openshift.io/expose-root_password": "{.data['database-root-password']}", "template.openshift.io/expose-username": "{.data['database-user']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-name": "${MYSQL_DATABASE}", "database-password": "${MYSQL_PASSWORD}", "database-root-password": "${MYSQL_ROOT_PASSWORD}", "database-user": "${MYSQL_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mariadb\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mariadb", "port": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_ROOT_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-root-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_DATABASE", "valueFrom": { "secretKeyRef": { "key": "database-name", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 30, "timeoutSeconds": 1 }, "name": "mariadb", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mariadb" ], "from": { "kind": "ImageStreamTag", "name": "mariadb:${MARIADB_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "mariadb", "required": true }, { "name": "MYSQL_USER", "displayName": "MariaDB Connection Username", "description": "Username for MariaDB user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "displayName": "MariaDB Connection Password", "description": "Password for the MariaDB connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_ROOT_PASSWORD", "displayName": "MariaDB root Password", "description": "Password for the MariaDB root user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_DATABASE", "displayName": "MariaDB Database Name", "description": "Name of the MariaDB database accessed.", "value": "sampledb", "required": true }, { "name": "MARIADB_VERSION", "displayName": "Version of MariaDB Image", "description": "Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest).", "value": "10.3-el8", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi.", "value": "1Gi", "required": true } ], "labels": { "app.openshift.io/runtime": "mariadb", "template": "mariadb-persistent-template" } }`) func examplesDbTemplatesMariadbPersistentTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesMariadbPersistentTemplateJson, nil } func examplesDbTemplatesMariadbPersistentTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesMariadbPersistentTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/mariadb-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesMysqlEphemeralTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "mysql-ephemeral", "creationTimestamp": null, "annotations": { "description": "MySQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL (Ephemeral)", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,mysql" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-database_name": "{.data['database-name']}", "template.openshift.io/expose-password": "{.data['database-password']}", "template.openshift.io/expose-root_password": "{.data['database-root-password']}", "template.openshift.io/expose-username": "{.data['database-user']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-name": "${MYSQL_DATABASE}", "database-password": "${MYSQL_PASSWORD}", "database-root-password": "${MYSQL_ROOT_PASSWORD}", "database-user": "${MYSQL_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "nodePort": 0, "port": 3306, "protocol": "TCP", "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_ROOT_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-root-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_DATABASE", "valueFrom": { "secretKeyRef": { "key": "database-name", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 30, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "volumes": [ { "emptyDir": { "medium": "" }, "name": "${DATABASE_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:${MYSQL_VERSION}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] }, "status": {} } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "mysql", "required": true }, { "name": "MYSQL_USER", "displayName": "MySQL Connection Username", "description": "Username for MySQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "displayName": "MySQL Connection Password", "description": "Password for the MySQL connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_ROOT_PASSWORD", "displayName": "MySQL root user Password", "description": "Password for the MySQL root user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_DATABASE", "displayName": "MySQL Database Name", "description": "Name of the MySQL database accessed.", "value": "sampledb", "required": true }, { "name": "MYSQL_VERSION", "displayName": "Version of MySQL Image", "description": "Version of MySQL image to be used (8.0-el7, 8.0-el8, or latest).", "value": "8.0-el8", "required": true } ], "labels": { "template": "mysql-ephemeral-template" } }`) func examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesMysqlEphemeralTemplateJson, nil } func examplesDbTemplatesMysqlEphemeralTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesMysqlEphemeralTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/mysql-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesMysqlPersistentTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "mysql-persistent", "creationTimestamp": null, "annotations": { "description": "MySQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/mysql.html", "openshift.io/long-description": "This template provides a standalone MySQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,mysql" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${MYSQL_USER}\n Password: ${MYSQL_PASSWORD}\n Database Name: ${MYSQL_DATABASE}\n Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/8.0/root/usr/share/container-scripts/mysql/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-database_name": "{.data['database-name']}", "template.openshift.io/expose-password": "{.data['database-password']}", "template.openshift.io/expose-root_password": "{.data['database-root-password']}", "template.openshift.io/expose-username": "{.data['database-user']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-name": "${MYSQL_DATABASE}", "database-password": "${MYSQL_PASSWORD}", "database-root-password": "${MYSQL_ROOT_PASSWORD}", "database-user": "${MYSQL_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "mysql://{.spec.clusterIP}:{.spec.ports[?(.name==\"mysql\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_ROOT_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-root-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "MYSQL_DATABASE", "valueFrom": { "secretKeyRef": { "key": "database-name", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 30, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD=\"$MYSQL_PASSWORD\" mysqladmin -u $MYSQL_USER ping" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:${MYSQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "mysql", "required": true }, { "name": "MYSQL_USER", "displayName": "MySQL Connection Username", "description": "Username for MySQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "displayName": "MySQL Connection Password", "description": "Password for the MySQL connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_ROOT_PASSWORD", "displayName": "MySQL root user Password", "description": "Password for the MySQL root user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "MYSQL_DATABASE", "displayName": "MySQL Database Name", "description": "Name of the MySQL database accessed.", "value": "sampledb", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi.", "value": "1Gi", "required": true }, { "name": "MYSQL_VERSION", "displayName": "Version of MySQL Image", "description": "Version of MySQL image to be used (8.0-el7, 8.0-el8, or latest).", "value": "8.0-el8", "required": true } ], "labels": { "template": "mysql-persistent-template" } }`) func examplesDbTemplatesMysqlPersistentTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesMysqlPersistentTemplateJson, nil } func examplesDbTemplatesMysqlPersistentTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesMysqlPersistentTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/mysql-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesPostgresqlEphemeralTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "postgresql-ephemeral", "creationTimestamp": null, "annotations": { "description": "PostgreSQL database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,postgresql" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-database_name": "{.data['database-name']}", "template.openshift.io/expose-password": "{.data['database-password']}", "template.openshift.io/expose-username": "{.data['database-user']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-name": "${POSTGRESQL_DATABASE}", "database-password": "${POSTGRESQL_PASSWORD}", "database-user": "${POSTGRESQL_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "nodePort": 0, "port": 5432, "protocol": "TCP", "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "valueFrom": { "secretKeyRef": { "key": "database-name", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432, "protocol": "TCP" } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "volumes": [ { "emptyDir": { "medium": "" }, "name": "${DATABASE_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] }, "status": {} } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "postgresql", "required": true }, { "name": "POSTGRESQL_USER", "displayName": "PostgreSQL Connection Username", "description": "Username for PostgreSQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "POSTGRESQL_PASSWORD", "displayName": "PostgreSQL Connection Password", "description": "Password for the PostgreSQL connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "POSTGRESQL_DATABASE", "displayName": "PostgreSQL Database Name", "description": "Name of the PostgreSQL database accessed.", "value": "sampledb", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", "value": "10-el8", "required": true } ], "labels": { "template": "postgresql-ephemeral-template" } }`) func examplesDbTemplatesPostgresqlEphemeralTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesPostgresqlEphemeralTemplateJson, nil } func examplesDbTemplatesPostgresqlEphemeralTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesPostgresqlEphemeralTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/postgresql-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesPostgresqlPersistentTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "postgresql-persistent", "creationTimestamp": null, "annotations": { "description": "PostgreSQL database service, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.\n\nNOTE: Scaling to more than one replica is not supported. You must have persistent volumes available in your cluster to use this template.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/db_images/postgresql.html", "openshift.io/long-description": "This template provides a standalone PostgreSQL server with a database created. The database is stored on persistent storage. The database name, username, and password are chosen via parameters when provisioning this service.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,postgresql" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Username: ${POSTGRESQL_USER}\n Password: ${POSTGRESQL_PASSWORD}\n Database Name: ${POSTGRESQL_DATABASE}\n Connection URL: postgresql://${DATABASE_SERVICE_NAME}:5432/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-database_name": "{.data['database-name']}", "template.openshift.io/expose-password": "{.data['database-password']}", "template.openshift.io/expose-username": "{.data['database-user']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-name": "${POSTGRESQL_DATABASE}", "database-password": "${POSTGRESQL_PASSWORD}", "database-user": "${POSTGRESQL_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "postgres://{.spec.clusterIP}:{.spec.ports[?(.name==\"postgresql\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "nodePort": 0, "port": 5432, "protocol": "TCP", "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "valueFrom": { "secretKeyRef": { "key": "database-name", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432, "protocol": "TCP" } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] }, "status": {} } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "postgresql", "required": true }, { "name": "POSTGRESQL_USER", "displayName": "PostgreSQL Connection Username", "description": "Username for PostgreSQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "POSTGRESQL_PASSWORD", "displayName": "PostgreSQL Connection Password", "description": "Password for the PostgreSQL connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "POSTGRESQL_DATABASE", "displayName": "PostgreSQL Database Name", "description": "Name of the PostgreSQL database accessed.", "value": "sampledb", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi.", "value": "1Gi", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (10-el7, 10-el8, or latest).", "value": "10-el8", "required": true } ], "labels": { "template": "postgresql-persistent-template" } }`) func examplesDbTemplatesPostgresqlPersistentTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesPostgresqlPersistentTemplateJson, nil } func examplesDbTemplatesPostgresqlPersistentTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesPostgresqlPersistentTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/postgresql-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesRedisEphemeralTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "redis-ephemeral", "creationTimestamp": null, "annotations": { "description": "Redis in-memory data structure store, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing", "iconClass": "icon-redis", "openshift.io/display-name": "Redis (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/5", "openshift.io/long-description": "This template provides a standalone Redis server. The data is not stored on persistent storage, so any restart of the service will result in all data being lost.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,redis" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-password": "{.data['database-password']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-password": "${REDIS_PASSWORD}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "redis", "nodePort": 0, "port": 6379, "protocol": "TCP", "targetPort": 6379 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "REDIS_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 6379 }, "timeoutSeconds": 1 }, "name": "redis", "ports": [ { "containerPort": 6379, "protocol": "TCP" } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/redis/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "volumes": [ { "emptyDir": { "medium": "" }, "name": "${DATABASE_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "redis" ], "from": { "kind": "ImageStreamTag", "name": "redis:${REDIS_VERSION}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] }, "status": {} } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "redis", "required": true }, { "name": "REDIS_PASSWORD", "displayName": "Redis Connection Password", "description": "Password for the Redis connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "REDIS_VERSION", "displayName": "Version of Redis Image", "description": "Version of Redis image to be used (5-el7, 5-el8, 6-el7, 6-el8, or latest).", "value": "6-el8", "required": true } ], "labels": { "template": "redis-ephemeral-template" } }`) func examplesDbTemplatesRedisEphemeralTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesRedisEphemeralTemplateJson, nil } func examplesDbTemplatesRedisEphemeralTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesRedisEphemeralTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/redis-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesDbTemplatesRedisPersistentTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "redis-persistent", "creationTimestamp": null, "annotations": { "description": "Redis in-memory data structure store, with persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis", "openshift.io/documentation-url": "https://github.com/sclorg/redis-container/tree/master/5", "openshift.io/long-description": "This template provides a standalone Redis server. The data is stored on persistent storage.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "database,redis" } }, "message": "The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}.\n\n Password: ${REDIS_PASSWORD}\n Connection URL: redis://${DATABASE_SERVICE_NAME}:6379/\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "annotations": { "template.openshift.io/expose-password": "{.data['database-password']}" }, "name": "${DATABASE_SERVICE_NAME}" }, "stringData": { "database-password": "${REDIS_PASSWORD}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "template.openshift.io/expose-uri": "redis://{.spec.clusterIP}:{.spec.ports[?(.name==\"redis\")].port}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "redis", "nodePort": 0, "port": 6379, "protocol": "TCP", "targetPort": 6379 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "REDIS_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${DATABASE_SERVICE_NAME}" } } } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 6379 }, "timeoutSeconds": 1 }, "name": "redis", "ports": [ { "containerPort": 6379, "protocol": "TCP" } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "test \"$(redis-cli -h 127.0.0.1 -a $REDIS_PASSWORD ping)\" == \"PONG\"" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/redis/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "redis" ], "from": { "kind": "ImageStreamTag", "name": "redis:${REDIS_VERSION}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] }, "status": {} } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "description": "The name of the OpenShift Service exposed for the database.", "value": "redis", "required": true }, { "name": "REDIS_PASSWORD", "displayName": "Redis Connection Password", "description": "Password for the Redis connection user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi.", "value": "1Gi", "required": true }, { "name": "REDIS_VERSION", "displayName": "Version of Redis Image", "description": "Version of Redis image to be used (5-el7, 5-el8, 6-el7, 6-el8, or latest).", "value": "6-el8", "required": true } ], "labels": { "template": "redis-persistent-template" } }`) func examplesDbTemplatesRedisPersistentTemplateJsonBytes() ([]byte, error) { return _examplesDbTemplatesRedisPersistentTemplateJson, nil } func examplesDbTemplatesRedisPersistentTemplateJson() (*asset, error) { bytes, err := examplesDbTemplatesRedisPersistentTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/db-templates/redis-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesImageStreamsImageStreamsCentos7Json = []byte(`{ "kind": "ImageStreamList", "apiVersion": "image.openshift.io/v1", "items": [ { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "dotnet", "creationTimestamp": null, "annotations": { "openshift.io/display-name": ".NET" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run .NET applications. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of .NET available on OpenShift, including major versions updates.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET (Latest)", "sampleContextDir": "app", "sampleRef": "dotnet-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet", "tags": "builder,.net,dotnet,dotnetcore,hidden" }, "from": { "kind": "ImageStreamTag", "name": "9.0-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "6.0-ubi8", "annotations": { "description": "Build and run .NET 6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/6.0/build/README.md.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET 6 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnet-6.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:6.0,dotnet", "tags": "builder,.net,dotnet,dotnetcore,dotnet60", "version": "6.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/dotnet-60:6.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "6.0", "annotations": { "description": "Build and run .NET 6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/6.0/build/README.md.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET 6 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnetcore-6.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:6.0,dotnet", "tags": "builder,.net,dotnet,dotnetcore,dotnet60,hidden", "version": "6.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/dotnet-60:6.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "9.0-ubi8", "annotations": { "description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET 9 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnet-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:9.0,dotnet", "tags": "builder,.net,dotnet,dotnetcore,dotnet90", "version": "9.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/dotnet-90:9.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "9.0", "annotations": { "description": "Build and run .NET 9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/9.0/build/README.md.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET 9 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnetcore-9.0", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:9.0,dotnet", "tags": "builder,.net,dotnet,dotnetcore,dotnet90,hidden", "version": "9.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/dotnet-90:9.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.1-ubi8", "annotations": { "description": "Build and run .NET Core 3.1 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/redhat-developer/s2i-dotnetcore/tree/master/3.1/build/README.md.", "iconClass": "icon-dotnet", "openshift.io/display-name": ".NET Core 3.1 (UBI 8)", "sampleContextDir": "app", "sampleRef": "dotnetcore-3.1", "sampleRepo": "https://github.com/redhat-developer/s2i-dotnetcore-ex", "supports": "dotnet:3.1,dotnet", "tags": "builder,.net,dotnet,dotnetcore,dotnet31", "version": "3.1" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/dotnet-31:3.1" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "httpd", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Apache HTTP Server (httpd)" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major version updates.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd" }, "from": { "kind": "ImageStreamTag", "name": "2.4-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.4-ubi9", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server 2.4 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd", "version": "2.4" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/httpd-24:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.4-ubi8", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on RHEL 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server 2.4 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd", "version": "2.4" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/httpd-24:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.4-el7", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server 2.4 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd", "version": "2.4" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/httpd-24-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.4", "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server 2.4", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd,hidden", "version": "2.4" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/httpd-24-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "jenkins", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Jenkins" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Provides a Jenkins server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins" }, "from": { "kind": "ImageStreamTag", "name": "2" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "ocp-upgrade-redeploy", "annotations": { "description": "Provides a Jenkins 2.X server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OCP versions if the Jenkins image reference has changed.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins" }, "from": { "kind": "ImageStreamTag", "name": "2" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2", "annotations": { "description": "Provides a Jenkins v2.x server on CentOS. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins 2.X", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins", "version": "2.x" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift/origin-jenkins:4.11" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "user-maintained-upgrade-redeploy", "annotations": { "description": "Provides a Jenkins 2.X server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OKD versions if the Jenkins image reference has changed. A user must invoke 'oc import-image jenkins:user-maintained-upgrade-redeploy -n openshift' in order for the ImageStream controller to pull the latest digest for the image tag, and if a new digest exists, any running Jenkins DeploymentConfig will redeploy.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins 2.X", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins", "version": "2.x" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift/origin-jenkins:4.11" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "scheduled-upgrade-redeploy", "annotations": { "description": "Provides a Jenkins 2.X server from quay.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. OpenShift will periodically check to ensure that the latest digest for this image tag is imported. If an update occurs, any running Jenkins DeploymentConfig will redeploy.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins 2.X", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins", "version": "2.x" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift/origin-jenkins:4.11" }, "generation": null, "importPolicy": { "scheduled": true }, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "mariadb", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "MariaDB" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Provides a MariaDB database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major version updates.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb" }, "from": { "kind": "ImageStreamTag", "name": "10.5-el7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "10.5-el7", "annotations": { "description": "Provides a MariaDB 10.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.5/README.md.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB 10.5 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", "version": "10.5" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mariadb-105-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "10.3-el7", "annotations": { "description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB 10.3 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", "version": "10.3" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mariadb-103-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "10.3", "annotations": { "description": "Provides a MariaDB 10.3 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/tree/master/10.3/README.md.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB 10.3", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb,hidden", "version": "10.3" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mariadb-103-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "mysql", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "MySQL" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Provides a MySQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major version updates.", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "mysql" }, "from": { "kind": "ImageStreamTag", "name": "8.0-el8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "8.0-el7", "annotations": { "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL 8.0 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "mysql", "version": "8.0" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mysql-80-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "8.0", "annotations": { "description": "Provides a MySQL 8.0 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL 8.0", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "mysql,hidden", "version": "8.0" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mysql-80-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "nginx", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.20/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major version updates.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx" }, "from": { "kind": "ImageStreamTag", "name": "1.20-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "1.20-ubi9", "annotations": { "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.20/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.20 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.20" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/nginx-120:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "1.20-ubi8", "annotations": { "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.20/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.20 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.20" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/nginx-120:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "1.20-ubi7", "annotations": { "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.20/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.20 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.20" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/nginx-118:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "1.18-ubi8", "annotations": { "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.18 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.18" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/nginx-118:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "1.18-ubi7", "annotations": { "description": "Build and serve static content via Nginx HTTP server and a reverse proxy (nginx) on RHEL 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.18/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.18 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.18" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/nginx-118:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "nodejs", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Node.js" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run Node.js applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/16/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major version updates.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "supports": "nodejs", "tags": "builder,nodejs" }, "from": { "kind": "ImageStreamTag", "name": "16-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "16-ubi9", "annotations": { "description": "Build and run Node.js 16 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/16/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 16 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "16" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/nodejs-16:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "16-ubi9-minimal", "annotations": { "description": "Build and run Node.js 16 applications on UBI 9 Minimal. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/16-minimal/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 16 (UBI 9 Minimal)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "16" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/nodejs-16-minimal:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "16-ubi8", "annotations": { "description": "Build and run Node.js 16 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/16/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 16 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "16" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/nodejs-16:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "16-ubi8-minimal", "annotations": { "description": "Build and run Node.js 16 applications on UBI 8 Minimal. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/16-minimal/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 16 (UBI 8 Minimal)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "16" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/nodejs-16-minimal:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "14-ubi8", "annotations": { "description": "Build and run Node.js 14 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 14 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "14" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/nodejs-14:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "14-ubi8-minimal", "annotations": { "description": "Build and run Node.js 14 applications on UBI 8 Minimal. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14-minimal/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 14 (UBI 8 Minimal)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "14" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/nodejs-14-minimal:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "14-ubi7", "annotations": { "description": "Build and run Node.js 14 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/14/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 14 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs,hidden", "version": "14" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/nodejs-14:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "perl", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Perl" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run Perl applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.32/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major version updates.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl", "tags": "builder,perl" }, "from": { "kind": "ImageStreamTag", "name": "5.32-ubi9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.32-ubi9", "annotations": { "description": "Build and run Perl 5.32 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.32/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.32 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.32,perl", "tags": "builder,perl", "version": "5.32" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/perl-532:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.32-ubi8", "annotations": { "description": "Build and run Perl 5.32 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.32/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.32 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.32,perl", "tags": "builder,perl", "version": "5.32" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/perl-532:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.30-ubi8", "annotations": { "description": "Build and run Perl 5.30 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30-mod_fcgid/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.30 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.30,perl", "tags": "builder,perl", "version": "5.30" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/perl-530:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.30-el7", "annotations": { "description": "Build and run Perl 5.30 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.30 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.30,perl", "tags": "builder,perl", "version": "5.30" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/perl-530-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.30", "annotations": { "description": "Build and run Perl 5.30 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.30", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.30,perl", "tags": "builder,perl,hidden", "version": "5.30" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/perl-530-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.26-ubi8", "annotations": { "description": "Build and run Perl 5.26 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.26-mod_fcgid/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.26 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.26,perl", "tags": "builder,perl", "version": "5.26" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/perl-526:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "php", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "PHP" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run PHP applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.0/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major version updates.", "iconClass": "icon-php", "openshift.io/display-name": "PHP (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php", "tags": "builder,php" }, "from": { "kind": "ImageStreamTag", "name": "8.0-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "8.0-ubi9", "annotations": { "description": "Build and run PHP 8.0 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.0/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 8.0 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:8.0,php", "tags": "builder,php", "version": "8.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/php-80:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "8.0-ubi8", "annotations": { "description": "Build and run PHP 8.0 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/8.0/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 8.0 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:8.0,php", "tags": "builder,php", "version": "8.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/php-80:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "7.4-ubi8", "annotations": { "description": "Build and run PHP 7.4 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.4/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 7.4 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:7.4,php", "tags": "builder,php", "version": "7.4" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/php-74:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "7.3-ubi7", "annotations": { "description": "Build and run PHP 7.3 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 7.3 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:7.3,php", "tags": "builder,php", "version": "7.3" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/php-73:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "7.3", "annotations": { "description": "Build and run PHP 7.3 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.3/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 7.3", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:7.3,php", "tags": "builder,php,hidden", "version": "7.3" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/php-73-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "postgresql", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "PostgreSQL" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Provides a PostgreSQL database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major version updates.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql" }, "from": { "kind": "ImageStreamTag", "name": "12-el8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "13-el7", "annotations": { "description": "Provides a PostgreSQL 13 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 13 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "13" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-13-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "13-el7", "annotations": { "description": "Provides a PostgreSQL 13 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 13 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "13" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-13-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "12-el7", "annotations": { "description": "Provides a PostgreSQL 12 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 12 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "12" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-12-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "12", "annotations": { "description": "Provides a PostgreSQL 12 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 12", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql,hidden", "version": "12" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-12-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "10-el7", "annotations": { "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 10 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "10" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-10-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "10", "annotations": { "description": "Provides a PostgreSQL 10 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 10", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql,hidden", "version": "10" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-10-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "python", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Python" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run Python applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.9/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major version updates.", "iconClass": "icon-python", "openshift.io/display-name": "Python (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python", "tags": "builder,python" }, "from": { "kind": "ImageStreamTag", "name": "3.9-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.9-ubi9", "annotations": { "description": "Build and run Python 3.9 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.9/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 3.9 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.9,python", "tags": "builder,python", "version": "3.9" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/python-39:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.9-ubi8", "annotations": { "description": "Build and run Python 3.9 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.9/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 3.9 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.9,python", "tags": "builder,python", "version": "3.9" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/python-39:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.8-ubi8", "annotations": { "description": "Build and run Python 3.8 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 3.8 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.8,python", "tags": "builder,python", "version": "3.8" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/python-38:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.8-ubi7", "annotations": { "description": "Build and run Python 3.8 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.8/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 3.8 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.8,python", "tags": "builder,python", "version": "3.8" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/python-38:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.6-ubi8", "annotations": { "description": "Build and run Python 3.6 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 3.6 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.6,python", "tags": "builder,python", "version": "3.6" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/python-36:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.7-ubi8", "annotations": { "description": "Build and run Python 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 2.7 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:2.7,python", "tags": "builder,python", "version": "2.7" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/python-27:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "redis", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Redis" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Provides a Redis database on CentOS. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major version updates.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "redis" }, "from": { "kind": "ImageStreamTag", "name": "5-el8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5-el7", "annotations": { "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis 5 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "redis", "version": "5" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/redis-5-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5", "annotations": { "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/tree/master/5/README.md.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis 5", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "redis,hidden", "version": "5" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/redis-5-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Ruby" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run Ruby applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/3.0/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby", "tags": "builder,ruby" }, "from": { "kind": "ImageStreamTag", "name": "3.0-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.0-ubi9", "annotations": { "description": "Build and run Ruby 3.0 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/3.0/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 3.0 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:3.0,ruby", "tags": "builder,ruby", "version": "3.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/ruby-30:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.0-ubi8", "annotations": { "description": "Build and run Ruby 3.0 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/3.0/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 3.0 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:3.0,ruby", "tags": "builder,ruby", "version": "3.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-30:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.0-ubi7", "annotations": { "description": "Build and run Ruby 3.0 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/3.0/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 3.0 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:3.0,ruby", "tags": "builder,ruby", "version": "3.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/ruby-30:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.7-ubi8", "annotations": { "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 2.7 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:2.7,ruby", "tags": "builder,ruby", "version": "2.7" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-27:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.7-ubi7", "annotations": { "description": "Build and run Ruby 2.7 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 2.7 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:2.7,ruby", "tags": "builder,ruby", "version": "2.7" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/ruby-27:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.7", "annotations": { "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/2.7/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 2.7", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby", "tags": "builder,ruby,hidden" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/ruby-27-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "2.5-ubi8", "annotations": { "description": "Build and run Ruby 2.5 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.5/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 2.5 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:2.5,ruby", "tags": "builder,ruby", "version": "2.5" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-25:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "wildfly", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "WildFly" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "latest", "annotations": { "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "jee,java", "tags": "builder,wildfly,java" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "17.0", "annotations": { "description": "Build and run WildFly 17 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 17", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:17,jee,java", "tags": "builder,wildfly,java", "version": "17.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:17.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "18.0", "annotations": { "description": "Build and run WildFly 18 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 18", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:18,jee,java", "tags": "builder,wildfly,java", "version": "18.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:18.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "19.0", "annotations": { "description": "Build and run WildFly 19 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 19", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:19,jee,java", "tags": "builder,wildfly,java", "version": "19.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:19.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "20.0", "annotations": { "description": "Build and run WildFly 20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 20", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:20,jee,java", "tags": "builder,wildfly,java", "version": "20.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:20.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "21.0", "annotations": { "description": "Build and run WildFly 21 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 21", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:21,jee,java", "tags": "builder,wildfly,java", "version": "21.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:21.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "22.0", "annotations": { "description": "Build and run WildFly 22 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 22", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:22,jee,java", "tags": "builder,wildfly,java", "version": "22.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:22.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "23.0", "annotations": { "description": "Build and run WildFly 23 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 23", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:23,jee,java", "tags": "builder,wildfly,java", "version": "23.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:23.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "24.0", "annotations": { "description": "Build and run WildFly 24 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 24", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:24,jee,java", "tags": "builder,wildfly,java", "version": "24.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:24.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "25.0", "annotations": { "description": "Build and run WildFly 25 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 25", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:25,jee,java", "tags": "builder,wildfly,java", "version": "25.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:25.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "26.0", "annotations": { "description": "Build and run WildFly 26 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 26", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:26,jee,java", "tags": "builder,wildfly,java", "version": "26.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:26.0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "26.1", "annotations": { "description": "Build and run WildFly 26 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/wildfly/wildfly-s2i/blob/current/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 26", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:26,jee,java", "tags": "builder,wildfly,java", "version": "26.1" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:26.1" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] }, "status": { "dockerImageRepository": "" } } ] } `) func examplesImageStreamsImageStreamsCentos7JsonBytes() ([]byte, error) { return _examplesImageStreamsImageStreamsCentos7Json, nil } func examplesImageStreamsImageStreamsCentos7Json() (*asset, error) { bytes, err := examplesImageStreamsImageStreamsCentos7JsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/image-streams/image-streams-centos7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesSampleAppApplicationTemplateDockerbuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27" }, "spec": { "tags": [ { "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-27:latest" }, "name": "latest" } ] } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Docker", "dockerStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-dockerbuild" } } `) func examplesSampleAppApplicationTemplateDockerbuildJsonBytes() ([]byte, error) { return _examplesSampleAppApplicationTemplateDockerbuildJson, nil } func examplesSampleAppApplicationTemplateDockerbuildJson() (*asset, error) { bytes, err := examplesSampleAppApplicationTemplateDockerbuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/sample-app/application-template-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesSampleAppApplicationTemplatePullspecbuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27" }, "spec": { "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "mid": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } } }, "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func examplesSampleAppApplicationTemplatePullspecbuildJsonBytes() ([]byte, error) { return _examplesSampleAppApplicationTemplatePullspecbuildJson, nil } func examplesSampleAppApplicationTemplatePullspecbuildJson() (*asset, error) { bytes, err := examplesSampleAppApplicationTemplatePullspecbuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/sample-app/application-template-pullspecbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesSampleAppApplicationTemplateStibuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27" }, "spec": { "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "Deployment", "apiVersion": "apps/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true", "image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"origin-ruby-sample:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" } }, "spec": { "strategy": { "type": "RollingUpdate" }, "replicas": 2, "selector": { "matchLabels": { "name": "frontend" } }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Deployment", "apiVersion": "apps/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate" }, "replicas": 1, "selector": { "matchLabels": { "name": "database" } }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func examplesSampleAppApplicationTemplateStibuildJsonBytes() ([]byte, error) { return _examplesSampleAppApplicationTemplateStibuildJson, nil } func examplesSampleAppApplicationTemplateStibuildJson() (*asset, error) { bytes, err := examplesSampleAppApplicationTemplateStibuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/sample-app/application-template-stibuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesSampleAppCleanupSh = []byte(`#!/bin/sh echo "Killing openshift all-in-one server ..." sudo pkill -x openshift echo "Stopping all k8s containers on host ..." sudo docker ps --format='{{.Names}}' | grep -E '^k8s_' | xargs -l -r sudo docker stop echo "Unmounting openshift local volumes ..." mount | grep "openshift.local.volumes" | awk '{ print $3}' | xargs -l -r sudo umount echo "Cleaning up openshift runtime files ..." sudo rm -rf openshift.local.* `) func examplesSampleAppCleanupShBytes() ([]byte, error) { return _examplesSampleAppCleanupSh, nil } func examplesSampleAppCleanupSh() (*asset, error) { bytes, err := examplesSampleAppCleanupShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/sample-app/cleanup.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesSampleAppGithubWebhookExampleJson = []byte(`{ "after": "9bdc3a26ff933b32f3e558636b58aea86a69f051", "before": "0000000000000000000000000000000000000000", "commits": [ { "added": [ "LICENSE" ], "author": { "email": "anonUser@example.com", "name": "Anonymous User" }, "committer": { "email": "anonUser@example.com", "name": "Anonymous User" }, "distinct": true, "id": "9bdc3a26ff933b32f3e558636b58aea86a69f051", "message": "Added license", "modified": [], "removed": [], "timestamp": "2014-08-28T16:55:36+02:00", "url": "https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051" } ], "compare": "https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", "created": true, "deleted": false, "forced": true, "head_commit": { "added": [ "LICENSE" ], "author": { "email": "anonUser@example.com", "name": "Anonymous User" }, "committer": { "email": "anonUser@example.com", "name": "Anonymous User" }, "distinct": true, "id": "", "message": "Added license", "modified": [], "removed": [], "timestamp": "2014-08-28T16:55:36+02:00", "url": "https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051" }, "pusher": { "email": "anonUser@example.com", "name": "anonUser" }, "ref": "refs/heads/master", "repository": { "archive_url": "https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", "assignees_url": "https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", "blobs_url": "https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", "branches_url": "https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", "clone_url": "https://github.com/anonUser/anonRepo.git", "collaborators_url": "https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", "comments_url": "https://api.github.com/repos/anonUser/anonRepo/comments{/number}", "commits_url": "https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", "compare_url": "https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", "contents_url": "https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", "contributors_url": "https://api.github.com/repos/anonUser/anonRepo/contributors", "created_at": 1.409063699e+09, "default_branch": "master", "description": "Git webhook implementation in Go.", "downloads_url": "https://api.github.com/repos/anonUser/anonRepo/downloads", "events_url": "https://api.github.com/repos/anonUser/anonRepo/events", "fork": false, "forks": 0, "forks_count": 0, "forks_url": "https://api.github.com/repos/anonUser/anonRepo/forks", "full_name": "anonUser/anonRepo", "git_commits_url": "https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", "git_refs_url": "https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", "git_tags_url": "https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", "git_url": "https://github.com/anonUser/anonRepo.git", "has_downloads": true, "has_issues": true, "has_wiki": true, "homepage": null, "hooks_url": "https://api.github.com/repos/anonUser/anonRepo/hooks", "html_url": "https://github.com/anonUser/anonRepo", "id": 2.3354788e+07, "issue_comment_url": "https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", "issue_events_url": "https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", "issues_url": "https://api.github.com/repos/anonUser/anonRepo/issues{/number}", "keys_url": "https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", "labels_url": "https://api.github.com/repos/anonUser/anonRepo/labels{/name}", "language": null, "languages_url": "https://api.github.com/repos/anonUser/anonRepo/languages", "master_branch": "master", "merges_url": "https://api.github.com/repos/anonUser/anonRepo/merges", "milestones_url": "https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", "mirror_url": null, "name": "anonRepo", "notifications_url": "https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", "open_issues": 0, "open_issues_count": 0, "owner": { "email": "anonUser@example.com", "name": "anonUser" }, "private": false, "pulls_url": "https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", "pushed_at": 1.409238007e+09, "releases_url": "https://api.github.com/repos/anonUser/anonRepo/releases{/id}", "size": 0, "ssh_url": "git@github.com:anonUser/anonRepo.git", "stargazers": 0, "stargazers_count": 0, "stargazers_url": "https://api.github.com/repos/anonUser/anonRepo/stargazers", "statuses_url": "https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", "subscribers_url": "https://api.github.com/repos/anonUser/anonRepo/subscribers", "subscription_url": "https://api.github.com/repos/anonUser/anonRepo/subscription", "svn_url": "https://github.com/anonUser/anonRepo", "tags_url": "https://api.github.com/repos/anonUser/anonRepo/tags", "teams_url": "https://api.github.com/repos/anonUser/anonRepo/teams", "trees_url": "https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", "updated_at": "2014-08-26T14:34:59Z", "url": "https://github.com/anonUser/anonRepo", "watchers": 0, "watchers_count": 0 } } `) func examplesSampleAppGithubWebhookExampleJsonBytes() ([]byte, error) { return _examplesSampleAppGithubWebhookExampleJson, nil } func examplesSampleAppGithubWebhookExampleJson() (*asset, error) { bytes, err := examplesSampleAppGithubWebhookExampleJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/sample-app/github-webhook-example.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsCakephpMysqlPersistentJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "cakephp-mysql-persistent", "creationTimestamp": null, "annotations": { "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "CakePHP + MySQL", "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,php,cakephp", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./vendor/bin/phpunit" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "COMPOSER_MIRROR", "value": "${COMPOSER_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "php:${PHP_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "cakephp-mysql-persistent" }, "failurePolicy": "Retry" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECRET_TOKEN", "valueFrom": { "secretKeyRef": { "key": "cakephp-secret-token", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECURITY_SALT", "valueFrom": { "secretKeyRef": { "key": "cakephp-security-salt", "name": "${NAME}" } } }, { "name": "OPCACHE_REVALIDATE_FREQ", "value": "${OPCACHE_REVALIDATE_FREQ}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 30, "periodSeconds": 60, "timeoutSeconds": 3 }, "name": "cakephp-mysql-persistent", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 3, "periodSeconds": 60, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "cakephp-mysql-persistent" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:${MYSQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "cakephp-mysql-persistent", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PHP_VERSION", "displayName": "PHP Version", "description": "Version of PHP image to be used (7.3-ubi7, 7.4-ubi8, or latest).", "value": "7.4-ubi8", "required": true }, { "name": "MYSQL_VERSION", "displayName": "MySQL Version", "description": "Version of MySQL image to be used (8.0-el8 or latest).", "value": "8.0-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the CakePHP container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "1Gi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/cakephp-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "mysql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "mysql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database User", "value": "cakephp", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "CAKEPHP_SECRET_TOKEN", "displayName": "CakePHP secret token", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "CAKEPHP_SECURITY_SALT", "displayName": "CakePHP Security Salt", "description": "Security salt for session hash.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "OPCACHE_REVALIDATE_FREQ", "displayName": "OPcache Revalidation Frequency", "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", "value": "2" }, { "name": "COMPOSER_MIRROR", "displayName": "Custom Composer Mirror URL", "description": "The custom Composer mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", "value": "mysql_native_password" } ], "labels": { "app": "cakephp-mysql-persistent", "template": "cakephp-mysql-persistent" } }`) func examplesQuickstartsCakephpMysqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsCakephpMysqlPersistentJson, nil } func examplesQuickstartsCakephpMysqlPersistentJson() (*asset, error) { bytes, err := examplesQuickstartsCakephpMysqlPersistentJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsCakephpMysqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "cakephp-mysql-example", "creationTimestamp": null, "annotations": { "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-php", "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,php,cakephp", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./vendor/bin/phpunit" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "COMPOSER_MIRROR", "value": "${COMPOSER_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "php:${PHP_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "cakephp-mysql-example" }, "failurePolicy": "Retry" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECRET_TOKEN", "valueFrom": { "secretKeyRef": { "key": "cakephp-secret-token", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECURITY_SALT", "valueFrom": { "secretKeyRef": { "key": "cakephp-security-salt", "name": "${NAME}" } } }, { "name": "OPCACHE_REVALIDATE_FREQ", "value": "${OPCACHE_REVALIDATE_FREQ}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 30, "periodSeconds": 60, "timeoutSeconds": 3 }, "name": "cakephp-mysql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 3, "periodSeconds": 60, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "cakephp-mysql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:${MYSQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "cakephp-mysql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PHP_VERSION", "displayName": "PHP Version", "description": "Version of PHP image to be used (7.3-ubi7, 7.4-ubi8, or latest).", "value": "7.4-ubi8", "required": true }, { "name": "MYSQL_VERSION", "displayName": "MySQL Version", "description": "Version of MySQL image to be used (8.0-el8 or latest).", "value": "8.0-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the CakePHP container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/cakephp-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "mysql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "mysql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database User", "value": "cakephp", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "CAKEPHP_SECRET_TOKEN", "displayName": "CakePHP secret token", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "CAKEPHP_SECURITY_SALT", "displayName": "CakePHP Security Salt", "description": "Security salt for session hash.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "OPCACHE_REVALIDATE_FREQ", "displayName": "OPcache Revalidation Frequency", "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", "value": "2" }, { "name": "COMPOSER_MIRROR", "displayName": "Custom Composer Mirror URL", "description": "The custom Composer mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", "value": "mysql_native_password" } ], "labels": { "app": "cakephp-mysql-example", "template": "cakephp-mysql-example" } }`) func examplesQuickstartsCakephpMysqlJsonBytes() ([]byte, error) { return _examplesQuickstartsCakephpMysqlJson, nil } func examplesQuickstartsCakephpMysqlJson() (*asset, error) { bytes, err := examplesQuickstartsCakephpMysqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsDancerMysqlPersistentJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "dancer-mysql-persistent", "creationTimestamp": null, "annotations": { "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Dancer + MySQL", "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,perl,dancer", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "keybase": "${SECRET_KEY_BASE}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "perl -I extlib/lib/perl5 -I lib t/*" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "CPAN_MIRROR", "value": "${CPAN_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "perl:${PERL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "SECRET_KEY_BASE", "valueFrom": { "secretKeyRef": { "key": "keybase", "name": "${NAME}" } } }, { "name": "PERL_APACHE2_RELOAD", "value": "${PERL_APACHE2_RELOAD}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "dancer-mysql-persistent", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "dancer-mysql-persistent" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:8.0-el8", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "dancer-mysql-persistent", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PERL_VERSION", "displayName": "Version of Perl Image", "description": "Version of Perl image to be used (5.30-el7, 5.30-ubi8, or latest).", "value": "5.30-ubi8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Perl Dancer container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "1Gi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/dancer-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "database", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "sampledb", "required": true }, { "name": "PERL_APACHE2_RELOAD", "displayName": "Perl Module Reload", "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." }, { "name": "SECRET_KEY_BASE", "displayName": "Secret Key", "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "CPAN_MIRROR", "displayName": "Custom CPAN Mirror URL", "description": "The custom CPAN mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", "value": "mysql_native_password" } ], "labels": { "app": "dancer-mysql-persistent", "template": "dancer-mysql-persistent" } }`) func examplesQuickstartsDancerMysqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsDancerMysqlPersistentJson, nil } func examplesQuickstartsDancerMysqlPersistentJson() (*asset, error) { bytes, err := examplesQuickstartsDancerMysqlPersistentJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/dancer-mysql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsDancerMysqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "dancer-mysql-example", "creationTimestamp": null, "annotations": { "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-perl", "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,perl,dancer", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "keybase": "${SECRET_KEY_BASE}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "perl -I extlib/lib/perl5 -I lib t/*" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "CPAN_MIRROR", "value": "${CPAN_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "perl:${PERL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "SECRET_KEY_BASE", "valueFrom": { "secretKeyRef": { "key": "keybase", "name": "${NAME}" } } }, { "name": "PERL_APACHE2_RELOAD", "value": "${PERL_APACHE2_RELOAD}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "dancer-mysql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "dancer-mysql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:8.0-el8", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "dancer-mysql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PERL_VERSION", "displayName": "Version of Perl Image", "description": "Version of Perl image to be used (5.30-el7, 5.30-ubi8, or latest).", "value": "5.30-ubi8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Perl Dancer container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/dancer-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "database", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "sampledb", "required": true }, { "name": "PERL_APACHE2_RELOAD", "displayName": "Perl Module Reload", "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." }, { "name": "SECRET_KEY_BASE", "displayName": "Secret Key", "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "CPAN_MIRROR", "displayName": "Custom CPAN Mirror URL", "description": "The custom CPAN mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", "value": "mysql_native_password" } ], "labels": { "app": "dancer-mysql-example", "template": "dancer-mysql-example" } }`) func examplesQuickstartsDancerMysqlJsonBytes() ([]byte, error) { return _examplesQuickstartsDancerMysqlJson, nil } func examplesQuickstartsDancerMysqlJson() (*asset, error) { bytes, err := examplesQuickstartsDancerMysqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/dancer-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsDjangoPostgresqlPersistentJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "django-psql-persistent", "creationTimestamp": null, "annotations": { "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Django + PostgreSQL", "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,python,django", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "django-secret-key": "${DJANGO_SECRET_KEY}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./manage.py test" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "PIP_INDEX_URL", "value": "${PIP_INDEX_URL}" } ], "from": { "kind": "ImageStreamTag", "name": "python:${PYTHON_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "APP_CONFIG", "value": "${APP_CONFIG}" }, { "name": "DJANGO_SECRET_KEY", "valueFrom": { "secretKeyRef": { "key": "django-secret-key", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "django-psql-persistent", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "django-psql-persistent" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" } ], "image": " ", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "django-psql-persistent", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PYTHON_VERSION", "displayName": "Version of Python Image", "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi8, 3.9-ubi8, or latest).", "value": "3.9-ubi8", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", "value": "12-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Django container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "512Mi", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "1Gi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/django-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", "value": "4.2.x" }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "postgresql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "value": "django", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database User Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "APP_CONFIG", "displayName": "Application Configuration File Path", "description": "Relative path to Gunicorn configuration file (optional)." }, { "name": "DJANGO_SECRET_KEY", "displayName": "Django Secret Key", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "PIP_INDEX_URL", "displayName": "Custom PyPi Index URL", "description": "The custom PyPi index URL" } ], "labels": { "app": "django-psql-persistent", "template": "django-psql-persistent" } }`) func examplesQuickstartsDjangoPostgresqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsDjangoPostgresqlPersistentJson, nil } func examplesQuickstartsDjangoPostgresqlPersistentJson() (*asset, error) { bytes, err := examplesQuickstartsDjangoPostgresqlPersistentJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/django-postgresql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsDjangoPostgresqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "django-psql-example", "creationTimestamp": null, "annotations": { "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-python", "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,python,django", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "django-secret-key": "${DJANGO_SECRET_KEY}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./manage.py test" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "PIP_INDEX_URL", "value": "${PIP_INDEX_URL}" } ], "from": { "kind": "ImageStreamTag", "name": "python:${PYTHON_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "APP_CONFIG", "value": "${APP_CONFIG}" }, { "name": "DJANGO_SECRET_KEY", "valueFrom": { "secretKeyRef": { "key": "django-secret-key", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "django-psql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "django-psql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" } ], "image": " ", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "django-psql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PYTHON_VERSION", "displayName": "Version of Python Image", "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi8, 3.9-ubi8, or latest).", "value": "3.9-ubi8", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", "value": "12-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Django container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/django-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", "value": "4.2.x" }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "postgresql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "value": "django", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database User Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "APP_CONFIG", "displayName": "Application Configuration File Path", "description": "Relative path to Gunicorn configuration file (optional)." }, { "name": "DJANGO_SECRET_KEY", "displayName": "Django Secret Key", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "PIP_INDEX_URL", "displayName": "Custom PyPi Index URL", "description": "The custom PyPi index URL" } ], "labels": { "app": "django-psql-example", "template": "django-psql-example" } }`) func examplesQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) { return _examplesQuickstartsDjangoPostgresqlJson, nil } func examplesQuickstartsDjangoPostgresqlJson() (*asset, error) { bytes, err := examplesQuickstartsDjangoPostgresqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/django-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsHttpdJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "httpd-example", "creationTimestamp": null, "annotations": { "description": "An example Apache HTTP Server (httpd) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server", "openshift.io/documentation-url": "https://github.com/sclorg/httpd-ex", "openshift.io/long-description": "This template defines resources needed to develop a static application served by Apache HTTP Server (httpd), including a build configuration and application deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,httpd", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/httpd-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "httpd:2.4-el8", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" }, { "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" }, "type": "Generic" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Rolling" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [], "image": " ", "livenessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "httpd-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "httpd-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "httpd-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/httpd-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the httpd service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" } ], "labels": { "app": "httpd-example", "template": "httpd-example" } }`) func examplesQuickstartsHttpdJsonBytes() ([]byte, error) { return _examplesQuickstartsHttpdJson, nil } func examplesQuickstartsHttpdJson() (*asset, error) { bytes, err := examplesQuickstartsHttpdJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/httpd.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsNginxJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "nginx-example", "creationTimestamp": null, "annotations": { "description": "An example Nginx HTTP server and a reverse proxy (nginx) application that serves static content. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy", "openshift.io/documentation-url": "https://github.com/sclorg/nginx-ex", "openshift.io/long-description": "This template defines resources needed to develop a static application served by Nginx HTTP server and a reverse proxy (nginx), including a build configuration and application deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,nginx" } }, "message": "The following service(s) have been created in your project: ${NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/nginx-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" }, "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "nginx:${NGINX_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" }, { "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" }, "type": "Generic" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Rolling" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [], "image": " ", "livenessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "nginx-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "nginx-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "nginx-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "NGINX_VERSION", "displayName": "NGINX Version", "description": "Version of NGINX image to be used (1.20-el8 by default).", "value": "1.20-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/nginx-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the nginx service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" } ], "labels": { "template": "nginx-example" } }`) func examplesQuickstartsNginxJsonBytes() ([]byte, error) { return _examplesQuickstartsNginxJson, nil } func examplesQuickstartsNginxJson() (*asset, error) { bytes, err := examplesQuickstartsNginxJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/nginx.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsNodejsPostgresqlPersistentJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "nodejs-postgresql-persistent", "creationTimestamp": null, "annotations": { "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js + PostgreSQL", "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,nodejs", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": {}, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "NPM_MIRROR", "value": "${NPM_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "nodejs:${NODEJS_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" }, { "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" }, "type": "Generic" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "labels": { "app.openshift.io/runtime": "nodejs" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "app.openshift.io/runtime": "nodejs", "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-admin-password", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "nodejs-postgresql-persistent", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "nodejs-postgresql-persistent" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-admin-password", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 5432 }, "timeoutSeconds": 1 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "nodejs-postgresql-persistent", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "NODEJS_VERSION", "displayName": "Version of NodeJS Image", "description": "Version of NodeJS image to be used (12-ubi8, 14-ubi8, or latest).", "value": "14-ubi8", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (12-el8, or latest).", "value": "12-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Node.js container can use.", "value": "256Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "256Mi", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "1Gi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_USER", "displayName": "PostgreSQL Username", "description": "Username for PostgreSQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "PostgreSQL Password", "description": "Password for the PostgreSQL user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "my_data", "required": true }, { "name": "DATABASE_ADMIN_PASSWORD", "displayName": "Database Administrator Password", "description": "Password for the database admin user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "NPM_MIRROR", "displayName": "Custom NPM Mirror URL", "description": "The custom NPM mirror URL" } ], "labels": { "app": "nodejs-postgresql-persistent", "template": "nodejs-postgresql-persistent" } }`) func examplesQuickstartsNodejsPostgresqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsNodejsPostgresqlPersistentJson, nil } func examplesQuickstartsNodejsPostgresqlPersistentJson() (*asset, error) { bytes, err := examplesQuickstartsNodejsPostgresqlPersistentJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/nodejs-postgresql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsNodejsPostgresqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "nodejs-postgresql-example", "creationTimestamp": null, "annotations": { "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js + PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,nodejs", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": {}, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "NPM_MIRROR", "value": "${NPM_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "nodejs:${NODEJS_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" }, { "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" }, "type": "Generic" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "labels": { "app.openshift.io/runtime": "nodejs" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "app.openshift.io/runtime": "nodejs", "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-admin-password", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "nodejs-postgresql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "nodejs-postgresql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-admin-password", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 5432 }, "timeoutSeconds": 1 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/postgresql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "emptyDir": { "medium": "" }, "name": "${DATABASE_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "nodejs-postgresql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "NODEJS_VERSION", "displayName": "Version of NodeJS Image", "description": "Version of NodeJS image to be used (12-ubi8, 14-ubi8, or latest).", "value": "14-ubi8", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (12-el8, or latest).", "value": "12-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Node.js container can use.", "value": "256Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "256Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_USER", "displayName": "PostgreSQL Username", "description": "Username for PostgreSQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "PostgreSQL Password", "description": "Password for the PostgreSQL user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "my_data", "required": true }, { "name": "DATABASE_ADMIN_PASSWORD", "displayName": "Database Administrator Password", "description": "Password for the database admin user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "NPM_MIRROR", "displayName": "Custom NPM Mirror URL", "description": "The custom NPM mirror URL" } ], "labels": { "app": "nodejs-postgresql-example", "template": "nodejs-postgresql-example" } }`) func examplesQuickstartsNodejsPostgresqlJsonBytes() ([]byte, error) { return _examplesQuickstartsNodejsPostgresqlJson, nil } func examplesQuickstartsNodejsPostgresqlJson() (*asset, error) { bytes, err := examplesQuickstartsNodejsPostgresqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/nodejs-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsRailsPostgresqlPersistentJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "rails-pgsql-persistent", "creationTimestamp": null, "annotations": { "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Rails + PostgreSQL", "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,ruby,rails", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "application-password": "${APPLICATION_PASSWORD}", "application-user": "${APPLICATION_USER}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "keybase": "${SECRET_KEY_BASE}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "RUBYGEM_MIRROR", "value": "${RUBYGEM_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "ruby:3.3-ubi8", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "${NAME}" }, "failurePolicy": "Abort" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "SECRET_KEY_BASE", "valueFrom": { "secretKeyRef": { "key": "keybase", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" }, { "name": "APPLICATION_DOMAIN", "value": "${APPLICATION_DOMAIN}" }, { "name": "APPLICATION_USER", "valueFrom": { "secretKeyRef": { "key": "application-user", "name": "${NAME}" } } }, { "name": "APPLICATION_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "application-password", "name": "${NAME}" } } }, { "name": "RAILS_ENV", "value": "${RAILS_ENV}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/articles", "port": 8080 }, "initialDelaySeconds": 10, "timeoutSeconds": 3 }, "name": "${NAME}", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/articles", "port": 8080 }, "initialDelaySeconds": 5, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "${NAME}" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" } ], "image": " ", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "name": "${DATABASE_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${DATABASE_SERVICE_NAME}" } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:12-el8", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "rails-pgsql-persistent", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Rails container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "512Mi", "required": true }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi", "value": "1Gi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/rails-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "SECRET_KEY_BASE", "displayName": "Secret Key", "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "APPLICATION_USER", "displayName": "Application Username", "description": "The application user that is used within the sample application to authorize access on pages.", "value": "openshift", "required": true }, { "name": "APPLICATION_PASSWORD", "displayName": "Application Password", "description": "The application password that is used within the sample application to authorize access on pages.", "value": "secret", "required": true }, { "name": "RAILS_ENV", "displayName": "Rails Environment", "description": "Environment under which the sample application will run. Could be set to production, development or test.", "value": "production", "required": true }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "root", "required": true }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "displayName": "Maximum Database Connections", "value": "100" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "displayName": "Shared Buffer Amount", "value": "12MB" }, { "name": "RUBYGEM_MIRROR", "displayName": "Custom RubyGems Mirror URL", "description": "The custom RubyGems mirror URL" } ], "labels": { "app": "rails-pgsql-persistent", "template": "rails-pgsql-persistent" } }`) func examplesQuickstartsRailsPostgresqlPersistentJsonBytes() ([]byte, error) { return _examplesQuickstartsRailsPostgresqlPersistentJson, nil } func examplesQuickstartsRailsPostgresqlPersistentJson() (*asset, error) { bytes, err := examplesQuickstartsRailsPostgresqlPersistentJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/rails-postgresql-persistent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsRailsPostgresqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "rails-postgresql-example", "creationTimestamp": null, "annotations": { "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-ruby", "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,ruby,rails", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "application-password": "${APPLICATION_PASSWORD}", "application-user": "${APPLICATION_USER}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "keybase": "${SECRET_KEY_BASE}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "RUBYGEM_MIRROR", "value": "${RUBYGEM_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "ruby:3.3-ubi8", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "${NAME}" }, "failurePolicy": "Abort" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "SECRET_KEY_BASE", "valueFrom": { "secretKeyRef": { "key": "keybase", "name": "${NAME}" } } }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" }, { "name": "APPLICATION_DOMAIN", "value": "${APPLICATION_DOMAIN}" }, { "name": "APPLICATION_USER", "valueFrom": { "secretKeyRef": { "key": "application-user", "name": "${NAME}" } } }, { "name": "APPLICATION_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "application-password", "name": "${NAME}" } } }, { "name": "RAILS_ENV", "value": "${RAILS_ENV}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/articles", "port": 8080 }, "initialDelaySeconds": 10, "timeoutSeconds": 3 }, "name": "${NAME}", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/articles", "port": 8080 }, "initialDelaySeconds": 5, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "${NAME}" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" } ], "image": " ", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:12-el8", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "rails-postgresql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Rails container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/rails-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "SECRET_KEY_BASE", "displayName": "Secret Key", "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "APPLICATION_USER", "displayName": "Application Username", "description": "The application user that is used within the sample application to authorize access on pages.", "value": "openshift", "required": true }, { "name": "APPLICATION_PASSWORD", "displayName": "Application Password", "description": "The application password that is used within the sample application to authorize access on pages.", "value": "secret", "required": true }, { "name": "RAILS_ENV", "displayName": "Rails Environment", "description": "Environment under which the sample application will run. Could be set to production, development or test.", "value": "production", "required": true }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "root", "required": true }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "displayName": "Maximum Database Connections", "value": "100" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "displayName": "Shared Buffer Amount", "value": "12MB" }, { "name": "RUBYGEM_MIRROR", "displayName": "Custom RubyGems Mirror URL", "description": "The custom RubyGems mirror URL" } ], "labels": { "app": "rails-postgresql-example", "template": "rails-postgresql-example" } }`) func examplesQuickstartsRailsPostgresqlJsonBytes() ([]byte, error) { return _examplesQuickstartsRailsPostgresqlJson, nil } func examplesQuickstartsRailsPostgresqlJson() (*asset, error) { bytes, err := examplesQuickstartsRailsPostgresqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/rails-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesHelloOpenshiftDockerfile = []byte(`FROM scratch MAINTAINER Jessica Forrester <jforrest@redhat.com> COPY bin/hello-openshift /hello-openshift EXPOSE 8080 8888 USER 1001 ENTRYPOINT ["/hello-openshift"] `) func examplesHelloOpenshiftDockerfileBytes() ([]byte, error) { return _examplesHelloOpenshiftDockerfile, nil } func examplesHelloOpenshiftDockerfile() (*asset, error) { bytes, err := examplesHelloOpenshiftDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/hello-openshift/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesHelloOpenshiftGoMod = []byte(`module github.com/openshift/origin/examples/hello-openshift go 1.21 `) func examplesHelloOpenshiftGoModBytes() ([]byte, error) { return _examplesHelloOpenshiftGoMod, nil } func examplesHelloOpenshiftGoMod() (*asset, error) { bytes, err := examplesHelloOpenshiftGoModBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/hello-openshift/go.mod", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesHelloOpenshiftHelloPodJson = []byte(`{ "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "hello-openshift", "creationTimestamp": null, "labels": { "name": "hello-openshift" } }, "spec": { "containers": [ { "name": "hello-openshift", "image": "openshift/hello-openshift", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "volumeMounts": [ { "name":"tmp", "mountPath":"/tmp" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name":"tmp", "emptyDir": {} } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" }, "status": {} } `) func examplesHelloOpenshiftHelloPodJsonBytes() ([]byte, error) { return _examplesHelloOpenshiftHelloPodJson, nil } func examplesHelloOpenshiftHelloPodJson() (*asset, error) { bytes, err := examplesHelloOpenshiftHelloPodJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/hello-openshift/hello-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesHelloOpenshiftHelloProjectJson = []byte(`{ "kind": "Project", "apiVersion": "project.openshift.io/v1", "metadata": { "name": "hello-openshift-project", "creationTimestamp": null, "labels": { "name": "hello-openshift-project" }, "annotations": { "openshift.io/description": "This is an example project to demonstrate OpenShift v3", "openshift.io/display-name": "Hello OpenShift" } }, "spec": {}, "status": {} } `) func examplesHelloOpenshiftHelloProjectJsonBytes() ([]byte, error) { return _examplesHelloOpenshiftHelloProjectJson, nil } func examplesHelloOpenshiftHelloProjectJson() (*asset, error) { bytes, err := examplesHelloOpenshiftHelloProjectJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/hello-openshift/hello-project.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsApplicationTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "nodejs-helloworld-sample", "annotations": { "description": "This example shows how to create a simple nodejs application in openshift origin v3", "iconClass": "icon-nodejs", "tags": "instant-app,nodejs" } }, "objects": [ { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend-prod" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 8080, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend-prod" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "frontend" }, "spec": { "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend-prod" }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120 } }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "nodejs-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-nodejs-sample:prod" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name":"frontend-prod" }, "template": { "metadata": { "labels": { "name": "frontend-prod" } }, "spec": { "containers": [ { "name": "nodejs-helloworld", "image": " ", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 8080, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-nodejs-sample" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-nodejs-sample2" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-nodejs-sample3" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "nodejs-010-centos7" }, "spec": { "dockerImageRepository": "${NAMESPACE}/nodejs-010-centos7" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "frontend", "labels": { "name": "nodejs-sample-build" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101" } } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/nodejs-ex.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "nodejs-010-centos7:latest" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-nodejs-sample:latest" } }, "resources": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend" }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120 } }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": false, "containerNames": [ "nodejs-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-nodejs-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name":"frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "nodejs-helloworld", "image": " ", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } ], "parameters": [ { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "512Mi" }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift" }, { "name": "ADMIN_USERNAME", "displayName": "Administrator Username", "description": "Username for the administrator of this application.", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "displayName": "Administrator Password", "description": "Password for the administrator of this application.", "generate": "expression", "from": "[a-zA-Z0-9]{8}" } ], "labels": { "template": "application-template-stibuild" } } `) func examplesJenkinsApplicationTemplateJsonBytes() ([]byte, error) { return _examplesJenkinsApplicationTemplateJson, nil } func examplesJenkinsApplicationTemplateJson() (*asset, error) { bytes, err := examplesJenkinsApplicationTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/application-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsJenkinsEphemeralTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "jenkins-ephemeral", "creationTimestamp": null, "annotations": { "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Ephemeral)", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "instant-app,jenkins" } }, "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/main/examples/jenkins/README.md contains more information about using this template.", "objects": [ { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "annotations": { "haproxy.router.openshift.io/timeout": "4m", "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "tls": { "insecureEdgeTerminationPolicy": "Redirect", "termination": "edge" }, "to": { "kind": "Service", "name": "${JENKINS_SERVICE_NAME}" } } }, { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "labels": { "config.openshift.io/inject-trusted-cabundle": "true" }, "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${JENKINS_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "OPENSHIFT_ENABLE_OAUTH", "value": "${ENABLE_OAUTH}" }, { "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", "value": "true" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" }, { "name": "KUBERNETES_MASTER", "value": "https://kubernetes.default:443" }, { "name": "KUBERNETES_TRUST_CERTIFICATES", "value": "true" }, { "name": "JENKINS_SERVICE_NAME", "value": "${JENKINS_SERVICE_NAME}" }, { "name": "JNLP_SERVICE_NAME", "value": "${JNLP_SERVICE_NAME}" }, { "name": "JENKINS_UC_INSECURE", "value": "${JENKINS_UC_INSECURE}" }, { "name": "CASC_JENKINS_CONFIG", "value": "/var/lib/jenkins/proxy.yaml" }, { "name": "JAVA_FIPS_OPTIONS", "value": "${JAVA_FIPS_OPTIONS}" } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "failureThreshold": 2, "httpGet": { "path": "/login", "port": 8080 }, "initialDelaySeconds": 420, "periodSeconds": 360, "timeoutSeconds": 240 }, "name": "jenkins", "readinessProbe": { "httpGet": { "path": "/login", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 240 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/jenkins", "name": "${JENKINS_SERVICE_NAME}-data" }, { "mountPath": "/etc/pki/ca-trust/source/anchors", "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccountName": "${JENKINS_SERVICE_NAME}", "volumes": [ { "emptyDir": { "medium": "" }, "name": "${JENKINS_SERVICE_NAME}-data" }, { "configMap": { "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", "optional": true }, "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "jenkins" ], "from": { "kind": "ImageStreamTag", "name": "${JENKINS_IMAGE_STREAM_TAG}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "ServiceAccount", "metadata": { "annotations": { "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" }, "name": "${JENKINS_SERVICE_NAME}" } }, { "apiVersion": "authorization.openshift.io/v1", "groupNames": null, "kind": "RoleBinding", "metadata": { "name": "${JENKINS_SERVICE_NAME}_edit" }, "roleRef": { "name": "edit" }, "subjects": [ { "kind": "ServiceAccount", "name": "${JENKINS_SERVICE_NAME}" } ] }, { "apiVersion": "v1", "kind": "Service", "metadata": { "name": "${JNLP_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "agent", "nodePort": 0, "port": 50000, "protocol": "TCP", "targetPort": 50000 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", "service.openshift.io/infrastructure": "true" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "web", "nodePort": 0, "port": 80, "protocol": "TCP", "targetPort": 8080 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" } } ], "parameters": [ { "name": "JENKINS_SERVICE_NAME", "displayName": "Jenkins Service Name", "description": "The name of the OpenShift Service exposed for the Jenkins container.", "value": "jenkins" }, { "name": "JNLP_SERVICE_NAME", "displayName": "Jenkins JNLP Service Name", "description": "The name of the service used for master/slave communication.", "value": "jenkins-jnlp" }, { "name": "ENABLE_OAUTH", "displayName": "Enable OAuth in Jenkins", "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", "value": "true" }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "1Gi" }, { "name": "NAMESPACE", "displayName": "Jenkins ImageStream Namespace", "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", "value": "openshift" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "displayName": "Disable memory intensive administrative monitors", "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", "value": "false" }, { "name": "JAVA_FIPS_OPTIONS", "displayName": "Allows control over how the JVM interacts with FIPS on startup.", "description": "See https://access.redhat.com/documentation/en-us/openjdk/11/html-single/configuring_openjdk_11_on_rhel_with_fips/index#config-fips-in-openjdk for the available command line properties to facilitate the JVM running on FIPS nodes.", "value": "-Dcom.redhat.fips=false" }, { "name": "JENKINS_IMAGE_STREAM_TAG", "displayName": "Jenkins ImageStreamTag", "description": "Name of the ImageStreamTag to be used for the Jenkins image.", "value": "jenkins:2" }, { "name": "JENKINS_UC_INSECURE", "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", "value": "false" }, { "name": "AGENT_BASE_IMAGE", "displayName": "Image used for the 'jnlp' container of the sample 'java-sidecar' and 'nodejs-sidecar' PodTemplates", "description": "Setting this value overrides the image used for the 'jnlp' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'jenkins-agent-base:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/jenkins-agent-base:latest" }, { "name": "JAVA_BUILDER_IMAGE", "displayName": "Image used for the 'java' container of the sample 'java-builder' PodTemplate", "description": "Setting this value overrides the image used for the 'java-builder' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'java:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/java:latest" }, { "name": "NODEJS_BUILDER_IMAGE", "displayName": "Image used for the 'nodejs' container of the sample 'nodejs-builder' PodTemplate", "description": "Setting this value overrides the image used for the 'nodejs-builder' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'nodejs:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/nodejs:latest" } ], "labels": { "app": "jenkins-ephemeral", "template": "jenkins-ephemeral-template" } }`) func examplesJenkinsJenkinsEphemeralTemplateJsonBytes() ([]byte, error) { return _examplesJenkinsJenkinsEphemeralTemplateJson, nil } func examplesJenkinsJenkinsEphemeralTemplateJson() (*asset, error) { bytes, err := examplesJenkinsJenkinsEphemeralTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/jenkins-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsJenkinsPersistentTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "jenkins-persistent", "creationTimestamp": null, "annotations": { "description": "Jenkins service, with persistent storage.\n\nNOTE: You must have persistent volumes available in your cluster to use this template.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "instant-app,jenkins" } }, "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/main/examples/jenkins/README.md contains more information about using this template.", "objects": [ { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "annotations": { "haproxy.router.openshift.io/timeout": "4m", "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "tls": { "insecureEdgeTerminationPolicy": "Redirect", "termination": "edge" }, "to": { "kind": "Service", "name": "${JENKINS_SERVICE_NAME}" } } }, { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "labels": { "config.openshift.io/inject-trusted-cabundle": "true" }, "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" } }, { "apiVersion": "v1", "kind": "PersistentVolumeClaim", "metadata": { "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "accessModes": [ "ReadWriteOnce" ], "resources": { "requests": { "storage": "${VOLUME_CAPACITY}" } } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${JENKINS_SERVICE_NAME}" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "OPENSHIFT_ENABLE_OAUTH", "value": "${ENABLE_OAUTH}" }, { "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", "value": "true" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" }, { "name": "KUBERNETES_MASTER", "value": "https://kubernetes.default:443" }, { "name": "KUBERNETES_TRUST_CERTIFICATES", "value": "true" }, { "name": "JENKINS_SERVICE_NAME", "value": "${JENKINS_SERVICE_NAME}" }, { "name": "JNLP_SERVICE_NAME", "value": "${JNLP_SERVICE_NAME}" }, { "name": "ENABLE_FATAL_ERROR_LOG_FILE", "value": "${ENABLE_FATAL_ERROR_LOG_FILE}" }, { "name": "JENKINS_UC_INSECURE", "value": "${JENKINS_UC_INSECURE}" }, { "name": "CASC_JENKINS_CONFIG", "value": "/var/lib/jenkins/proxy.yaml" }, { "name": "JAVA_FIPS_OPTIONS", "value": "${JAVA_FIPS_OPTIONS}" } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "failureThreshold": 2, "httpGet": { "path": "/login", "port": 8080 }, "initialDelaySeconds": 420, "periodSeconds": 360, "timeoutSeconds": 240 }, "name": "jenkins", "readinessProbe": { "httpGet": { "path": "/login", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 240 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/jenkins", "name": "${JENKINS_SERVICE_NAME}-data" }, { "mountPath": "/etc/pki/ca-trust/source/anchors", "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccountName": "${JENKINS_SERVICE_NAME}", "volumes": [ { "name": "${JENKINS_SERVICE_NAME}-data", "persistentVolumeClaim": { "claimName": "${JENKINS_SERVICE_NAME}" } }, { "configMap": { "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", "optional": true }, "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "jenkins" ], "from": { "kind": "ImageStreamTag", "name": "${JENKINS_IMAGE_STREAM_TAG}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "ServiceAccount", "metadata": { "annotations": { "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" }, "name": "${JENKINS_SERVICE_NAME}" } }, { "apiVersion": "authorization.openshift.io/v1", "groupNames": null, "kind": "RoleBinding", "metadata": { "name": "${JENKINS_SERVICE_NAME}_edit" }, "roleRef": { "name": "edit" }, "subjects": [ { "kind": "ServiceAccount", "name": "${JENKINS_SERVICE_NAME}" } ] }, { "apiVersion": "v1", "kind": "Service", "metadata": { "name": "${JNLP_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "agent", "nodePort": 0, "port": 50000, "protocol": "TCP", "targetPort": 50000 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", "service.openshift.io/infrastructure": "true" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "web", "nodePort": 0, "port": 80, "protocol": "TCP", "targetPort": 8080 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" } } ], "parameters": [ { "name": "JENKINS_SERVICE_NAME", "displayName": "Jenkins Service Name", "description": "The name of the OpenShift Service exposed for the Jenkins container.", "value": "jenkins" }, { "name": "JNLP_SERVICE_NAME", "displayName": "Jenkins JNLP Service Name", "description": "The name of the service used for master/slave communication.", "value": "jenkins-jnlp" }, { "name": "ENABLE_OAUTH", "displayName": "Enable OAuth in Jenkins", "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", "value": "true" }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "1Gi" }, { "name": "VOLUME_CAPACITY", "displayName": "Volume Capacity", "description": "Volume space available for data, e.g. 512Mi, 2Gi.", "value": "1Gi", "required": true }, { "name": "NAMESPACE", "displayName": "Jenkins ImageStream Namespace", "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", "value": "openshift" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "displayName": "Disable memory intensive administrative monitors", "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", "value": "false" }, { "name": "JAVA_FIPS_OPTIONS", "displayName": "Allows control over how the JVM interacts with FIPS on startup.", "description": "See https://access.redhat.com/documentation/en-us/openjdk/11/html-single/configuring_openjdk_11_on_rhel_with_fips/index#config-fips-in-openjdk for the available command line properties to facilitate the JVM running on FIPS nodes.", "value": "-Dcom.redhat.fips=false" }, { "name": "JENKINS_IMAGE_STREAM_TAG", "displayName": "Jenkins ImageStreamTag", "description": "Name of the ImageStreamTag to be used for the Jenkins image.", "value": "jenkins:2" }, { "name": "ENABLE_FATAL_ERROR_LOG_FILE", "displayName": "Fatal Error Log File", "description": "When a fatal error occurs, an error log is created with information and the state obtained at the time of the fatal error.", "value": "false" }, { "name": "JENKINS_UC_INSECURE", "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", "value": "false" }, { "name": "AGENT_BASE_IMAGE", "displayName": "Image used for the 'jnlp' container of the sample 'java-sidecar' and 'nodejs-sidecar' PodTemplates", "description": "Setting this value overrides the image used for the 'jnlp' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'jenkins-agent-base:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/jenkins-agent-base:latest" }, { "name": "JAVA_BUILDER_IMAGE", "displayName": "Image used for the 'java' container of the sample 'java-builder' PodTemplate", "description": "Setting this value overrides the image used for the 'java-builder' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'java:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/java:latest" }, { "name": "NODEJS_BUILDER_IMAGE", "displayName": "Image used for the 'nodejs' container of the sample 'nodejs-builder' PodTemplate", "description": "Setting this value overrides the image used for the 'nodejs-builder' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'nodejs:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/nodejs:latest" } ], "labels": { "app": "jenkins-persistent", "template": "jenkins-persistent-template" } }`) func examplesJenkinsJenkinsPersistentTemplateJsonBytes() ([]byte, error) { return _examplesJenkinsJenkinsPersistentTemplateJson, nil } func examplesJenkinsJenkinsPersistentTemplateJson() (*asset, error) { bytes, err := examplesJenkinsJenkinsPersistentTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/jenkins-persistent-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsPipelineBluegreenPipelineYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template labels: template: bluegreen-pipeline message: A Jenkins server must be instantiated in this project to manage the Pipeline BuildConfig created by this template. You will be able to log in to it using your OpenShift user credentials. metadata: annotations: description: This example showcases a blue green deployment using a Jenkins pipeline that pauses for approval. iconClass: icon-jenkins tags: instant-app,jenkins name: bluegreen-pipeline objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: annotations: pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' creationTimestamp: null labels: name: bluegreen-pipeline name: bluegreen-pipeline spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- try { timeout(time: 20, unit: 'MINUTES') { def appName="${NAME}" def project="" def tag="blue" def altTag="green" def verbose="${VERBOSE}" node { project = env.PROJECT_NAME stage("Initialize") { sh "oc get route ${appName} -n ${project} -o jsonpath='{ .spec.to.name }' --loglevel=4 > activeservice" activeService = readFile('activeservice').trim() if (activeService == "${appName}-blue") { tag = "green" altTag = "blue" } sh "oc get route ${tag}-${appName} -n ${project} -o jsonpath='{ .spec.host }' --loglevel=4 > routehost" routeHost = readFile('routehost').trim() } openshift.withCluster() { openshift.withProject() { stage("Build") { echo "building tag ${tag}" def bld = openshift.startBuild("${appName}") bld.untilEach { return it.object().status.phase == "Running" } bld.logs('-f') } stage("Deploy Test") { openshift.tag("${appName}:latest", "${appName}:${tag}") def dc = openshift.selector('dc', "${appName}-${tag}") dc.rollout().status() } stage("Test") { input message: "Test deployment: http://${routeHost}. Approve?", id: "approval" } stage("Go Live") { sh "oc set -n ${project} route-backends ${appName} ${appName}-${tag}=100 ${appName}-${altTag}=0 --loglevel=4" } } } } } } catch (err) { echo "in catch block" echo "Caught: ${err}" currentBuild.result = 'FAILURE' throw err } type: JenkinsPipeline triggers: - github: secret: "${GITHUB_WEBHOOK_SECRET}" type: GitHub - generic: secret: "${GENERIC_WEBHOOK_SECRET}" type: Generic - apiVersion: v1 kind: Secret metadata: name: ${NAME} stringData: database-admin-password: ${DATABASE_ADMIN_PASSWORD} database-password: ${DATABASE_PASSWORD} database-user: ${DATABASE_USER} - apiVersion: route.openshift.io/v1 kind: Route metadata: name: blue-${NAME} spec: to: kind: Service name: ${NAME}-blue - apiVersion: route.openshift.io/v1 kind: Route metadata: name: green-${NAME} spec: to: kind: Service name: ${NAME}-green - apiVersion: route.openshift.io/v1 kind: Route metadata: name: ${NAME} spec: alternateBackends: - name: ${NAME}-green weight: 0 to: kind: Service name: ${NAME}-blue weight: 100 - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: annotations: description: Keeps track of changes in the application image name: ${NAME} - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: annotations: description: Defines how to build the application name: ${NAME} spec: output: to: kind: ImageStreamTag name: ${NAME}:latest postCommit: script: npm test source: contextDir: ${CONTEXT_DIR} git: ref: ${SOURCE_REPOSITORY_REF} uri: ${SOURCE_REPOSITORY_URL} type: Git strategy: sourceStrategy: env: - name: NPM_MIRROR value: ${NPM_MIRROR} from: kind: ImageStreamTag name: nodejs:${NODEJS_VERSION} namespace: ${NAMESPACE} type: Source triggers: - github: secret: ${GITHUB_WEBHOOK_SECRET} type: GitHub - generic: secret: ${GENERIC_WEBHOOK_SECRET} type: Generic - apiVersion: v1 kind: Service metadata: annotations: service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]' name: ${NAME}-blue spec: ports: - name: web port: 8080 targetPort: 8080 selector: name: ${NAME}-blue - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: description: Defines how to deploy the application server name: ${NAME}-blue spec: replicas: 1 selector: name: ${NAME}-blue strategy: type: Rolling template: metadata: labels: name: ${NAME}-blue name: ${NAME}-blue spec: containers: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - name: MYSQL_USER value: ${DATABASE_USER} - name: MYSQL_PASSWORD value: ${DATABASE_PASSWORD} - name: MYSQL_DATABASE value: ${DATABASE_NAME} - name: MYSQL_ROOT_PASSWORD value: ${DATABASE_ROOT_PASSWORD} image: ' ' livenessProbe: httpGet: path: /pagecount port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 name: nodejs-postgresql-example ports: - containerPort: 8080 readinessProbe: httpGet: path: /pagecount port: 8080 initialDelaySeconds: 3 timeoutSeconds: 3 resources: limits: memory: ${MEMORY_LIMIT} triggers: - imageChangeParams: automatic: true containerNames: - nodejs-postgresql-example from: kind: ImageStreamTag name: ${NAME}:blue type: ImageChange - type: ConfigChange - apiVersion: v1 kind: Service metadata: annotations: service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "namespace": "", "kind": "Service"}]' name: ${NAME}-green spec: ports: - name: web port: 8080 targetPort: 8080 selector: name: ${NAME}-green - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: description: Defines how to deploy the application server name: ${NAME}-green spec: replicas: 1 selector: name: ${NAME}-green strategy: type: Rolling template: metadata: labels: name: ${NAME}-green name: ${NAME}-green spec: containers: - env: - name: POSTGRESQL_USER valueFrom: secretKeyRef: key: database-user name: ${NAME} - name: POSTGRESQL_PASSWORD valueFrom: secretKeyRef: key: database-password name: ${NAME} - name: POSTGRESQL_DATABASE value: ${DATABASE_NAME} - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: key: database-admin-password name: ${NAME} image: ' ' livenessProbe: httpGet: path: /pagecount port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 name: nodejs-postgresql-example ports: - containerPort: 8080 readinessProbe: httpGet: path: /pagecount port: 8080 initialDelaySeconds: 3 timeoutSeconds: 3 resources: limits: memory: ${MEMORY_LIMIT} triggers: - imageChangeParams: automatic: true containerNames: - nodejs-postgresql-example from: kind: ImageStreamTag name: ${NAME}:green type: ImageChange - type: ConfigChange - apiVersion: v1 kind: Service metadata: annotations: description: Exposes the database server name: ${DATABASE_SERVICE_NAME} spec: ports: - name: postgresql port: 5432 targetPort: 5432 selector: name: ${DATABASE_SERVICE_NAME} - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: description: Defines how to deploy the database name: ${DATABASE_SERVICE_NAME} spec: replicas: 1 selector: name: ${DATABASE_SERVICE_NAME} strategy: type: Recreate template: metadata: labels: name: ${DATABASE_SERVICE_NAME} name: ${DATABASE_SERVICE_NAME} spec: containers: - env: - name: POSTGRESQL_USER valueFrom: secretKeyRef: key: database-user name: ${NAME} - name: POSTGRESQL_PASSWORD valueFrom: secretKeyRef: key: database-password name: ${NAME} - name: POSTGRESQL_DATABASE value: ${DATABASE_NAME} - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: key: database-admin-password name: ${NAME} image: ' ' livenessProbe: initialDelaySeconds: 30 tcpSocket: port: 5432 timeoutSeconds: 1 name: postgresql ports: - containerPort: 5432 resources: limits: memory: ${MEMORY_MYSQL_LIMIT} volumeMounts: - mountPath: /var/lib/mysql/data name: ${DATABASE_SERVICE_NAME}-data volumes: - emptyDir: medium: "" name: ${DATABASE_SERVICE_NAME}-data triggers: - imageChangeParams: automatic: true containerNames: - postgresql from: kind: ImageStreamTag name: postgresql:${POSTGRESQL_VERSION} namespace: ${NAMESPACE} type: ImageChange - type: ConfigChange parameters: - description: The name assigned to all of the frontend objects defined in this template. displayName: Name name: NAME required: true value: nodejs-postgresql-example - description: The OpenShift Namespace where the NodeJS and postgresql ImageStreams reside. displayName: Namespace name: NAMESPACE required: true value: openshift - description: Version of NodeJS image to be used (14-ubi8, or latest). displayName: Version of NodeJS Image name: NODEJS_VERSION required: true value: 14-ubi8 - description: Version of PostgreSQL image to be used (12-el8, or latest). displayName: Version of PostgreSQL Image name: POSTGRESQL_VERSION required: true value: 12-el8 - description: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted. displayName: Application Hostname name: APPLICATION_DOMAIN - description: The URL of the repository with your application source code. displayName: Git Repository URL name: SOURCE_REPOSITORY_URL required: true value: https://github.com/openshift/nodejs-ex.git - description: The reference of the repository with your application source code. displayName: Git Repository Ref name: SOURCE_REPOSITORY_REF required: true value: master - description: Password for the database admin user. displayName: Database Administrator Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_ADMIN_PASSWORD - displayName: Database Name name: DATABASE_NAME required: true value: sampledb - description: Username for postgresql user that will be used for accessing the database. displayName: postgresql Username from: user[A-Z0-9]{3} generate: expression name: DATABASE_USER - description: Password for the postgresql user. displayName: postgresql Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_PASSWORD - description: Maximum amount of memory the Node.js container can use. displayName: Memory Limit name: MEMORY_LIMIT required: true value: 512Mi - description: Maximum amount of memory the postgresql container can use. displayName: Memory Limit (postgresql) name: MEMORY_MYSQL_LIMIT required: true value: 512Mi - displayName: Database Service Name name: DATABASE_SERVICE_NAME required: true value: postgresql - description: Password for the database admin user. displayName: Database Administrator Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_ROOT_PASSWORD - description: Set this to the relative path to your project if it is not in the root of your repository. displayName: Context Directory name: CONTEXT_DIR - description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. displayName: GitHub Webhook Secret from: '[a-zA-Z0-9]{40}' generate: expression name: GITHUB_WEBHOOK_SECRET - description: A secret string used to configure the Generic webhook. displayName: Generic Webhook Secret from: '[a-zA-Z0-9]{40}' generate: expression name: GENERIC_WEBHOOK_SECRET - description: The custom NPM mirror URL displayName: Custom NPM Mirror URL name: NPM_MIRROR - description: Whether to enable verbose logging of Jenkinsfile steps in pipeline displayName: Verbose name: VERBOSE required: true value: "false" `) func examplesJenkinsPipelineBluegreenPipelineYamlBytes() ([]byte, error) { return _examplesJenkinsPipelineBluegreenPipelineYaml, nil } func examplesJenkinsPipelineBluegreenPipelineYaml() (*asset, error) { bytes, err := examplesJenkinsPipelineBluegreenPipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/pipeline/bluegreen-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsPipelineMavenPipelineYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: maven-pipeline parameters: - name: APP_NAME description: The name assigned to all of the application objects defined in this template. displayName: Application Name required: true value: openshift-jee-sample - name: GIT_SOURCE_URL description: The source URL for the application displayName: Source URL required: true value: https://github.com/openshift/openshift-jee-sample.git - name: GIT_SOURCE_REF description: The source Ref for the application displayName: Source Ref required: true value: master - description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. displayName: GitHub Webhook Secret from: '[a-zA-Z0-9]{40}' generate: expression name: GITHUB_WEBHOOK_SECRET required: true - description: A secret string used to configure the Generic webhook. displayName: Generic Webhook Secret from: '[a-zA-Z0-9]{40}' generate: expression name: GENERIC_WEBHOOK_SECRET required: true objects: - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: labels: app: ${APP_NAME} name: ${APP_NAME} spec: {} status: dockerImageRepository: "" - apiVersion: image.openshift.io/fv1 kind: ImageStream metadata: name: wildfly spec: tags: - annotations: supports: wildfly:10.1,jee,java tags: builder,wildfly,java version: "10.1" from: kind: DockerImage name: openshift/wildfly-101-centos7:latest name: "10.1" - annotations: supports: jee,java tags: builder,wildfly,java from: kind: ImageStreamTag name: "10.1" name: latest - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: annotations: pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' creationTimestamp: null labels: name: ${APP_NAME} name: ${APP_NAME} spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- try { timeout(time: 20, unit: 'MINUTES') { def appName="${APP_NAME}" def project="" node { stage("Initialize") { project = env.PROJECT_NAME } } node("maven") { stage("Checkout") { git url: "${GIT_SOURCE_URL}", branch: "${GIT_SOURCE_REF}" } stage("Build WAR") { sh "mvn clean package -Popenshift" stash name:"war", includes:"target/ROOT.war" } } node { stage("Build Image") { unstash name:"war" def status = sh(returnStdout: true, script: "oc start-build ${appName}-docker --from-file=target/ROOT.war -n ${project}") def result = status.split("\n").find{ it.matches("^build.*started") } if(!result) { echo "ERROR: No started build found for ${appName}" currentBuild.result = 'FAILURE' return } // result can be: // - build "build-name" started // - build build.build.openshift.io/build-name started // - build "build.build.openshift.io/build-name" started // Goal is to isolate "build-name" def startedBuild = result.replaceAll("build [^0-9a-zA-Z]*", "").replaceAll("[^0-9a-zA-Z]* started", "").replaceFirst("^.*/", "") echo "Build ${startedBuild} has started. Now watching it ..." timeout(time: 20, unit: 'MINUTES') { openshift.withCluster() { openshift.withProject() { def build = openshift.selector('builds', "${startedBuild}") build.untilEach { def object = it.object() if(object.status.phase == "Failed") { error("Build ${startedBuild} failed") } return object.status.phase == "Complete" } } } } } stage("Deploy") { openshift.withCluster() { openshift.withProject() { def dc = openshift.selector('dc', "${appName}") dc.rollout().status() } } } } } } catch (err) { echo "in catch block" echo "Caught: ${err}" currentBuild.result = 'FAILURE' throw err } type: JenkinsPipeline triggers: - github: secret: "${GITHUB_WEBHOOK_SECRET}" type: GitHub - generic: secret: "${GENERIC_WEBHOOK_SECRET}" type: Generic - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: app: ${APP_NAME}-docker name: ${APP_NAME}-docker spec: output: to: kind: ImageStreamTag name: ${APP_NAME}:latest postCommit: {} resources: {} runPolicy: Serial source: dockerfile: |- FROM wildfly COPY ROOT.war /wildfly/standalone/deployments/ROOT.war CMD $STI_SCRIPTS_PATH/run binary: asFile: ROOT.war type: Docker strategy: dockerStrategy: from: kind: ImageStreamTag name: wildfly:latest type: Docker triggers: [] - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: labels: app: ${APP_NAME} name: ${APP_NAME} spec: replicas: 1 selector: app: ${APP_NAME} deploymentconfig: ${APP_NAME} strategy: rollingParams: intervalSeconds: 1 maxSurge: 25% maxUnavailable: 25% timeoutSeconds: 600 updatePeriodSeconds: 1 type: Rolling template: metadata: labels: app: ${APP_NAME} deploymentconfig: ${APP_NAME} spec: containers: - image: ${APP_NAME}:latest imagePullPolicy: Always name: ${APP_NAME} ports: - containerPort: 8080 protocol: TCP resources: {} terminationMessagePath: /dev/termination-log livenessProbe: httpGet: path: / port: 8080 scheme: HTTP initialDelaySeconds: 10 timeoutSeconds: 2 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 readinessProbe: httpGet: path: / port: 8080 scheme: HTTP initialDelaySeconds: 30 timeoutSeconds: 2 periodSeconds: 10 successThreshold: 1 failureThreshold: 3 dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} terminationGracePeriodSeconds: 30 test: false triggers: - type: ConfigChange - imageChangeParams: automatic: true containerNames: - ${APP_NAME} from: kind: ImageStreamTag name: ${APP_NAME}:latest type: ImageChange status: {} - apiVersion: v1 kind: Service metadata: annotations: openshift.io/generated-by: OpenShiftNewApp labels: app: ${APP_NAME} name: ${APP_NAME} spec: ports: - name: 8080-tcp port: 8080 protocol: TCP targetPort: 8080 selector: app: ${APP_NAME} deploymentconfig: ${APP_NAME} sessionAffinity: None type: ClusterIP status: loadBalancer: {} - apiVersion: route.openshift.io/v1 kind: Route metadata: name: ${APP_NAME} labels: app: ${APP_NAME} spec: to: kind: Service name: ${APP_NAME} weight: 100 port: targetPort: 8080-tcp wildcardPolicy: None `) func examplesJenkinsPipelineMavenPipelineYamlBytes() ([]byte, error) { return _examplesJenkinsPipelineMavenPipelineYaml, nil } func examplesJenkinsPipelineMavenPipelineYaml() (*asset, error) { bytes, err := examplesJenkinsPipelineMavenPipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/pipeline/maven-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsPipelineNodejsSamplePipelineYaml = []byte(`kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "nodejs-sample-pipeline" spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- // path of the template to use def templatePath = 'nodejs-postgresql-example' // name of the template that will be created def templateName = 'nodejs-postgresql-example' // NOTE, the "pipeline" directive/closure from the declarative pipeline syntax needs to include, or be nested outside, // and "openshift" directive/closure from the OpenShift Client Plugin for Jenkins. Otherwise, the declarative pipeline engine // will not be fully engaged. pipeline { agent { node { // spin up a node.js slave pod to run this build on label 'nodejs' } } options { // set a timeout of 20 minutes for this pipeline timeout(time: 20, unit: 'MINUTES') } stages { stage('preamble') { steps { script { openshift.withCluster() { openshift.withProject() { echo "Using project: ${openshift.project()}" } } } } } stage('cleanup') { steps { script { openshift.withCluster() { openshift.withProject() { // delete everything with this template label openshift.selector("all", [ template : templateName ]).delete() // delete any secrets with this template label if (openshift.selector("secrets", templateName).exists()) { openshift.selector("secrets", templateName).delete() } } } } // script } // steps } // stage stage('create') { steps { script { openshift.withCluster() { openshift.withProject() { // create a new application from the templatePath openshift.newApp(templatePath) } } } // script } // steps } // stage stage('build') { steps { script { openshift.withCluster() { openshift.withProject() { def builds = openshift.selector("bc", templateName).related('builds') builds.untilEach(1) { return (it.object().status.phase == "Complete") } } } } // script } // steps } // stage stage('deploy') { steps { script { openshift.withCluster() { openshift.withProject() { def rm = openshift.selector("dc", templateName).rollout() openshift.selector("dc", templateName).related('pods').untilEach(1) { return (it.object().status.phase == "Running") } } } } // script } // steps } // stage stage('tag') { steps { script { openshift.withCluster() { openshift.withProject() { // if everything else succeeded, tag the ${templateName}:latest image as ${templateName}-staging:latest // a pipeline build config for the staging environment can watch for the ${templateName}-staging:latest // image to change and then deploy it to the staging environment openshift.tag("${templateName}:latest", "${templateName}-staging:latest") } } } // script } // steps } // stage } // stages } // pipeline type: JenkinsPipeline `) func examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() ([]byte, error) { return _examplesJenkinsPipelineNodejsSamplePipelineYaml, nil } func examplesJenkinsPipelineNodejsSamplePipelineYaml() (*asset, error) { bytes, err := examplesJenkinsPipelineNodejsSamplePipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/pipeline/nodejs-sample-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: name: sample-pipeline-openshift-client-plugin name: sample-pipeline-openshift-client-plugin spec: source: type: Git git: uri: https://github.com/openshift/jenkins-client-plugin.git strategy: type: JenkinsPipeline jenkinsPipelineStrategy: jenkinsfilePath: examples/jenkins-image-sample.groovy `) func examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() ([]byte, error) { return _examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, nil } func examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml() (*asset, error) { bytes, err := examplesJenkinsPipelineOpenshiftClientPluginPipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesJenkinsPipelineSamplepipelineYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template labels: template: application-template-sample-pipeline message: |- A Jenkins server must be instantiated in this project to manage the Pipeline BuildConfig created by this template. You will be able to log in to it using your OpenShift user credentials. metadata: annotations: openshift.io/display-name: Pipeline Build Example description: |- This example showcases the new Jenkins Pipeline integration in OpenShift, which performs continuous integration and deployment right on the platform. The template contains a Jenkinsfile - a definition of a multi-stage CI/CD process - that leverages the underlying OpenShift platform for dynamic and scalable builds. OpenShift integrates the status of your pipeline builds into the web console allowing you to see your entire application lifecycle in a single view. iconClass: icon-jenkins tags: instant-app,jenkins name: jenkins-pipeline-example objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: annotations: pipeline.alpha.openshift.io/uses: '[{"name": "${NAME}", "namespace": "", "kind": "DeploymentConfig"}]' labels: name: sample-pipeline name: sample-pipeline spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- try { timeout(time: 20, unit: 'MINUTES') { node('nodejs') { stage('build') { openshift.withCluster() { openshift.withProject() { def bld = openshift.startBuild('${NAME}') bld.untilEach { return it.object().status.phase == "Running" } bld.logs('-f') } } } stage('deploy') { openshift.withCluster() { openshift.withProject() { def dc = openshift.selector('dc', '${NAME}') dc.rollout().latest() } } } } } } catch (err) { echo "in catch block" echo "Caught: ${err}" currentBuild.result = 'FAILURE' throw err } type: JenkinsPipeline triggers: - github: secret: secret101 type: GitHub - generic: secret: secret101 type: Generic - apiVersion: v1 kind: Secret metadata: name: ${NAME} stringData: database-admin-password: ${DATABASE_ADMIN_PASSWORD} database-password: ${DATABASE_PASSWORD} database-user: ${DATABASE_USER} - apiVersion: v1 kind: Service metadata: annotations: description: Exposes and load balances the application pods service.alpha.openshift.io/dependencies: '[{"name": "${DATABASE_SERVICE_NAME}", "kind": "Service"}]' name: ${NAME} spec: ports: - name: web port: 8080 targetPort: 8080 selector: name: ${NAME} - apiVersion: route.openshift.io/v1 kind: Route metadata: name: ${NAME} spec: host: ${APPLICATION_DOMAIN} to: kind: Service name: ${NAME} - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: annotations: description: Keeps track of changes in the application image name: ${NAME} - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: annotations: description: Defines how to build the application template.alpha.openshift.io/wait-for-ready: "true" name: ${NAME} spec: output: to: kind: ImageStreamTag name: ${NAME}:latest postCommit: {} source: contextDir: ${CONTEXT_DIR} git: ref: ${SOURCE_REPOSITORY_REF} uri: ${SOURCE_REPOSITORY_URL} type: Git strategy: sourceStrategy: env: - name: NPM_MIRROR value: ${NPM_MIRROR} from: kind: ImageStreamTag name: nodejs:${NODEJS_VERSION} namespace: ${NAMESPACE} type: Source triggers: - github: secret: ${GITHUB_WEBHOOK_SECRET} type: GitHub - generic: secret: ${GENERIC_WEBHOOK_SECRET} type: Generic - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: description: Defines how to deploy the application server template.alpha.openshift.io/wait-for-ready: "true" labels: app.openshift.io/runtime: nodejs name: ${NAME} spec: replicas: 1 selector: name: ${NAME} strategy: type: Recreate template: metadata: labels: app.openshift.io/runtime: nodejs name: ${NAME} name: ${NAME} spec: containers: - env: - name: DATABASE_SERVICE_NAME value: ${DATABASE_SERVICE_NAME} - name: POSTGRESQL_USER valueFrom: secretKeyRef: key: database-user name: ${NAME} - name: POSTGRESQL_PASSWORD valueFrom: secretKeyRef: key: database-password name: ${NAME} - name: POSTGRESQL_DATABASE value: ${DATABASE_NAME} - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: key: database-admin-password name: ${NAME} image: ' ' livenessProbe: httpGet: path: / port: 8080 initialDelaySeconds: 30 timeoutSeconds: 3 name: nodejs-postgresql-example ports: - containerPort: 8080 readinessProbe: httpGet: path: / port: 8080 initialDelaySeconds: 3 timeoutSeconds: 3 resources: limits: memory: ${MEMORY_LIMIT} triggers: - imageChangeParams: automatic: false containerNames: - nodejs-postgresql-example from: kind: ImageStreamTag name: ${NAME}:latest type: ImageChange - type: ConfigChange - apiVersion: v1 kind: Service metadata: annotations: description: Exposes the database server name: ${DATABASE_SERVICE_NAME} spec: ports: - name: postgresql port: 5432 targetPort: 5432 selector: name: ${DATABASE_SERVICE_NAME} - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: description: Defines how to deploy the database template.alpha.openshift.io/wait-for-ready: "true" name: ${DATABASE_SERVICE_NAME} spec: replicas: 1 selector: name: ${DATABASE_SERVICE_NAME} strategy: type: Recreate template: metadata: labels: name: ${DATABASE_SERVICE_NAME} name: ${DATABASE_SERVICE_NAME} spec: containers: - env: - name: POSTGRESQL_USER valueFrom: secretKeyRef: key: database-user name: ${NAME} - name: POSTGRESQL_PASSWORD valueFrom: secretKeyRef: key: database-password name: ${NAME} - name: POSTGRESQL_DATABASE value: ${DATABASE_NAME} - name: POSTGRESQL_ADMIN_PASSWORD valueFrom: secretKeyRef: key: database-admin-password name: ${NAME} image: ' ' livenessProbe: initialDelaySeconds: 30 tcpSocket: port: 5432 timeoutSeconds: 1 name: postgresql ports: - containerPort: 5432 resources: limits: memory: ${MEMORY_POSTGRESQL_LIMIT} volumeMounts: - mountPath: /var/lib/postgresql/data name: ${DATABASE_SERVICE_NAME}-data volumes: - emptyDir: medium: "" name: ${DATABASE_SERVICE_NAME}-data triggers: - imageChangeParams: automatic: true containerNames: - postgresql from: kind: ImageStreamTag name: postgresql:${POSTGRESQL_VERSION} namespace: ${NAMESPACE} type: ImageChange - type: ConfigChange parameters: - description: The name assigned to all of the frontend objects defined in this template. displayName: Name name: NAME required: true value: nodejs-postgresql-example - description: The OpenShift Namespace where the ImageStream resides. displayName: Namespace name: NAMESPACE required: true value: openshift - description: Version of NodeJS image to be used (14-ubi8, or latest). displayName: Version of NodeJS Image name: NODEJS_VERSION required: true value: 14-ubi8 - description: Version of PostgreSQL image to be used (12-el8, or latest). displayName: Version of PostgreSQL Image name: POSTGRESQL_VERSION required: true value: 12-el8 - description: Maximum amount of memory the Node.js container can use. displayName: Memory Limit name: MEMORY_LIMIT required: true value: 256Mi - description: Maximum amount of memory the PostgreSQL container can use. displayName: Memory Limit (PostgreSQL) name: MEMORY_POSTGRESQL_LIMIT required: true value: 256Mi - description: The URL of the repository with your application source code. displayName: Git Repository URL name: SOURCE_REPOSITORY_URL required: true value: https://github.com/nodeshift-starters/nodejs-rest-http-crud.git - description: Set this to a branch name, tag or other ref of your repository if you are not using the default branch. displayName: Git Reference name: SOURCE_REPOSITORY_REF - description: Set this to the relative path to your project if it is not in the root of your repository. displayName: Context Directory name: CONTEXT_DIR - description: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted. displayName: Application Hostname name: APPLICATION_DOMAIN - description: Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted. displayName: GitHub Webhook Secret from: '[a-zA-Z0-9]{40}' generate: expression name: GITHUB_WEBHOOK_SECRET - description: A secret string used to configure the Generic webhook. displayName: Generic Webhook Secret from: '[a-zA-Z0-9]{40}' generate: expression name: GENERIC_WEBHOOK_SECRET - displayName: Database Service Name name: DATABASE_SERVICE_NAME required: true value: postgresql - description: Username for PostgreSQL user that will be used for accessing the database. displayName: PostgreSQL Username from: user[A-Z0-9]{3} generate: expression name: DATABASE_USER - description: Password for the PostgreSQL user. displayName: PostgreSQL Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_PASSWORD - displayName: Database Name name: DATABASE_NAME required: true value: my_data - description: Password for the database admin user. displayName: Database Administrator Password from: '[a-zA-Z0-9]{16}' generate: expression name: DATABASE_ADMIN_PASSWORD - description: The custom NPM mirror URL displayName: Custom NPM Mirror URL name: NPM_MIRROR `) func examplesJenkinsPipelineSamplepipelineYamlBytes() ([]byte, error) { return _examplesJenkinsPipelineSamplepipelineYaml, nil } func examplesJenkinsPipelineSamplepipelineYaml() (*asset, error) { bytes, err := examplesJenkinsPipelineSamplepipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/jenkins/pipeline/samplepipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "cakephp-mysql-example", "creationTimestamp": null, "annotations": { "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-php", "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,php,cakephp", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./vendor/bin/phpunit" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "COMPOSER_MIRROR", "value": "${COMPOSER_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "php:${PHP_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "cakephp-mysql-example" }, "failurePolicy": "Retry" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECRET_TOKEN", "valueFrom": { "secretKeyRef": { "key": "cakephp-secret-token", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECURITY_SALT", "valueFrom": { "secretKeyRef": { "key": "cakephp-security-salt", "name": "${NAME}" } } }, { "name": "OPCACHE_REVALIDATE_FREQ", "value": "${OPCACHE_REVALIDATE_FREQ}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 30, "periodSeconds": 60, "timeoutSeconds": 3 }, "name": "cakephp-mysql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 3, "periodSeconds": 60, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "cakephp-mysql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:${MYSQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "cakephp-mysql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PHP_VERSION", "displayName": "PHP Version", "description": "Version of PHP image to be used (7.3-ubi7, 7.4-ubi8, or latest).", "value": "7.4-ubi8", "required": true }, { "name": "MYSQL_VERSION", "displayName": "MySQL Version", "description": "Version of MySQL image to be used (8.0-el8 or latest).", "value": "8.0-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the CakePHP container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/cakephp-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "mysql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "mysql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database User", "value": "cakephp", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "CAKEPHP_SECRET_TOKEN", "displayName": "CakePHP secret token", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "CAKEPHP_SECURITY_SALT", "displayName": "CakePHP Security Salt", "description": "Security salt for session hash.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "OPCACHE_REVALIDATE_FREQ", "displayName": "OPcache Revalidation Frequency", "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", "value": "2" }, { "name": "COMPOSER_MIRROR", "displayName": "Custom Composer Mirror URL", "description": "The custom Composer mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", "value": "mysql_native_password" } ], "labels": { "app": "cakephp-mysql-example", "template": "cakephp-mysql-example" } }`) func examplesQuickstartsCakephpMysqlJsonCakephpMysqlJsonBytes() ([]byte, error) { return _examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson, nil } func examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson() (*asset, error) { bytes, err := examplesQuickstartsCakephpMysqlJsonCakephpMysqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "examples/quickstarts/cakephp-mysql.json/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorKubeSystemAuthReaderYaml = []byte(`apiVersion: authorization.openshift.io/v1 kind: Role metadata: name: extension-apiserver-authentication-reader namespace: kube-system rules: - verbs: - get apiGroups: - "" resources: - configmaps resourceNames: - extension-apiserver-authentication `) func testExtendedTestdataAggregatorKubeSystemAuthReaderYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorKubeSystemAuthReaderYaml, nil } func testExtendedTestdataAggregatorKubeSystemAuthReaderYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorKubeSystemAuthReaderYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/kube-system-auth-reader.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorSampleApiserverApiserviceYaml = []byte(`apiVersion: apiregistration.k8s.io/v1alpha1 kind: APIService metadata: name: v1alpha1.wardle.k8s.io spec: insecureSkipTLSVerify: true group: wardle.k8s.io priority: 200 service: name: api namespace: wardle version: v1alpha1 `) func testExtendedTestdataAggregatorSampleApiserverApiserviceYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorSampleApiserverApiserviceYaml, nil } func testExtendedTestdataAggregatorSampleApiserverApiserviceYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorSampleApiserverApiserviceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-apiservice.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml = []byte(`apiVersion: authorization.openshift.io/v1 kind: ClusterRoleBinding metadata: name: wardle:system:auth-delegator roleRef: name: system:auth-delegator subjects: - kind: ServiceAccount name: apiserver namespace: wardle `) func testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml, nil } func testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-authdelegator.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml = []byte(`apiVersion: authorization.openshift.io/v1 kind: RoleBinding metadata: name: wardle-auth-reader namespace: kube-system roleRef: name: extension-apiserver-authentication-reader namespace: kube-system subjects: - kind: ServiceAccount name: apiserver namespace: wardle `) func testExtendedTestdataAggregatorSampleApiserverAuthreaderYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml, nil } func testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorSampleApiserverAuthreaderYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-authreader.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorSampleApiserverRcYaml = []byte(`apiVersion: v1 kind: ReplicationController metadata: name: wardle-server namespace: wardle labels: apiserver: "true" spec: replicas: 1 selector: apiserver: "true" template: metadata: labels: apiserver: "true" spec: serviceAccountName: apiserver containers: - name: wardle-server image: kube-sample-apiserver:latest imagePullPolicy: Never args: - "--etcd-servers=http://localhost:2379" - "--audit-log-path=-" - name: etcd image: quay.io/coreos/etcd:v3.0.17 securityContext: runAsUser: 0 securityContext: runAsUser: 0`) func testExtendedTestdataAggregatorSampleApiserverRcYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorSampleApiserverRcYaml, nil } func testExtendedTestdataAggregatorSampleApiserverRcYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorSampleApiserverRcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-rc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorSampleApiserverSaYaml = []byte(`kind: ServiceAccount apiVersion: v1 metadata: name: apiserver namespace: wardle `) func testExtendedTestdataAggregatorSampleApiserverSaYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorSampleApiserverSaYaml, nil } func testExtendedTestdataAggregatorSampleApiserverSaYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorSampleApiserverSaYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-sa.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataAggregatorSampleApiserverServiceYaml = []byte(`apiVersion: v1 kind: Service metadata: name: api namespace: wardle spec: ports: - port: 443 protocol: TCP targetPort: 443 selector: apiserver: "true" `) func testExtendedTestdataAggregatorSampleApiserverServiceYamlBytes() ([]byte, error) { return _testExtendedTestdataAggregatorSampleApiserverServiceYaml, nil } func testExtendedTestdataAggregatorSampleApiserverServiceYaml() (*asset, error) { bytes, err := testExtendedTestdataAggregatorSampleApiserverServiceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/aggregator/sample-apiserver-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataApiserverOperatorKubeApiserverCrYaml = []byte(`apiVersion: operator.openshift.io/v1 kind: KubeAPIServer metadata: generateName: test-apiserver- spec: managementState: Managed status: nodeStatuses: - nodeName: "master-1" - nodeName: "master-2" `) func testExtendedTestdataApiserverOperatorKubeApiserverCrYamlBytes() ([]byte, error) { return _testExtendedTestdataApiserverOperatorKubeApiserverCrYaml, nil } func testExtendedTestdataApiserverOperatorKubeApiserverCrYaml() (*asset, error) { bytes, err := testExtendedTestdataApiserverOperatorKubeApiserverCrYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/apiserver/operator-kube-apiserver-cr.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsApplicationTemplateCustombuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-custom-docker-builder" }, "spec": { "dockerImageRepository": "openshift/origin-custom-docker-builder" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Custom", "customStrategy": { "from": { "kind": "ImageStreamTag", "name": "origin-custom-docker-builder:latest" }, "env": [ { "name": "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE", "value": "openshift/origin-custom-docker-builder" } ], "exposeDockerSocket": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "mid": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } } }, "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-custombuild" } } `) func testExtendedTestdataBuildsApplicationTemplateCustombuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsApplicationTemplateCustombuildJson, nil } func testExtendedTestdataBuildsApplicationTemplateCustombuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsApplicationTemplateCustombuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/application-template-custombuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPostcommitDockerYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mydockertest labels: name: test spec: triggers: [] runPolicy: Serial source: dockerfile: | FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest strategy: type: Docker dockerStrategy: env: - name: BUILD_LOGLEVEL value: "5" resources: {} postCommit: command: ["touch"] args: ["/tmp/postCommit"] nodeSelector: null status: lastVersion: 0 - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: mydockertest spec: replicas: 1 selector: app: mydockertest deploymentconfig: mydockertest strategy: type: Rolling template: metadata: labels: app: mydockertest deploymentconfig: mydockertest spec: containers: - image: imagePullPolicy: Always readinessProbe: httpGet: port: 8080 name: mydockertest ports: - containerPort: 8080 protocol: TCP - containerPort: 8888 protocol: TCP terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} triggers: - imageChangeParams: automatic: true containerNames: - mydockertest from: kind: ImageStreamTag name: mydockertest:latest type: ImageChange - type: ConfigChange `) func testExtendedTestdataBuildsBuildPostcommitDockerYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPostcommitDockerYaml, nil } func testExtendedTestdataBuildsBuildPostcommitDockerYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPostcommitDockerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-postcommit/docker.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: mydockertest - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: mys2itest `) func testExtendedTestdataBuildsBuildPostcommitImagestreamsYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml, nil } func testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPostcommitImagestreamsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-postcommit/imagestreams.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPostcommitStiYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mys2itest labels: name: test spec: triggers: [] runPolicy: Serial source: type: Git git: uri: 'https://github.com/sclorg/nodejs-ex' strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 resources: {} postCommit: {} nodeSelector: null status: lastVersion: 0 - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: mys2itest spec: replicas: 1 selector: app: mys2itest deploymentconfig: mys2itest strategy: type: Rolling template: metadata: labels: app: mys2itest deploymentconfig: mys2itest spec: containers: - image: imagePullPolicy: Always name: mys2itest terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} triggers: - imageChangeParams: automatic: true containerNames: - mys2itest from: kind: ImageStreamTag name: mys2itest:latest type: ImageChange - type: ConfigChange `) func testExtendedTestdataBuildsBuildPostcommitStiYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPostcommitStiYaml, nil } func testExtendedTestdataBuildsBuildPostcommitStiYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPostcommitStiYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-postcommit/sti.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: myphp spec: source: type: Git git: uri: 'https://github.com/sclorg/cakephp-ex.git' strategy: type: Source sourceStrategy: from: kind: DockerImage name: registry.redhat.io/ubi8/php-74:latest `) func testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml, nil } func testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/default-group-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: myphp spec: source: type: Git git: uri: https://github.com/sclorg/cakephp-ex.git strategy: type: Source sourceStrategy: from: kind: DockerImage name: registry.redhat.io/ubi8/php-74:latest `) func testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml, nil } func testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/default-legacy-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: myphp spec: failedBuildsHistoryLimit: 2 source: type: Git git: uri: 'https://github.com/sclorg/cakephp-ex.git' ref: master strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" - name: FIELDREF_ENV valueFrom: fieldRef: fieldPath: metadata.nofield from: kind: DockerImage name: registry.redhat.io/ubi8/php-74:latest `) func testExtendedTestdataBuildsBuildPruningErroredBuildConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml, nil } func testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningErroredBuildConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/errored-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: myphp labels: app: myphp annotations: openshift.io/generated-by: OpenShiftWebConsole spec: failedBuildsHistoryLimit: 2 source: type: Git git: uri: 'https://github.com/openshift/non-working-example.git' strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: registry.redhat.io/ubi8/php-74:latest `) func testExtendedTestdataBuildsBuildPruningFailedBuildConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml, nil } func testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningFailedBuildConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/failed-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningFailedPipelineYaml = []byte(`kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "failed-pipeline" spec: failedBuildsHistoryLimit: 2 strategy: jenkinsPipelineStrategy: jenkinsfile: |- node() { sh 'exit 1' } type: JenkinsPipeline `) func testExtendedTestdataBuildsBuildPruningFailedPipelineYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningFailedPipelineYaml, nil } func testExtendedTestdataBuildsBuildPruningFailedPipelineYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningFailedPipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/failed-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningImagestreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: myphp `) func testExtendedTestdataBuildsBuildPruningImagestreamYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningImagestreamYaml, nil } func testExtendedTestdataBuildsBuildPruningImagestreamYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningImagestreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: myphp labels: app: myphp annotations: openshift.io/generated-by: OpenShiftWebConsole spec: successfulBuildsHistoryLimit: 2 source: dockerfile: | FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest RUN touch /php-file strategy: dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" `) func testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml, nil } func testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/successful-build-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml = []byte(`kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "successful-pipeline" spec: successfulBuildsHistoryLimit: 2 strategy: jenkinsPipelineStrategy: jenkinsfile: |- node() { sh 'exit 0' } type: JenkinsPipeline `) func testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml, nil } func testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-pruning/successful-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildQuotaS2iBinAssemble = []byte(`#!/bin/bash # Seeing issues w/ buildah log output being intermingled with the container # output, so adding a sleep in an attempt to let the buildah log output # stop before the container output starts sleep 10 unifiedMount=$(awk '{if ($3 == "cgroup2") {print $2; exit}}' /proc/self/mounts) echo "cgroupv2 mount point is ${unifiedMount}" unifiedName=$(awk -F: '/^0:/ {if ($1 == "0") {print $3; exit}}' /proc/self/cgroup) echo "unified cgroup name is ${unifiedName}" if test -e /"$unifiedMount"/"$unifiedName"/cgroup.controllers ; then unifiedControllers=$(cat /"$unifiedMount"/"$unifiedName"/cgroup.controllers) fi echo "cgroupv2 controllers are ${unifiedControllers}" cgroupv1Val=$(cat /sys/fs/cgroup/memory/memory.limit_in_bytes) || true echo "cgroupv1Val is ${cgroupv1Val}" if [ "$cgroupv1Val" != "" ]; then echo "MEMORY=${cgroupv1Val}" fi cgroupv2Val=$(cat /"$unifiedMount"/"$unifiedName"/memory.max) || true echo "cgroupv2Val is ${cgroupv2Val}" if [ "$cgroupv2Val" != "" ]; then echo "MEMORY=${cgroupv2Val}" MEMORY="${cgroupv2Val}" fi cgroupv1Val=$(cat /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes) || true echo "cgroupv1Val is ${cgroupv1Val}" if [ "$cgroupv1Val" != "" ]; then echo "MEMORYSWAP=${cgroupv1Val}" fi # ok swap is treated differently between cgroup v1 and v2. In v1, memory.memsw.limit_in_bytes # is memory+swap. In v2, memory.swap.max is just swap. So with our quota in place, we will # find a memory.swap.max file with a value of '0' instead of 'max'. cgroupv2Val=$(cat /"$unifiedMount"/"$unifiedName"/memory.swap.max) || true echo "cgroupv2Val is ${cgroupv2Val}" if [ "$cgroupv2Val" != "" ]; then # so that our associated ginkgo test case does not have to distinguish between cgroup v1 # and v2, we calculate the equivalent v1 value echo MEMORYSWAP=$(($cgroup2Val + $MEMORY)) fi if [ -e /sys/fs/cgroup/cpuacct,cpu ]; then quota=$(cat /sys/fs/cgroup/cpuacct,cpu/cpu.cfs_quota_us) echo QUOTA= && cat /sys/fs/cgroup/cpuacct,cpu/cpu.cfs_quota_us echo SHARES= && cat /sys/fs/cgroup/cpuacct,cpu/cpu.shares echo PERIOD= && cat /sys/fs/cgroup/cpuacct,cpu/cpu.cfs_period_us else quota=$(cat /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us) echo QUOTA= && cat /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us echo SHARES= && cat /sys/fs/cgroup/cpu,cpuacct/cpu.shares echo PERIOD= && cat /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us fi if [ "${quota}" = "-1" ]; then cat /proc/self/cgroup cat /proc/self/mountinfo findmnt fi `) func testExtendedTestdataBuildsBuildQuotaS2iBinAssembleBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildQuotaS2iBinAssemble, nil } func testExtendedTestdataBuildsBuildQuotaS2iBinAssemble() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildQuotaS2iBinAssembleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-quota/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildQuotaDockerfile = []byte(`FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest USER root ADD .s2i/bin/assemble . RUN ./assemble # exit 1 causes the docker build to fail which causes docker to show the output # of all commands like 'assemble' above. RUN exit 1 `) func testExtendedTestdataBuildsBuildQuotaDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildQuotaDockerfile, nil } func testExtendedTestdataBuildsBuildQuotaDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildQuotaDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-quota/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsDockerfile = []byte(`FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest USER root ADD ./secret-dir /secrets COPY ./secret2 / ADD ./config-dir /configs COPY ./this / # Create a shell script that will output secrets and configMaps when the image is run RUN echo '#!/bin/sh' > /secret_report.sh RUN echo '(test -f /secrets/secret1 && echo -n "secret1=" && cat /secrets/secret1)' >> /secret_report.sh RUN echo '(test -f /secret2 && echo -n "relative-secret2=" && cat /secret2)' >> /secret_report.sh RUN echo '(test -f /configs/foo && echo -n "foo=" && cat /configs/foo)' >> /secret_report.sh RUN echo '(test -f /this && echo -n "relative-this=" && cat /this)' >> /secret_report.sh RUN chmod 755 /secret_report.sh CMD ["/bin/sh", "-c", "/secret_report.sh"] `) func testExtendedTestdataBuildsBuildSecretsDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsDockerfile, nil } func testExtendedTestdataBuildsBuildSecretsDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble = []byte(`#!/bin/bash # Copy secrets into a location they can be output during image run mkdir -p "${HOME}/testsecret" if [[ -f /tmp/secret1 ]]; then # Copy three secrets defined in testsecret fixture to directory cp /tmp/secret? "${HOME}/testsecret" else echo "Unable to locate testsecret fixture files" exit 1 fi mkdir -p "${HOME}/testsecret2" if [[ -f secret1 ]]; then # Copy three secrets defined in testsecret2 fixture to directory cp secret? "${HOME}/testsecret2" else echo "Unable to locate testsecret2 fixture files" exit 2 fi mkdir -p "${HOME}/testconfig" if [[ -f /tmp/configmap/foo ]]; then # Copy three configMap entries defined in configmap1 fixture to directory cp /tmp/configmap/* "${HOME}/testconfig" else echo "Unable to locate test-configmap fixture files" exit 3 fi mkdir -p "${HOME}/testconfig2" if [[ -f configmap2/foo ]]; then # Copy three configMap entries defined in configmap2 fixture to directory cp configmap2/* "${HOME}/testconfig2" else echo "Unable to locate test-configmap-2 fixture files" exit 4 fi `) func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssembleBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble, nil } func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssembleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun = []byte(`#!/bin/bash # Ensure none of the build config inject secrets still exist in the file system secrets=(secret1 secret2 secret3) configMaps=(foo this red) function checkSecret() { dir=$1 file=$2 if [[ -e "${dir}/${file}" ]]; then echo "Found secret file which should have been deleted: ${dir}/${file}" exit 1 fi } function checkConfigMap() { dir=$1 file=$2 if [[ -a "${dir}/${file}" ]]; then if [[ ! -s "${dir}/${file}" ]]; then echo "Found empty configMap file which should not have been truncated: ${dir}/${file}" exit 1 fi else echo "ConfigMap file ${file} is missing from ${dir}." exit 1 fi } for s in ${secrets[@]}; do checkSecret "/tmp" $s checkSecret "." $s done for c in ${configMaps[@]}; do checkConfigMap "/tmp/configmap" $c checkConfigMap "configmap2" $c done # Print out the secrets copied into the image during assemble cd "${HOME}" for s in testsecret/* testsecret2/* testconfig/* testconfig2/*; do echo -n "${s}=" && cat "${s}" done`) func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRunBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun, nil } func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRunBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/run", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile = []byte(`source "https://rubygems.org" gem "rack" `) func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile, nil } func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]} `) func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRuBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu, nil } func testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRuBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/s2i-binary-dir/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json = []byte(`{ "kind": "ConfigMap", "apiVersion": "v1", "metadata": { "name": "test-configmap-2", "creationTimestamp": null }, "data": { "foo": "bar\n", "this": "that\n", "red": "hat\n" } } `) func testExtendedTestdataBuildsBuildSecretsTestConfigmap2JsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json, nil } func testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestConfigmap2JsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-configmap-2.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestConfigmapJson = []byte(`{ "kind": "ConfigMap", "apiVersion": "v1", "metadata": { "name": "test-configmap" }, "data": { "foo": "bar\n", "this": "that\n", "red": "hat\n" } } `) func testExtendedTestdataBuildsBuildSecretsTestConfigmapJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestConfigmapJson, nil } func testExtendedTestdataBuildsBuildSecretsTestConfigmapJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestConfigmapJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-configmap.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Binary", "binary": {}, "secrets": [ { "secret": { "name": "testsecret" }, "destinationDir": "secret-dir" }, { "secret": { "name": "testsecret2" } } ], "configMaps": [ { "configMap": { "name": "test-configmap" }, "destinationDir": "config-dir" }, { "configMap": { "name": "test-configmap-2" } } ] }, "strategy": { "type": "Docker", "dockerStrategy": { "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" } } } } `) func testExtendedTestdataBuildsBuildSecretsTestDockerBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson, nil } func testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestDockerBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestIsJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test" } } `) func testExtendedTestdataBuildsBuildSecretsTestIsJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestIsJson, nil } func testExtendedTestdataBuildsBuildSecretsTestIsJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestIsJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Binary", "binary": {}, "secrets": [ { "secret": { "name": "testsecret" }, "destinationDir": "/tmp" }, { "secret": { "name": "testsecret2" } } ], "configMaps": [ { "configMap": { "name": "test-configmap" }, "destinationDir": "/tmp/configmap" }, { "configMap": { "name": "test-configmap-2" }, "destinationDir": "configmap2" } ] }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" } } } } `) func testExtendedTestdataBuildsBuildSecretsTestS2iBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson, nil } func testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestS2iBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestSecret2Json = []byte(`{ "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "testsecret2", "creationTimestamp": null }, "data": { "secret1": "c2VjcmV0MQo=", "secret2": "c2VjcmV0Mgo=", "secret3": "c2VjcmV0Mwo=" }, "type": "Opaque" } `) func testExtendedTestdataBuildsBuildSecretsTestSecret2JsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestSecret2Json, nil } func testExtendedTestdataBuildsBuildSecretsTestSecret2Json() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestSecret2JsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-secret-2.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildSecretsTestSecretJson = []byte(`{ "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "testsecret", "creationTimestamp": null }, "data": { "secret1": "c2VjcmV0MQo=", "secret2": "c2VjcmV0Mgo=", "secret3": "c2VjcmV0Mwo=" }, "type": "Opaque" } `) func testExtendedTestdataBuildsBuildSecretsTestSecretJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildSecretsTestSecretJson, nil } func testExtendedTestdataBuildsBuildSecretsTestSecretJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildSecretsTestSecretJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-secrets/test-secret.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 USER root `) func testExtendedTestdataBuildsBuildTimingDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingDockerfile, nil } func testExtendedTestdataBuildsBuildTimingDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble = []byte(`#!/bin/sh `) func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssembleBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble, nil } func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssembleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun = []byte(`#!/bin/sh `) func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRunBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun, nil } func testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRunBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/run", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile = []byte(`source "https://rubygems.org" gem "rack" `) func testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile, nil } func testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]} `) func testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRuBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu, nil } func testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRuBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/s2i-binary-dir/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingTestDockerBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Binary", "binary": {} }, "strategy": { "type": "Docker", "dockerStrategy": { "forcePull": true, "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" } } } } `) func testExtendedTestdataBuildsBuildTimingTestDockerBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingTestDockerBuildJson, nil } func testExtendedTestdataBuildsBuildTimingTestDockerBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingTestDockerBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingTestIsJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test" } } `) func testExtendedTestdataBuildsBuildTimingTestIsJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingTestIsJson, nil } func testExtendedTestdataBuildsBuildTimingTestIsJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingTestIsJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsBuildTimingTestS2iBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Binary", "binary": {} }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "quay.io/redhat-developer/test-build-simples2i:1.2" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" } } } } `) func testExtendedTestdataBuildsBuildTimingTestS2iBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsBuildTimingTestS2iBuildJson, nil } func testExtendedTestdataBuildsBuildTimingTestS2iBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsBuildTimingTestS2iBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/build-timing/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml = []byte(`kind: Build apiVersion: config.openshift.io/v1 metadata: name: cluster spec: buildDefaults: defaultProxy: httpProxy: http://invalid.proxy.redhat.com:3288 httpsProxy: http://invalid.proxy.redhat.com:3288 noProxy: image-registry.openshift-image-registry.svc:5000 `) func testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml, nil } func testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config/invalid-build-cluster-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml = []byte(`kind: Image apiVersion: config.openshift.io/v1 metadata: name: cluster spec: registrySources: blockedRegistries: - docker.io - quay.io `) func testExtendedTestdataBuildsClusterConfigRegistryBlacklistYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml, nil } func testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsClusterConfigRegistryBlacklistYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config/registry-blacklist.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml = []byte(`kind: Image apiVersion: config.openshift.io/v1 metadata: name: cluster spec: registrySources: allowedRegistries: - quay.io `) func testExtendedTestdataBuildsClusterConfigRegistryWhitelistYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml, nil } func testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsClusterConfigRegistryWhitelistYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config/registry-whitelist.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsClusterConfigYaml = []byte(`kind: Image apiVersion: config.openshift.io/v1 metadata: name: cluster spec: {} `) func testExtendedTestdataBuildsClusterConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsClusterConfigYaml, nil } func testExtendedTestdataBuildsClusterConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsClusterConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/cluster-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsCustomBuildDockerfile = []byte(`FROM registry.redhat.io/rhel8/buildah:latest # For simplicity, /tmp/build contains the inputs we’ll be building when we # run this custom builder image. Normally the custom builder image would # fetch this content from some location at build time. (e.g. via git clone). ADD Dockerfile.sample /tmp/input/Dockerfile ADD build.sh /usr/bin RUN chmod a+x /usr/bin/build.sh # /tmp/build/build.sh contains the actual custom build logic that will be executed when # this custom builder image is executed. ENTRYPOINT ["/usr/bin/build.sh"] `) func testExtendedTestdataBuildsCustomBuildDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsCustomBuildDockerfile, nil } func testExtendedTestdataBuildsCustomBuildDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsCustomBuildDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/custom-build/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsCustomBuildDockerfileSample = []byte(`FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest RUN touch /tmp/built `) func testExtendedTestdataBuildsCustomBuildDockerfileSampleBytes() ([]byte, error) { return _testExtendedTestdataBuildsCustomBuildDockerfileSample, nil } func testExtendedTestdataBuildsCustomBuildDockerfileSample() (*asset, error) { bytes, err := testExtendedTestdataBuildsCustomBuildDockerfileSampleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/custom-build/Dockerfile.sample", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsCustomBuildBuildSh = []byte(`#!/bin/sh set -euo pipefail # Note that in this case the build inputs are part of the custom builder image, but normally this # would be retrieved from an external source. cd /tmp/input # OUTPUT_REGISTRY and OUTPUT_IMAGE are env variables provided by the custom # build framework TAG="${OUTPUT_REGISTRY}/${OUTPUT_IMAGE}" cp -R /var/run/configs/openshift.io/certs/certs.d/* /etc/containers/certs.d/ # buildah requires a slight modification to the push secret provided by the service account in order to use it for pushing the image echo "{ \"auths\": $(cat /var/run/secrets/openshift.io/pull/.dockercfg)}" > /tmp/.pull echo "{ \"auths\": $(cat /var/run/secrets/openshift.io/push/.dockercfg)}" > /tmp/.push # performs the build of the new image defined by Dockerfile.sample buildah --authfile /tmp/.pull --storage-driver vfs bud --isolation chroot -t ${TAG} . # push the new image to the target for the build buildah --authfile /tmp/.push --storage-driver vfs push ${TAG} `) func testExtendedTestdataBuildsCustomBuildBuildShBytes() ([]byte, error) { return _testExtendedTestdataBuildsCustomBuildBuildSh, nil } func testExtendedTestdataBuildsCustomBuildBuildSh() (*asset, error) { bytes, err := testExtendedTestdataBuildsCustomBuildBuildShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/custom-build/build.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsDockerAddDockerfile = []byte(`FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest ADD no-exist-file . `) func testExtendedTestdataBuildsDockerAddDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsDockerAddDockerfile, nil } func testExtendedTestdataBuildsDockerAddDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsDockerAddDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/docker-add/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsDockerAddDockerAddEnvDockerfile = []byte(`FROM registry.redhat.io/ubi8/ubi-minimal ENV foo=foo ADD ./${foo} /tmp/foo `) func testExtendedTestdataBuildsDockerAddDockerAddEnvDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsDockerAddDockerAddEnvDockerfile, nil } func testExtendedTestdataBuildsDockerAddDockerAddEnvDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsDockerAddDockerAddEnvDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/docker-add/docker-add-env/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsDockerAddDockerAddEnvFoo = []byte(``) func testExtendedTestdataBuildsDockerAddDockerAddEnvFooBytes() ([]byte, error) { return _testExtendedTestdataBuildsDockerAddDockerAddEnvFoo, nil } func testExtendedTestdataBuildsDockerAddDockerAddEnvFoo() (*asset, error) { bytes, err := testExtendedTestdataBuildsDockerAddDockerAddEnvFooBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/docker-add/docker-add-env/foo", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsIncrementalAuthBuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "push-pull-builder", "creationTimestamp": null, "annotations": { "description": "This defines a build which pulls from and pushes to the internal registry", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "incremental-image", "creationTimestamp": null }, "spec": {} }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "incremental-build", "creationTimestamp": null, "labels": { "name": "incremental-build" } }, "spec": { "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/incremental-app.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:2.5-ubi8" }, "incremental": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "incremental-image:latest" } } } } ], "parameters": [], "labels": { "template": "application-template-stibuild" } } `) func testExtendedTestdataBuildsIncrementalAuthBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsIncrementalAuthBuildJson, nil } func testExtendedTestdataBuildsIncrementalAuthBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsIncrementalAuthBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/incremental-auth-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsJenkinsPipelineJenkinsEphemeralJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "jenkins-ephemeral", "annotations": { "openshift.io/display-name": "Jenkins (Ephemeral)", "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-jenkins", "tags": "instant-app,jenkins", "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", "openshift.io/support-url": "https://access.redhat.com" } }, "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/main/examples/jenkins/README.md contains more information about using this template.", "labels": { "app": "jenkins-ephemeral", "template": "jenkins-ephemeral-template" }, "objects": [ { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "${JENKINS_SERVICE_NAME}", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}", "haproxy.router.openshift.io/timeout": "4m" } }, "spec": { "to": { "kind": "Service", "name": "${JENKINS_SERVICE_NAME}" }, "tls": { "termination": "edge", "insecureEdgeTerminationPolicy": "Redirect" } } }, { "kind": "ConfigMap", "apiVersion": "v1", "metadata": { "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", "labels": { "config.openshift.io/inject-trusted-cabundle": "true" } } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "${JENKINS_SERVICE_NAME}", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate" }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "jenkins" ], "from": { "kind": "ImageStreamTag", "name": "${JENKINS_IMAGE_STREAM_TAG}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "template": { "metadata": { "labels": { "name": "${JENKINS_SERVICE_NAME}" } }, "spec": { "serviceAccountName": "${JENKINS_SERVICE_NAME}", "containers": [ { "name": "jenkins", "image": " ", "readinessProbe": { "timeoutSeconds": 240, "initialDelaySeconds": 3, "httpGet": { "path": "/login", "port": 8080 } }, "livenessProbe": { "timeoutSeconds": 240, "periodSeconds": 360, "initialDelaySeconds": 420, "failureThreshold": 2, "httpGet": { "path": "/login", "port": 8080 } }, "env": [ { "name": "OPENSHIFT_ENABLE_OAUTH", "value": "${ENABLE_OAUTH}" }, { "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", "value": "true" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" }, { "name": "KUBERNETES_MASTER", "value": "https://kubernetes.default:443" }, { "name": "KUBERNETES_TRUST_CERTIFICATES", "value": "true" }, { "name": "JENKINS_SERVICE_NAME", "value": "${JENKINS_SERVICE_NAME}" }, { "name": "JNLP_SERVICE_NAME", "value": "${JNLP_SERVICE_NAME}" }, { "name": "JENKINS_UC_INSECURE", "value": "${JENKINS_UC_INSECURE}" }, { "name": "CASC_JENKINS_CONFIG", "value": "/var/lib/jenkins/proxy.yaml" }, { "name": "JAVA_FIPS_OPTIONS", "value": "${JAVA_FIPS_OPTIONS}" } ], "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "volumeMounts": [ { "name": "${JENKINS_SERVICE_NAME}-data", "mountPath": "/var/lib/jenkins" }, { "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", "mountPath": "/etc/pki/ca-trust/source/anchors" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "capabilities": {}, "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "${JENKINS_SERVICE_NAME}-data", "emptyDir": { "medium": "" } }, { "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", "configMap": { "name": "${JENKINS_SERVICE_NAME}-trusted-ca-bundle", "optional": true } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "ServiceAccount", "apiVersion": "v1", "metadata": { "name": "${JENKINS_SERVICE_NAME}", "annotations": { "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" } } }, { "kind": "RoleBinding", "apiVersion": "authorization.openshift.io/v1", "metadata": { "name": "${JENKINS_SERVICE_NAME}_edit" }, "groupNames": null, "subjects": [ { "kind": "ServiceAccount", "name": "${JENKINS_SERVICE_NAME}" } ], "roleRef": { "name": "edit" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "${JNLP_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "agent", "protocol": "TCP", "port": 50000, "targetPort": 50000, "nodePort": 0 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "type": "ClusterIP", "sessionAffinity": "None" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "${JENKINS_SERVICE_NAME}", "annotations": { "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", "service.openshift.io/infrastructure": "true" } }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 80, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "type": "ClusterIP", "sessionAffinity": "None" } } ], "parameters": [ { "name": "JENKINS_SERVICE_NAME", "displayName": "Jenkins Service Name", "description": "The name of the OpenShift Service exposed for the Jenkins container.", "value": "jenkins" }, { "name": "JNLP_SERVICE_NAME", "displayName": "Jenkins JNLP Service Name", "description": "The name of the service used for master/slave communication.", "value": "jenkins-jnlp" }, { "name": "ENABLE_OAUTH", "displayName": "Enable OAuth in Jenkins", "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", "value": "true" }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the container can use.", "value": "1Gi" }, { "name": "NAMESPACE", "displayName": "Jenkins ImageStream Namespace", "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", "value": "openshift" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "displayName": "Disable memory intensive administrative monitors", "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", "value": "false" }, { "name": "JAVA_FIPS_OPTIONS", "displayName": "Allows control over how the JVM interacts with FIPS on startup.", "description": "See https://access.redhat.com/documentation/en-us/openjdk/11/html-single/configuring_openjdk_11_on_rhel_with_fips/index#config-fips-in-openjdk for the available command line properties to facilitate the JVM running on FIPS nodes.", "value": "-Dcom.redhat.fips=false" }, { "name": "JENKINS_IMAGE_STREAM_TAG", "displayName": "Jenkins ImageStreamTag", "description": "Name of the ImageStreamTag to be used for the Jenkins image.", "value": "jenkins:2" }, { "name": "JENKINS_UC_INSECURE", "displayName": "Allows use of Jenkins Update Center repository with invalid SSL certificate", "description": "Whether to allow use of a Jenkins Update Center that uses invalid certificate (self-signed, unknown CA). If any value other than 'false', certificate check is bypassed. By default, certificate check is enforced.", "value": "false" }, { "name": "AGENT_BASE_IMAGE", "displayName": "Image used for the 'jnlp' container of the sample 'java-sidecar' and 'nodejs-sidecar' PodTemplates", "description": "Setting this value overrides the image used for the 'jnlp' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'jenkins-agent-base:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/jenkins-agent-base:latest" }, { "name": "JAVA_BUILDER_IMAGE", "displayName": "Image used for the 'java' container of the sample 'java-builder' PodTemplate", "description": "Setting this value overrides the image used for the 'java-builder' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'java:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/java:latest" }, { "name": "NODEJS_BUILDER_IMAGE", "displayName": "Image used for the 'nodejs' container of the sample 'nodejs-builder' PodTemplate", "description": "Setting this value overrides the image used for the 'nodejs-builder' container in the sample kubernetes plug-in PodTemplates provided with this image. Otherwise, the image from the 'nodejs:latest' ImageStreamTag in the 'openshift' namespace is used.", "value": "image-registry.openshift-image-registry.svc:5000/openshift/nodejs:latest" } ] } `) func testExtendedTestdataBuildsJenkinsPipelineJenkinsEphemeralJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsJenkinsPipelineJenkinsEphemeralJson, nil } func testExtendedTestdataBuildsJenkinsPipelineJenkinsEphemeralJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsJenkinsPipelineJenkinsEphemeralJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/jenkins-pipeline/jenkins-ephemeral.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsJenkinsPipelineJenkinsRhelYaml = []byte(`kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: jenkins annotations: openshift.io/display-name: Jenkins spec: tags: - name: latest annotations: openshift.io/display-name: Jenkins (Latest) openshift.io/provider-display-name: Red Hat, Inc. description: |- Provides a Jenkins server from registry.redhat.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. WARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates. iconClass: icon-jenkins tags: jenkins from: kind: ImageStreamTag name: "2" referencePolicy: type: Local - name: ocp-upgrade-redeploy annotations: openshift.io/display-name: Jenkins (Latest) openshift.io/provider-display-name: Red Hat, Inc. description: Provides a Jenkins 2.X server from registry.redhat.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OCP versions if the Jenkins image reference has changed. iconClass: icon-jenkins tags: jenkins from: kind: ImageStreamTag name: "2" referencePolicy: type: Local - name: "2" annotations: openshift.io/display-name: Jenkins 2.X openshift.io/provider-display-name: Red Hat, Inc. description: Provides a Jenkins 2.X server from registry.redhat.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OCP versions if the Jenkins image reference has changed. iconClass: icon-jenkins tags: jenkins version: 2.x from: kind: DockerImage name: registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0-1686682222 referencePolicy: type: Local - name: "user-maintained-upgrade-redeploy" annotations: openshift.io/display-name: Jenkins 2.X openshift.io/provider-display-name: Red Hat, Inc. description: Provides a Jenkins 2.X server from registry.redhat.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OCP versions if the Jenkins image reference has changed. A user must invoke 'oc import-image jenkins:user-maintained-upgrade-redeploy -n openshift' in order for the ImageStream controller to pull the latest digest for the image tag, and if a new digest exists, any running Jenkins DeploymentConfig will redeploy. iconClass: icon-jenkins tags: jenkins version: 2.x from: kind: DockerImage name: registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0 referencePolicy: type: Local - name: "scheduled-upgrade-redeploy" annotations: openshift.io/display-name: Jenkins 2.X openshift.io/provider-display-name: Red Hat, Inc. description: Provides a Jenkins 2.X server from registry.redhat.io. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md. This tag will will redeploy the Jenkins DeploymentConfig on an upgrade in OCP versions if the Jenkins image reference has changed. OpenShift will periodically check to ensure that the latest digest for this image tag is imported. If an update occurs, any running Jenkins DeploymentConfig will redeploy. iconClass: icon-jenkins tags: jenkins version: 2.x from: kind: DockerImage name: registry.redhat.io/ocp-tools-4/jenkins-rhel8:v4.13.0 importPolicy: scheduled: true referencePolicy: type: Local `) func testExtendedTestdataBuildsJenkinsPipelineJenkinsRhelYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsJenkinsPipelineJenkinsRhelYaml, nil } func testExtendedTestdataBuildsJenkinsPipelineJenkinsRhelYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsJenkinsPipelineJenkinsRhelYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/jenkins-pipeline/jenkins-rhel.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: linked-nodejs spec: source: git: uri: "https://github.com/sclorg/nodejs-ex.git" strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/nodejs:latest `) func testExtendedTestdataBuildsPullsecretLinkedNodejsBcYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml, nil } func testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsPullsecretLinkedNodejsBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/pullsecret/linked-nodejs-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: pullsecret-nodejs spec: source: git: uri: "https://github.com/sclorg/nodejs-ex.git" strategy: type: Source sourceStrategy: from: kind: DockerImage name: registry.redhat.io/ubi8/nodejs-14:latest pullSecret: name: local-ps `) func testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml, nil } func testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment = []byte(`TEST_ENV=success `) func testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironmentBytes() ([]byte, error) { return _testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment, nil } func testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment() (*asset, error) { bytes, err := testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironmentBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/s2i-environment-build-app/.s2i/environment", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile = []byte(`source 'https://rubygems.org' gem "rack" gem "rackup" gem "webrick"`) func testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile, nil } func testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/s2i-environment-build-app/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]} `) func testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRuBytes() ([]byte, error) { return _testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu, nil } func testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu() (*asset, error) { bytes, err := testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRuBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/s2i-environment-build-app/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsSimplePipelineBcYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: minimalpipeline spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- node() { sh 'exit 0' } type: JenkinsPipeline `) func testExtendedTestdataBuildsSimplePipelineBcYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsSimplePipelineBcYaml, nil } func testExtendedTestdataBuildsSimplePipelineBcYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsSimplePipelineBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/simple-pipeline-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble = []byte(`#!/usr/bin/env bash exit 123123 `) func testExtendedTestdataBuildsStatusfailAssembleS2iBinAssembleBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble, nil } func testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailAssembleS2iBinAssembleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-assemble/.s2i/bin/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-badcontextdirsourcetoimage spec: source: git: uri: "https://github.com/openshift/ruby-hello-world" contextDir: "foobar" strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 `) func testExtendedTestdataBuildsStatusfailBadcontextdirs2iYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml, nil } func testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailBadcontextdirs2iYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailFailedassembleYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-assemblescript spec: source: type: binary strategy: type: Source sourceStrategy: from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 `) func testExtendedTestdataBuildsStatusfailFailedassembleYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailFailedassembleYaml, nil } func testExtendedTestdataBuildsStatusfailFailedassembleYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailFailedassembleYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-failedassemble.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-builderimage spec: source: git: uri: "https://github.com/openshift/ruby-hello-world.git" strategy: type: Docker dockerStrategy: from: kind: DockerImage name: fail/me:latest `) func testExtendedTestdataBuildsStatusfailFetchbuilderimageYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml, nil } func testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailFetchbuilderimageYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchbuilderimage.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-fetchimagecontentdocker spec: source: images: - from: kind: DockerImage name: dummy.io/dont/exist:latest paths: - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - destinationDir: injected/usr/bin sourcePath: /usr/bin/ruby strategy: type: Docker dockerStrategy: from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 `) func testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYaml, nil } func testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-fetchsourcedocker spec: source: git: uri: "https://failure/docker/status" strategy: type: Docker dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 `) func testExtendedTestdataBuildsStatusfailFetchsourcedockerYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml, nil } func testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailFetchsourcedockerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailFetchsources2iYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-fetchsourcesourcetoimage spec: source: git: uri: "https://failure/sourcetoimage/status" strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 `) func testExtendedTestdataBuildsStatusfailFetchsources2iYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailFetchsources2iYaml, nil } func testExtendedTestdataBuildsStatusfailFetchsources2iYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailFetchsources2iYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-fetchsources2i.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailGenericreasonYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-genericfailure spec: source: git: uri: "https://github.com/sclorg/ruby-ex" strategy: type: Source sourceStrategy: from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 scripts: "http://example.org/scripts" env: - name: http_proxy value: "http://%" - name: "BUILD_LOGLEVEL" value: "2" `) func testExtendedTestdataBuildsStatusfailGenericreasonYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailGenericreasonYaml, nil } func testExtendedTestdataBuildsStatusfailGenericreasonYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailGenericreasonYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-genericreason.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailOomkilledYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-oomkilled spec: resources: limits: memory: 50Mi source: git: uri: "https://github.com/openshift/ruby-hello-world" strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 forcePull: true `) func testExtendedTestdataBuildsStatusfailOomkilledYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailOomkilledYaml, nil } func testExtendedTestdataBuildsStatusfailOomkilledYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailOomkilledYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-oomkilled.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailPostcommithookYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-postcommithook spec: source: git: uri: "https://github.com/openshift/ruby-hello-world.git" postCommit: args: - failme strategy: sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 type: Source `) func testExtendedTestdataBuildsStatusfailPostcommithookYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailPostcommithookYaml, nil } func testExtendedTestdataBuildsStatusfailPostcommithookYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailPostcommithookYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-postcommithook.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsStatusfailPushtoregistryYaml = []byte(`kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: statusfail-pushtoregistry spec: source: git: uri: "https://github.com/openshift/ruby-hello-world.git" output: to: kind: DockerImage # Bug 1746499: Image without tag should push with <imageid>:latest name: bogus.registry/image strategy: sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 type: Source `) func testExtendedTestdataBuildsStatusfailPushtoregistryYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsStatusfailPushtoregistryYaml, nil } func testExtendedTestdataBuildsStatusfailPushtoregistryYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsStatusfailPushtoregistryYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/statusfail-pushtoregistry.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsSubscriptionContentBuildImagestreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: subscription-content `) func testExtendedTestdataBuildsSubscriptionContentBuildImagestreamYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsSubscriptionContentBuildImagestreamYaml, nil } func testExtendedTestdataBuildsSubscriptionContentBuildImagestreamYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsSubscriptionContentBuildImagestreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/subscription-content/build-imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel7Yaml = []byte(`` + "\xEF\xBB\xBF" + `kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: subscription-content-rhel7 spec: nodeSelector: null output: to: kind: ImageStreamTag name: 'subscription-content:rhel7' resources: {} successfulBuildsHistoryLimit: 5 failedBuildsHistoryLimit: 5 strategy: type: Docker dockerStrategy: from: kind: DockerImage name: 'registry.access.redhat.com/ubi7/ubi:latest' volumes: - name: etc-pki-entitlement source: type: Secret secret: secretName: etc-pki-entitlement defaultMode: 420 mounts: - destinationPath: /etc/pki/entitlement postCommit: {} source: type: Dockerfile dockerfile: | FROM registry.access.redhat.com/ubi7/ubi:latest RUN rm -rf /etc/rhsm-host RUN yum --enablerepo=rhel-server-rhscl-7-rpms install \ nss_wrapper -y && \ yum clean all -y RUN ln -s /run/secrets/rhsm /etc/rhsm-host runPolicy: Serial `) func testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel7YamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel7Yaml, nil } func testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel7Yaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel7YamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel7.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel8Yaml = []byte(`` + "\xEF\xBB\xBF" + `kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: subscription-content-rhel8 spec: nodeSelector: null output: to: kind: ImageStreamTag name: 'subscription-content:rhel8' resources: {} successfulBuildsHistoryLimit: 5 failedBuildsHistoryLimit: 5 strategy: type: Docker dockerStrategy: from: kind: DockerImage name: 'registry.access.redhat.com/ubi8/ubi:latest' volumes: - name: etc-pki-entitlement source: type: Secret secret: secretName: etc-pki-entitlement defaultMode: 420 mounts: - destinationPath: /etc/pki/entitlement postCommit: {} source: type: Dockerfile dockerfile: | FROM registry.access.redhat.com/ubi8/ubi:latest RUN rm -rf /etc/rhsm-host RUN yum --enablerepo=codeready-builder-for-rhel-8-$(arch)-rpms install \ nss_wrapper \ uid_wrapper -y && \ yum clean all -y RUN ln -s /run/secrets/rhsm /etc/rhsm-host runPolicy: Serial `) func testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel8YamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel8Yaml, nil } func testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel8Yaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel8YamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel8.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel9Yaml = []byte(`` + "\xEF\xBB\xBF" + `kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: subscription-content-rhel9 spec: nodeSelector: null output: to: kind: ImageStreamTag name: 'subscription-content:rhel9' resources: {} successfulBuildsHistoryLimit: 5 failedBuildsHistoryLimit: 5 strategy: type: Docker dockerStrategy: from: kind: DockerImage name: 'registry.access.redhat.com/ubi9/ubi:latest' volumes: - name: etc-pki-entitlement source: type: Secret secret: secretName: etc-pki-entitlement defaultMode: 420 mounts: - destinationPath: /etc/pki/entitlement postCommit: {} source: type: Dockerfile dockerfile: | FROM registry.access.redhat.com/ubi9/ubi:latest RUN rm -rf /etc/rhsm-host RUN yum --enablerepo=codeready-builder-for-rhel-9-$(arch)-rpms install \ nss_wrapper \ uid_wrapper -y && \ yum clean all -y RUN ln -s /run/secrets/rhsm /etc/rhsm-host runPolicy: Serial `) func testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel9YamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel9Yaml, nil } func testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel9Yaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel9YamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel9.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsSubscriptionContentSecretTemplateTxt = []byte(`kind: Secret apiVersion: v1 metadata: name: etc-pki-entitlement type: Opaque data: {{ range $key, $value := .data }} {{ $key }}: {{ $value }} {{ end }} `) func testExtendedTestdataBuildsSubscriptionContentSecretTemplateTxtBytes() ([]byte, error) { return _testExtendedTestdataBuildsSubscriptionContentSecretTemplateTxt, nil } func testExtendedTestdataBuildsSubscriptionContentSecretTemplateTxt() (*asset, error) { bytes, err := testExtendedTestdataBuildsSubscriptionContentSecretTemplateTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/subscription-content/secret-template.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestAuthBuildYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template labels: template: gitauth metadata: name: gitauth parameters: - name: SOURCE_URL required: true - name: SOURCE_SECRET required: true objects: - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: output - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: gitauth spec: source: git: uri: ${SOURCE_URL} type: Git sourceSecret: name: ${SOURCE_SECRET} strategy: sourceStrategy: env: - name: BUILD_LOGLEVEL value: "5" from: kind: ImageStreamTag name: nodejs:latest namespace: openshift type: Source output: to: kind: ImageStreamTag name: output:latest `) func testExtendedTestdataBuildsTestAuthBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestAuthBuildYaml, nil } func testExtendedTestdataBuildsTestAuthBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestAuthBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-auth-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBcWithPrRefYaml = []byte(`kind: List apiVersion: v1 items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: bc-with-pr-ref - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: bc-with-pr-ref-docker - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: bc-with-pr-ref spec: source: type: Git git: uri: https://github.com/sclorg/django-ex.git ref: refs/pull/121/head strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: python:latest namespace: openshift output: to: kind: ImageStreamTag name: bc-with-pr-ref:latest - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: bc-with-pr-ref-docker spec: source: type: Git git: uri: https://github.com/sclorg/django-ex.git ref: refs/pull/121/head dockerfile: FROM registry.redhat.io/ubi8/python-36:latest strategy: type: Docker dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: registry.redhat.io/ubi8/python-36:latest output: to: kind: ImageStreamTag name: bc-with-pr-ref-docker:latest `) func testExtendedTestdataBuildsTestBcWithPrRefYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBcWithPrRefYaml, nil } func testExtendedTestdataBuildsTestBcWithPrRefYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBcWithPrRefYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-bc-with-pr-ref.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildAppDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 USER default EXPOSE 8080 ENV RACK_ENV production ENV RAILS_ENV production COPY . /opt/app-root/src/ RUN bundle install CMD ["./run.sh"] USER default `) func testExtendedTestdataBuildsTestBuildAppDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildAppDockerfile, nil } func testExtendedTestdataBuildsTestBuildAppDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildAppDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-app/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildAppGemfile = []byte(`source "https://rubygems.org" gem "rack" `) func testExtendedTestdataBuildsTestBuildAppGemfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildAppGemfile, nil } func testExtendedTestdataBuildsTestBuildAppGemfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildAppGemfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-app/Gemfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildAppConfigRu = []byte(`run Proc.new {|env| [200, {"Content-Type" => "text/html"}, [ENV['TEST_ENV']]]} `) func testExtendedTestdataBuildsTestBuildAppConfigRuBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildAppConfigRu, nil } func testExtendedTestdataBuildsTestBuildAppConfigRu() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildAppConfigRuBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-app/config.ru", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildClusterConfigYaml = []byte(`kind: List apiVersion: v1 metadata: {} items: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: simple-s2i-build spec: source: git: uri: https://github.com/sclorg/nodejs-ex type: Git strategy: sourceStrategy: from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 type: Source - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: verbose-s2i-build spec: source: git: uri: https://github.com/sclorg/nodejs-ex type: Git strategy: sourceStrategy: env: - name: BUILD_LOGLEVEL value: "5" from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 type: Source `) func testExtendedTestdataBuildsTestBuildClusterConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildClusterConfigYaml, nil } func testExtendedTestdataBuildsTestBuildClusterConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildClusterConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-cluster-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildPodsvcJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "parameters": [ { "name": "IMAGE_NAME", "required": true } ], "objects": [ { "kind":"Pod", "apiVersion":"v1", "metadata":{ "name":"build-test-pod", "labels":{ "name":"build-test-pod" } }, "spec":{ "containers":[ { "name":"test", "image":"${IMAGE_NAME}", "readinessProbe": { "httpGet": { "port": 8080 } } } ], "dnsPolicy":"ClusterFirst" } }, { "kind": "Service", "apiVersion":"v1", "metadata": { "name":"build-test-svc" }, "spec": { "ports": [ { "name": "8080-tcp", "protocol": "TCP", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "build-test-pod" } } } ] } `) func testExtendedTestdataBuildsTestBuildPodsvcJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildPodsvcJson, nil } func testExtendedTestdataBuildsTestBuildPodsvcJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildPodsvcJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-podsvc.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildProxyYaml = []byte(`kind: List apiVersion: v1 metadata: {} items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: origin-ruby-sample creationTimestamp: spec: {} status: dockerImageRepository: '' - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Git git: uri: https://github.com/openshift/ruby-hello-world.git httpProxy: 127.0.0.1:3128 httpsProxy: 127.0.0.1:3128 strategy: type: Source sourceStrategy: env: - name: HTTPS_PROXY value: 127.0.0.1:3128 - name: HTTP_PROXY value: 127.0.0.1:3128 - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-s2i-build-noproxy creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Git git: uri: https://github.com/openshift/ruby-hello-world.git httpProxy: http://gituser:password@proxy1.com httpsProxy: https://gituser:password@proxy2.com noProxy: github.com strategy: type: Source sourceStrategy: from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 env: - name: SOME_HTTP_PROXY value: https://envuser:password@proxy3.com - name: SOME_HTTPS_PROXY value: https://envuser:password@proxy4.com - name: "BUILD_LOGLEVEL" value: "2" - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-docker-build-noproxy creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Git git: uri: https://github.com/openshift/ruby-hello-world.git httpProxy: http://gituser:password@proxy1.com httpsProxy: https://gituser:password@proxy2.com noProxy: github.com strategy: type: Docker dockerStrategy: from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 env: - name: SOME_HTTP_PROXY value: https://envuser:password@proxy3.com - name: SOME_HTTPS_PROXY value: https://envuser:password@proxy4.com - name: "BUILD_LOGLEVEL" value: "2" - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-docker-build-proxy-ca spec: mountTrustedCA: true source: dockerfile: | FROM registry.redhat.io/ubi8/ubi:latest RUN cat /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem strategy: dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: cli namespace: openshift `) func testExtendedTestdataBuildsTestBuildProxyYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildProxyYaml, nil } func testExtendedTestdataBuildsTestBuildProxyYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildProxyYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-proxy.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildRevisionJson = []byte(`{ "kind":"List", "apiVersion":"v1", "metadata":{ }, "items":[ { "kind":"BuildConfig", "apiVersion":"build.openshift.io/v1", "metadata":{ "name":"sample-build", "creationTimestamp":null }, "spec":{ "source":{ "type":"Git", "git":{ "uri":"https://github.com/openshift/ruby-hello-world.git" } }, "strategy":{ "type":"Source", "sourceStrategy":{ "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from":{ "kind":"DockerImage", "name":"quay.io/redhat-developer/test-build-simples2i:1.2" } } }, "resources":{ } }, "status":{ "lastVersion":0 } } ] } `) func testExtendedTestdataBuildsTestBuildRevisionJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildRevisionJson, nil } func testExtendedTestdataBuildsTestBuildRevisionJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildRevisionJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-revision.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildSearchRegistriesYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: ubi spec: source: # ubi8/ubi:latest only resolves to an image on registry.redhat.io or registry.access.redhat.com. dockerfile: FROM ubi8/ubi:latest type: Dockerfile strategy: dockerStrategy: env: - name: BUILD_LOGLEVEL value: "10" type: Docker `) func testExtendedTestdataBuildsTestBuildSearchRegistriesYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildSearchRegistriesYaml, nil } func testExtendedTestdataBuildsTestBuildSearchRegistriesYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildSearchRegistriesYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build-search-registries.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildYaml = []byte(`kind: List apiVersion: v1 metadata: {} items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: origin-ruby-sample creationTimestamp: spec: {} status: dockerImageRepository: '' - kind: Secret apiVersion: v1 metadata: name: webhooksecret creationTimestamp: data: WebHookSecretKey: c2VjcmV0dmFsdWUx type: Opaque - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build creationTimestamp: spec: triggers: - type: ImageChange imageChange: {} - type: Generic generic: secret: "mysecret" secretReference: name: "webhooksecret" source: type: Git git: uri: https://github.com/openshift/ruby-hello-world.git strategy: type: Source sourceStrategy: env: - name: FOO value: test - name: BAR value: test - name: BUILD_LOGLEVEL value: '5' from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 resources: {} status: lastVersion: 0 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-verbose-build creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Git git: uri: https://github.com/openshift/ruby-hello-world.git strategy: type: Source sourceStrategy: env: - name: FOO value: test - name: BAR value: test - name: BUILD_LOGLEVEL value: '5' from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 resources: {} status: lastVersion: 0 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build-binary creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Binary binary: {} strategy: type: Docker dockerStrategy: env: - name: FOO value: test - name: BAR value: test - name: BUILD_LOGLEVEL value: '5' from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 resources: {} status: lastVersion: 0 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build-github-archive creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Binary binary: {} contextDir: ruby-hello-world-master strategy: type: Docker dockerStrategy: env: - name: FOO value: test - name: BAR value: test - name: BUILD_LOGLEVEL value: '5' from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 resources: {} status: lastVersion: 0 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build-binary-invalidnodeselector creationTimestamp: spec: triggers: - type: imageChange imageChange: {} source: type: Binary binary: {} strategy: type: Docker dockerStrategy: env: - name: FOO value: test - name: BAR value: test - name: BUILD_LOGLEVEL value: '5' from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8 resources: {} nodeSelector: nodelabelkey: nodelabelvalue status: lastVersion: 0 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build-docker-args creationTimestamp: spec: triggers: - type: ImageChange imageChange: {} source: type: Dockerfile dockerfile: |- FROM registry.access.redhat.com/ubi8/ruby-27 ARG foofoo RUN echo $foofoo strategy: type: Docker dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest resources: {} postCommit: {} nodeSelector: status: lastVersion: 0 - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-build-docker-args-preset creationTimestamp: spec: triggers: - type: ImageChange imageChange: {} source: type: Dockerfile dockerfile: |- FROM registry.access.redhat.com/ubi8/ruby-27 ARG foofoo RUN echo $foofoo strategy: type: Docker dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest buildArgs: - name: foofoo value: default resources: {} postCommit: {} nodeSelector: status: lastVersion: 0 `) func testExtendedTestdataBuildsTestBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildYaml, nil } func testExtendedTestdataBuildsTestBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml = []byte(`kind: List apiVersion: v1 items: - kind: Secret apiVersion: v1 type: kubernetes.io/basic-auth metadata: name: secret1 annotations: build.openshift.io/source-secret-match-uri-1: '*://*.example.com/*' data: username: AA== - kind: Secret apiVersion: v1 type: kubernetes.io/ssh-auth metadata: name: secret2 annotations: build.openshift.io/source-secret-match-uri-1: '*://*.example.com/*' data: ssh-privatekey: AA== - kind: Secret apiVersion: v1 type: kubernetes.io/basic-auth metadata: name: secret3 annotations: build.openshift.io/source-secret-match-uri-1: 'https://*.com/*' data: username: AA== - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: test1 spec: source: type: Git git: uri: https://server1.example.com/path strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStream name: test - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: test2 spec: source: type: Git git: uri: ssh://server1.example.com/path strategy: type: Source sourceStrategy: from: kind: ImageStream name: test - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: test3 spec: source: type: Git git: uri: https://test.com/path strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStream name: test - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: test4 spec: source: type: Git git: uri: http://test.com/path strategy: type: Source sourceStrategy: from: kind: ImageStream name: test `) func testExtendedTestdataBuildsTestBuildconfigsecretinjectorYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml, nil } func testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestBuildconfigsecretinjectorYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-buildconfigsecretinjector.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestCdsDockerbuildJson = []byte(`{ "kind":"BuildConfig", "apiVersion":"build.openshift.io/v1", "metadata":{ "name":"docker-build" }, "spec":{ "completionDeadlineSeconds": 5, "triggers":[], "source":{ "type":"Dockerfile", "dockerfile":"FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest\nRUN sleep 10m" }, "strategy":{ "type":"Docker", "dockerStrategy":{ "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from":{ "kind":"DockerImage", "name":"image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" } } } } } `) func testExtendedTestdataBuildsTestCdsDockerbuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestCdsDockerbuildJson, nil } func testExtendedTestdataBuildsTestCdsDockerbuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestCdsDockerbuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-cds-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestCdsSourcebuildJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "source-build" }, "spec": { "completionDeadlineSeconds": 5, "triggers": [], "source":{ "type":"Dockerfile", "dockerfile":"FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest\nRUN sleep 10m" }, "strategy": { "type": "Source", "sourceStrategy": { "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" } } } } } ] } `) func testExtendedTestdataBuildsTestCdsSourcebuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestCdsSourcebuildJson, nil } func testExtendedTestdataBuildsTestCdsSourcebuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestCdsSourcebuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-cds-sourcebuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestContextBuildJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "dockercontext" }, "spec": { "triggers": [], "source": { "type": "binary", "binary": {}, "contextDir": "2.3" }, "strategy": { "type": "Docker", "dockerStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ] } } } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "s2icontext" }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri":"https://github.com/sclorg/s2i-ruby-container" }, "contextDir": "3.3/test/puma-test-app" }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "from": { "kind": "ImageStreamTag", "name": "ruby:latest" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" } } } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test" } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend" }, "spec": { "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "frontend" ], "from": { "kind": "ImageStreamTag", "name": "test:latest" } } } ], "replicas": 1, "selector": { "name":"frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "frontend", "image": "", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ] } ] } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } } ] } `) func testExtendedTestdataBuildsTestContextBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestContextBuildJson, nil } func testExtendedTestdataBuildsTestContextBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestContextBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-context-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestCustomBuildYaml = []byte(`kind: List apiVersion: v1 items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: sample-custom - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: sample-custom-build labels: name: sample-custom-build annotations: template.alpha.openshift.io/wait-for-ready: 'true' spec: strategy: type: Custom customStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" forcePull: true from: kind: ImageStreamTag name: custom-builder-image:latest output: to: kind: ImageStreamTag name: sample-custom:latest `) func testExtendedTestdataBuildsTestCustomBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestCustomBuildYaml, nil } func testExtendedTestdataBuildsTestCustomBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestCustomBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-custom-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestDockerAppDockerfile = []byte(`FROM image-registry.openshift-image-registry.svc:5000/openshift/nodejs RUN touch /tmp/foo`) func testExtendedTestdataBuildsTestDockerAppDockerfileBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestDockerAppDockerfile, nil } func testExtendedTestdataBuildsTestDockerAppDockerfile() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestDockerAppDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-app/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestDockerBuildPullsecretJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "image1", "creationTimestamp": null }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "docker-build", "creationTimestamp": null, "labels": { "name": "docker-build" } }, "spec": { "source": { "dockerfile": "FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "strategy": { "type": "Docker", "dockerStrategy": { "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "image1:latest" } } } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "docker-build-pull", "creationTimestamp": null, "labels": { "name": "docker-build-pull" } }, "spec": { "source": { "dockerfile": "FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "strategy": { "type": "Docker", "dockerStrategy": { "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from": { "kind": "ImageStreamTag", "name": "image1:latest" }, "forcePull": true } } } }] } `) func testExtendedTestdataBuildsTestDockerBuildPullsecretJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestDockerBuildPullsecretJson, nil } func testExtendedTestdataBuildsTestDockerBuildPullsecretJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestDockerBuildPullsecretJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-build-pullsecret.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestDockerBuildJson = []byte(`{ "kind":"BuildConfig", "apiVersion":"build.openshift.io/v1", "metadata":{ "name":"test", "labels":{ "name":"test" } }, "spec":{ "triggers":[ ], "source":{ "git":{ "uri":"https://github.com/sclorg/nodejs-ex" }, "dockerfile":"FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "strategy":{ "type":"Docker", "dockerStrategy":{ "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from":{ "kind":"DockerImage", "name":"image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" } } }, "output":{ "to":{ "kind":"ImageStreamTag", "name":"test:latest" }, "imageLabels":[ { "name":"user-specified-label", "value":"arbitrary-value" }, { "name":"io.k8s.display-name", "value":"overridden" }, { "name":"io.openshift.builder-version", "value":"overridden2" } ] } } } `) func testExtendedTestdataBuildsTestDockerBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestDockerBuildJson, nil } func testExtendedTestdataBuildsTestDockerBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestDockerBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestDockerNoOutputnameJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test-docker", "labels": { "name": "test-docker" } }, "spec": { "triggers": [], "source": { "type": "Git", "dockerfile": "FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "strategy": { "type": "Docker", "dockerStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" } } } } } `) func testExtendedTestdataBuildsTestDockerNoOutputnameJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestDockerNoOutputnameJson, nil } func testExtendedTestdataBuildsTestDockerNoOutputnameJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestDockerNoOutputnameJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-docker-no-outputname.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestEnvBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Binary" }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "2" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" } } } } `) func testExtendedTestdataBuildsTestEnvBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestEnvBuildJson, nil } func testExtendedTestdataBuildsTestEnvBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestEnvBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-env-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestImageStreamJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test", "creationTimestamp": null, "labels": { "color": "blue" } }, "spec": {}, "status": { "dockerImageRepository": "" } } `) func testExtendedTestdataBuildsTestImageStreamJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestImageStreamJson, nil } func testExtendedTestdataBuildsTestImageStreamJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestImageStreamJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-image-stream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestImagechangetriggersYaml = []byte(`kind: List apiVersion: v1 items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: nodejs-ex spec: tags: - name: latest from: kind: DockerImage name: registry.redhat.io/ubi8/nodejs-12:latest - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: bc-source spec: source: type: Git git: uri: https://github.com/sclorg/nodejs-ex.git strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: nodejs-ex:latest triggers: - type: ImageChange imageChange: from: kind: ImageStreamTag name: nodejs-ex:latest - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: bc-docker spec: source: type: Dockerfile dockerfile: FROM nodejs strategy: type: Docker dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: nodejs-ex:latest triggers: - type: ImageChange imageChange: from: kind: ImageStreamTag name: nodejs-ex:latest - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: bc-custom spec: strategy: type: Custom customStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: nodejs-ex:latest triggers: - type: ImageChange imageChange: from: kind: ImageStreamTag name: nodejs-ex:latest - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: bc-jenkins spec: strategy: type: Jenkins jenkinsPipelineStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" jenkinsfile: node {} triggers: - type: ImageChange imageChange: from: kind: ImageStreamTag name: nodejs-ex:latest `) func testExtendedTestdataBuildsTestImagechangetriggersYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestImagechangetriggersYaml, nil } func testExtendedTestdataBuildsTestImagechangetriggersYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestImagechangetriggersYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-imagechangetriggers.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: build.openshift.io/v1 kind: Build metadata: labels: build: imagecustombuild name: imagecustombuild spec: output: to: kind: ImageStreamTag name: imagesourceapp:latest source: git: uri: https://github.com/openshift/ruby-hello-world.git images: - from: kind: ImageStreamTag name: inputimage:latest paths: - destinationDir: injected/dir sourcePath: /usr/bin/ruby strategy: customStrategy: from: kind: ImageStreamTag name: inputimage:latest `) func testExtendedTestdataBuildsTestImageresolutionCustomBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml, nil } func testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestImageresolutionCustomBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-imageresolution-custom-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: build.openshift.io/v1 kind: Build metadata: labels: build: imagedockerbuild name: imagedockerbuild spec: output: to: kind: ImageStreamTag name: imagedockerapp:latest source: git: uri: https://github.com/openshift/ruby-hello-world.git images: - from: kind: ImageStreamTag name: inputimage:latest paths: - destinationDir: injected/dir sourcePath: /usr/bin/ruby strategy: dockerStrategy: from: kind: ImageStreamTag name: inputimage:latest `) func testExtendedTestdataBuildsTestImageresolutionDockerBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml, nil } func testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestImageresolutionDockerBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-imageresolution-docker-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: build.openshift.io/v1 kind: Build metadata: labels: build: imagesourcebuild name: imagesourcebuild spec: output: to: kind: ImageStreamTag name: imagesourceapp:latest source: git: uri: https://github.com/openshift/ruby-hello-world.git images: - from: kind: ImageStreamTag name: inputimage:latest paths: - destinationDir: injected/dir sourcePath: /usr/bin/ruby strategy: sourceStrategy: from: kind: ImageStreamTag name: inputimage:latest `) func testExtendedTestdataBuildsTestImageresolutionS2iBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml, nil } func testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestImageresolutionS2iBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-imageresolution-s2i-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestImagesourceBuildconfigYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: build: inputimage name: inputimage spec: output: to: kind: ImageStreamTag name: inputimage:latest source: dockerfile: |- # Bug 1694859: ensure symlinks are followed FROM ruby RUN mkdir -p /opt/app-root/test-links && \ ln -s ../../rh/6/root/usr/bin /opt/app-root/test-links/bin strategy: dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: ruby:3.3-ubi8 namespace: openshift - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: build: imagesourcebuild name: imagesourcebuildconfig spec: output: to: kind: ImageStreamTag name: imagesourceapp:latest source: git: uri: https://github.com/openshift/ruby-hello-world.git images: - from: kind: ImageStreamTag name: inputimage:latest paths: # Bug 1698152: ensure image source copy behavior is correct - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - destinationDir: injected/usr/bin sourcePath: /usr/bin/ruby strategy: sourceStrategy: from: kind: ImageStreamTag name: ruby:latest namespace: openshift - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: build: imagedockerbuild name: imagedockerbuildconfig spec: output: to: kind: ImageStreamTag name: imagedockerapp:latest source: git: uri: https://github.com/openshift/ruby-hello-world.git images: - from: kind: ImageStreamTag name: inputimage:latest paths: # Bug 1698152: ensure image source copy behavior is correct - destinationDir: injected/opt/app-root/test-links sourcePath: /opt/app-root/test-links/. - destinationDir: injected/usr/bin sourcePath: /usr/bin/ruby strategy: dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: inputimage spec: {} - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: imagesourceapp spec: {} - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: imagedockerapp spec: {} - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: imagesourceapp spec: replicas: 1 selector: app: imagesourceapp deploymentconfig: imagesourceapp strategy: type: Rolling template: metadata: labels: app: imagesourceapp deploymentconfig: imagesourceapp spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault containers: - image: imagePullPolicy: Always readinessProbe: httpGet: port: 8080 name: imagesourceapp ports: - containerPort: 8080 protocol: TCP - containerPort: 8888 protocol: TCP terminationMessagePath: /dev/termination-log securityContext: runAsNonRoot: true allowPrivilegeEscalation: false capabilities: drop: - ALL dnsPolicy: ClusterFirst restartPolicy: Always triggers: - imageChangeParams: automatic: true containerNames: - imagesourceapp from: kind: ImageStreamTag name: imagesourceapp:latest type: ImageChange - type: ConfigChange - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: imagedockerapp spec: replicas: 1 selector: app: imagedockerapp deploymentconfig: imagedockerapp strategy: type: Rolling template: metadata: labels: app: imagedockerapp deploymentconfig: imagedockerapp spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault containers: - image: imagePullPolicy: Always readinessProbe: httpGet: port: 8080 name: imagedockerapp ports: - containerPort: 8080 protocol: TCP - containerPort: 8888 protocol: TCP securityContext: runAsNonRoot: true allowPrivilegeEscalation: false capabilities: drop: - ALL terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always triggers: - imageChangeParams: automatic: true containerNames: - imagedockerapp from: kind: ImageStreamTag name: imagedockerapp:latest type: ImageChange - type: ConfigChange `) func testExtendedTestdataBuildsTestImagesourceBuildconfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestImagesourceBuildconfigYaml, nil } func testExtendedTestdataBuildsTestImagesourceBuildconfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestImagesourceBuildconfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-imagesource-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestNosrcBuildJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "nosrc-stream", "creationTimestamp": null }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "nosrc-build", "creationTimestamp": null }, "spec": { "triggers": [ ], "source": { }, "strategy": { "type": "Source", "sourceStrategy": { "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from": { "kind": "DockerImage", "name": "quay.io/redhat-developer/test-build-simples2i:1.2" } } } } } ] } `) func testExtendedTestdataBuildsTestNosrcBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestNosrcBuildJson, nil } func testExtendedTestdataBuildsTestNosrcBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestNosrcBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-nosrc-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestS2iBuildQuotaJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "s2i-build-quota", "creationTimestamp": null, "labels": { "name": "s2i-build-quota" } }, "spec": { "resources": { "limits": { "cpu": "400m", "memory": "400Mi" } }, "source": { "binary": { "asFile": "" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "quay.io/redhat-developer/test-build-simples2i:1.2" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "6" } ] } } } } `) func testExtendedTestdataBuildsTestS2iBuildQuotaJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestS2iBuildQuotaJson, nil } func testExtendedTestdataBuildsTestS2iBuildQuotaJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestS2iBuildQuotaJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-s2i-build-quota.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestS2iBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri":"https://github.com/sclorg/nodejs-ex" } }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "from": { "kind": "DockerImage", "name": "quay.io/redhat-developer/test-build-simples2i:1.2" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" }, "imageLabels": [ { "name": "user-specified-label", "value": "arbitrary-value" }, { "name": "io.k8s.display-name", "value": "overridden" }, { "name": "io.openshift.builder-version", "value": "overridden2" } ] } } } `) func testExtendedTestdataBuildsTestS2iBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestS2iBuildJson, nil } func testExtendedTestdataBuildsTestS2iBuildJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestS2iBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestS2iNoOutputnameJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test-sti", "labels": { "name": "test-sti" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world" } }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "from": { "kind": "DockerImage", "name": "quay.io/redhat-developer/test-build-simples2i:1.2" } } } } } `) func testExtendedTestdataBuildsTestS2iNoOutputnameJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestS2iNoOutputnameJson, nil } func testExtendedTestdataBuildsTestS2iNoOutputnameJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestS2iNoOutputnameJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-s2i-no-outputname.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsTestSymlinkBuildYaml = []byte(`kind: List apiVersion: v1 items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: symlink-is - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: symlink-bc spec: source: type: binary binary: {} strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: ImageStreamTag name: nodejs:latest namespace: openshift output: to: kind: ImageStreamTag name: symlink-is:latest `) func testExtendedTestdataBuildsTestSymlinkBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsTestSymlinkBuildYaml, nil } func testExtendedTestdataBuildsTestSymlinkBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsTestSymlinkBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/test-symlink-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mydockertest labels: name: test spec: triggers: [] runPolicy: Serial source: dockerfile: 'FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest' strategy: type: Docker dockerStrategy: env: - name: BUILD_LOGLEVEL value: "5" - name: FIELDREF_ENV valueFrom: fieldRef: fieldPath: metadata.nofield - name: CONFIGMAPKEYREF_ENV valueFrom: configMapKeyRef: name: myconfigmap key: nokey - name: SECRETKEYREF_ENV valueFrom: secretKeyRef: name: mysecret key: nousername output: to: kind: ImageStreamTag name: 'test:latest' imageLabels: - name: user-specified-label value: arbitrary-value resources: {} postCommit: {} nodeSelector: null status: lastVersion: 0 `) func testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml, nil } func testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/failed-docker-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mys2itest labels: name: test spec: triggers: [] runPolicy: Serial source: type: Git git: uri: 'https://github.com/sclorg/nodejs-ex' strategy: type: Source sourceStrategy: from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 env: - name: BUILD_LOGLEVEL value: "5" - name: FIELDREF_ENV valueFrom: fieldRef: fieldPath: metadata.nofield - name: CONFIGMAPKEYREF_ENV valueFrom: configMapKeyRef: name: myconfigmap key: nokey - name: SECRETKEYREF_ENV valueFrom: secretKeyRef: name: mysecret key: nousername output: to: kind: ImageStreamTag name: 'test:latest' imageLabels: - name: user-specified-label value: arbitrary-value resources: {} postCommit: {} nodeSelector: null status: lastVersion: 0 `) func testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml, nil } func testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/failed-sti-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mydockertest labels: name: test spec: triggers: [] runPolicy: Serial source: dockerfile: 'FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest' strategy: type: Docker dockerStrategy: env: - name: BUILD_LOGLEVEL value: "5" - name: FIELDREF_ENV valueFrom: fieldRef: fieldPath: metadata.name - name: CONFIGMAPKEYREF_ENV valueFrom: configMapKeyRef: name: myconfigmap key: mykey - name: SECRETKEYREF_ENV valueFrom: secretKeyRef: name: mysecret key: username - name: FIELDREF_CLONE_ENV value: $(FIELDREF_ENV) - name: FIELDREF_CLONE_CLONE_ENV value: $(FIELDREF_CLONE_ENV) - name: UNAVAILABLE_ENV value: $(SOME_OTHER_ENV) - name: ESCAPED_ENV value: $$(MY_ESCAPED_VALUE) output: to: kind: ImageStreamTag name: 'test:latest' imageLabels: - name: user-specified-label value: arbitrary-value resources: {} postCommit: {} nodeSelector: null status: lastVersion: 0 `) func testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml, nil } func testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/successful-docker-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mys2itest labels: name: test spec: triggers: [] runPolicy: Serial source: type: Git git: uri: 'https://github.com/sclorg/nodejs-ex' strategy: type: Source sourceStrategy: from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 env: - name: BUILD_LOGLEVEL value: "5" - name: FIELDREF_ENV valueFrom: fieldRef: fieldPath: metadata.name - name: CONFIGMAPKEYREF_ENV valueFrom: configMapKeyRef: name: myconfigmap key: mykey - name: SECRETKEYREF_ENV valueFrom: secretKeyRef: name: mysecret key: username - name: FIELDREF_CLONE_ENV value: $(FIELDREF_ENV) - name: FIELDREF_CLONE_CLONE_ENV value: $(FIELDREF_CLONE_ENV) - name: UNAVAILABLE_ENV value: $(SOME_OTHER_ENV) - name: ESCAPED_ENV value: $$(MY_ESCAPED_VALUE) output: to: kind: ImageStreamTag name: 'test:latest' imageLabels: - name: user-specified-label value: arbitrary-value resources: {} postCommit: {} nodeSelector: null status: lastVersion: 0 `) func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml, nil } func testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromTestConfigmapYaml = []byte(`apiVersion: v1 kind: ConfigMap metadata: name: myconfigmap data: mykey: myvalue `) func testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromTestConfigmapYaml, nil } func testExtendedTestdataBuildsValuefromTestConfigmapYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromTestConfigmapYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-configmap.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromTestIsJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test" } } `) func testExtendedTestdataBuildsValuefromTestIsJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromTestIsJson, nil } func testExtendedTestdataBuildsValuefromTestIsJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromTestIsJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-is.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsValuefromTestSecretYaml = []byte(`apiVersion: v1 kind: Secret metadata: name: mysecret data: password: cGFzc3dvcmQ= username: ZGV2ZWxvcGVy type: kubernetes.io/basic-auth `) func testExtendedTestdataBuildsValuefromTestSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsValuefromTestSecretYaml, nil } func testExtendedTestdataBuildsValuefromTestSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsValuefromTestSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/valuefrom/test-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesConfigmapYaml = []byte(`apiVersion: v1 data: key: my-configmap-value kind: ConfigMap metadata: name: my-configmap `) func testExtendedTestdataBuildsVolumesConfigmapYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesConfigmapYaml, nil } func testExtendedTestdataBuildsVolumesConfigmapYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesConfigmapYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/configmap.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesDockerBuildconfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mydockertest labels: name: test spec: output: to: kind: ImageStreamTag name: mydockerstream:latest postCommit: script: cat /var/run/secrets/some-secret/key; cat /var/run/configmaps/some-configmap/key triggers: [] runPolicy: Serial source: dockerfile: 'FROM quay.io/redhat-developer/test-build-simples2i:1.2' strategy: type: Docker dockerStrategy: env: - name: BUILD_LOGLEVEL value: "5" volumes: - mounts: - destinationPath: "/var/run/secrets/some-secret" name: this-secret source: secret: defaultMode: 420 secretName: my-secret type: Secret - mounts: - destinationPath: "/var/run/configmaps/some-configmap" name: this-configmap source: configMap: defaultMode: 420 name: my-configmap type: ConfigMap resources: {} nodeSelector: null status: {}`) func testExtendedTestdataBuildsVolumesDockerBuildconfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesDockerBuildconfigYaml, nil } func testExtendedTestdataBuildsVolumesDockerBuildconfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesDockerBuildconfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/docker-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesDockerDeploymentYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: name: mydockertest annotations: image.openshift.io/triggers: "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"mydockerstream:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" spec: replicas: 1 selector: matchLabels: app: mydockertest deployment: mydockertest strategy: type: RollingUpdate template: metadata: labels: app: mydockertest deployment: mydockertest spec: containers: - image: " " imagePullPolicy: Always name: mydockertest terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} `) func testExtendedTestdataBuildsVolumesDockerDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesDockerDeploymentYaml, nil } func testExtendedTestdataBuildsVolumesDockerDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesDockerDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/docker-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesDockerImagestreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: mydockerstream `) func testExtendedTestdataBuildsVolumesDockerImagestreamYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesDockerImagestreamYaml, nil } func testExtendedTestdataBuildsVolumesDockerImagestreamYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesDockerImagestreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/docker-imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesS2iBuildconfigYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: mys2itest labels: name: test spec: output: to: kind: ImageStreamTag name: mys2istream:latest postCommit: script: cat /var/run/secrets/some-secret/key; cat /var/run/configmaps/some-configmap/key triggers: [] runPolicy: Serial source: type: Binary binary: {} strategy: type: Source sourceStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 volumes: - mounts: - destinationPath: "/var/run/secrets/some-secret" name: this-secret source: secret: defaultMode: 420 secretName: my-secret type: Secret - mounts: - destinationPath: "/var/run/configmaps/some-configmap" name: this-configmap source: configMap: defaultMode: 420 name: my-configmap type: ConfigMap resources: {} nodeSelector: null status: {}`) func testExtendedTestdataBuildsVolumesS2iBuildconfigYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesS2iBuildconfigYaml, nil } func testExtendedTestdataBuildsVolumesS2iBuildconfigYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesS2iBuildconfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/s2i-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesS2iDeploymentYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: name: mys2itest annotations: image.openshift.io/triggers: "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"mys2istream:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" spec: replicas: 1 selector: matchLabels: app: mys2itest deployment: mys2itest strategy: type: RollingUpdate template: metadata: labels: app: mys2itest deployment: mys2itest spec: containers: - image: " " imagePullPolicy: Always name: mys2itest terminationMessagePath: /dev/termination-log dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} `) func testExtendedTestdataBuildsVolumesS2iDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesS2iDeploymentYaml, nil } func testExtendedTestdataBuildsVolumesS2iDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesS2iDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/s2i-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesS2iImagestreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: mys2istream `) func testExtendedTestdataBuildsVolumesS2iImagestreamYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesS2iImagestreamYaml, nil } func testExtendedTestdataBuildsVolumesS2iImagestreamYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesS2iImagestreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/s2i-imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsVolumesSecretYaml = []byte(`apiVersion: v1 data: key: bXktc2VjcmV0LXZhbHVl # my-secret-value kind: Secret metadata: name: my-secret type: Opaque `) func testExtendedTestdataBuildsVolumesSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsVolumesSecretYaml, nil } func testExtendedTestdataBuildsVolumesSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsVolumesSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/volumes/secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson = []byte(`{ "actor": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "repository": { "type": "repository", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket" }, "html": { "href": "https://api.bitbucket.org/bitbucket/bitbucket" }, "avatar": { "href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png" } }, "uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}", "project": { "type": "project", "project": "Untitled project", "uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}", "links": { "html": { "href": "https://bitbucket.org/account/user/teamawesome/projects/proj" }, "avatar": { "href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32" } }, "key": "proj" }, "full_name": "team_name/repo_name", "name": "repo_name", "website": "https://mywebsite.com/", "owner": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "scm": "git", "is_private": true }, "push": { "changes": [ { "new": { "type": "branch", "name": "this-is-not-master", "target": { "type": "commit", "hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "message": "new commit message\n", "date": "2015-06-09T03:34:49+00:00", "parents": [ { "type": "commit", "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0" } } } ], "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/branch/master" } } }, "old": { "type": "branch", "name": "this-is-not-master", "target": { "type": "commit", "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "message": "old commit message\n", "date": "2015-06-08T21:34:56+00:00", "parents": [ { "type": "commit", "hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" } } } ], "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/branch/master" } } }, "links": { "html": { "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b" } }, "created": false, "forced": false, "closed": false, "commits": [ { "hash": "03f4a7270240708834de475bcf21532d6134777e", "type": "commit", "message": "First commit", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" }, "html": { "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" } } }, { "hash": "ffffffffffffffffffffffffffffffffffffffff", "type": "commit", "message": "Second commit", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" }, "html": { "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" } } } ], "truncated": false } ] } } `) func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson, nil } func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson = []byte(`{ "actor": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "repository": { "type": "repository", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket" }, "html": { "href": "https://api.bitbucket.org/bitbucket/bitbucket" }, "avatar": { "href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png" } }, "uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}", "project": { "type": "project", "project": "Untitled project", "uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}", "links": { "html": { "href": "https://bitbucket.org/account/user/teamawesome/projects/proj" }, "avatar": { "href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32" } }, "key": "proj" }, "full_name": "team_name/repo_name", "name": "repo_name", "website": "https://mywebsite.com/", "owner": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "scm": "git", "is_private": true }, "push": { "changes": [ { "new": { "type": "branch", "name": "master", "target": { "type": "commit", "hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "message": "new commit message\n", "date": "2015-06-09T03:34:49+00:00", "parents": [ { "type": "commit", "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0" } } } ], "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/branch/master" } } }, "old": { "type": "branch", "name": "master", "target": { "type": "commit", "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "message": "old commit message\n", "date": "2015-06-08T21:34:56+00:00", "parents": [ { "type": "commit", "hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7" } } } ], "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master" }, "html": { "href": "https://bitbucket.org/user_name/repo_name/branch/master" } } }, "links": { "html": { "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" }, "diff": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b" }, "commits": { "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b" } }, "created": false, "forced": false, "closed": false, "commits": [ { "hash": "03f4a7270240708834de475bcf21532d6134777e", "type": "commit", "message": "First commit", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" }, "html": { "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" } } }, { "hash": "ffffffffffffffffffffffffffffffffffffffff", "type": "commit", "message": "Second commit", "author": { "type": "user", "username": "emmap1", "display_name": "Emma", "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}", "links": { "self": { "href": "https://api.bitbucket.org/api/2.0/users/emmap1" }, "html": { "href": "https://api.bitbucket.org/emmap1" }, "avatar": { "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png" } } }, "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e" }, "html": { "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e" } } } ], "truncated": false } ] } } `) func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson, nil } func testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson = []byte(`{ "eventKey":"repo:refs_changed", "date":"2017-09-19T09:45:32+1000", "actor":{ "name":"admin", "emailAddress":"admin@example.com", "id":1, "displayName":"Administrator", "active":true, "slug":"admin", "type":"NORMAL" }, "repository":{ "slug":"repository", "id":84, "name":"repository", "scmId":"git", "state":"AVAILABLE", "statusMessage":"Available", "forkable":true, "project":{ "key":"PROJ", "id":84, "name":"project", "public":false, "type":"NORMAL" }, "public":false }, "changes":[ { "ref":{ "id":"refs/heads/other", "displayId":"other", "type":"BRANCH" }, "refId":"refs/heads/other", "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932", "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc", "type":"UPDATE" } ] }`) func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson, nil } func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json = []byte(`{ "eventKey":"repo:refs_changed", "date":"2017-09-19T09:45:32+1000", "actor":{ "name":"admin", "emailAddress":"admin@example.com", "id":1, "displayName":"Administrator", "active":true, "slug":"admin", "type":"NORMAL" }, "repository":{ "slug":"repository", "id":84, "name":"repository", "scmId":"git", "state":"AVAILABLE", "statusMessage":"Available", "forkable":true, "project":{ "key":"PROJ", "id":84, "name":"project", "public":false, "type":"NORMAL" }, "public":false }, "changes":[ { "ref":{ "id":"refs/heads/master", "displayId":"master", "type":"BRANCH" }, "refId":"refs/heads/master", "fromHash":"ecddabb624f6f5ba43816f5926e580a5f680a932", "toHash":"178864a7d521b6f5e720b386b2c2b0ef8563e0dc", "type":"UPDATE" } ] }`) func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json, nil } func testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54JsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson = []byte(`{ "type": "Git", "git": { "author": {}, "committer": {}, "refs": [ { "ref": "refs/heads/master", "commit": "2602ace61490de0513dfbd7c7de949356cf9bd17", "author": { "name": "Joe Smith", "email": "joe.smith@gmail.com" }, "committer": { "name": "Joe Smith", "email": "joe.smith@gmail.com" }, "message": "Merge pull request #31 from mnagy/prepare_for_new_mysql_image\n\nPrepare for new centos/mysql-56-centos7 image" } ] } }`) func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson, nil } func testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson = []byte(`{ "type" : "Git", "git" : { "uri" : "https://mygitserver/myrepo.git", "ref" : "refs/heads/master", "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", "message" : "Random act of kindness", "author" : { "name" : "Jon Doe", "email" : "jondoe@email.com" }, "committer" : { "name" : "Jon Doe", "email" : "jondoe@email.com" } }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } `) func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson, nil } func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml = []byte(`--- type: "Git" git: uri: "https://mygitserver/myrepo.git" ref: "refs/heads/master" commit: "9bdc3a26ff933b32f3e558636b58aea86a69f051" message: "Random act of kindness" author: name: "Jon Doe" email: "jondoe@email.com" committer: name: "Jon Doe" email: "jondoe@email.com" env: - name: "EXAMPLE" value: "sample-app" `) func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml, nil } func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson = []byte(`{ "type" : "Git", "git" : { "uri" : "https://mygitserver/myrepo.git", "ref" : "refs/heads/master", "commit" : "9bdc3a26ff933b32f3e558636b58aea86a69f051", "message" : "Random act of kindness", "author" : { "name" : "Jon Doe", "email" : "jondoe@email.com" }, "committer" : { "name" : "Jon Doe", "email" : "jondoe@email.com" } } } `) func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson, nil } func testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-generic.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson = []byte(`{ "object_kind":"push", "before":"cf1fa898d2a78685ccde72f14b4922b474f73cd1", "after":"2602ace61490de0513dfbd7c7de949356cf9bd17", "ref":"refs/heads/master", "checkout_sha":"2602ace61490de0513dfbd7c7de949356cf9bd17", "message":null, "user_id":12345, "user_name":"Jon Doe", "user_email":"jondoe@email.com", "project_id":12345, "repository":{ "name":"ruby-hello-world", "url":"git@gitlab.com:jondoe/repo.git", "description":"", "homepage":"https://gitlab.com/jondoe/repo", "git_http_url":"https://gitlab.com/jondoe/repo", "git_ssh_url":"git@gitlab.com:jondoe/repo", "visibility_level":20 }, "commits":[ { "id":"2602ace61490de0513dfbd7c7de949356cf9bd17", "message":"Random act of kindness", "timestamp":"2015-03-17T09:23:58+01:00", "url":"https://gitlab.com/jondoe/repo/commit/2602ace61490de0513dfbd7c7de949356cf9bd17", "author":{ "name":"Jon Doe", "email":"jondoe@email.com" } } ], "total_commits_count":3 } `) func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson, nil } func testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson = []byte(`{ "zen":"Encourage flow.", "hook":{ "url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466", "test_url":"https://api.github.com/repos/anonUser/anonRepo/hooks/2896466/test", "id":2896466, "name":"web", "active":true, "events":[ "push" ], "config":{ "secret":"", "url":"http://example.com/gitwebhook", "content_type":"json", "insecure_ssl":"0" }, "last_response":{ "code":null, "status":"unused", "message":null }, "updated_at":"2014-08-28T14:25:47Z", "created_at":"2014-08-28T14:25:47Z" }, "hook_id":2896466 } `) func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson, nil } func testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPingeventJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pingevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson = []byte(`{ "ref":"refs/heads/my_other_branch", "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051", "before":"0000000000000000000000000000000000000000", "created":true, "deleted":false, "forced":true, "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", "commits":[ { "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", "distinct":true, "message":"Added license", "timestamp":"2014-08-28T16:55:36+02:00", "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", "author":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "committer":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "added":[ "LICENSE" ], "removed":[ ], "modified":[ ] } ], "head_commit":{ "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", "distinct":true, "message":"Added license", "timestamp":"2014-08-28T16:55:36+02:00", "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", "author":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "committer":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "added":[ "LICENSE" ], "removed":[ ], "modified":[ ] }, "repository":{ "id":23354788, "name":"anonRepo", "full_name":"anonUser/anonRepo", "owner":{ "name":"anonUser", "email":"anonUser@example.com" }, "private":false, "html_url":"https://github.com/anonUser/anonRepo", "description":"Git webhook implementation in Go.", "fork":false, "url":"https://github.com/anonUser/anonRepo", "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks", "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams", "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks", "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", "events_url":"https://api.github.com/repos/anonUser/anonRepo/events", "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags", "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages", "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers", "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors", "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers", "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription", "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}", "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges", "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads", "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}", "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}", "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}", "created_at":1409063699, "updated_at":"2014-08-26T14:34:59Z", "pushed_at":1409238007, "git_url":"https://github.com/anonUser/anonRepo.git", "ssh_url":"git@github.com:anonUser/anonRepo.git", "clone_url":"https://github.com/anonUser/anonRepo.git", "svn_url":"https://github.com/anonUser/anonRepo", "homepage":null, "size":0, "stargazers_count":0, "watchers_count":0, "language":null, "has_issues":true, "has_downloads":true, "has_wiki":true, "forks_count":0, "mirror_url":null, "open_issues_count":0, "forks":0, "open_issues":0, "watchers":0, "default_branch":"master", "stargazers":0, "master_branch":"master" }, "pusher":{ "name":"anonUser", "email":"anonUser@example.com" } } `) func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson, nil } func testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson = []byte(`{ "ref":"refs/heads/master", "after":"9bdc3a26ff933b32f3e558636b58aea86a69f051", "before":"0000000000000000000000000000000000000000", "created":true, "deleted":false, "forced":true, "compare":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff93", "commits":[ { "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", "distinct":true, "message":"Added license", "timestamp":"2014-08-28T16:55:36+02:00", "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", "author":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "committer":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "added":[ "LICENSE" ], "removed":[ ], "modified":[ ] } ], "head_commit":{ "id":"9bdc3a26ff933b32f3e558636b58aea86a69f051", "distinct":true, "message":"Added license", "timestamp":"2014-08-28T16:55:36+02:00", "url":"https://github.com/anonUser/anonRepo/commit/9bdc3a26ff933b32f3e558636b58aea86a69f051", "author":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "committer":{ "name":"Anonymous User", "email":"anonUser@example.com" }, "added":[ "LICENSE" ], "removed":[ ], "modified":[ ] }, "repository":{ "id":23354788, "name":"anonRepo", "full_name":"anonUser/anonRepo", "owner":{ "name":"anonUser", "email":"anonUser@example.com" }, "private":false, "html_url":"https://github.com/anonUser/anonRepo", "description":"Git webhook implementation in Go.", "fork":false, "url":"https://github.com/anonUser/anonRepo", "forks_url":"https://api.github.com/repos/anonUser/anonRepo/forks", "keys_url":"https://api.github.com/repos/anonUser/anonRepo/keys{/key_id}", "collaborators_url":"https://api.github.com/repos/anonUser/anonRepo/collaborators{/collaborator}", "teams_url":"https://api.github.com/repos/anonUser/anonRepo/teams", "hooks_url":"https://api.github.com/repos/anonUser/anonRepo/hooks", "issue_events_url":"https://api.github.com/repos/anonUser/anonRepo/issues/events{/number}", "events_url":"https://api.github.com/repos/anonUser/anonRepo/events", "assignees_url":"https://api.github.com/repos/anonUser/anonRepo/assignees{/user}", "branches_url":"https://api.github.com/repos/anonUser/anonRepo/branches{/branch}", "tags_url":"https://api.github.com/repos/anonUser/anonRepo/tags", "blobs_url":"https://api.github.com/repos/anonUser/anonRepo/git/blobs{/sha}", "git_tags_url":"https://api.github.com/repos/anonUser/anonRepo/git/tags{/sha}", "git_refs_url":"https://api.github.com/repos/anonUser/anonRepo/git/refs{/sha}", "trees_url":"https://api.github.com/repos/anonUser/anonRepo/git/trees{/sha}", "statuses_url":"https://api.github.com/repos/anonUser/anonRepo/statuses/{sha}", "languages_url":"https://api.github.com/repos/anonUser/anonRepo/languages", "stargazers_url":"https://api.github.com/repos/anonUser/anonRepo/stargazers", "contributors_url":"https://api.github.com/repos/anonUser/anonRepo/contributors", "subscribers_url":"https://api.github.com/repos/anonUser/anonRepo/subscribers", "subscription_url":"https://api.github.com/repos/anonUser/anonRepo/subscription", "commits_url":"https://api.github.com/repos/anonUser/anonRepo/commits{/sha}", "git_commits_url":"https://api.github.com/repos/anonUser/anonRepo/git/commits{/sha}", "comments_url":"https://api.github.com/repos/anonUser/anonRepo/comments{/number}", "issue_comment_url":"https://api.github.com/repos/anonUser/anonRepo/issues/comments/{number}", "contents_url":"https://api.github.com/repos/anonUser/anonRepo/contents/{+path}", "compare_url":"https://api.github.com/repos/anonUser/anonRepo/compare/{base}...{head}", "merges_url":"https://api.github.com/repos/anonUser/anonRepo/merges", "archive_url":"https://api.github.com/repos/anonUser/anonRepo/{archive_format}{/ref}", "downloads_url":"https://api.github.com/repos/anonUser/anonRepo/downloads", "issues_url":"https://api.github.com/repos/anonUser/anonRepo/issues{/number}", "pulls_url":"https://api.github.com/repos/anonUser/anonRepo/pulls{/number}", "milestones_url":"https://api.github.com/repos/anonUser/anonRepo/milestones{/number}", "notifications_url":"https://api.github.com/repos/anonUser/anonRepo/notifications{?since,all,participating}", "labels_url":"https://api.github.com/repos/anonUser/anonRepo/labels{/name}", "releases_url":"https://api.github.com/repos/anonUser/anonRepo/releases{/id}", "created_at":1409063699, "updated_at":"2014-08-26T14:34:59Z", "pushed_at":1409238007, "git_url":"https://github.com/anonUser/anonRepo.git", "ssh_url":"git@github.com:anonUser/anonRepo.git", "clone_url":"https://github.com/anonUser/anonRepo.git", "svn_url":"https://github.com/anonUser/anonRepo", "homepage":null, "size":0, "stargazers_count":0, "watchers_count":0, "language":null, "has_issues":true, "has_downloads":true, "has_wiki":true, "forks_count":0, "mirror_url":null, "open_issues_count":0, "forks":0, "open_issues":0, "watchers":0, "default_branch":"master", "stargazers":0, "master_branch":"master" }, "pusher":{ "name":"anonUser", "email":"anonUser@example.com" } } `) func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson, nil } func testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGithubTestdataPusheventJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/github/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson = []byte(`{ "object_kind": "push", "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "ref": "refs/heads/my_other_branch", "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "user_id": 4, "user_name": "John Smith", "user_email": "john@example.com", "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80", "project_id": 15, "project":{ "name":"Diaspora", "description":"", "web_url":"http://example.com/mike/diaspora", "avatar_url":null, "git_ssh_url":"git@example.com:mike/diaspora.git", "git_http_url":"http://example.com/mike/diaspora.git", "namespace":"Mike", "visibility_level":0, "path_with_namespace":"mike/diaspora", "default_branch":"master", "homepage":"http://example.com/mike/diaspora", "url":"git@example.com:mike/diaspora.git", "ssh_url":"git@example.com:mike/diaspora.git", "http_url":"http://example.com/mike/diaspora.git" }, "repository":{ "name": "Diaspora", "url": "git@example.com:mike/diaspora.git", "description": "", "homepage": "http://example.com/mike/diaspora", "git_http_url":"http://example.com/mike/diaspora.git", "git_ssh_url":"git@example.com:mike/diaspora.git", "visibility_level":0 }, "commits": [ { "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", "message": "Update Catalan translation to e38cb41.", "timestamp": "2011-12-12T14:27:31+02:00", "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", "author": { "name": "Jordi Mallach", "email": "jordi@softcatala.org" }, "added": ["CHANGELOG"], "modified": ["app/controller/application.rb"], "removed": [] }, { "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "message": "fixed readme", "timestamp": "2012-01-03T23:36:29+02:00", "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "author": { "name": "GitLab dev user", "email": "gitlabdev@dv6700.(none)" }, "added": ["CHANGELOG"], "modified": ["app/controller/application.rb"], "removed": [] } ], "total_commits_count": 4 } `) func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson, nil } func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson = []byte(`{ "object_kind": "push", "before": "95790bf891e76fee5e1747ab589903a6a1f80f22", "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "ref": "refs/heads/master", "checkout_sha": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "user_id": 4, "user_name": "John Smith", "user_email": "john@example.com", "user_avatar": "https://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=8://s.gravatar.com/avatar/d4c74594d841139328695756648b6bd6?s=80", "project_id": 15, "project":{ "name":"Diaspora", "description":"", "web_url":"http://example.com/mike/diaspora", "avatar_url":null, "git_ssh_url":"git@example.com:mike/diaspora.git", "git_http_url":"http://example.com/mike/diaspora.git", "namespace":"Mike", "visibility_level":0, "path_with_namespace":"mike/diaspora", "default_branch":"master", "homepage":"http://example.com/mike/diaspora", "url":"git@example.com:mike/diaspora.git", "ssh_url":"git@example.com:mike/diaspora.git", "http_url":"http://example.com/mike/diaspora.git" }, "repository":{ "name": "Diaspora", "url": "git@example.com:mike/diaspora.git", "description": "", "homepage": "http://example.com/mike/diaspora", "git_http_url":"http://example.com/mike/diaspora.git", "git_ssh_url":"git@example.com:mike/diaspora.git", "visibility_level":0 }, "commits": [ { "id": "b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", "message": "Update Catalan translation to e38cb41.", "timestamp": "2011-12-12T14:27:31+02:00", "url": "http://example.com/mike/diaspora/commit/b6568db1bc1dcd7f8b4d5a946b0b91f9dacd7327", "author": { "name": "Jordi Mallach", "email": "jordi@softcatala.org" }, "added": ["CHANGELOG"], "modified": ["app/controller/application.rb"], "removed": [] }, { "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "message": "fixed readme", "timestamp": "2012-01-03T23:36:29+02:00", "url": "http://example.com/mike/diaspora/commit/da1560886d4f094c3e6c9ef40349f7d38b5d27d7", "author": { "name": "GitLab dev user", "email": "gitlabdev@dv6700.(none)" }, "added": ["CHANGELOG"], "modified": ["app/controller/application.rb"], "removed": [] } ], "total_commits_count": 4 } `) func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() ([]byte, error) { return _testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson, nil } func testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson() (*asset, error) { bytes, err := testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCliTestReleaseImageReferencesJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "4.13.0-rc.0", "creationTimestamp": "2023-03-20T15:10:52Z", "annotations": { "release.openshift.io/from-image-stream": "ocp/4.13-art-latest-2023-03-19-052243", "release.openshift.io/from-release": "registry.ci.openshift.org/ocp/release:4.13.0-0.nightly-2023-03-19-052243" } }, "spec": { "lookupPolicy": { "local": false }, "tags": [ { "name": "agent-installer-api-server", "annotations": { "io.openshift.build.commit.id": "869bbf48e516af94a80cd351327c08aefb5b563b", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/assisted-service" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:be61fad30e596cfadc440081c6b97c9c7b31dfd41b333e3916b5eca84663009c" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "agent-installer-csr-approver", "annotations": { "io.openshift.build.commit.id": "6160d18379195ac3f65ab3898429936a95522fd0", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/assisted-installer" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:23e31102f5390e60b7a72023ea6c7667d405e42dd83735fca1f0f96cf671a82e" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "agent-installer-node-agent", "annotations": { "io.openshift.build.commit.id": "2bfea2c7035757cdb1e58fa9f854b56ac6d62366", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/assisted-installer-agent" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c5d46e66f6ed6640db15a4d2c47b75976a42bdedd953656e89bf3298fbd0d50f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "agent-installer-orchestrator", "annotations": { "io.openshift.build.commit.id": "6160d18379195ac3f65ab3898429936a95522fd0", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/assisted-installer" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ca81e1f40fd6b49ce87b9d5cb2e90e4020b112f725d63b0e14c6b4a6f6f97cba" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "alibaba-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "b5200baa784513b77437809c63fcc80cfd53c9df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-alibaba-cloud" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ee53132cfdc5ae6c65e35b947422e4a0e81f5fbf5d3916e679ec382c31b869fb" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "alibaba-cloud-csi-driver", "annotations": { "io.openshift.build.commit.id": "68c0ecfcdcfaa375450f0af1b7f8c6083e3f122f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/alibaba-cloud-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:773580ce51a55c984aecc8088b11b24f2fd3bfbd67f16306148c9f4ce898e5ab" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "alibaba-disk-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "0f4b92ab502068edc6cad4c0d070f44c06842092", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/alibaba-disk-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:aca1aa1ee037086cc4c327d5ff87f3e7f7d8dc6e90ef09f3b29f26934a85e9e4" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "alibaba-machine-controllers", "annotations": { "io.openshift.build.commit.id": "4c0f96a692dee91100d7085c05a68f3efb7e281d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-alibaba" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6aca4be4556f9641c76e6be2bceb370d83a82a9f894e7e2314505ead9da270ff" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "apiserver-network-proxy", "annotations": { "io.openshift.build.commit.id": "61e198ca00b9426e2f7309cf2818ac74426486ff", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/apiserver-network-proxy" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8e0680bd4f38dd06caef26c0dd80a88fcd181cef3525452bf34ba9e11327ab5f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "aws-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "946daa07dbf49c4a1860a1c3fc4c05fa685c6590", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-aws" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:43ce153beba81e30ca2cf4f513c2ecbf992368077c43c09069adbc195b4aa95a" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "aws-cluster-api-controllers", "annotations": { "io.openshift.build.commit.id": "4251ed32deecad37706c6b90ecb187882386609a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-aws" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:326887644764547f3d81d5dc35615a4bef5005b68f1864e68f1c63b3143d88ad" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "aws-ebs-csi-driver", "annotations": { "io.openshift.build.commit.id": "d8fa531075bd9e3da26a58e05fc906bc84e2625e", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/aws-ebs-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:57f524dade9dfab2170d530abeba6be1c2d65e5651ac927307376358572b2140" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "aws-ebs-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "03aebf48c71bdfd1e32f2ab48b38b029b1a7681d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/aws-ebs-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:189279778e9140f0b47f3e8c58ac6262cf1dbe573ae1a651e8a6e675b7d7b369" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "aws-machine-controllers", "annotations": { "io.openshift.build.commit.id": "9c6a95fea21143b255479a1d142da839794a3dcc", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-aws" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c9f622d5408462011492d823946b98c1043c08d2ecf2a264dc9d90f48084a9c8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "aws-pod-identity-webhook", "annotations": { "io.openshift.build.commit.id": "4969655df4169f19092e173b16c56c79d3a3383e", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/aws-pod-identity-webhook" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4e248571068c87bc5b2f69bd4fc2bc3934d8bcd2b2a7fecadc754a30e06ac592" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "ce2ddad6686e14327c3b27befbf8c46b1b2dc68c", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-azure" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e2592c9a914d389bed20e0e192e0dedede67c1da1f77074eccad2845350c214f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-cloud-node-manager", "annotations": { "io.openshift.build.commit.id": "ce2ddad6686e14327c3b27befbf8c46b1b2dc68c", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-azure" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b20a087288d9c99e571d216218403f22112fc15f1181a45e9bb2db91866cca4f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-cluster-api-controllers", "annotations": { "io.openshift.build.commit.id": "9885d4d37ed74d764eb83a826f3a7b013ed83d12", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-azure" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a424d7a7602bf21e61fb75436a5c6936d84d4d08f85e3204cfcd103c1e7f2373" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-disk-csi-driver", "annotations": { "io.openshift.build.commit.id": "202e8afa8f1899d4cd1843d9e09cf8832ae0eff7", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/azure-disk-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6f033c6e704ad25934a8c8f1551f0cf8a7399fffc9ba2818e65b58dd65a65506" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-disk-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "67bda47232a73fe3877815d7901353f4f74ebeb0", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/azure-disk-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c15be489e34dcb43fee4eddc8770883552dd104f6d5950e13725f8bfe9d42a2f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-file-csi-driver", "annotations": { "io.openshift.build.commit.id": "fd94a035e3d9dedce048f7e5f271e7ed6bea822f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/azure-file-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d99d909234985991021d286a19449852115b75ec3c5898c90a475523d15c9d74" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-file-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "994c32c927a69df33f83aed440cc150e8d270341", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/azure-file-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f335e6c8d5a7022e4763c1e6a93ba7cc338893ab05033ff064835800c1baac5b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "azure-machine-controllers", "annotations": { "io.openshift.build.commit.id": "3405d8c4b87fc22a5ac355cd4a9611a38aa1f3cc", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-azure" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:88abbe74050a26898b1df159639198b71ed035f414a054a1400e9e87f41881f6" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "baremetal-installer", "annotations": { "io.openshift.build.commit.id": "f11c21e5e98c0f19516a0c0b13b8350a8f636b36", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/installer" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:0e7f7901b263d03790b777eab79b956ca1c84bfa412a2e435f6d4956233cbe17" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "baremetal-machine-controllers", "annotations": { "io.openshift.build.commit.id": "0a751899f22b8d17ed4e0c3c029739b30d02cce3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-baremetal" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:83745caa069d90bf5cd873492b41996c317f32be1c0b78ef22d2d5940d3b3140" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "baremetal-operator", "annotations": { "io.openshift.build.commit.id": "8e073a67123ad0a81e04780801b718440f1c1699", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/baremetal-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cf910fdbc632ea976338b6d0d098537e5e4531407326744523ad378f0e848cfa" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "baremetal-runtimecfg", "annotations": { "io.openshift.build.commit.id": "5847e8945c4997c5257c9f4f74cde0800e555866", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/baremetal-runtimecfg" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d6e932edff04477fe06480dba7598c4363a4328939165db36e07a6a1094295cb" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cli", "annotations": { "io.openshift.build.commit.id": "eed143055ede731029931ad204b19cd2f565ef1a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oc" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c66da0adc83e5e6db1824ff5cf204610d36f29fc0c7a8352b24795f58151eefe" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cli-artifacts", "annotations": { "io.openshift.build.commit.id": "eed143055ede731029931ad204b19cd2f565ef1a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oc" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ec5351e220112a5b70451310b563175ae713c4d2864765c861b969730515a21b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cloud-credential-operator", "annotations": { "io.openshift.build.commit.id": "65ec23ac0053c16a9a7b3c61af088c81b19b9f76", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-credential-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:023392c216b04a82b69315c210827b2776d95583bee16754f55577573553cad4" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cloud-network-config-controller", "annotations": { "io.openshift.build.commit.id": "f4aeb704324972cf816f74a8a96534fd17c0c549", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-network-config-controller" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:737fbb45ea282de2eba6ed7c7e0112d62d31a74ed0dc6b9d0b1ad01975227945" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-authentication-operator", "annotations": { "io.openshift.build.commit.id": "453de141dcf9d0ac95d45cee1c8112f539ba3a24", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-authentication-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c8b9deb101306eca89fb04662fd5266a3704ad19d6e54cae5ae79e373c0ec62d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-autoscaler", "annotations": { "io.openshift.build.commit.id": "c58c53bf7a82ee46414c7f7c0f2e0e438da93eeb", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kubernetes-autoscaler" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c467b900f27e1ca4c5dc1aecca5080951091eb4570cb92d88ab190057e86b98b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-autoscaler-operator", "annotations": { "io.openshift.build.commit.id": "99a0e2bacb4beacc58ea0c203c247f35fdf57ee1", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-autoscaler-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1b696ffc14cdc67e31403d1a6308c7448d7970ed7f872ec18fea9c2017029814" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-baremetal-operator", "annotations": { "io.openshift.build.commit.id": "53d370a7c26b1b7fefbd445a9522ba4250651702", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-baremetal-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a4f74849d28d578b213bb837750fbc967abe1cf433ad7611dde27be1f15baf36" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-bootstrap", "annotations": { "io.openshift.build.commit.id": "49fe1bdba1ab15b1a89797d7bb1d4d66de57fbeb", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-bootstrap" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:86c881be1f36093222cafe3ca1fe4ab87078bfcb679365f464fecc79d4927226" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-capi-controllers", "annotations": { "io.openshift.build.commit.id": "0142186bad9acc2d7950663129a4ef82c32a5610", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4680640d747de1f13f7139d352900f04c2a3411d82e29aa787c3cef5cbbb1c7c" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-capi-operator", "annotations": { "io.openshift.build.commit.id": "eb2c1be0761ee00620c7170ee6ec82edd3bd5f62", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-capi-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d22c10405c7b525b1fe7c4f4a196280ff437fd9fbc97bb66bf544fc2f5e89c1f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-cloud-controller-manager-operator", "annotations": { "io.openshift.build.commit.id": "96d7eab7aff0bc4f1da46d994891e8aca298343d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-cloud-controller-manager-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:77345c48a82b167f67364ffd41788160b5d06e746946d9ea67191fa18cf34806" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-config-operator", "annotations": { "io.openshift.build.commit.id": "4aa594ce8515f8780e7271d46e8d3da07ea27e0b", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-config-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6eca04bc4045ccf6694e6e0c94453e9c1d8dcbb669a58419603b3c2aab18488b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-control-plane-machine-set-operator", "annotations": { "io.openshift.build.commit.id": "2c110ec111fe3a791983d6935fc0d398ca626297", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-control-plane-machine-set-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:278a7aba8f50daaaa56984563a5ca591493989e3353eda2da9516f45a35ee7ed" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-csi-snapshot-controller-operator", "annotations": { "io.openshift.build.commit.id": "22d0f40fd1d1d13ce10c6a09039be9a20e275878", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-csi-snapshot-controller-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:85e377fa5f92f13c07ca57eeaa575f7ef80ed954ae231f70ca70bfbe173b070b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-dns-operator", "annotations": { "io.openshift.build.commit.id": "d96022a4d0d091955d73e7e99fc8cc81db56c86a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-dns-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ecfd2df94486e0570eeb0f88a5696ecaa0e1e54bc67d342aab3a6167863175fe" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-etcd-operator", "annotations": { "io.openshift.build.commit.id": "aaeed42bd30481fafb0258b3522abc02986fa8e1", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-etcd-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d5f169ad45e402da4067e53b4821e0ff888012716b072013145cf3d09d14fa88" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-image-registry-operator", "annotations": { "io.openshift.build.commit.id": "86635851e94d656cddecabf4c13ef31b90d3e994", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-image-registry-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d049299956446154ed1d1c21e5d4561bb452b41f6c3bf17a48f3550a2c998cbe" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-ingress-operator", "annotations": { "io.openshift.build.commit.id": "6aa482c551de22016dc2b6c87ca11ef4ac2be04d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-ingress-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6de5d1e6d774c20a0c3bd4d4c544234519bc4528e5535f24d0cf78a6788b4056" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-kube-apiserver-operator", "annotations": { "io.openshift.build.commit.id": "5cec361179f3658986890a87d0b51f40a1da89ad", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-kube-apiserver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7816a6f699e70da73dcee8a12e526ad0b234f6ced09ded67d81d55db54b577c9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-kube-cluster-api-operator", "annotations": { "io.openshift.build.commit.id": "b8428eb60d727565fefa4e37c845d704913cf0c5", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3c9948ba348597c53edd064e84f39326ab25829be83ad116a29110c0f82f005d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-kube-controller-manager-operator", "annotations": { "io.openshift.build.commit.id": "4ca346ef97def3697f1aa0368c9b35459b9b2f59", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-kube-controller-manager-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:23c30c160f461075478682516ada5b744edc1a68f24b89b7066693afccf3333f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-kube-scheduler-operator", "annotations": { "io.openshift.build.commit.id": "d3978864fb58063235be176c18fe50457b5223f3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-kube-scheduler-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4c52e0d353383738834a2786a775a7b58a504abc15118dfd8db5cb5a233f802f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-kube-storage-version-migrator-operator", "annotations": { "io.openshift.build.commit.id": "9f475980d1e6a70f0e9400aec6f15e5f5a6132b6", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-kube-storage-version-migrator-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:fc8e1a30ec145b1e91f862880b9866d48abe8056fe69edd94d760739137b6d4a" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-machine-approver", "annotations": { "io.openshift.build.commit.id": "d0d9df7e0463c05e4aa59452d0a69a97f06b6190", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-machine-approver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:90fd3983343e366cb4df6f35efa1527e4b5da93e90558f23aa416cb9c453375e" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-monitoring-operator", "annotations": { "io.openshift.build.commit.id": "45815e820f0a751bef4a42b96c53ff0fc16978ec", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-monitoring-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9a1e35d8ae26fad862261135aaaa0658befbaccf9ffba55291dc4e8a95c20546" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-network-operator", "annotations": { "io.openshift.build.commit.id": "040d5efed272789341b16858f63c2d0bcdb71b50", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-network-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5d8e73d86d1b77620f415e1552aaccc3b38aa2959467df2ebe586bd9a7e11892" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-node-tuning-operator", "annotations": { "io.openshift.build.commit.id": "61ed06ca1249b3ff7c16da11988498a659c91fd3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-node-tuning-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e3f88ca4f79ec5b7e3a2323f32da8564c02bbd269ff1e87ad3ad602df95a8106" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-openshift-apiserver-operator", "annotations": { "io.openshift.build.commit.id": "304a06d06a70b56d7f99042c5384b4ffb9287e16", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-openshift-apiserver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:55b8c96568666d4340d71558c31742bd8b5c02ab0cca7913fa41586d5f2de697" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-openshift-controller-manager-operator", "annotations": { "io.openshift.build.commit.id": "7867c26e6c91e2cc279317dfc080befe63a60749", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-openshift-controller-manager-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:aa8066a640500eaaf14c73b769e8792c0b420a927adb8db98ec47d9440a85d32" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-platform-operators-manager", "annotations": { "io.openshift.build.commit.id": "42b454506fc84dc0ff34713dbe34ad89fcf961ac", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/platform-operators" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ac6ad44dece9b419527e047c54b033f1897d9ae3d5c9b57166952650ac8293f9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-policy-controller", "annotations": { "io.openshift.build.commit.id": "ac01e3463245f2dd9312145368d7f4099a8a0bb9", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-policy-controller" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:40fec19020202ba3b7f09460bc0cb52fc001941fbb3a3fa7d1ca34a2e9ebf0e9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-samples-operator", "annotations": { "io.openshift.build.commit.id": "03b7091c58c02c20a8b218f2373812d6c62e20ea", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-samples-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b3066c35df5c02d6013ee2944ff5d100cdf41fb0d25076ce846d6e094b36d45c" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-storage-operator", "annotations": { "io.openshift.build.commit.id": "e8b9f8ee17a5687878c7ac2e65f44f4ee4c5f8e5", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-storage-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:2a4719dd49c67aa02ad187264977e0b64ad2b0d6725e99b1d460567663961ef4" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-update-keys", "annotations": { "io.openshift.build.commit.id": "2796e1732615521e818be82663058e0a3f1b3941", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-update-keys" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8876a35e2920d5751133b611cfa3b51aa9d96f06933dbe05635a924a9c39ba4c" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "cluster-version-operator", "annotations": { "io.openshift.build.commit.id": "7e34cd1a936ddba872fd8ed4dd8ed43d1065b631", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-version-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8dcd7fa3602050dab6844799713f283cc43cc664204be55aa9073d64d14084c4" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "configmap-reloader", "annotations": { "io.openshift.build.commit.id": "9adad592e7d9bd5a723add16488e68365a64977f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/configmap-reload" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5e8ca6243af10b08be45460ba07a74a9ba0d3d150ac23b3d6e926c395450b0c1" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "console", "annotations": { "io.openshift.build.commit.id": "9bee14b4c9443ae36847bc99f650fb4d1fe053f3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/console" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:2f8ed86b29b0df00f0cfb8b6d170e5fa8d9b0092ee92140788ec5a0a1eb60a10" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "console-operator", "annotations": { "io.openshift.build.commit.id": "91684e461ad99334fb12fc4041746128b14c4dae", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/console-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e6dd6ba37d430e9e8e248b4c5911ef0903f8bd8d05451ed65eeb1d9d2b3c42e4" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "container-networking-plugins", "annotations": { "io.openshift.build.commit.id": "4655073266cb14756783bb06378224048f0dd3e3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/containernetworking-plugins" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:be088cb9218a248cd4a616132c8daf531502c7b85404aadb0b73e76f8dba01df" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "coredns", "annotations": { "io.openshift.build.commit.id": "5560e4ad8c343c211f0b2f9d85ce7331b20b87cb", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/coredns" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a604c96952da5e59f104a305e0c8303d474e33ef345b8c534fd677f189d05299" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-driver-manila", "annotations": { "io.openshift.build.commit.id": "af5c48da935694ed5263a5a163318b52564977df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-openstack" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:54768f02635c0915ee01f3ec667a3bbf03cb96a75d57198319699d6cd8ca916b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-driver-manila-operator", "annotations": { "io.openshift.build.commit.id": "e540ced4cc5deba7ce3309931d797fe9eb8b9573", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-driver-manila-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c90152758a4418ba6321b0c7784375f83dea60111b1255634fe398d92703cf8e" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-driver-nfs", "annotations": { "io.openshift.build.commit.id": "2b914c2161722ebf11f9275fa29e00a0b1306da1", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-driver-nfs" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6bdeeb8f791a20b4bf5da39869b1ef9e6a3250d1ee67dda7f34a308be2c201fb" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-driver-shared-resource", "annotations": { "io.openshift.build.commit.id": "d4685ceb2b13ac6ce60e1b7997a99dea7173649d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-driver-shared-resource" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:baad49891aba4931054081f4d87e545313ef736c9b5c4567e24b7800f6ad0725" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-driver-shared-resource-operator", "annotations": { "io.openshift.build.commit.id": "fedb7b7ff15a02986d54276b87173c5cd5e41f46", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-driver-shared-resource-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:fdcacc80d1741848bfb5e2a71fc849ae52513ddd272abf89b9da444a87e90f48" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-driver-shared-resource-webhook", "annotations": { "io.openshift.build.commit.id": "d4685ceb2b13ac6ce60e1b7997a99dea7173649d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-driver-shared-resource" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1080935300ee25959cc2dc4d3f4e2c54cdc0db99c2c3b7e5ee2123d4698845bf" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-external-attacher", "annotations": { "io.openshift.build.commit.id": "335d78a21fd46fc7faea74b7716f66f112da8eaf", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-external-attacher" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:726ed98ed8df6da72ea0aaecf62714470ad60d9e5665b65286271e92e4f46c1d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-external-provisioner", "annotations": { "io.openshift.build.commit.id": "0dc83f5f1bd118247eaf0f91030c321da9c88aa3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-external-provisioner" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:77941761aca0cba770d56fcf4d213512b4dd959aa49d3f50c9da02a7aee8d62e" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-external-resizer", "annotations": { "io.openshift.build.commit.id": "3b2067091212995ce901d65504e794177632c55c", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-external-resizer" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:66daa08f96501fa939342eafe2de7be5307656a3ff3ec9bde82664905c695bb6" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-external-snapshotter", "annotations": { "io.openshift.build.commit.id": "e7114303c69b82fec51ab65ba15ec7b58be3b12f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-external-snapshotter" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:281a8f2be0f5afefc956d758928a761a97ac9a5b3e1f4f5785717906d791a5e3" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-livenessprobe", "annotations": { "io.openshift.build.commit.id": "c785aa6755bf96a4d39b4a804b7a826485965227", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-livenessprobe" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:0fbffd94ea750eac9dcef360d12a6ca41746915f50f44fb7ed2be1a71c128487" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-node-driver-registrar", "annotations": { "io.openshift.build.commit.id": "ee27c345e10faa88b1cf6436ac7922a7e5318a18", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-node-driver-registrar" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f8022fba7aebc67e52a69bf57825548b74484dea32dd6d5758fc1f592e6dc821" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-snapshot-controller", "annotations": { "io.openshift.build.commit.id": "e7114303c69b82fec51ab65ba15ec7b58be3b12f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-external-snapshotter" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f6985210e2dec2b96cd8cd1dc6965ce2710b23b2c515d9ae67a694245bd41082" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "csi-snapshot-validation-webhook", "annotations": { "io.openshift.build.commit.id": "e7114303c69b82fec51ab65ba15ec7b58be3b12f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/csi-external-snapshotter" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e7a32310238d69d56d35be8f7de426bdbedf96ff73edcd198698ac174c6d3c34" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "deployer", "annotations": { "io.openshift.build.commit.id": "eed143055ede731029931ad204b19cd2f565ef1a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oc" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:60eaeef7848be3f86d22f5db7de382d1eac9e3d0cb24eca75b0cddc25f0baeda" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "docker-builder", "annotations": { "io.openshift.build.commit.id": "a63ac04216a3616bd86988c4117e0db4df873aac", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/builder" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:10db13a028712249b51ea042f073542a1fbcea4bc6de94db7aa2b698a2a30930" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "docker-registry", "annotations": { "io.openshift.build.commit.id": "f414ba7310818c39af1eaf8239e056cb6f146128", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/image-registry" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c31fa588cb4f0e3350b4642471bf1615b7e3f85d138bdb880d6724ba4caba0d7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "driver-toolkit", "annotations": { "io.openshift.build.commit.id": "967d9d324b00595e22d7835a4979b95dbc2e355d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/driver-toolkit" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cefb02b8cb7b27cd2439c7546272d153ea9233d6f62ceb8657fa50abd7ce11a5" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "egress-router-cni", "annotations": { "io.openshift.build.commit.id": "879b72bf6305ef394291ed1b4c5eeb3b11917633", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/egress-router-cni" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5a14e0c908f369adb40d2902d6f331cab420ad5928887f8de7cd082057a2f633" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "etcd", "annotations": { "io.openshift.build.commit.id": "13c18c444a8c6a86ccbba16cce664008f5f948bd", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/etcd" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:61f249fe0adadafbd49133d1be1ef71228f0a3ecadf2b182c8343e94ecb3dc7b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "gcp-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "9b7ca987656ad184730a6b430dcd846f5bc75db5", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-gcp" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:204a427d828364db9201f4b82ac99b2f574a07455b1ddd5b3d232f1059bf1fcc" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "gcp-cluster-api-controllers", "annotations": { "io.openshift.build.commit.id": "baf133cb8c200c1200363c97442382a9f9dab011", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-gcp" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:14585290b75baf3ddea1e3580febb965daa4969e411cec451fcdc10684ee2b19" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "gcp-machine-controllers", "annotations": { "io.openshift.build.commit.id": "ca53af896fba13f3c11f56e450f65e6744d3b049", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-gcp" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7cb3f6f5391c4ce1b4d473add422131c1fa994b1d34a863645ce836e301c2dfa" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "gcp-pd-csi-driver", "annotations": { "io.openshift.build.commit.id": "c5ae6f5d4a62ecc686259cc680514f1ae9f1f733", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/gcp-pd-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1cc85f7c27b6368fbf80703d49d4a53a2b1d4192fecfb8615043ad5706561fbf" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "gcp-pd-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "d151ef0f5268ccdedf5bb43b649d4cab13b21d68", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/gcp-pd-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:566025885a03ca4bdce52d93f013a0fbc3c65cfa435c975a59d4906a9337e45c" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "haproxy-router", "annotations": { "io.openshift.build.commit.id": "69eda4bd427c3f27d9993afa35461f4fc1dc0357", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/router" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:0743d54d3acaf6558295618248ff446b4352dde0234d52465d7578c7c261e6fd" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "hyperkube", "annotations": { "io.openshift.build.commit.id": "06e8c46c9f0d3f6bfcd1e146c09647e4b634e4eb", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kubernetes", "io.openshift.build.version-display-names": "", "io.openshift.build.versions": "kubernetes=1.26.2" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f07ab081508d10035f9be64166a3f97d4b0706ec8f30dbcba7377686aaaba865" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "hypershift", "annotations": { "io.openshift.build.commit.id": "f4a73f2ff5f742cf719d5304505ed71fe2ecc1ba", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/hypershift" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c15d153d062bd964578a8359c3f340c4208064ba2531225832e5d643aea351fe" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ibm-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "1640c42033631b3e8847c9867772666e898dfd01", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-ibm" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:16a7ce1d05c49179fd10ae4defd742fbcbe2a6183b5b69453141090fe97d8087" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ibm-vpc-block-csi-driver", "annotations": { "io.openshift.build.commit.id": "66dcaf9a0591ec321828cec5ee24f0a4df0e5080", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ibm-vpc-block-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:cc561d9c2a0070b55f5a3d9d8ee59decc697731c973cd152e55b6a9c69729c6a" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ibm-vpc-block-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "e83df2f32ae88c84c15a12741a970607b20228ec", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ibm-vpc-block-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:651e3ee87e97feb297450b326a13d0139a69d8671b5195627f9f2397a07674f7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ibm-vpc-node-label-updater", "annotations": { "io.openshift.build.commit.id": "283a614ee34e83afa065338dee25d4ee202c8aeb", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ibm-vpc-node-label-updater" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4f5ce98c592ce9c8a151332632cb5f2a2fd057244ff897e8adde87e57ef19624" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ibmcloud-cluster-api-controllers", "annotations": { "io.openshift.build.commit.id": "70e411ce00c9d12c5b0e983771df8bcf4750b17f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-ibmcloud" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:17dbbde09dba21d5fec0c99fa355f3976a3c58f79da24c4373f83127e43074ca" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ibmcloud-machine-controllers", "annotations": { "io.openshift.build.commit.id": "c75f7e3e7a3b7525aa2d540f86fd7477e7800608", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-ibmcloud" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8326f0a011caaed347e3e2d61e5b54fbcb70babe4c5e969056b170bc446a304f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "insights-operator", "annotations": { "io.openshift.build.commit.id": "6b00277feb1396a372620c18a7c5f79a8a17834f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/insights-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7cb4c45f3e100ceddafee4c6ccd57d79f5a6627686484aba625c1486c2ffc1c8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "installer", "annotations": { "io.openshift.build.commit.id": "f11c21e5e98c0f19516a0c0b13b8350a8f636b36", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/installer" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1e0619a786d968b04e775d08f8cf3924c8a27491de979989d299a52d1866e6fc" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "installer-artifacts", "annotations": { "io.openshift.build.commit.id": "f11c21e5e98c0f19516a0c0b13b8350a8f636b36", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/installer" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5f2a50bcdffe039e7de99c5c645a2c392d574864b09e27f2224e1c4da33d4c2f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ironic", "annotations": { "io.openshift.build.commit.id": "7aa7039683a9bec98c59cb47996e61960ae81a64", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ironic-image" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:10c4a509ff86b79b6205af506763b0dfc26d633563ac5b42d8d9995b6dc803b1" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ironic-agent", "annotations": { "io.openshift.build.commit.id": "ee5bee32747e1053fc6add76fcdd98f5816b27ba", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ironic-agent-image" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c8cebb491a7999a6f9747c9ba5d9130a0d2947dc0c0ef19c714aede75aa19adf" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ironic-machine-os-downloader", "annotations": { "io.openshift.build.commit.id": "2ba6060dc968488a495fbcd1250cfb186e4ada78", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ironic-rhcos-downloader" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:80c8240f47fd980b62a0c5844c3b5b29e046bc94d327adb32dc3b6abdf2cfc73" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ironic-static-ip-manager", "annotations": { "io.openshift.build.commit.id": "f524f2c9451ff0808beb54bece660640f58e8a3d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ironic-static-ip-manager" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b73358cd52b82fa5d9a241e6ea5c60e877d12597159e9e670b2190454e8f6bb3" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "k8s-prometheus-adapter", "annotations": { "io.openshift.build.commit.id": "b2e401059a11d23923adba51eeb82cbd5d75b7fc", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/k8s-prometheus-adapter" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bbc27b4ea8b6ed06d8490b60e95b36bda21f09f15ec3f25f901c8dffc32292d9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "keepalived-ipfailover", "annotations": { "io.openshift.build.commit.id": "42aa9c3e0e8c49358a74f9de8da8eca896c51892", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/images" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1644285dd756def306241c11b99c663d73595bf5da8cbf355f107e587a3c1995" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kube-proxy", "annotations": { "io.openshift.build.commit.id": "b58a257b896d774e0a092612be250fb9414af5ca", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/sdn" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:431478f63a87d00b4ef84e97c88c4c996ee97907fe517a230841344675603873" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kube-rbac-proxy", "annotations": { "io.openshift.build.commit.id": "0aa2830ed7359fd8cd0e2f7db0ed96a733c5990e", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kube-rbac-proxy" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5795789f6e56ae0c7644ae2380c6d88d6b2a88d64ab8581064bc746f0a97b52d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kube-state-metrics", "annotations": { "io.openshift.build.commit.id": "4b9698489404f06195ba8a4646d58d67e13501d4", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kube-state-metrics" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:48772f8b25db5f426c168026f3e89252389ea1c6bf3e508f670bffb24ee6e8e7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kube-storage-version-migrator", "annotations": { "io.openshift.build.commit.id": "bad104d13ba95bc850f5aaf96436f793d7985864", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kubernetes-kube-storage-version-migrator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:39ef66439265e28941d847694107b349dff04d9cc64f0b713882e1895ea2acb9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kubevirt-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "ee2033ecd471dc9fc08d101c421a04916f4f55c5", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-kubevirt" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b03d7d629a8551f28d12e21a42c0fdfd41177c67e285af38bc1f02472fe5689e" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kubevirt-csi-driver", "annotations": { "io.openshift.build.commit.id": "efa0b9432bf0f44a965dc978ada75ea9b0f3e511", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kubevirt-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bc62908bdc8b6ca58a4d3aa029e4688682b90486d555cef8bd9ea92fc55f32fe" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kuryr-cni", "annotations": { "io.openshift.build.commit.id": "672973fc0a6788667c382fb4ed1a5c5996cc8181", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kuryr-kubernetes" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:572a2ff575e3862de7539384beee12c9b61b20ab4d391d08eed1bcfcaa4e5ad6" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "kuryr-controller", "annotations": { "io.openshift.build.commit.id": "672973fc0a6788667c382fb4ed1a5c5996cc8181", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kuryr-kubernetes" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5603918ff567594261e572a4ea422703cf52a84a4e040c9898167ce6712b4857" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "libvirt-machine-controllers", "annotations": { "io.openshift.build.commit.id": "e55e92c14b2cd4925f8489f5f074015a64ed5713", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-libvirt" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f1fc06ae50980fabb0f06fe8a7fa54b2ff804337a18d8054ed6e848030df6a8f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "machine-api-operator", "annotations": { "io.openshift.build.commit.id": "866531e2f52c624c0e6dd711fc125f30bfe171cf", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:fae409a0e6467f2d4e5e1cd0974a33f71fddf6f3b567c278b3a9aad56aa0f089" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "machine-config-operator", "annotations": { "io.openshift.build.commit.id": "40575b862f7bd42a2c40c8e6b7203cd4c29b0021", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-config-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:438b7282ad388ca861674acf7331b7bf0d53b78112dbb12c964e9f5605e0b3f6" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "machine-image-customization-controller", "annotations": { "io.openshift.build.commit.id": "94e8789385209b3a4044abc9f38d456b5d744f7b", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/image-customization-controller" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d4ddfc967d0ed1a0ae60872e37d261b3ea5ee7f3972ece0990b1cf7bf3fdde61" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "machine-os-content", "annotations": { "io.openshift.build.commit.id": "", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "", "io.openshift.build.version-display-names": "machine-os=CentOS Stream CoreOS", "io.openshift.build.versions": "machine-os=413.92.202303190222-0" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:987669130c9effc1b9479f24d61d85f5f0abc7ebec3502c8b551374ab3fac6d3" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "machine-os-images", "annotations": { "io.openshift.build.commit.id": "11473df90664a3c2c56ea6d265f1232b4ca37605", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-os-images" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:83f86c33e8a7a515be30cd72371f7160f37132cf291398071e013ba78aa5dc19" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "multus-admission-controller", "annotations": { "io.openshift.build.commit.id": "d6d52a7a7df2243056c5db83cc10885ac2ca775b", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/multus-admission-controller" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3c3cca6e2da92a6cd38e7f20f77bffc675895bd800157fdb50261b7f7ea9fc90" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "multus-cni", "annotations": { "io.openshift.build.commit.id": "3f9b2d036b6cbc562aca9269bbeb7d0be198549c", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/multus-cni" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e15e4dbebc9b2ec1d44a393eb125a07564afd83dcf1154fd3a7bf2955aa0b13a" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "multus-networkpolicy", "annotations": { "io.openshift.build.commit.id": "98a0bad1071074f0c04c35ff209f0333c5d7274b", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/multus-networkpolicy" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:04b0a6e1969b6925073e59efedf79b5f28c7e3838ae2082cc8787a935914dede" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "multus-route-override-cni", "annotations": { "io.openshift.build.commit.id": "6644ac7ba8481b2c7b035390d20d28ba4b55c5ab", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/route-override-cni" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4903dfa59fc0fcc3521f6431d51c6ed0ef563b0c63614a2df44ee4d447ab6c5d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "multus-whereabouts-ipam-cni", "annotations": { "io.openshift.build.commit.id": "7517829eb1574d5852e3e53108fdff24f552da25", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/whereabouts-cni" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:2d56a44d5d9429dc668e476de36d9fa1083fbc948fd3a1c799a3733c9af4894b" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "must-gather", "annotations": { "io.openshift.build.commit.id": "5eca0cb65ea6dd13f907d1f7493ed237f07e3906", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/must-gather" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f6488dc68d872e1aeeaa0fbc00278f5d9b3f434d9eec436d10b31ae8367fddad" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "network-interface-bond-cni", "annotations": { "io.openshift.build.commit.id": "674f4753981739cff77f2ba05f203c2685a02c3f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/bond-cni" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:56dec1af3c24148179ab45f9137ba74876f4287121f07aa32dc7a3643da749a9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "network-metrics-daemon", "annotations": { "io.openshift.build.commit.id": "e72c8ad1581132817c09e23295f55425a14a5c58", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/network-metrics-daemon" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:6a5e01ac462952a60254c8a9a0f43cce8b323da60014d37a49250a2e586142a5" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "network-tools", "annotations": { "io.openshift.build.commit.id": "b4098c67659217e36ac7077229b25bbe2c3e5f38", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/network-tools" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4eb12728facf6c326c9e30f1d96b7f8754ed18d1afc7b4b420bfecb045c4fe19" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "nutanix-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "bc449492731076867420964be5ce3217fbcfda14", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-nutanix" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a4c103b81e2e4225200389f66a6857c47918d522091390a9dd5c1dd6b50ddfc9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "nutanix-machine-controllers", "annotations": { "io.openshift.build.commit.id": "e0f567fc40892d28487ad12a24705f88ff67ba84", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-nutanix" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d72c31f32cc38bdf61e1b407ae3a18f61a2031cd14c869e33dd5ec205ddc0a77" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "oauth-apiserver", "annotations": { "io.openshift.build.commit.id": "41c2dfea104b3c686a00b068654843b48b4db53f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oauth-apiserver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:0755461bb6ec987da5c44b85947d02eba8df0b0816923f397cee3f235303a74d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "oauth-proxy", "annotations": { "io.openshift.build.commit.id": "03e5b13b8b7087dd70abfd70efb4c5b92f800a4f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oauth-proxy" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:4e32e949909c4b9d7e400356a9c6e6c236bc2715f7a3cbdf6fe54e0b2612d154" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "oauth-server", "annotations": { "io.openshift.build.commit.id": "7e584f112a4ee8423ed027a15cc3f345ee09b267", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oauth-server" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:2156db516db2fda43363a063c11f91bd201dde2de7eb4fbab9c1210d17e699ba" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "oc-mirror", "annotations": { "io.openshift.build.commit.id": "c718c7405d9d7cbb6899cd7b215da5118d75ac18", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oc-mirror" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c1624f4ee7a202b2bd507b779aaf697e4f6578b9069d17efbbf6a1eae3ec9911" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "olm-rukpak", "annotations": { "io.openshift.build.commit.id": "66b3e551fc2730beb4c46d478166b38766c5f346", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/operator-framework-rukpak" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:0be44c9402996b5add5663280050b77b71501ccd8f19d650401b169713a1aae1" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openshift-apiserver", "annotations": { "io.openshift.build.commit.id": "dcbeee1e73552153c7c70a7d274d0862deaa9710", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/openshift-apiserver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:558f0eb88863582cd8532a701904559e7d9be443b2eefc4688e2c0fc04cae08d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openshift-controller-manager", "annotations": { "io.openshift.build.commit.id": "87de83867ac51730f506138ee790a56ca21d9fc9", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/openshift-controller-manager" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:03d999968e93d76624e3d10f22591abfbfdaaf2dd8f315abf64cdc590ab64195" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openshift-state-metrics", "annotations": { "io.openshift.build.commit.id": "7beb8807e2c0092b5e580a29903ff060140d8ff0", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/openshift-state-metrics" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:907363827442bc34c33be580ea3ac30198ca65f46a95eb80b2c5255e24d173f3" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openstack-cinder-csi-driver", "annotations": { "io.openshift.build.commit.id": "af5c48da935694ed5263a5a163318b52564977df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-openstack" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e7cd85685a000763b309a19422a29d42adbf98bfa9f3b1d6eda7ed77f69f6074" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openstack-cinder-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "14fcca54f20d18045e382cc0699f97e4a1e760ac", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/openstack-cinder-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b9e7109d5f1417a35649b5959f48d70e1b44f60eae1f36f2fb49a973ae9d89d0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openstack-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "af5c48da935694ed5263a5a163318b52564977df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-openstack" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:14845814cc3f542024dc45fea251a0ee5354310310c6d9bf7856743c91d07db0" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "openstack-machine-api-provider", "annotations": { "io.openshift.build.commit.id": "bcb08a7835c08d20606d75757228fd03fbb20dab", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-openstack" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:e6dcb3896d2e0fd85548f7add2d7c315a2fa1d80eb6742be7e3d00d9051531ce" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "operator-lifecycle-manager", "annotations": { "io.openshift.build.commit.id": "d4219045431cb6a35ad0d1b5d5fdb0b09adf1430", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/operator-framework-olm" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:497121bfdb3b293af2c939af393bfbda39aeace9d754f7288a244cd7ec2662d7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "operator-marketplace", "annotations": { "io.openshift.build.commit.id": "cfce6b5024f56305304599cd49dfbbe2b5d8ed3d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/operator-framework/operator-marketplace" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3e8bda93aae5c360f971e4532706ab6a95eb260e026a6704f837016cab6525fb" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "operator-registry", "annotations": { "io.openshift.build.commit.id": "d4219045431cb6a35ad0d1b5d5fdb0b09adf1430", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/operator-framework-olm" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:bfdc8d5477d1e6fd5da73df41c9213456dddae9f61c2ca0db9a9b9747a857c9d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ovirt-csi-driver", "annotations": { "io.openshift.build.commit.id": "f21b470f4927f97eca93a0a390cffccd7d724043", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ovirt-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:16f87e31a6b9ea1c7af5fe67cbee491211d17ec836dbde991939accbad61b257" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ovirt-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "3e49f77c34922a7e2ce675825cb5ff3bca3a6dbd", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ovirt-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:44b3dbecb7e1908fcb8e05ed40dc6799581f84559cbe63af1c997bf65f43879a" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ovirt-machine-controllers", "annotations": { "io.openshift.build.commit.id": "22d89b3fd9e2e395a62f71092487d26c8940052e", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-ovirt" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:aef7c938ed5acf805fc1afb90c4c9f0f5fa15004cedc1e636bb5264f6d419a8f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ovn-kubernetes-microshift-rhel-9", "annotations": { "io.openshift.build.commit.id": "dd45efd39e5db428d4578ed6787e6c08b79e2df5", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ovn-kubernetes" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:2188b2c01e6641000541562862ff033a648d15551ffbc7f75a39893a0a83f466" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "ovn-kubernetes-rhel-9", "annotations": { "io.openshift.build.commit.id": "dd45efd39e5db428d4578ed6787e6c08b79e2df5", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ovn-kubernetes" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5c1300e2d232a5e06e02a291d2de9a8be62cfed1d0f25dd8f0db5c6c20aa2967" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "pod", "annotations": { "io.openshift.build.commit.id": "06e8c46c9f0d3f6bfcd1e146c09647e4b634e4eb", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/kubernetes" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:9a21858c61e35722a243df3593c0329e90c4f78c334b21177da3a2f94f9c14dc" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "powervs-block-csi-driver", "annotations": { "io.openshift.build.commit.id": "6c96aeab7d866ef2798240989ff6a4b4ae5ebf2d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ibm-powervs-block-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:db48507979ddad297c8b0ad9726f49dc52cb157948e384915532cb137a409579" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "powervs-block-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "215326fa33b9093cf071cd0a690d98e6e1dc9a0b", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/ibm-powervs-block-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:036b285246f982d8c90b9980f89b611c4c01ad6d82f19a3e29744885c573e61d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "powervs-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "e52cfc59b051b6574f8bbbb4be4579ab3d72611a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-powervs" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b8d372d7a65dec03aeeb576755d93c6edc37896f7402ad4dc4febe4eed48849d" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "powervs-machine-controllers", "annotations": { "io.openshift.build.commit.id": "bf49c5c1b07137baa766b4d78b9e9c2650ef59ad", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/machine-api-provider-powervs" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:591d9b9b8c423c98354f9e93cb53feae5eb731e34b6ae0acea108f3760abe319" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prom-label-proxy", "annotations": { "io.openshift.build.commit.id": "b501d5e2aff82d46a141223636b522aeae95b915", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/prom-label-proxy" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:b8541443d5c6c0d31959a8e5f8d6a525d43bb4df66be563603d282f48bdeb304" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prometheus", "annotations": { "io.openshift.build.commit.id": "d8ea2c4f037abbf3f0fad5b6179ccf24ba9d9e4d", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/prometheus" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d1cdf8e55288584a04e1a403133d4508bac27808a20427a18aee85a92c367316" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prometheus-alertmanager", "annotations": { "io.openshift.build.commit.id": "f44d574d8e170d6788cfbf2bdbc866d3e1fc1054", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/prometheus-alertmanager" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d1a766de06530f7008fc155e6239f6e3d63b816deeb24c6d520ef1980d748050" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prometheus-config-reloader", "annotations": { "io.openshift.build.commit.id": "9cd6788ed2cb30982c8b9d6ec8f8c7e72b30d7df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/prometheus-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ff0062cc5aad6c3c8538f4b9a2572191f60181c9c15e9a94de2661aafba2df83" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prometheus-node-exporter", "annotations": { "io.openshift.build.commit.id": "10dc380d4ce996d2557b10991b3f7623a4551e21", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/node_exporter" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:1f4a21a1dba07ad90fdf2a59a4462e11e25567c6a30bdde0a1eb837e44c5573e" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prometheus-operator", "annotations": { "io.openshift.build.commit.id": "9cd6788ed2cb30982c8b9d6ec8f8c7e72b30d7df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/prometheus-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:3f0c9dc9888697e244d61cd89f8fe5a61dcb09dc100889be738db21b2fc5bbf7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "prometheus-operator-admission-webhook", "annotations": { "io.openshift.build.commit.id": "9cd6788ed2cb30982c8b9d6ec8f8c7e72b30d7df", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/prometheus-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:381e2218fd1d860bdb72a28d8fc34e1d5e7c3674bf1d0005583d70800dcd79d2" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "rhel-coreos", "annotations": { "io.openshift.build.commit.id": "", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:42e45dd0ba1be3d2681972d6d38c42008c70ddb8c5a96f1f770a11f9bbfb048f" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "rhel-coreos-extensions", "annotations": { "io.openshift.build.commit.id": "", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:c5ec77bcf92641781a9b42823dd176c4920aeed48f9c22e96b40bd6d1d3e60c2" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "route-controller-manager", "annotations": { "io.openshift.build.commit.id": "d7a8e22db412b6fabb7028ca0da8de8f3d9ac3c3", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/route-controller-manager" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:884971410b4691a0666287eb389e07a425040d4fc90665c864aa9f4728d4599c" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "sdn", "annotations": { "io.openshift.build.commit.id": "b58a257b896d774e0a092612be250fb9414af5ca", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/sdn" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:8deebae3c688a760967547128a800f51d355355837070ae987d6dcd60c914766" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "service-ca-operator", "annotations": { "io.openshift.build.commit.id": "1b89fdce3fcccecdc5fdb705fe674cd4bfc58a2a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/service-ca-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7f7cb6554c1dc9b5b3b58f162f592062e5c63bf24c5ed90a62074e117be3f743" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "telemeter", "annotations": { "io.openshift.build.commit.id": "ee1ba4699b82ecb2033f886af12b9e2e451d2296", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/telemeter" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:942a1ba76f95d02ba681afbb7d1aea28d457fb2a9d967cacc2233bb243588990" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "tests", "annotations": { "io.openshift.build.commit.id": "3163d5f1655ba939cc0957f60925d6304b299168", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/origin" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:fa40f288a884fadc8f3a9167a5224a1ad5c93263e9ea1b61eb646f80355566fc" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "thanos", "annotations": { "io.openshift.build.commit.id": "b6f11a5b2d63ca6269fcbd7b9488d8a8e9188d9a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/thanos" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a898acb346b7aae546bb9dc31e43266415a096fa755241b56acb5969190584f9" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "tools", "annotations": { "io.openshift.build.commit.id": "eed143055ede731029931ad204b19cd2f565ef1a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/oc" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:ce4412c7a4664f4a5346c5cf0cdd3f63365de70371c3c2f5fd2a41ba6e71562a" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "vsphere-cloud-controller-manager", "annotations": { "io.openshift.build.commit.id": "e9a65389e8c45d79dea428c0610b7fdd0b6f5be6", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cloud-provider-vsphere" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5027567a29a12409916016f764ba1edab132fba9fbeecc3d1b346b232bbc0b94" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "vsphere-cluster-api-controllers", "annotations": { "io.openshift.build.commit.id": "24e08ddf65fd387ea7c71e229b13e47d6cd3643f", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/cluster-api-provider-vsphere" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:741cac2c8604976554b1aca24721275db091675a571fd65216c507b6c787c423" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "vsphere-csi-driver", "annotations": { "io.openshift.build.commit.id": "e4408a3c04c3f485c6f344bdc786d15a5c84b05a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/vmware-vsphere-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:7716f88f50e2099db28b0a763a9b32bc1f78b870f34260512ceb987c1a62baa3" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "vsphere-csi-driver-operator", "annotations": { "io.openshift.build.commit.id": "9eb1e6c10c5fe27899d60353ae3ba8f77ace7fe1", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/vmware-vsphere-csi-driver-operator" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:f2505692e0c903b692a69e55c5525684969cca38e04b29eba04868e5fe5b4761" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "vsphere-csi-driver-syncer", "annotations": { "io.openshift.build.commit.id": "e4408a3c04c3f485c6f344bdc786d15a5c84b05a", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/vmware-vsphere-csi-driver" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:27c5e80f8fd9cb783f4b343389529c691b70a491b4e3907d55a94d7323399ff5" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } }, { "name": "vsphere-problem-detector", "annotations": { "io.openshift.build.commit.id": "ca408db88a70cfa5aefa3128dff971a555994c29", "io.openshift.build.commit.ref": "", "io.openshift.build.source-location": "https://github.com/openshift/vsphere-problem-detector" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:62a8f9c08cb12d8b9be52a4414b1b3e15592f951d15f7fff492746677385c614" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "" } } ] }, "status": { "dockerImageRepository": "" } }`) func testExtendedTestdataCliTestReleaseImageReferencesJsonBytes() ([]byte, error) { return _testExtendedTestdataCliTestReleaseImageReferencesJson, nil } func testExtendedTestdataCliTestReleaseImageReferencesJson() (*asset, error) { bytes, err := testExtendedTestdataCliTestReleaseImageReferencesJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cli/test-release-image-references.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataClusterMasterVertYaml = []byte(`provider: local ClusterLoader: cleanup: true ifexists: delete projects: - num: 1 basename: clusterloader-cakephp-mysql ifexists: delete tuning: default templates: - num: 1 file: ./quickstarts/cakephp-mysql.json - num: 1 basename: clusterloader-dancer-mysql ifexists: delete tuning: default templates: - num: 1 file: ./quickstarts/dancer-mysql.json - num: 1 basename: clusterloader-django-postgresql ifexists: delete tuning: default templates: - num: 1 file: ./quickstarts/django-postgresql.json - num: 1 basename: clusterloader-nodejs-postgresql ifexists: delete tuning: default templates: - num: 1 file: ./quickstarts/nodejs-postgresql.json - num: 1 basename: clusterloader-rails-postgresql ifexists: delete tuning: default templates: - num: 1 file: ./quickstarts/rails-postgresql.json tuningsets: - name: default pods: stepping: stepsize: 5 pause: 0 min rate_limit: delay: 0 ms `) func testExtendedTestdataClusterMasterVertYamlBytes() ([]byte, error) { return _testExtendedTestdataClusterMasterVertYaml, nil } func testExtendedTestdataClusterMasterVertYaml() (*asset, error) { bytes, err := testExtendedTestdataClusterMasterVertYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cluster/master-vert.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataClusterQuickstartsCakephpMysqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "cakephp-mysql-example", "creationTimestamp": null, "annotations": { "description": "An example CakePHP application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-php", "openshift.io/display-name": "CakePHP + MySQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/cakephp-ex", "openshift.io/long-description": "This template defines resources needed to develop a CakePHP application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,php,cakephp", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/cakephp-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "cakephp-secret-token": "${CAKEPHP_SECRET_TOKEN}", "cakephp-security-salt": "${CAKEPHP_SECURITY_SALT}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./vendor/bin/phpunit" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "COMPOSER_MIRROR", "value": "${COMPOSER_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "php:${PHP_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "cakephp-mysql-example" }, "failurePolicy": "Retry" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECRET_TOKEN", "valueFrom": { "secretKeyRef": { "key": "cakephp-secret-token", "name": "${NAME}" } } }, { "name": "CAKEPHP_SECURITY_SALT", "valueFrom": { "secretKeyRef": { "key": "cakephp-security-salt", "name": "${NAME}" } } }, { "name": "OPCACHE_REVALIDATE_FREQ", "value": "${OPCACHE_REVALIDATE_FREQ}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 30, "periodSeconds": 60, "timeoutSeconds": 3 }, "name": "cakephp-mysql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health.php", "port": 8080 }, "initialDelaySeconds": 3, "periodSeconds": 60, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "cakephp-mysql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:${MYSQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "cakephp-mysql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PHP_VERSION", "displayName": "PHP Version", "description": "Version of PHP image to be used (7.3-ubi7, 7.4-ubi8, or latest).", "value": "7.4-ubi8", "required": true }, { "name": "MYSQL_VERSION", "displayName": "MySQL Version", "description": "Version of MySQL image to be used (8.0-el8 or latest).", "value": "8.0-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the CakePHP container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/cakephp-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the CakePHP service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "mysql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "mysql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database User", "value": "cakephp", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "CAKEPHP_SECRET_TOKEN", "displayName": "CakePHP secret token", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "CAKEPHP_SECURITY_SALT", "displayName": "CakePHP Security Salt", "description": "Security salt for session hash.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "OPCACHE_REVALIDATE_FREQ", "displayName": "OPcache Revalidation Frequency", "description": "How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request.", "value": "2" }, { "name": "COMPOSER_MIRROR", "displayName": "Custom Composer Mirror URL", "description": "The custom Composer mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once PHP client supports it.", "value": "mysql_native_password" } ], "labels": { "app": "cakephp-mysql-example", "template": "cakephp-mysql-example" } }`) func testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() ([]byte, error) { return _testExtendedTestdataClusterQuickstartsCakephpMysqlJson, nil } func testExtendedTestdataClusterQuickstartsCakephpMysqlJson() (*asset, error) { bytes, err := testExtendedTestdataClusterQuickstartsCakephpMysqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/cakephp-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataClusterQuickstartsDancerMysqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "dancer-mysql-example", "creationTimestamp": null, "annotations": { "description": "An example Dancer application with a MySQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-perl", "openshift.io/display-name": "Dancer + MySQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/dancer-ex", "openshift.io/long-description": "This template defines resources needed to develop a Dancer based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,perl,dancer", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/dancer-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "keybase": "${SECRET_KEY_BASE}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "perl -I extlib/lib/perl5 -I lib t/*" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "CPAN_MIRROR", "value": "${CPAN_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "perl:${PERL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "SECRET_KEY_BASE", "valueFrom": { "secretKeyRef": { "key": "keybase", "name": "${NAME}" } } }, { "name": "PERL_APACHE2_RELOAD", "value": "${PERL_APACHE2_RELOAD}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "dancer-mysql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "dancer-mysql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "mysql", "port": 3306, "targetPort": 3306 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "MYSQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "value": "${MYSQL_DEFAULT_AUTHENTICATION_PLUGIN}" } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 3306 }, "timeoutSeconds": 1 }, "name": "mysql", "ports": [ { "containerPort": 3306 } ], "readinessProbe": { "exec": { "command": [ "/bin/sh", "-i", "-c", "MYSQL_PWD='${DATABASE_PASSWORD}' mysql -h 127.0.0.1 -u ${DATABASE_USER} -D ${DATABASE_NAME} -e 'SELECT 1'" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_MYSQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/mysql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "mysql" ], "from": { "kind": "ImageStreamTag", "name": "mysql:8.0-el8", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "dancer-mysql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PERL_VERSION", "displayName": "Version of Perl Image", "description": "Version of Perl image to be used (5.30-el7, 5.30-ubi8, or latest).", "value": "5.30-ubi8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Perl Dancer container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_MYSQL_LIMIT", "displayName": "Memory Limit (MySQL)", "description": "Maximum amount of memory the MySQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/dancer-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Dancer service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "database", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "sampledb", "required": true }, { "name": "PERL_APACHE2_RELOAD", "displayName": "Perl Module Reload", "description": "Set this to \"true\" to enable automatic reloading of modified Perl modules." }, { "name": "SECRET_KEY_BASE", "displayName": "Secret Key", "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "CPAN_MIRROR", "displayName": "Custom CPAN Mirror URL", "description": "The custom CPAN mirror URL" }, { "name": "MYSQL_DEFAULT_AUTHENTICATION_PLUGIN", "displayName": "MySQL authentication plugin", "description": "The custom MySQL default authentication plugin (default: mysql_native_password), might be changed to caching_sha2_password once clients support it.", "value": "mysql_native_password" } ], "labels": { "app": "dancer-mysql-example", "template": "dancer-mysql-example" } }`) func testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() ([]byte, error) { return _testExtendedTestdataClusterQuickstartsDancerMysqlJson, nil } func testExtendedTestdataClusterQuickstartsDancerMysqlJson() (*asset, error) { bytes, err := testExtendedTestdataClusterQuickstartsDancerMysqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/dancer-mysql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "django-psql-example", "creationTimestamp": null, "annotations": { "description": "An example Django application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-python", "openshift.io/display-name": "Django + PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/django-ex", "openshift.io/long-description": "This template defines resources needed to develop a Django based application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,python,django", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/django-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "django-secret-key": "${DJANGO_SECRET_KEY}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "./manage.py test" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "PIP_INDEX_URL", "value": "${PIP_INDEX_URL}" } ], "from": { "kind": "ImageStreamTag", "name": "python:${PYTHON_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "DATABASE_ENGINE", "value": "${DATABASE_ENGINE}" }, { "name": "DATABASE_NAME", "value": "${DATABASE_NAME}" }, { "name": "DATABASE_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "DATABASE_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "APP_CONFIG", "value": "${APP_CONFIG}" }, { "name": "DJANGO_SECRET_KEY", "valueFrom": { "secretKeyRef": { "key": "django-secret-key", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "django-psql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/health", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "django-psql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" } ], "image": " ", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "django-psql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "PYTHON_VERSION", "displayName": "Version of Python Image", "description": "Version of Python image to be used (3.6-ubi8, 3.8-ubi8, 3.9-ubi8, or latest).", "value": "3.9-ubi8", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (10-el8, 12-el8, or latest).", "value": "12-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Django container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/django-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch.", "value": "4.2.x" }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Django service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_ENGINE", "displayName": "Database Engine", "description": "Database engine: postgresql, mysql or sqlite (default).", "value": "postgresql", "required": true }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "default", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "value": "django", "required": true }, { "name": "DATABASE_PASSWORD", "displayName": "Database User Password", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "APP_CONFIG", "displayName": "Application Configuration File Path", "description": "Relative path to Gunicorn configuration file (optional)." }, { "name": "DJANGO_SECRET_KEY", "displayName": "Django Secret Key", "description": "Set this to a long random string.", "generate": "expression", "from": "[\\w]{50}" }, { "name": "PIP_INDEX_URL", "displayName": "Custom PyPi Index URL", "description": "The custom PyPi index URL" } ], "labels": { "app": "django-psql-example", "template": "django-psql-example" } }`) func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() ([]byte, error) { return _testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, nil } func testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson() (*asset, error) { bytes, err := testExtendedTestdataClusterQuickstartsDjangoPostgresqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/django-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "nodejs-postgresql-example", "creationTimestamp": null, "annotations": { "description": "An example Node.js application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js + PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/nodeshift-starters/nodejs-rest-http-crud", "openshift.io/long-description": "This template defines resources needed to develop a NodeJS application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,nodejs", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/nodeshift-starters/nodejs-rest-http-crud/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "database-admin-password": "${DATABASE_ADMIN_PASSWORD}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": {}, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "NPM_MIRROR", "value": "${NPM_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "nodejs:${NODEJS_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" }, { "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" }, "type": "Generic" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "labels": { "app.openshift.io/runtime": "nodejs" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "app.openshift.io/runtime": "nodejs", "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-admin-password", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 30, "timeoutSeconds": 3 }, "name": "nodejs-postgresql-example", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "nodejs-postgresql-example" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_ADMIN_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-admin-password", "name": "${NAME}" } } } ], "image": " ", "livenessProbe": { "initialDelaySeconds": 30, "tcpSocket": { "port": 5432 }, "timeoutSeconds": 1 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/postgresql/data", "name": "${DATABASE_SERVICE_NAME}-data" } ] } ], "volumes": [ { "emptyDir": { "medium": "" }, "name": "${DATABASE_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:${POSTGRESQL_VERSION}", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "nodejs-postgresql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "NODEJS_VERSION", "displayName": "Version of NodeJS Image", "description": "Version of NodeJS image to be used (12-ubi8, 14-ubi8, or latest).", "value": "14-ubi8", "required": true }, { "name": "POSTGRESQL_VERSION", "displayName": "Version of PostgreSQL Image", "description": "Version of PostgreSQL image to be used (12-el8, or latest).", "value": "12-el8", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Node.js container can use.", "value": "256Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "256Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/nodeshift-starters/nodejs-rest-http-crud.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "GENERIC_WEBHOOK_SECRET", "displayName": "Generic Webhook Secret", "description": "A secret string used to configure the Generic webhook.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_USER", "displayName": "PostgreSQL Username", "description": "Username for PostgreSQL user that will be used for accessing the database.", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "PostgreSQL Password", "description": "Password for the PostgreSQL user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "my_data", "required": true }, { "name": "DATABASE_ADMIN_PASSWORD", "displayName": "Database Administrator Password", "description": "Password for the database admin user.", "generate": "expression", "from": "[a-zA-Z0-9]{16}" }, { "name": "NPM_MIRROR", "displayName": "Custom NPM Mirror URL", "description": "The custom NPM mirror URL" } ], "labels": { "app": "nodejs-postgresql-example", "template": "nodejs-postgresql-example" } }`) func testExtendedTestdataClusterQuickstartsNodejsPostgresqlJsonBytes() ([]byte, error) { return _testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson, nil } func testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson() (*asset, error) { bytes, err := testExtendedTestdataClusterQuickstartsNodejsPostgresqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "rails-postgresql-example", "creationTimestamp": null, "annotations": { "description": "An example Rails application with a PostgreSQL database. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-ruby", "openshift.io/display-name": "Rails + PostgreSQL (Ephemeral)", "openshift.io/documentation-url": "https://github.com/sclorg/rails-ex", "openshift.io/long-description": "This template defines resources needed to develop a Rails application, including a build configuration, application deployment configuration, and database deployment configuration. The database is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "quickstart,ruby,rails", "template.openshift.io/bindable": "false" } }, "message": "The following service(s) have been created in your project: ${NAME}, ${DATABASE_SERVICE_NAME}.\n\nFor more information about using this template, including OpenShift considerations, see https://github.com/sclorg/rails-ex/blob/master/README.md.", "objects": [ { "apiVersion": "v1", "kind": "Secret", "metadata": { "name": "${NAME}" }, "stringData": { "application-password": "${APPLICATION_PASSWORD}", "application-user": "${APPLICATION_USER}", "database-password": "${DATABASE_PASSWORD}", "database-user": "${DATABASE_USER}", "keybase": "${SECRET_KEY_BASE}" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes and load balances the application pods", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${DATABASE_SERVICE_NAME}\", \"kind\": \"Service\"}]" }, "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "name": "${NAME}" }, "spec": { "host": "${APPLICATION_DOMAIN}", "to": { "kind": "Service", "name": "${NAME}" } } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "description": "Keeps track of changes in the application image" }, "name": "${NAME}" } }, { "apiVersion": "build.openshift.io/v1", "kind": "BuildConfig", "metadata": { "annotations": { "description": "Defines how to build the application", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "source": { "contextDir": "${CONTEXT_DIR}", "git": { "ref": "${SOURCE_REPOSITORY_REF}", "uri": "${SOURCE_REPOSITORY_URL}" }, "type": "Git" }, "strategy": { "sourceStrategy": { "env": [ { "name": "RUBYGEM_MIRROR", "value": "${RUBYGEM_MIRROR}" } ], "from": { "kind": "ImageStreamTag", "name": "ruby:3.3-ubi8", "namespace": "${NAMESPACE}" } }, "type": "Source" }, "triggers": [ { "type": "ImageChange" }, { "type": "ConfigChange" }, { "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" }, "type": "GitHub" } ] } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the application server", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${NAME}" }, "strategy": { "recreateParams": { "pre": { "execNewPod": { "command": [ "./migrate-database.sh" ], "containerName": "${NAME}" }, "failurePolicy": "Abort" } }, "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${NAME}" }, "name": "${NAME}" }, "spec": { "containers": [ { "env": [ { "name": "DATABASE_SERVICE_NAME", "value": "${DATABASE_SERVICE_NAME}" }, { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "SECRET_KEY_BASE", "valueFrom": { "secretKeyRef": { "key": "keybase", "name": "${NAME}" } } }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" }, { "name": "APPLICATION_DOMAIN", "value": "${APPLICATION_DOMAIN}" }, { "name": "APPLICATION_USER", "valueFrom": { "secretKeyRef": { "key": "application-user", "name": "${NAME}" } } }, { "name": "APPLICATION_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "application-password", "name": "${NAME}" } } }, { "name": "RAILS_ENV", "value": "${RAILS_ENV}" } ], "image": " ", "livenessProbe": { "httpGet": { "path": "/articles", "port": 8080 }, "initialDelaySeconds": 10, "timeoutSeconds": 3 }, "name": "${NAME}", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "httpGet": { "path": "/articles", "port": 8080 }, "initialDelaySeconds": 5, "timeoutSeconds": 3 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } } } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "${NAME}" ], "from": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "description": "Exposes the database server" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "postgresql", "port": 5432, "targetPort": 5432 } ], "selector": { "name": "${DATABASE_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "description": "Defines how to deploy the database", "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${DATABASE_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${DATABASE_SERVICE_NAME}" }, "name": "${DATABASE_SERVICE_NAME}" }, "spec": { "containers": [ { "env": [ { "name": "POSTGRESQL_USER", "valueFrom": { "secretKeyRef": { "key": "database-user", "name": "${NAME}" } } }, { "name": "POSTGRESQL_PASSWORD", "valueFrom": { "secretKeyRef": { "key": "database-password", "name": "${NAME}" } } }, { "name": "POSTGRESQL_DATABASE", "value": "${DATABASE_NAME}" }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" } ], "image": " ", "livenessProbe": { "exec": { "command": [ "/usr/libexec/check-container", "--live" ] }, "initialDelaySeconds": 120, "timeoutSeconds": 10 }, "name": "postgresql", "ports": [ { "containerPort": 5432 } ], "readinessProbe": { "exec": { "command": [ "/usr/libexec/check-container" ] }, "initialDelaySeconds": 5, "timeoutSeconds": 1 }, "resources": { "limits": { "memory": "${MEMORY_POSTGRESQL_LIMIT}" } }, "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "data" } ] } ], "volumes": [ { "emptyDir": {}, "name": "data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "postgresql" ], "from": { "kind": "ImageStreamTag", "name": "postgresql:12-el8", "namespace": "${NAMESPACE}" } }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "value": "rails-postgresql-example", "required": true }, { "name": "NAMESPACE", "displayName": "Namespace", "description": "The OpenShift Namespace where the ImageStream resides.", "value": "openshift", "required": true }, { "name": "MEMORY_LIMIT", "displayName": "Memory Limit", "description": "Maximum amount of memory the Rails container can use.", "value": "512Mi", "required": true }, { "name": "MEMORY_POSTGRESQL_LIMIT", "displayName": "Memory Limit (PostgreSQL)", "description": "Maximum amount of memory the PostgreSQL container can use.", "value": "512Mi", "required": true }, { "name": "SOURCE_REPOSITORY_URL", "displayName": "Git Repository URL", "description": "The URL of the repository with your application source code.", "value": "https://github.com/sclorg/rails-ex.git", "required": true }, { "name": "SOURCE_REPOSITORY_REF", "displayName": "Git Reference", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "CONTEXT_DIR", "displayName": "Context Directory", "description": "Set this to the relative path to your project if it is not in the root of your repository." }, { "name": "APPLICATION_DOMAIN", "displayName": "Application Hostname", "description": "The exposed hostname that will route to the Rails service, if left blank a value will be defaulted." }, { "name": "GITHUB_WEBHOOK_SECRET", "displayName": "GitHub Webhook Secret", "description": "Github trigger secret. A difficult to guess string encoded as part of the webhook URL. Not encrypted.", "generate": "expression", "from": "[a-zA-Z0-9]{40}" }, { "name": "SECRET_KEY_BASE", "displayName": "Secret Key", "description": "Your secret key for verifying the integrity of signed cookies.", "generate": "expression", "from": "[a-z0-9]{127}" }, { "name": "APPLICATION_USER", "displayName": "Application Username", "description": "The application user that is used within the sample application to authorize access on pages.", "value": "openshift", "required": true }, { "name": "APPLICATION_PASSWORD", "displayName": "Application Password", "description": "The application password that is used within the sample application to authorize access on pages.", "value": "secret", "required": true }, { "name": "RAILS_ENV", "displayName": "Rails Environment", "description": "Environment under which the sample application will run. Could be set to production, development or test.", "value": "production", "required": true }, { "name": "DATABASE_SERVICE_NAME", "displayName": "Database Service Name", "value": "postgresql", "required": true }, { "name": "DATABASE_USER", "displayName": "Database Username", "generate": "expression", "from": "user[A-Z0-9]{3}" }, { "name": "DATABASE_PASSWORD", "displayName": "Database Password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "DATABASE_NAME", "displayName": "Database Name", "value": "root", "required": true }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "displayName": "Maximum Database Connections", "value": "100" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "displayName": "Shared Buffer Amount", "value": "12MB" }, { "name": "RUBYGEM_MIRROR", "displayName": "Custom RubyGems Mirror URL", "description": "The custom RubyGems mirror URL" } ], "labels": { "app": "rails-postgresql-example", "template": "rails-postgresql-example" } }`) func testExtendedTestdataClusterQuickstartsRailsPostgresqlJsonBytes() ([]byte, error) { return _testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, nil } func testExtendedTestdataClusterQuickstartsRailsPostgresqlJson() (*asset, error) { bytes, err := testExtendedTestdataClusterQuickstartsRailsPostgresqlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cluster/quickstarts/rails-postgresql.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibCmdSh = []byte(`#!/usr/bin/env bash # This utility file contains functions that wrap commands to be tested. All wrapper functions run commands # in a sub-shell and redirect all output. Tests in test-cmd *must* use these functions for testing. # expect_success runs the cmd and expects an exit code of 0 function os::cmd::expect_success() { if [[ $# -ne 1 ]]; then echo "os::cmd::expect_success expects only one argument, got $#"; return 1; fi local cmd=$1 os::cmd::internal::expect_exit_code_run_grep "${cmd}" } readonly -f os::cmd::expect_success # expect_failure runs the cmd and expects a non-zero exit code function os::cmd::expect_failure() { if [[ $# -ne 1 ]]; then echo "os::cmd::expect_failure expects only one argument, got $#"; return 1; fi local cmd=$1 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::failure_func" } readonly -f os::cmd::expect_failure # expect_success_and_text runs the cmd and expects an exit code of 0 # as well as running a grep test to find the given string in the output function os::cmd::expect_success_and_text() { if [[ $# -ne 2 ]]; then echo "os::cmd::expect_success_and_text expects two arguments, got $#"; return 1; fi local cmd=$1 local expected_text=$2 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::success_func" "${expected_text}" } readonly -f os::cmd::expect_success_and_text # expect_failure_and_text runs the cmd and expects a non-zero exit code # as well as running a grep test to find the given string in the output function os::cmd::expect_failure_and_text() { if [[ $# -ne 2 ]]; then echo "os::cmd::expect_failure_and_text expects two arguments, got $#"; return 1; fi local cmd=$1 local expected_text=$2 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::failure_func" "${expected_text}" } readonly -f os::cmd::expect_failure_and_text # expect_success_and_not_text runs the cmd and expects an exit code of 0 # as well as running a grep test to ensure the given string is not in the output function os::cmd::expect_success_and_not_text() { if [[ $# -ne 2 ]]; then echo "os::cmd::expect_success_and_not_text expects two arguments, got $#"; return 1; fi local cmd=$1 local expected_text=$2 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::success_func" "${expected_text}" "os::cmd::internal::failure_func" } readonly -f os::cmd::expect_success_and_not_text # expect_failure_and_not_text runs the cmd and expects a non-zero exit code # as well as running a grep test to ensure the given string is not in the output function os::cmd::expect_failure_and_not_text() { if [[ $# -ne 2 ]]; then echo "os::cmd::expect_failure_and_not_text expects two arguments, got $#"; return 1; fi local cmd=$1 local expected_text=$2 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::failure_func" "${expected_text}" "os::cmd::internal::failure_func" } readonly -f os::cmd::expect_failure_and_not_text # expect_code runs the cmd and expects a given exit code function os::cmd::expect_code() { if [[ $# -ne 2 ]]; then echo "os::cmd::expect_code expects two arguments, got $#"; return 1; fi local cmd=$1 local expected_cmd_code=$2 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::specific_code_func ${expected_cmd_code}" } readonly -f os::cmd::expect_code # expect_code_and_text runs the cmd and expects the given exit code # as well as running a grep test to find the given string in the output function os::cmd::expect_code_and_text() { if [[ $# -ne 3 ]]; then echo "os::cmd::expect_code_and_text expects three arguments, got $#"; return 1; fi local cmd=$1 local expected_cmd_code=$2 local expected_text=$3 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::specific_code_func ${expected_cmd_code}" "${expected_text}" } readonly -f os::cmd::expect_code_and_text # expect_code_and_not_text runs the cmd and expects the given exit code # as well as running a grep test to ensure the given string is not in the output function os::cmd::expect_code_and_not_text() { if [[ $# -ne 3 ]]; then echo "os::cmd::expect_code_and_not_text expects three arguments, got $#"; return 1; fi local cmd=$1 local expected_cmd_code=$2 local expected_text=$3 os::cmd::internal::expect_exit_code_run_grep "${cmd}" "os::cmd::internal::specific_code_func ${expected_cmd_code}" "${expected_text}" "os::cmd::internal::failure_func" } readonly -f os::cmd::expect_code_and_not_text millisecond=1 second=$(( 1000 * millisecond )) minute=$(( 60 * second )) # os::cmd::try_until_success runs the cmd in a small interval until either the command succeeds or times out # the default time-out for os::cmd::try_until_success is 60 seconds. # the default interval for os::cmd::try_until_success is 200ms function os::cmd::try_until_success() { if [[ $# -lt 1 ]]; then echo "os::cmd::try_until_success expects at least one arguments, got $#"; return 1; fi local cmd=$1 local duration=${2:-$minute} local interval=${3:-0.2} os::cmd::internal::run_until_exit_code "${cmd}" "os::cmd::internal::success_func" "${duration}" "${interval}" } readonly -f os::cmd::try_until_success # os::cmd::try_until_failure runs the cmd until either the command fails or times out # the default time-out for os::cmd::try_until_failure is 60 seconds. function os::cmd::try_until_failure() { if [[ $# -lt 1 ]]; then echo "os::cmd::try_until_failure expects at least one argument, got $#"; return 1; fi local cmd=$1 local duration=${2:-$minute} local interval=${3:-0.2} os::cmd::internal::run_until_exit_code "${cmd}" "os::cmd::internal::failure_func" "${duration}" "${interval}" } readonly -f os::cmd::try_until_failure # os::cmd::try_until_text runs the cmd until either the command outputs the desired text or times out # the default time-out for os::cmd::try_until_text is 60 seconds. function os::cmd::try_until_text() { if [[ $# -lt 2 ]]; then echo "os::cmd::try_until_text expects at least two arguments, got $#"; return 1; fi local cmd=$1 local text=$2 local duration=${3:-$minute} local interval=${4:-0.2} os::cmd::internal::run_until_text "${cmd}" "${text}" "os::cmd::internal::success_func" "${duration}" "${interval}" } readonly -f os::cmd::try_until_text # os::cmd::try_until_not_text runs the cmd until either the command doesnot output the text or times out # the default time-out for os::cmd::try_until_not_text is 60 seconds. function os::cmd::try_until_not_text() { if [[ $# -lt 2 ]]; then echo "os::cmd::try_until_not_text expects at least two arguments, got $#"; return 1; fi local cmd=$1 local text=$2 local duration=${3:-$minute} local interval=${4:-0.2} os::cmd::internal::run_until_text "${cmd}" "${text}" "os::cmd::internal::failure_func" "${duration}" "${interval}" } readonly -f os::cmd::try_until_text # Functions in the os::cmd::internal namespace are discouraged from being used outside of os::cmd # In order to harvest stderr and stdout at the same time into different buckets, we need to stick them into files # in an intermediate step os_cmd_internal_tmpdir="${TMPDIR:-"/tmp"}/cmd" os_cmd_internal_tmpout="${os_cmd_internal_tmpdir}/tmp_stdout.log" os_cmd_internal_tmperr="${os_cmd_internal_tmpdir}/tmp_stderr.log" # os::cmd::internal::expect_exit_code_run_grep runs the provided test command and expects a specific # exit code from that command as well as the success of a specified ` + "`" + `grep` + "`" + ` invocation. Output from the # command to be tested is suppressed unless either ` + "`" + `VERBOSE=1` + "`" + ` or the test fails. This function bypasses # any error exiting settings or traps set by upstream callers by masking the return code of the command # with the return code of setting the result variable on failure. # # Globals: # - JUNIT_REPORT_OUTPUT # - VERBOSE # Arguments: # - 1: the command to run # - 2: command evaluation assertion to use # - 3: text to test for # - 4: text assertion to use # Returns: # - 0: if all assertions met # - 1: if any assertions fail function os::cmd::internal::expect_exit_code_run_grep() { local cmd=$1 # default expected cmd code to 0 for success local cmd_eval_func=${2:-os::cmd::internal::success_func} # default to nothing local grep_args=${3:-} # default expected test code to 0 for success local test_eval_func=${4:-os::cmd::internal::success_func} local -a junit_log os::cmd::internal::init_tempdir os::test::junit::declare_test_start local name=$(os::cmd::internal::describe_call "${cmd}" "${cmd_eval_func}" "${grep_args}" "${test_eval_func}") local preamble="Running ${name}..." echo "${preamble}" # for ease of parsing, we want the entire declaration on one line, so we replace '\n' with ';' junit_log+=( "${name//$'\n'/;}" ) local start_time=$(os::cmd::internal::seconds_since_epoch) local cmd_result=$( os::cmd::internal::run_collecting_output "${cmd}"; echo $? ) local cmd_succeeded=$( ${cmd_eval_func} "${cmd_result}"; echo $? ) local test_result=0 if [[ -n "${grep_args}" ]]; then test_result=$( os::cmd::internal::run_collecting_output 'grep -Eq "${grep_args}" <(os::cmd::internal::get_results)'; echo $? ) fi local test_succeeded=$( ${test_eval_func} "${test_result}"; echo $? ) local end_time=$(os::cmd::internal::seconds_since_epoch) local time_elapsed=$(echo $(( ${end_time} - ${start_time} )) | xargs printf '%5.3f') # in decimal seconds, we need leading zeroes for parsing later # clear the preamble so we can print out the success or error message os::text::clear_string "${preamble}" local return_code if (( cmd_succeeded && test_succeeded )); then os::text::print_green "SUCCESS after ${time_elapsed}s: ${name}" junit_log+=( "SUCCESS after ${time_elapsed}s: ${name//$'\n'/;}" ) if [[ -n ${VERBOSE-} ]]; then os::cmd::internal::print_results fi return_code=0 else local cause=$(os::cmd::internal::assemble_causes "${cmd_succeeded}" "${test_succeeded}") os::text::print_red_bold "FAILURE after ${time_elapsed}s: ${name}: ${cause}" junit_log+=( "FAILURE after ${time_elapsed}s: ${name//$'\n'/;}: ${cause}" ) os::text::print_red "$(os::cmd::internal::print_results)" return_code=1 fi junit_log+=( "$(os::cmd::internal::print_results)" ) # append inside of a subshell so that IFS doesn't get propagated out ( IFS=$'\n'; echo "${junit_log[*]}" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" ) os::test::junit::declare_test_end return "${return_code}" } readonly -f os::cmd::internal::expect_exit_code_run_grep # os::cmd::internal::init_tempdir initializes the temporary directory function os::cmd::internal::init_tempdir() { mkdir -p "${os_cmd_internal_tmpdir}" rm -f "${os_cmd_internal_tmpdir}"/tmp_std{out,err}.log } readonly -f os::cmd::internal::init_tempdir # os::cmd::internal::describe_call determines the file:line of the latest function call made # from outside of this file in the call stack, and the name of the function being called from # that line, returning a string describing the call function os::cmd::internal::describe_call() { local cmd=$1 local cmd_eval_func=$2 local grep_args=${3:-} local test_eval_func=${4:-} local caller_id=$(os::cmd::internal::determine_caller) local full_name="${caller_id}: executing '${cmd}'" local cmd_expectation=$(os::cmd::internal::describe_expectation "${cmd_eval_func}") local full_name="${full_name} expecting ${cmd_expectation}" if [[ -n "${grep_args}" ]]; then local text_expecting= case "${test_eval_func}" in "os::cmd::internal::success_func") text_expecting="text" ;; "os::cmd::internal::failure_func") text_expecting="not text" ;; esac full_name="${full_name} and ${text_expecting} '${grep_args}'" fi echo "${full_name}" } readonly -f os::cmd::internal::describe_call # os::cmd::internal::determine_caller determines the file relative to the OpenShift Origin root directory # and line number of the function call to the outer os::cmd wrapper function function os::cmd::internal::determine_caller() { local call_depth= local len_sources="${#BASH_SOURCE[@]}" for (( i=0; i<${len_sources}; i++ )); do if [ ! $(echo "${BASH_SOURCE[i]}" | grep "hack/lib/cmd\.sh$") ]; then call_depth=i break fi done local caller_file="${BASH_SOURCE[${call_depth}]}" caller_file="$( os::util::repository_relative_path "${caller_file}" )" local caller_line="${BASH_LINENO[${call_depth}-1]}" echo "${caller_file}:${caller_line}" } readonly -f os::cmd::internal::determine_caller # os::cmd::internal::describe_expectation describes a command return code evaluation function function os::cmd::internal::describe_expectation() { local func=$1 case "${func}" in "os::cmd::internal::success_func") echo "success" ;; "os::cmd::internal::failure_func") echo "failure" ;; "os::cmd::internal::specific_code_func"*[0-9]) local code=$(echo "${func}" | grep -Eo "[0-9]+$") echo "exit code ${code}" ;; "") echo "any result" esac } readonly -f os::cmd::internal::describe_expectation # os::cmd::internal::seconds_since_epoch returns the number of seconds elapsed since the epoch # with milli-second precision function os::cmd::internal::seconds_since_epoch() { local ns=$(date +%s%N) # if ` + "`" + `date` + "`" + ` doesn't support nanoseconds, return second precision if [[ "$ns" == *N ]]; then date "+%s.000" return fi echo $(( ${ns}/1000000000 )) } readonly -f os::cmd::internal::seconds_since_epoch # os::cmd::internal::run_collecting_output runs the command given, piping stdout and stderr into # the given files, and returning the exit code of the command function os::cmd::internal::run_collecting_output() { local cmd=$1 local result= $( eval "${cmd}" 1>>"${os_cmd_internal_tmpout}" 2>>"${os_cmd_internal_tmperr}" ) || result=$? local result=${result:-0} # if we haven't set result yet, the command succeeded return "${result}" } readonly -f os::cmd::internal::run_collecting_output # os::cmd::internal::success_func determines if the input exit code denotes success # this function returns 0 for false and 1 for true to be compatible with arithmetic tests function os::cmd::internal::success_func() { local exit_code=$1 # use a negated test to get output correct for (( )) [[ "${exit_code}" -ne "0" ]] return $? } readonly -f os::cmd::internal::success_func # os::cmd::internal::failure_func determines if the input exit code denotes failure # this function returns 0 for false and 1 for true to be compatible with arithmetic tests function os::cmd::internal::failure_func() { local exit_code=$1 # use a negated test to get output correct for (( )) [[ "${exit_code}" -eq "0" ]] return $? } readonly -f os::cmd::internal::failure_func # os::cmd::internal::specific_code_func determines if the input exit code matches the given code # this function returns 0 for false and 1 for true to be compatible with arithmetic tests function os::cmd::internal::specific_code_func() { local expected_code=$1 local exit_code=$2 # use a negated test to get output correct for (( )) [[ "${exit_code}" -ne "${expected_code}" ]] return $? } readonly -f os::cmd::internal::specific_code_func # os::cmd::internal::get_results prints the stderr and stdout files function os::cmd::internal::get_results() { cat "${os_cmd_internal_tmpout}" "${os_cmd_internal_tmperr}" } readonly -f os::cmd::internal::get_results # os::cmd::internal::get_last_results prints the stderr and stdout from the last attempt function os::cmd::internal::get_last_results() { cat "${os_cmd_internal_tmpout}" | awk 'BEGIN { RS = "\x1e" } END { print $0 }' cat "${os_cmd_internal_tmperr}" | awk 'BEGIN { RS = "\x1e" } END { print $0 }' } readonly -f os::cmd::internal::get_last_results # os::cmd::internal::mark_attempt marks the end of an attempt in the stdout and stderr log files # this is used to make the try_until_* output more concise function os::cmd::internal::mark_attempt() { echo -e '\x1e' >> "${os_cmd_internal_tmpout}" echo -e '\x1e' >> "${os_cmd_internal_tmperr}" } readonly -f os::cmd::internal::mark_attempt # os::cmd::internal::compress_output compresses an output file into timeline representation function os::cmd::internal::compress_output() { local logfile=$1 awk -f ${OS_ROOT}/hack/lib/compress.awk $logfile } readonly -f os::cmd::internal::compress_output # os::cmd::internal::print_results pretty-prints the stderr and stdout files. If attempt separators # are present, this function returns a concise view of the stdout and stderr output files using a # timeline format, where consecutive output lines that are the same are condensed into one line # with a counter function os::cmd::internal::print_results() { if [[ -s "${os_cmd_internal_tmpout}" ]]; then echo "Standard output from the command:" if grep -q $'\x1e' "${os_cmd_internal_tmpout}"; then os::cmd::internal::compress_output "${os_cmd_internal_tmpout}" else cat "${os_cmd_internal_tmpout}"; echo fi else echo "There was no output from the command." fi if [[ -s "${os_cmd_internal_tmperr}" ]]; then echo "Standard error from the command:" if grep -q $'\x1e' "${os_cmd_internal_tmperr}"; then os::cmd::internal::compress_output "${os_cmd_internal_tmperr}" else cat "${os_cmd_internal_tmperr}"; echo fi else echo "There was no error output from the command." fi } readonly -f os::cmd::internal::print_results # os::cmd::internal::assemble_causes determines from the two input booleans which part of the test # failed and generates a nice delimited list of failure causes function os::cmd::internal::assemble_causes() { local cmd_succeeded=$1 local test_succeeded=$2 local causes=() if (( ! cmd_succeeded )); then causes+=("the command returned the wrong error code") fi if (( ! test_succeeded )); then causes+=("the output content test failed") fi local list=$(printf '; %s' "${causes[@]}") echo "${list:2}" } readonly -f os::cmd::internal::assemble_causes # os::cmd::internal::run_until_exit_code runs the provided command until the exit code test given # succeeds or the timeout given runs out. Output from the command to be tested is suppressed unless # either ` + "`" + `VERBOSE=1` + "`" + ` or the test fails. This function bypasses any error exiting settings or traps # set by upstream callers by masking the return code of the command with the return code of setting # the result variable on failure. # # Globals: # - JUNIT_REPORT_OUTPUT # - VERBOSE # Arguments: # - 1: the command to run # - 2: command evaluation assertion to use # - 3: timeout duration # - 4: interval duration # Returns: # - 0: if all assertions met before timeout # - 1: if timeout occurs function os::cmd::internal::run_until_exit_code() { local cmd=$1 local cmd_eval_func=$2 local duration=$3 local interval=$4 local -a junit_log os::cmd::internal::init_tempdir os::test::junit::declare_test_start local description=$(os::cmd::internal::describe_call "${cmd}" "${cmd_eval_func}") local duration_seconds=` + "`" + `echo $(( $(( duration )) / 1000 )) | xargs printf '%5.3f'` + "`" + ` local description="${description}; re-trying every ${interval}s until completion or ${duration_seconds}s" local preamble="Running ${description}..." echo "${preamble}" # for ease of parsing, we want the entire declaration on one line, so we replace '\n' with ';' junit_log+=( "${description//$'\n'/;}" ) local start_time=$(os::cmd::internal::seconds_since_epoch) local deadline=$(( $(date +%s000) + $duration )) local cmd_succeeded=0 while [ $(date +%s000) -lt $deadline ]; do local cmd_result=$( os::cmd::internal::run_collecting_output "${cmd}"; echo $? ) cmd_succeeded=$( ${cmd_eval_func} "${cmd_result}"; echo $? ) if (( cmd_succeeded )); then break fi sleep "${interval}" os::cmd::internal::mark_attempt done local end_time=$(os::cmd::internal::seconds_since_epoch) local time_elapsed=$(echo $(( ${end_time} - ${start_time} )) | xargs printf '%5.3f') # in decimal seconds, we need leading zeroes for parsing later # clear the preamble so we can print out the success or error message os::text::clear_string "${preamble}" local return_code if (( cmd_succeeded )); then os::text::print_green "SUCCESS after ${time_elapsed}s: ${description}" junit_log+=( "SUCCESS after ${time_elapsed}s: ${description//$'\n'/;}" ) if [[ -n ${VERBOSE-} ]]; then os::cmd::internal::print_results fi return_code=0 else os::text::print_red_bold "FAILURE after ${time_elapsed}s: ${description}: the command timed out" junit_log+=( "FAILURE after ${time_elapsed}s: ${description//$'\n'/;}: the command timed out" ) os::text::print_red "$(os::cmd::internal::print_results)" return_code=1 fi junit_log+=( "$(os::cmd::internal::print_results)" ) ( IFS=$'\n'; echo "${junit_log[*]}" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" ) os::test::junit::declare_test_end return "${return_code}" } readonly -f os::cmd::internal::run_until_exit_code # os::cmd::internal::run_until_text runs the provided command until the assertion function succeeds with # the given text on the command output or the timeout given runs out. This can be used to run until the # output does or does not contain some text. Output from the command to be tested is suppressed unless # either ` + "`" + `VERBOSE=1` + "`" + ` or the test fails. This function bypasses any error exiting settings or traps # set by upstream callers by masking the return code of the command with the return code of setting # the result variable on failure. # # Globals: # - JUNIT_REPORT_OUTPUT # - VERBOSE # Arguments: # - 1: the command to run # - 2: text to test for # - 3: text assertion to use # - 4: timeout duration # - 5: interval duration # Returns: # - 0: if all assertions met before timeout # - 1: if timeout occurs function os::cmd::internal::run_until_text() { local cmd=$1 local text=$2 local test_eval_func=${3:-os::cmd::internal::success_func} local duration=$4 local interval=$5 local -a junit_log os::cmd::internal::init_tempdir os::test::junit::declare_test_start local description=$(os::cmd::internal::describe_call "${cmd}" "" "${text}" "${test_eval_func}") local duration_seconds=$(echo $(( $(( duration )) / 1000)) | xargs printf '%5.3f') local description="${description}; re-trying every ${interval}s until completion or ${duration_seconds}s" local preamble="Running ${description}..." echo "${preamble}" # for ease of parsing, we want the entire declaration on one line, so we replace '\n' with ';' junit_log+=( "${description//$'\n'/;}" ) local start_time=$(os::cmd::internal::seconds_since_epoch) local deadline=$(( $(date +%s000) + $duration )) local test_succeeded=0 while [ $(date +%s000) -lt $deadline ]; do local cmd_result=$( os::cmd::internal::run_collecting_output "${cmd}"; echo $? ) local test_result test_result=$( os::cmd::internal::run_collecting_output 'grep -Eq "${text}" <(os::cmd::internal::get_last_results)'; echo $? ) test_succeeded=$( ${test_eval_func} "${test_result}"; echo $? ) if (( test_succeeded )); then break fi sleep "${interval}" os::cmd::internal::mark_attempt done local end_time=$(os::cmd::internal::seconds_since_epoch) local time_elapsed=$(echo $(( ${end_time} - ${start_time} )) | xargs printf '%5.3f') # in decimal seconds, we need leading zeroes for parsing later # clear the preamble so we can print out the success or error message os::text::clear_string "${preamble}" local return_code if (( test_succeeded )); then os::text::print_green "SUCCESS after ${time_elapsed}s: ${description}" junit_log+=( "SUCCESS after ${time_elapsed}s: ${description//$'\n'/;}" ) if [[ -n ${VERBOSE-} ]]; then os::cmd::internal::print_results fi return_code=0 else os::text::print_red_bold "FAILURE after ${time_elapsed}s: ${description}: the command timed out" junit_log+=( "FAILURE after ${time_elapsed}s: ${description//$'\n'/;}: the command timed out" ) os::text::print_red "$(os::cmd::internal::print_results)" return_code=1 fi junit_log+=( "$(os::cmd::internal::print_results)" ) ( IFS=$'\n'; echo "${junit_log[*]}" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" ) os::test::junit::declare_test_end return "${return_code}" } readonly -f os::cmd::internal::run_until_text `) func testExtendedTestdataCmdHackLibCmdShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibCmdSh, nil } func testExtendedTestdataCmdHackLibCmdSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibCmdShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/cmd.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibCompressAwk = []byte(`# Helper functions function trim(s) { gsub(/^[ \t\r\n]+|[ \t\r\n]+$/, "", s); return s; } function printRecordAndCount(record, count) { print record; if (count > 1) { printf("... repeated %d times\n", count) } } BEGIN { # Before processing, set the record separator to the ASCII record separator character \x1e RS = "\x1e"; } # This action is executed for each record { # Build our current var from the trimmed record current = trim($0); # Bump the count of times we have seen it seen[current]++; # Print the previous record and its count (if it is not identical to the current record) if (previous && previous != current) { printRecordAndCount(previous, seen[previous]); } # Store the current record as the previous record previous = current; } END { # After processing, print the last record and count if it is non-empty if (previous) { printRecordAndCount(previous, seen[previous]); } }`) func testExtendedTestdataCmdHackLibCompressAwkBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibCompressAwk, nil } func testExtendedTestdataCmdHackLibCompressAwk() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibCompressAwkBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/compress.awk", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibConstantsSh = []byte(`#!/usr/bin/env bash readonly OS_OUTPUT_BASEPATH="${OS_OUTPUT_BASEPATH:-_output}" readonly OS_BASE_OUTPUT="${OS_ROOT}/${OS_OUTPUT_BASEPATH}" readonly OS_OUTPUT_SCRIPTPATH="${OS_OUTPUT_SCRIPTPATH:-"${OS_BASE_OUTPUT}/scripts"}" `) func testExtendedTestdataCmdHackLibConstantsShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibConstantsSh, nil } func testExtendedTestdataCmdHackLibConstantsSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibConstantsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/constants.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibInitSh = []byte(`#!/usr/bin/env bash # This script is meant to be the entrypoint for OpenShift Bash scripts to import all of the support # libraries at once in order to make Bash script preambles as minimal as possible. This script recur- # sively ` + "`" + `source` + "`" + `s *.sh files in this directory tree. As such, no files should be ` + "`" + `source` + "`" + `ed outside # of this script to ensure that we do not attempt to overwrite read-only variables. set -o errexit set -o nounset set -o pipefail OS_SCRIPT_START_TIME="$( date +%s )"; export OS_SCRIPT_START_TIME # os::util::absolute_path returns the absolute path to the directory provided function os::util::absolute_path() { local relative_path="$1" local absolute_path pushd "${relative_path}" >/dev/null relative_path="$( pwd )" if [[ -h "${relative_path}" ]]; then absolute_path="$( readlink "${relative_path}" )" else absolute_path="${relative_path}" fi popd >/dev/null echo "${absolute_path}" } readonly -f os::util::absolute_path # find the absolute path to the root of the Origin source tree init_source="$( dirname "${BASH_SOURCE[0]}" )/../.." OS_ROOT="$( os::util::absolute_path "${init_source}" )" export OS_ROOT cd "${OS_ROOT}" source "${OS_ROOT}/hack/lib/constants.sh" source "${OS_ROOT}/hack/lib/cmd.sh" for library_file in $( find "${OS_ROOT}/hack/lib/log" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ); do source "${library_file}" done for library_file in $( find "${OS_ROOT}/hack/lib/test" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ); do source "${library_file}" done for library_file in $( find "${OS_ROOT}/hack/lib/util" -type f -name '*.sh' -not -path '*/hack/lib/init.sh' ); do source "${library_file}" done unset library_files library_file init_source # all of our Bash scripts need to have the stacktrace # handler installed to deal with errors os::log::stacktrace::install # All of our Bash scripts need to have access to the # binaries that we build so we don't have to find # them before every invocation. os::util::environment::update_path_var if [[ -z "${OS_TMP_ENV_SET-}" ]]; then # if this file is run via 'source', then $0 will be "-bash" and won't work with basename if [[ "${0}" =~ .*\.sh ]]; then os::util::environment::setup_tmpdir_vars "$( basename "${0}" ".sh" )" else os::util::environment::setup_tmpdir_vars "shell" fi fi # Allow setting $JUNIT_REPORT to toggle output behavior if [[ -n "${JUNIT_REPORT:-}" ]]; then export JUNIT_REPORT_OUTPUT="${LOG_DIR}/raw_test_output.log" fi cp ${KUBECONFIG_TESTS} /kubeconfig chmod 644 /kubeconfig export KUBECONFIG=/kubeconfig namespace="cmd-${TEST_NAME}" oc new-project "${namespace}" oc label namespace ${namespace} --overwrite \ pod-security.kubernetes.io/enforce=baseline \ pod-security.kubernetes.io/warn=baseline \ pod-security.kubernetes.io/audit=baseline \ security.openshift.io/scc.podSecurityLabelSync=false `) func testExtendedTestdataCmdHackLibInitShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibInitSh, nil } func testExtendedTestdataCmdHackLibInitSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibInitShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/init.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibLogOutputSh = []byte(`#!/usr/bin/env bash # This file contains functions used for writing log messages # to stdout and stderr from scripts while they run. # os::log::info writes the message to stdout. # # Arguments: # - all: message to write function os::log::info() { local message; message="$( os::log::internal::prefix_lines "[INFO]" "$*" )" os::log::internal::to_logfile "${message}" echo "${message}" } readonly -f os::log::info # os::log::warning writes the message to stderr. # A warning indicates something went wrong but # not so wrong that we cannot recover. # # Arguments: # - all: message to write function os::log::warning() { local message; message="$( os::log::internal::prefix_lines "[WARNING]" "$*" )" os::log::internal::to_logfile "${message}" os::text::print_yellow "${message}" 1>&2 } readonly -f os::log::warning # os::log::error writes the message to stderr. # An error indicates that something went wrong # and we will most likely fail after this. # # Arguments: # - all: message to write function os::log::error() { local message; message="$( os::log::internal::prefix_lines "[ERROR]" "$*" )" os::log::internal::to_logfile "${message}" os::text::print_red "${message}" 1>&2 } readonly -f os::log::error # os::log::fatal writes the message to stderr and # returns a non-zero code to force a process exit. # A fatal error indicates that there is no chance # of recovery. # # Arguments: # - all: message to write function os::log::fatal() { local message; message="$( os::log::internal::prefix_lines "[FATAL]" "$*" )" os::log::internal::to_logfile "${message}" os::text::print_red "${message}" 1>&2 exit 1 } readonly -f os::log::fatal # os::log::debug writes the message to stderr if # the ${OS_DEBUG} variable is set. # # Globals: # - OS_DEBUG # Arguments: # - all: message to write function os::log::debug() { local message; message="$( os::log::internal::prefix_lines "[DEBUG]" "$*" )" os::log::internal::to_logfile "${message}" if [[ -n "${OS_DEBUG:-}" ]]; then os::text::print_blue "${message}" 1>&2 fi } readonly -f os::log::debug # os::log::internal::to_logfile makes a best-effort # attempt to write the message to the script logfile # # Globals: # - LOG_DIR # Arguments: # - all: message to write function os::log::internal::to_logfile() { if [[ -n "${LOG_DIR:-}" && -d "${LOG_DIR-}" ]]; then echo "$*" >>"${LOG_DIR}/scripts.log" fi } # os::log::internal::prefix_lines prints out the # original content with the given prefix at the # start of every line. # # Arguments: # - 1: prefix for lines # - 2: content to prefix function os::log::internal::prefix_lines() { local prefix="$1" local content="$2" local old_ifs="${IFS}" IFS=$'\n' for line in ${content}; do echo "${prefix} ${line}" done IFS="${old_ifs}" }`) func testExtendedTestdataCmdHackLibLogOutputShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibLogOutputSh, nil } func testExtendedTestdataCmdHackLibLogOutputSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibLogOutputShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/log/output.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibLogStacktraceSh = []byte(`#!/usr/bin/env bash # # This library contains an implementation of a stack trace for Bash scripts. # os::log::stacktrace::install installs the stacktrace as a handler for the ERR signal if one # has not already been installed and sets ` + "`" + `set -o errtrace` + "`" + ` in order to propagate the handler # If the ERR trap is not initialized, installing this plugin will initialize it. # # Globals: # None # Arguments: # None # Returns: # - export OS_USE_STACKTRACE function os::log::stacktrace::install() { # setting 'errtrace' propagates our ERR handler to functions, expansions and subshells set -o errtrace # OS_USE_STACKTRACE is read by os::util::trap at runtime to request a stacktrace export OS_USE_STACKTRACE=true os::util::trap::init_err } readonly -f os::log::stacktrace::install # os::log::stacktrace::print prints the stacktrace and exits with the return code from the script that # called for a stack trace. This function will always return 0 if it is not handling the signal, and if it # is handling the signal, this function will always ` + "`" + `exit` + "`" + `, not return, the return code it receives as # its first argument. # # Globals: # - BASH_SOURCE # - BASH_LINENO # - FUNCNAME # Arguments: # - 1: the return code of the command in the script that generated the ERR signal # - 2: the last command that ran before handlers were invoked # - 3: whether or not ` + "`" + `set -o errexit` + "`" + ` was set in the script that generated the ERR signal # Returns: # None function os::log::stacktrace::print() { local return_code=$1 local last_command=$2 local errexit_set=${3:-} if [[ "${return_code}" = "0" ]]; then # we're not supposed to respond when no error has occurred return 0 fi if [[ -z "${errexit_set}" ]]; then # if errexit wasn't set in the shell when the ERR signal was issued, then we can ignore the signal # as this is not cause for failure return 0 fi # dump the entire stack for debugging purposes os::log::debug "$( os::util::repository_relative_path "${BASH_SOURCE[0]}:${LINENO}: ${BASH_COMMAND}" )" for (( i = 0; i < ${#BASH_LINENO[@]}; i++ )); do os::log::debug "$( os::util::repository_relative_path "${BASH_SOURCE[$i+1]:-"$( os::util::repository_relative_path "$0" )"}" ):${BASH_LINENO[$i]}: ${FUNCNAME[$i]}" done # iterate backwards through the stack until we leave library files, so we can be sure we start logging # actual script code and not this handler's call local stack_begin_index for (( stack_begin_index = 0; stack_begin_index < ${#BASH_SOURCE[@]}; stack_begin_index++ )); do if [[ ! "${BASH_SOURCE[${stack_begin_index}]}" =~ hack/lib/(log/stacktrace|util/trap)\.sh ]]; then break fi done local preamble_finished local stack_index=1 local i for (( i = stack_begin_index; i < ${#BASH_SOURCE[@]}; i++ )); do local bash_source bash_source="$( os::util::repository_relative_path "${BASH_SOURCE[$i]}" )" if [[ -z "${preamble_finished:-}" ]]; then preamble_finished=true os::log::error "${bash_source}:${BASH_LINENO[$i-1]}: \` + "`" + `${last_command}\` + "`" + ` exited with status ${return_code}." >&2 exit "${return_code}" fi stack_index=$(( stack_index + 1 )) done # we know we're the privileged handler in this chain, so we can safely exit the shell without # starving another handler of the privilege of reacting to this signal os::log::info " Exiting with code ${return_code}." >&2 exit "${return_code}" } readonly -f os::log::stacktrace::print `) func testExtendedTestdataCmdHackLibLogStacktraceShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibLogStacktraceSh, nil } func testExtendedTestdataCmdHackLibLogStacktraceSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibLogStacktraceShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/log/stacktrace.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibLogSystemSh = []byte(`#!/usr/bin/env bash # # This library holds all of the system logging functions for OpenShift bash scripts. # os::log::system::install_cleanup installs os::log::system::clean_up as a trap on exit. # If any traps are currently set for these signals, os::log::system::clean_up is prefixed. # # Globals: # None # Arguments: # None # Returns: # None function os::log::system::install_cleanup() { trap "os::log::system::clean_up; $(trap -p EXIT | awk -F"'" '{print $2}')" EXIT } readonly -f os::log::system::install_cleanup # os::log::system::clean_up should be trapped so that it can stop the logging utility once the script that # installed it is finished. # This function stops logging and generates plots of data for easy consumption. # # Globals: # - LOG_DIR # - LOGGER_PID # - SAR_LOGFILE # Arguments: # None # Returns: # None function os::log::system::clean_up() { local return_code=$? # we don't want failures in this logger to set +o errexit if jobs -pr | grep -q "${LOGGER_PID}"; then kill -SIGTERM "${LOGGER_PID}" # give logger ten seconds to gracefully exit before killing it for (( i = 0; i < 10; i++ )); do if ! jobs -pr | grep -q "${LOGGER_PID}"; then # the logger has shutdown, we don't need to wait on it any longer break fi done if jobs -pr | grep -q "${LOGGER_PID}"; then # the logger has not shutdown, so kill it kill -SIGKILL "${LOGGER_PID}" fi fi if ! which sadf >/dev/null 2>&1; then os::log::warning "System logger data could not be unpacked and graphed, 'sadf' binary not found in this environment." return 0 fi if [[ ! -s "${SAR_LOGFILE:-}" ]]; then os::log::warning "No system logger data could be found, log file missing." return 0 fi local log_subset_flags=( "-b" "-B" "-u ALL" "-q" "-r" ) local log_subset_names=( "iops" "paging" "cpu" "queue" "memory" ) local log_subset_file local i for (( i = 0; i < "${#log_subset_flags[@]}"; i++ )); do log_subset_file="${LOG_DIR}/${log_subset_names[$i]}.txt" # use sadf utility to extract data into easily-parseable format sadf -d "${SAR_LOGFILE}" -- ${log_subset_flags[$i]} > "${log_subset_file}" local ignored_columns="hostname,interval," # special cases for special output from SAR, because the tool often gives us columns full of baloney if [[ "${log_subset_names[$i]}" == "cpu" ]]; then ignored_columns="${ignored_columns}CPU," fi os::log::system::internal::prune_datafile "${log_subset_file}" "${ignored_columns}" os::log::system::internal::plot "${log_subset_file}" done # remove the ` + "`" + `sar` + "`" + ` log file for space constraints rm -f "${SAR_LOGFILE}" return "${return_code}" } readonly -f os::log::system::clean_up # os::log::system::internal::prune_datafile removes the given columns from a datafile created by 'sadf -d' # # Globals: # None # Arguments: # - 1: datafile # - 2: comma-delimited columns to remove, with trailing comma # Returns: # None function os::log::system::internal::prune_datafile() { local datafile=$1 local column_names=$2 if [[ "${#column_names}" -eq 0 ]]; then return 0 fi local columns_in_order columns_in_order=( $( head -n 1 "${datafile}" | sed 's/^# //g' | tr ';' ' ' ) ) local columns_to_keep local i for (( i = 0; i < "${#columns_in_order[@]}"; i++ )); do if ! echo "${column_names}" | grep -q "${columns_in_order[$i]},"; then # this is a column we need to keep, adding one as 'cut' is 1-indexed columns_to_keep+=( "$(( i + 1 ))" ) fi done # for the proper flag format for 'cut', we join the list delimiting with commas columns_to_keep="$( IFS=','; echo "${columns_to_keep[*]}" )" cut --delimiter=';' -f"${columns_to_keep}" "${datafile}" > "${datafile}.tmp" sed -i '1s/^/# /' "${datafile}.tmp" mv "${datafile}.tmp" "${datafile}" } readonly -f os::log::system::internal::prune_datafile # os::log::system::internal::plot uses gnuplot to make a plot of some data across time points. This function is intended to be used # on the output of a 'sar -f' read of a sar binary file. Plots will be made of all columns and stacked on each other with one x axis. # This function needs the non-data columns of the file to be prefixed with comments. # # Globals: # - LOG_DIR # Arguments: # - 1: data file # Returns: # None function os::log::system::internal::plot() { local datafile=$1 local plotname plotname="$(basename "${datafile}" .txt)" # we are expecting the output of a 'sadf -d' read, so the headers will be on the first line of the file local headers headers=( $( head -n 1 "${datafile}" | sed 's/^# //g' | tr ';' ' ' ) ) local records local width records="$(( $( wc -l < "${datafile}" ) - 1 ))" # one of these lines will be the header comment if [[ "${records}" -gt 90 ]]; then width="$(echo "8.5 + ${records}*0.025" | bc )" else width="8.5" fi local gnuplot_directive=( "set terminal pdf size ${width}in,$(( 2 * (${#headers[@]} - 1) ))in" \ "set output \"${LOG_DIR}/${plotname}.pdf\"" \ "set datafile separator \";\"" \ "set xdata time" \ "set timefmt '%Y-%m-%d %H:%M:%S UTC'" \ "set tmargin 1" \ "set bmargin 1" \ "set lmargin 20" \ "set rmargin 20" \ "set multiplot layout ${#headers[@]},1 title \"\n${plotname}\n\"" \ "unset title" ) local i for (( i = 1; i < "${#headers[@]}"; i++ )); do local header header="${headers[$i]}" if (( i == ${#headers[@]} - 1 )); then # we need x-tick labels on the bottom plot gnuplot_directive+=( "set xtics format '%H:%M:%S' rotate by -90" ) else gnuplot_directive+=( "set format x ''" ) fi gnuplot_directive+=( "plot \"${datafile}\" using 1:$(( i + 1 )) title \"${header}\" with lines" ) done # concatenate the array with newlines to get the final directive to send to gnuplot gnuplot_directive="$( IFS=$'\n'; echo "${gnuplot_directive[*]}" )" { printf '$ gnuplot <<< %s\n' "${gnuplot_directive}" gnuplot <<< "${gnuplot_directive}" 2>&1 printf '\n\n' } >> "${LOG_DIR}/gnuplot.log" os::log::debug "Stacked plot for log subset \"${plotname}\" written to ${LOG_DIR}/${plotname}.pdf" } readonly -f os::log::system::internal::plot # os::log::system::start installs the system logger and begins logging # # Globals: # - LOG_DIR # Arguments: # None # Returns: # - export LOGGER_PID # - export SAR_LOGFILE function os::log::system::start() { if ! which sar >/dev/null 2>&1; then os::log::debug "System logger could not be started, 'sar' binary not found in this environment." return 0 fi readonly SAR_LOGFILE="${LOG_DIR}/sar.log" export SAR_LOGFILE os::log::system::internal::run "${SAR_LOGFILE}" "${LOG_DIR}/sar_stderr.log" os::log::system::install_cleanup } readonly -f os::log::system::start # os::log::system::internal::run runs the system logger in the background. # 'sar' is configured to run once a second for 24 hours, so the cleanup trap should be installed to ensure that # the process is killed once the parent script is finished. # # Globals: # None # Arguments: # - 1: file to log binary outut to # - 2: file to log stderr of the logger to # Returns: # None function os::log::system::internal::run() { local binary_logfile=$1 local stderr_logfile=$2 sar -A -o "${binary_logfile}" 1 86400 1>/dev/null 2>"${stderr_logfile}" & LOGGER_PID=$! readonly LOGGER_PID export LOGGER_PID } readonly -f os::log::system::internal::run `) func testExtendedTestdataCmdHackLibLogSystemShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibLogSystemSh, nil } func testExtendedTestdataCmdHackLibLogSystemSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibLogSystemShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/log/system.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibTestJunitSh = []byte(`#!/usr/bin/env bash # This utility file contains functions that format test output to be parsed into jUnit XML # os::test::junit::declare_suite_start prints a message declaring the start of a test suite # Any number of suites can be in flight at any time, so there is no failure condition for this # script based on the number of suites in flight. # # Globals: # - JUNIT_REPORT_OUTPUT # - NUM_OS_JUNIT_SUITES_IN_FLIGHT # Arguments: # - 1: the suite name that is starting # Returns: # - increment NUM_OS_JUNIT_SUITES_IN_FLIGHT function os::test::junit::declare_suite_start() { local suite_name=$1 local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0} echo "=== BEGIN TEST SUITE github.com/openshift/origin/test/${suite_name} ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" NUM_OS_JUNIT_SUITES_IN_FLIGHT=$(( ${num_suites} + 1 )) export NUM_OS_JUNIT_SUITES_IN_FLIGHT } readonly -f os::test::junit::declare_suite_start # os::test::junit::declare_suite_end prints a message declaring the end of a test suite # If there aren't any suites in flight, this function will fail. # # Globals: # - JUNIT_REPORT_OUTPUT # - NUM_OS_JUNIT_SUITES_IN_FLIGHT # Arguments: # - 1: the suite name that is starting # Returns: # - export/decrement NUM_OS_JUNIT_SUITES_IN_FLIGHT function os::test::junit::declare_suite_end() { local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0} if [[ "${num_suites}" -lt "1" ]]; then # we can't end a suite if none have been started yet echo "[ERROR] jUnit suite marker could not be placed, expected suites in flight, got ${num_suites}" return 1 fi echo "=== END TEST SUITE ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" NUM_OS_JUNIT_SUITES_IN_FLIGHT=$(( ${num_suites} - 1 )) export NUM_OS_JUNIT_SUITES_IN_FLIGHT } readonly -f os::test::junit::declare_suite_end # os::test::junit::declare_test_start prints a message declaring the start of a test case # If there is already a test marked as being in flight, this function will fail. # # Globals: # - JUNIT_REPORT_OUTPUT # - NUM_OS_JUNIT_TESTS_IN_FLIGHT # Arguments: # None # Returns: # - increment NUM_OS_JUNIT_TESTS_IN_FLIGHT function os::test::junit::declare_test_start() { local num_tests=${NUM_OS_JUNIT_TESTS_IN_FLIGHT:-0} if [[ "${num_tests}" -ne "0" ]]; then # someone's declaring the starting of a test when a test is already in flight echo "[ERROR] jUnit test marker could not be placed, expected no tests in flight, got ${num_tests}" return 1 fi local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0} if [[ "${num_suites}" -lt "1" ]]; then # we can't end a test if no suites are in flight echo "[ERROR] jUnit test marker could not be placed, expected suites in flight, got ${num_suites}" return 1 fi echo "=== BEGIN TEST CASE ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" NUM_OS_JUNIT_TESTS_IN_FLIGHT=$(( ${num_tests} + 1 )) export NUM_OS_JUNIT_TESTS_IN_FLIGHT } readonly -f os::test::junit::declare_test_start # os::test::junit::declare_test_end prints a message declaring the end of a test case # If there is no test marked as being in flight, this function will fail. # # Globals: # - JUNIT_REPORT_OUTPUT # - NUM_OS_JUNIT_TESTS_IN_FLIGHT # Arguments: # None # Returns: # - decrement NUM_OS_JUNIT_TESTS_IN_FLIGHT function os::test::junit::declare_test_end() { local num_tests=${NUM_OS_JUNIT_TESTS_IN_FLIGHT:-0} if [[ "${num_tests}" -ne "1" ]]; then # someone's declaring the end of a test when a test is not in flight echo "[ERROR] jUnit test marker could not be placed, expected one test in flight, got ${num_tests}" return 1 fi echo "=== END TEST CASE ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}" NUM_OS_JUNIT_TESTS_IN_FLIGHT=$(( ${num_tests} - 1 )) export NUM_OS_JUNIT_TESTS_IN_FLIGHT } readonly -f os::test::junit::declare_test_end # os::test::junit::check_test_counters checks that we do not have any test suites or test cases in flight # This function should be called at the very end of any test script using jUnit markers to make sure no error in # marking has occurred. # # Globals: # - NUM_OS_JUNIT_SUITES_IN_FLIGHT # - NUM_OS_JUNIT_TESTS_IN_FLIGHT # Arguments: # None # Returns: # None function os::test::junit::check_test_counters() { if [[ "${NUM_OS_JUNIT_SUITES_IN_FLIGHT-}" -ne "0" ]]; then echo "[ERROR] Expected no test suites to be marked as in-flight at the end of testing, got ${NUM_OS_JUNIT_SUITES_IN_FLIGHT-}" return 1 elif [[ "${NUM_OS_JUNIT_TESTS_IN_FLIGHT-}" -ne "0" ]]; then echo "[ERROR] Expected no test cases to be marked as in-flight at the end of testing, got ${NUM_OS_JUNIT_TESTS_IN_FLIGHT-}" return 1 fi } readonly -f os::test::junit::check_test_counters # os::test::junit::reconcile_output appends the necessary suite and test end statements to the jUnit output file # in order to ensure that the file is in a consistent state to allow for parsing # # Globals: # - NUM_OS_JUNIT_SUITES_IN_FLIGHT # - NUM_OS_JUNIT_TESTS_IN_FLIGHT # Arguments: # None # Returns: # None function os::test::junit::reconcile_output() { if [[ "${NUM_OS_JUNIT_TESTS_IN_FLIGHT:-0}" = "1" ]]; then os::test::junit::declare_test_end fi for (( i = 0; i < ${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0}; i++ )); do os::test::junit::declare_suite_end done } readonly -f os::test::junit::reconcile_output # os::test::junit::generate_report determines which type of report is to # be generated and does so from the raw output of the tests. # # Globals: # - JUNIT_REPORT_OUTPUT # - ARTIFACT_DIR # Arguments: # None # Returns: # None function os::test::junit::generate_report() { if [[ -z "${JUNIT_REPORT_OUTPUT:-}" || -n "${JUNIT_REPORT_OUTPUT:-}" && ! -s "${JUNIT_REPORT_OUTPUT:-}" ]]; then # we can't generate a report return 0 fi if grep -q "=== END TEST CASE ===" "${JUNIT_REPORT_OUTPUT}"; then os::test::junit::reconcile_output os::test::junit::check_test_counters os::test::junit::internal::generate_report "oscmd" fi } # os::test::junit::internal::generate_report generats an XML jUnit # report for either ` + "`" + `os::cmd` + "`" + ` or ` + "`" + `go test` + "`" + `, based on the passed # argument. If the ` + "`" + `junitreport` + "`" + ` binary is not present, it will be built. # # Globals: # - JUNIT_REPORT_OUTPUT # - ARTIFACT_DIR # Arguments: # - 1: specify which type of tests command output should junitreport read # Returns: # export JUNIT_REPORT_NUM_FAILED function os::test::junit::internal::generate_report() { local report_type="$1" os::util::ensure::built_binary_exists 'junitreport' local report_file report_file="$( mktemp "${ARTIFACT_DIR}/${report_type}_report_XXXXX" ).xml" os::log::info "jUnit XML report placed at $( os::util::repository_relative_path ${report_file} )" junitreport --type "${report_type}" \ --suites nested \ --roots github.com/openshift/origin \ --output "${report_file}" \ <"${JUNIT_REPORT_OUTPUT}" local summary summary=$( junitreport summarize <"${report_file}" ) JUNIT_REPORT_NUM_FAILED="$( grep -oE "[0-9]+ failed" <<<"${summary}" )" export JUNIT_REPORT_NUM_FAILED echo "${summary}" }`) func testExtendedTestdataCmdHackLibTestJunitShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibTestJunitSh, nil } func testExtendedTestdataCmdHackLibTestJunitSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibTestJunitShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/test/junit.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibUtilEnvironmentSh = []byte(`#!/usr/bin/env bash # This script holds library functions for setting up the shell environment for OpenShift scripts # os::util::environment::use_sudo updates $USE_SUDO to be 'true', so that later scripts choosing between # execution using 'sudo' and execution without it chose to use 'sudo' # # Globals: # None # Arguments: # None # Returns: # - export USE_SUDO function os::util::environment::use_sudo() { USE_SUDO=true export USE_SUDO } readonly -f os::util::environment::use_sudo # os::util::environment::setup_time_vars sets up environment variables that describe durations of time # These variables can be used to specify times for other utility functions # # Globals: # None # Arguments: # None # Returns: # - export TIME_MS # - export TIME_SEC # - export TIME_MIN function os::util::environment::setup_time_vars() { TIME_MS=1 export TIME_MS TIME_SEC="$(( 1000 * ${TIME_MS} ))" export TIME_SEC TIME_MIN="$(( 60 * ${TIME_SEC} ))" export TIME_MIN } readonly -f os::util::environment::setup_time_vars # os::util::environment::setup_all_server_vars sets up all environment variables necessary to configure and start an OpenShift server # # Globals: # - OS_ROOT # - PATH # - TMPDIR # - LOG_DIR # - ARTIFACT_DIR # - KUBELET_SCHEME # - KUBELET_BIND_HOST # - KUBELET_HOST # - KUBELET_PORT # - BASETMPDIR # - ETCD_PORT # - ETCD_PEER_PORT # - API_BIND_HOST # - API_HOST # - API_PORT # - API_SCHEME # - PUBLIC_MASTER_HOST # - USE_IMAGES # Arguments: # - 1: the path under the root temporary directory for OpenShift where these subdirectories should be made # Returns: # - export PATH # - export BASETMPDIR # - export LOG_DIR # - export VOLUME_DIR # - export ARTIFACT_DIR # - export FAKE_HOME_DIR # - export KUBELET_SCHEME # - export KUBELET_BIND_HOST # - export KUBELET_HOST # - export KUBELET_PORT # - export ETCD_PORT # - export ETCD_PEER_PORT # - export ETCD_DATA_DIR # - export API_BIND_HOST # - export API_HOST # - export API_PORT # - export API_SCHEME # - export SERVER_CONFIG_DIR # - export MASTER_CONFIG_DIR # - export NODE_CONFIG_DIR # - export USE_IMAGES # - export TAG function os::util::environment::setup_all_server_vars() { os::util::environment::setup_kubelet_vars os::util::environment::setup_etcd_vars os::util::environment::setup_server_vars os::util::environment::setup_images_vars } readonly -f os::util::environment::setup_all_server_vars # os::util::environment::update_path_var updates $PATH so that OpenShift binaries are available # # Globals: # - OS_ROOT # - PATH # Arguments: # None # Returns: # - export PATH function os::util::environment::update_path_var() { local prefix if os::util::find::system_binary 'go' >/dev/null 2>&1; then prefix+="${OS_OUTPUT_BINPATH}/$(os::build::host_platform):" fi if [[ -n "${GOPATH:-}" ]]; then prefix+="${GOPATH}/bin:" fi PATH="${prefix:-}${PATH}" export PATH } readonly -f os::util::environment::update_path_var # os::util::environment::setup_tmpdir_vars sets up temporary directory path variables # # Globals: # - TMPDIR # Arguments: # - 1: the path under the root temporary directory for OpenShift where these subdirectories should be made # Returns: # - export BASETMPDIR # - export BASEOUTDIR # - export LOG_DIR # - export VOLUME_DIR # - export ARTIFACT_DIR # - export FAKE_HOME_DIR # - export OS_TMP_ENV_SET function os::util::environment::setup_tmpdir_vars() { local sub_dir=$1 BASETMPDIR="${TMPDIR:-/tmp}/openshift/${sub_dir}" export BASETMPDIR VOLUME_DIR="${BASETMPDIR}/volumes" export VOLUME_DIR BASEOUTDIR="${OS_OUTPUT_SCRIPTPATH}/${sub_dir}" export BASEOUTDIR LOG_DIR="${ARTIFACT_DIR:-${BASEOUTDIR}}/logs" export LOG_DIR ARTIFACT_DIR="${ARTIFACT_DIR:-${BASEOUTDIR}/artifacts}" export ARTIFACT_DIR FAKE_HOME_DIR="${BASEOUTDIR}/openshift.local.home" export FAKE_HOME_DIR mkdir -p "${LOG_DIR}" "${VOLUME_DIR}" "${ARTIFACT_DIR}" "${FAKE_HOME_DIR}" export OS_TMP_ENV_SET="${sub_dir}" } readonly -f os::util::environment::setup_tmpdir_vars # os::util::environment::setup_kubelet_vars sets up environment variables necessary for interacting with the kubelet # # Globals: # - KUBELET_SCHEME # - KUBELET_BIND_HOST # - KUBELET_HOST # - KUBELET_PORT # Arguments: # None # Returns: # - export KUBELET_SCHEME # - export KUBELET_BIND_HOST # - export KUBELET_HOST # - export KUBELET_PORT function os::util::environment::setup_kubelet_vars() { KUBELET_SCHEME="${KUBELET_SCHEME:-https}" export KUBELET_SCHEME KUBELET_BIND_HOST="${KUBELET_BIND_HOST:-127.0.0.1}" export KUBELET_BIND_HOST KUBELET_HOST="${KUBELET_HOST:-${KUBELET_BIND_HOST}}" export KUBELET_HOST KUBELET_PORT="${KUBELET_PORT:-10250}" export KUBELET_PORT } readonly -f os::util::environment::setup_kubelet_vars # os::util::environment::setup_etcd_vars sets up environment variables necessary for interacting with etcd # # Globals: # - BASETMPDIR # - ETCD_HOST # - ETCD_PORT # - ETCD_PEER_PORT # Arguments: # None # Returns: # - export ETCD_HOST # - export ETCD_PORT # - export ETCD_PEER_PORT # - export ETCD_DATA_DIR function os::util::environment::setup_etcd_vars() { ETCD_HOST="${ETCD_HOST:-127.0.0.1}" export ETCD_HOST ETCD_PORT="${ETCD_PORT:-4001}" export ETCD_PORT ETCD_PEER_PORT="${ETCD_PEER_PORT:-7001}" export ETCD_PEER_PORT ETCD_DATA_DIR="${BASETMPDIR}/etcd" export ETCD_DATA_DIR mkdir -p "${ETCD_DATA_DIR}" } readonly -f os::util::environment::setup_etcd_vars # os::util::environment::setup_server_vars sets up environment variables necessary for interacting with the server # # Globals: # - BASETMPDIR # - KUBELET_HOST # - API_BIND_HOST # - API_HOST # - API_PORT # - API_SCHEME # - PUBLIC_MASTER_HOST # Arguments: # None # Returns: # - export API_BIND_HOST # - export API_HOST # - export API_PORT # - export API_SCHEME # - export SERVER_CONFIG_DIR # - export MASTER_CONFIG_DIR # - export NODE_CONFIG_DIR function os::util::environment::setup_server_vars() { # turn on cache mutation detector every time we start a server KUBE_CACHE_MUTATION_DETECTOR="${KUBE_CACHE_MUTATION_DETECTOR:-true}" export KUBE_CACHE_MUTATION_DETECTOR API_BIND_HOST="${API_BIND_HOST:-127.0.0.1}" export API_BIND_HOST API_HOST="${API_HOST:-${API_BIND_HOST}}" export API_HOST API_PORT="${API_PORT:-8443}" export API_PORT API_SCHEME="${API_SCHEME:-https}" export API_SCHEME MASTER_ADDR="${API_SCHEME}://${API_HOST}:${API_PORT}" export MASTER_ADDR PUBLIC_MASTER_HOST="${PUBLIC_MASTER_HOST:-${API_HOST}}" export PUBLIC_MASTER_HOST SERVER_CONFIG_DIR="${BASETMPDIR}/openshift.local.config" export SERVER_CONFIG_DIR MASTER_CONFIG_DIR="${SERVER_CONFIG_DIR}/master" export MASTER_CONFIG_DIR NODE_CONFIG_DIR="${SERVER_CONFIG_DIR}/node-${KUBELET_HOST}" export NODE_CONFIG_DIR ETCD_CLIENT_CERT="${MASTER_CONFIG_DIR}/master.etcd-client.crt" export ETCD_CLIENT_CERT ETCD_CLIENT_KEY="${MASTER_CONFIG_DIR}/master.etcd-client.key" export ETCD_CLIENT_KEY ETCD_CA_BUNDLE="${MASTER_CONFIG_DIR}/ca-bundle.crt" export ETCD_CA_BUNDLE mkdir -p "${SERVER_CONFIG_DIR}" "${MASTER_CONFIG_DIR}" "${NODE_CONFIG_DIR}" } readonly -f os::util::environment::setup_server_vars # os::util::environment::setup_images_vars sets up environment variables necessary for interacting with release images # # Globals: # - OS_ROOT # - USE_IMAGES # Arguments: # None # Returns: # - export USE_IMAGES # - export TAG # - export MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY function os::util::environment::setup_images_vars() { # Use either the latest release built images, or latest. IMAGE_PREFIX="${OS_IMAGE_PREFIX:-"openshift/origin"}" if [[ -z "${USE_IMAGES-}" ]]; then TAG='latest' export TAG USE_IMAGES="${IMAGE_PREFIX}-\${component}:latest" export USE_IMAGES if [[ -e "${OS_ROOT}/_output/local/releases/.commit" ]]; then TAG="$(cat "${OS_ROOT}/_output/local/releases/.commit")" export TAG USE_IMAGES="${IMAGE_PREFIX}-\${component}:${TAG}" export USE_IMAGES fi fi export MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY="${MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY:-3}" } readonly -f os::util::environment::setup_images_vars `) func testExtendedTestdataCmdHackLibUtilEnvironmentShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibUtilEnvironmentSh, nil } func testExtendedTestdataCmdHackLibUtilEnvironmentSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibUtilEnvironmentShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/environment.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibUtilMiscSh = []byte(`#!/usr/bin/env bash # # This library holds miscellaneous utility functions. If there begin to be groups of functions in this # file that share intent or are thematically similar, they should be split into their own files. # os::util::describe_return_code describes an exit code # # Globals: # - OS_SCRIPT_START_TIME # Arguments: # - 1: exit code to describe # Returns: # None function os::util::describe_return_code() { local return_code=$1 local message="$( os::util::repository_relative_path $0 ) exited with code ${return_code} " if [[ -n "${OS_SCRIPT_START_TIME:-}" ]]; then local end_time end_time="$(date +%s)" local elapsed_time elapsed_time="$(( end_time - OS_SCRIPT_START_TIME ))" local formatted_time formatted_time="$( os::util::format_seconds "${elapsed_time}" )" message+="after ${formatted_time}" fi if [[ "${return_code}" = "0" ]]; then os::log::info "${message}" else os::log::error "${message}" fi } readonly -f os::util::describe_return_code # os::util::install_describe_return_code installs the return code describer for the EXIT trap # If the EXIT trap is not initialized, installing this plugin will initialize it. # # Globals: # None # Arguments: # None # Returns: # - export OS_DESCRIBE_RETURN_CODE # - export OS_SCRIPT_START_TIME function os::util::install_describe_return_code() { export OS_DESCRIBE_RETURN_CODE="true" OS_SCRIPT_START_TIME="$( date +%s )"; export OS_SCRIPT_START_TIME os::util::trap::init_exit } readonly -f os::util::install_describe_return_code # OS_ORIGINAL_WD is the original working directory the script sourcing this utility file was called # from. This is an important directory as if $0 is a relative path, we cannot use the following path # utility without knowing from where $0 is relative. if [[ -z "${OS_ORIGINAL_WD:-}" ]]; then # since this could be sourced in a context where the utilities are already loaded, # we want to ensure that this is re-entrant, so we only set $OS_ORIGINAL_WD if it # is not set already OS_ORIGINAL_WD="$( pwd )" readonly OS_ORIGINAL_WD export OS_ORIGINAL_WD fi # os::util::repository_relative_path returns the relative path from the $OS_ROOT directory to the # given file, if the file is inside of the $OS_ROOT directory. If the file is outside of $OS_ROOT, # this function will return the absolute path to the file # # Globals: # - OS_ROOT # Arguments: # - 1: the path to relativize # Returns: # None function os::util::repository_relative_path() { local filename=$1 local directory; directory="$( dirname "${filename}" )" filename="$( basename "${filename}" )" if [[ "${directory}" != "${OS_ROOT}"* ]]; then pushd "${OS_ORIGINAL_WD}" >/dev/null 2>&1 directory="$( os::util::absolute_path "${directory}" )" popd >/dev/null 2>&1 fi directory="${directory##*${OS_ROOT}/}" echo "${directory}/${filename}" } readonly -f os::util::repository_relative_path # os::util::format_seconds formats a duration of time in seconds to print in HHh MMm SSs # # Globals: # None # Arguments: # - 1: time in seconds to format # Return: # None function os::util::format_seconds() { local raw_seconds=$1 local hours minutes seconds (( hours=raw_seconds/3600 )) (( minutes=(raw_seconds%3600)/60 )) (( seconds=raw_seconds%60 )) printf '%02dh %02dm %02ds' "${hours}" "${minutes}" "${seconds}" } readonly -f os::util::format_seconds # os::util::sed attempts to make our Bash scripts agnostic to the platform # on which they run ` + "`" + `sed` + "`" + ` by glossing over a discrepancy in flag use in GNU. # # Globals: # None # Arguments: # - all: arguments to pass to ` + "`" + `sed -i` + "`" + ` # Return: # None function os::util::sed() { local sudo="${USE_SUDO:+sudo}" if LANG=C sed --help 2>&1 | grep -q "GNU sed"; then ${sudo} sed -i'' "$@" else ${sudo} sed -i '' "$@" fi } readonly -f os::util::sed # os::util::base64decode attempts to make our Bash scripts agnostic to the platform # on which they run ` + "`" + `base64decode` + "`" + ` by glossing over a discrepancy in flag use in GNU. # # Globals: # None # Arguments: # - all: arguments to pass to ` + "`" + `base64decode` + "`" + ` # Return: # None function os::util::base64decode() { if [[ "$(go env GOHOSTOS)" == "darwin" ]]; then base64 -D "$@" else base64 -d "$@" fi } readonly -f os::util::base64decode # os::util::curl_etcd sends a request to the backing etcd store for the master. # We use the administrative client cert and key for access and re-encode them # as necessary for OSX clients. # # Globals: # MASTER_CONFIG_DIR # API_SCHEME # API_HOST # ETCD_PORT # Arguments: # - 1: etcd-relative URL to curl, with leading slash # Returns: # None function os::util::curl_etcd() { local url="$1" local full_url="${API_SCHEME}://${API_HOST}:${ETCD_PORT}${url}" local etcd_client_cert="${MASTER_CONFIG_DIR}/master.etcd-client.crt" local etcd_client_key="${MASTER_CONFIG_DIR}/master.etcd-client.key" local ca_bundle="${MASTER_CONFIG_DIR}/ca-bundle.crt" if curl -V | grep -q 'SecureTransport'; then # on newer OSX ` + "`" + `curl` + "`" + ` implementations, SSL is not used and client certs # and keys are expected to be encoded in P12 format instead of PEM format, # so we need to convert the secrets that the server wrote if we haven't # already done so local etcd_client_cert_p12="${MASTER_CONFIG_DIR}/master.etcd-client.crt.p12" local etcd_client_cert_p12_password="${CURL_CERT_P12_PASSWORD:-'password'}" if [[ ! -f "${etcd_client_cert_p12}" ]]; then openssl pkcs12 -export \ -in "${etcd_client_cert}" \ -inkey "${etcd_client_key}" \ -out "${etcd_client_cert_p12}" \ -password "pass:${etcd_client_cert_p12_password}" fi curl --fail --silent --cacert "${ca_bundle}" \ --cert "${etcd_client_cert_p12}:${etcd_client_cert_p12_password}" "${full_url}" else curl --fail --silent --cacert "${ca_bundle}" \ --cert "${etcd_client_cert}" --key "${etcd_client_key}" "${full_url}" fi } # os::util::ensure_tmpfs ensures that the target dir is mounted on tmpfs # # Globals: # OS_TMPFS_REQUIRED # Arguments: # - 1: target to check # Returns: # None function os::util::ensure_tmpfs() { if [[ -z "${OS_TMPFS_REQUIRED:-}" ]]; then return 0 fi local target="$1" if [[ ! -d "${target}" ]]; then os::log::fatal "Target dir ${target} does not exist, cannot perform fstype check." fi os::log::debug "Filesystem information: $( df -h -T )" os::log::debug "Mount information: $( findmnt --all )" local fstype fstype="$( df --output=fstype "${target}" | tail -n 1 )" if [[ "${fstype}" != "tmpfs" ]]; then local message="Expected \` + "`" + `${target}\` + "`" + ` to be mounted on \` + "`" + `tmpfs\` + "`" + ` but found \` + "`" + `${fstype}\` + "`" + ` instead." os::log::fatal "${message}" fi }`) func testExtendedTestdataCmdHackLibUtilMiscShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibUtilMiscSh, nil } func testExtendedTestdataCmdHackLibUtilMiscSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibUtilMiscShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/misc.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibUtilTextSh = []byte(`#!/usr/bin/env bash # This file contains helpful aliases for manipulating the output text to the terminal as # well as functions for one-command augmented printing. # os::text::reset resets the terminal output to default if it is called in a TTY function os::text::reset() { if os::text::internal::is_tty; then tput sgr0 fi } readonly -f os::text::reset # os::text::bold sets the terminal output to bold text if it is called in a TTY function os::text::bold() { if os::text::internal::is_tty; then tput bold fi } readonly -f os::text::bold # os::text::red sets the terminal output to red text if it is called in a TTY function os::text::red() { if os::text::internal::is_tty; then tput setaf 1 fi } readonly -f os::text::red # os::text::green sets the terminal output to green text if it is called in a TTY function os::text::green() { if os::text::internal::is_tty; then tput setaf 2 fi } readonly -f os::text::green # os::text::blue sets the terminal output to blue text if it is called in a TTY function os::text::blue() { if os::text::internal::is_tty; then tput setaf 4 fi } readonly -f os::text::blue # os::text::yellow sets the terminal output to yellow text if it is called in a TTY function os::text::yellow() { if os::text::internal::is_tty; then tput setaf 11 fi } readonly -f os::text::yellow # os::text::clear_last_line clears the text from the last line of output to the # terminal and leaves the cursor on that line to allow for overwriting that text # if it is called in a TTY function os::text::clear_last_line() { if os::text::internal::is_tty; then tput cuu 1 tput el fi } readonly -f os::text::clear_last_line # os::text::clear_string attempts to clear the entirety of a string from the terminal. # If the string contains literal tabs or other characters that take up more than one # character space in output, or if the window size is changed before this function # is called, it will not function correctly. # No action is taken if this is called outside of a TTY function os::text::clear_string() { local -r string="$1" if os::text::internal::is_tty; then echo "${string}" | while read line; do # num_lines is the number of terminal lines this one line of output # would have taken up with the current terminal width in columns local num_lines=$(( ${#line} / $( tput cols ) )) for (( i = 0; i <= num_lines; i++ )); do os::text::clear_last_line done done fi } # os::text::internal::is_tty determines if we are outputting to a TTY function os::text::internal::is_tty() { [[ -t 1 && -n "${TERM:-}" ]] } readonly -f os::text::internal::is_tty # os::text::print_bold prints all input in bold text function os::text::print_bold() { os::text::bold echo "${*}" os::text::reset } readonly -f os::text::print_bold # os::text::print_red prints all input in red text function os::text::print_red() { os::text::red echo "${*}" os::text::reset } readonly -f os::text::print_red # os::text::print_red_bold prints all input in bold red text function os::text::print_red_bold() { os::text::red os::text::bold echo "${*}" os::text::reset } readonly -f os::text::print_red_bold # os::text::print_green prints all input in green text function os::text::print_green() { os::text::green echo "${*}" os::text::reset } readonly -f os::text::print_green # os::text::print_green_bold prints all input in bold green text function os::text::print_green_bold() { os::text::green os::text::bold echo "${*}" os::text::reset } readonly -f os::text::print_green_bold # os::text::print_blue prints all input in blue text function os::text::print_blue() { os::text::blue echo "${*}" os::text::reset } readonly -f os::text::print_blue # os::text::print_blue_bold prints all input in bold blue text function os::text::print_blue_bold() { os::text::blue os::text::bold echo "${*}" os::text::reset } readonly -f os::text::print_blue_bold # os::text::print_yellow prints all input in yellow text function os::text::print_yellow() { os::text::yellow echo "${*}" os::text::reset } readonly -f os::text::print_yellow # os::text::print_yellow_bold prints all input in bold yellow text function os::text::print_yellow_bold() { os::text::yellow os::text::bold echo "${*}" os::text::reset } readonly -f os::text::print_yellow_bold `) func testExtendedTestdataCmdHackLibUtilTextShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibUtilTextSh, nil } func testExtendedTestdataCmdHackLibUtilTextSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibUtilTextShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/text.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdHackLibUtilTrapSh = []byte(`#!/usr/bin/env bash # # This library defines the trap handlers for the ERR and EXIT signals. Any new handler for these signals # must be added to these handlers and activated by the environment variable mechanism that the rest use. # These functions ensure that no handler can ever alter the exit code that was emitted by a command # in a test script. # os::util::trap::init_err initializes the privileged handler for the ERR signal if it hasn't # been registered already. This will overwrite any other handlers registered on the signal. # # Globals: # None # Arguments: # None # Returns: # None function os::util::trap::init_err() { if ! trap -p ERR | grep -q 'os::util::trap::err_handler'; then trap 'os::util::trap::err_handler;' ERR fi } readonly -f os::util::trap::init_err # os::util::trap::init_exit initializes the privileged handler for the EXIT signal if it hasn't # been registered already. This will overwrite any other handlers registered on the signal. # # Globals: # None # Arguments: # None # Returns: # None function os::util::trap::init_exit() { if ! trap -p EXIT | grep -q 'os::util::trap::exit_handler'; then trap 'os::util::trap::exit_handler;' EXIT fi } readonly -f os::util::trap::init_exit # os::util::trap::err_handler is the handler for the ERR signal. # # Globals: # - OS_TRAP_DEBUG # - OS_USE_STACKTRACE # Arguments: # None # Returns: # - returns original return code, allows privileged handler to exit if necessary function os::util::trap::err_handler() { local -r return_code=$? local -r last_command="${BASH_COMMAND}" if set +o | grep -q '\-o errexit'; then local -r errexit_set=true fi if [[ "${OS_TRAP_DEBUG:-}" = "true" ]]; then echo "[DEBUG] Error handler executing with return code \` + "`" + `${return_code}\` + "`" + `, last command \` + "`" + `${last_command}\` + "`" + `, and errexit set \` + "`" + `${errexit_set:-}\` + "`" + `" fi if [[ "${OS_USE_STACKTRACE:-}" = "true" ]]; then # the OpenShift stacktrace function is treated as a privileged handler for this signal # and is therefore allowed to run outside of a subshell in order to allow it to ` + "`" + `exit` + "`" + ` # if necessary os::log::stacktrace::print "${return_code}" "${last_command}" "${errexit_set:-}" fi return "${return_code}" } readonly -f os::util::trap::err_handler # os::util::trap::exit_handler is the handler for the EXIT signal. # # Globals: # - OS_TRAP_DEBUG # - OS_DESCRIBE_RETURN_CODE # Arguments: # None # Returns: # - original exit code of the script that exited function os::util::trap::exit_handler() { local -r return_code=$? # we do not want these traps to be able to trigger more errors, we can let them fail silently set +o errexit if [[ "${OS_TRAP_DEBUG:-}" = "true" ]]; then echo "[DEBUG] Exit handler executing with return code \` + "`" + `${return_code}\` + "`" + `" fi # the following envars selectively enable optional exit traps, all of which are run inside of # a subshell in order to sandbox them and not allow them to influence how this script will exit if [[ "${OS_DESCRIBE_RETURN_CODE:-}" = "true" ]]; then ( os::util::describe_return_code "${return_code}" ) fi exit "${return_code}" } readonly -f os::util::trap::exit_handler `) func testExtendedTestdataCmdHackLibUtilTrapShBytes() ([]byte, error) { return _testExtendedTestdataCmdHackLibUtilTrapSh, nil } func testExtendedTestdataCmdHackLibUtilTrapSh() (*asset, error) { bytes, err := testExtendedTestdataCmdHackLibUtilTrapShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/hack/lib/util/trap.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdAuthenticationSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT project="$( oc project -q )" if [[ "${project}" == "default" ]]; then echo "Test must be run from a non-default namespace" exit 1 fi # Cleanup cluster resources created by this test ( set +e oc delete oauthaccesstokens --all oc adm policy remove-cluster-role-from-user cluster-debugger user3 exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/authentication" ## Logging in prints useful messages #os::test::junit::declare_suite_start "cmd/authentication/existing-credentials" #os::cmd::expect_success_and_text 'oc login -u user1 -p pw' 'Login successful' #os::cmd::expect_success_and_text 'oc login -u user2 -p pw' 'Login successful' ## Switching to another user using existing credentials informs you #os::cmd::expect_success_and_text 'oc login -u user1' 'Logged into ".*" as "user1" using existing credentials' ## Completing a login as the same user using existing credentials informs you #os::cmd::expect_success_and_text 'oc login -u user1' 'Logged into ".*" as "user1" using existing credentials' ## Return to the system:admin user #os::cmd::expect_success "oc login -u system:admin -n '${project}'" #os::test::junit::declare_suite_end # #os::test::junit::declare_suite_start "cmd/authentication/scopedtokens" #os::cmd::expect_success 'oc adm policy add-role-to-user admin scoped-user' # ## initialize the user object #os::cmd::expect_success 'oc login -u scoped-user -p asdf' #os::cmd::expect_success 'oc login -u system:admin' #username="$(oc get user/scoped-user -o jsonpath='{.metadata.name}')" #useruid="$(oc get user/scoped-user -o jsonpath='{.metadata.uid}')" #os::cmd::expect_success_and_text "oc policy can-i --list -n '${project}' --as=scoped-user" 'get.*pods' #os::cmd::expect_success "oc policy can-i --list --output=yaml" #os::cmd::expect_success "oc policy can-i --list --output=json" #os::cmd::expect_success "oc policy can-i --list" # #whoamitoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=whoami SCOPE=user:info USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" #os::cmd::expect_success_and_text "oc get user/~ --token='${whoamitoken}'" "${username}" #os::cmd::expect_success_and_text "oc whoami --token='${whoamitoken}'" "${username}" #os::cmd::expect_failure_and_text "oc get pods --token='${whoamitoken}' -n '${project}'" "pods is forbidden: User \"scoped-user\" cannot list resource \"pods\" in API group \"\" in the namespace \"${project}\"" # #listprojecttoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=listproject SCOPE=user:list-scoped-projects USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" ## this token doesn't have rights to see any projects even though it can hit the list endpoint, so an empty list is correct ## we'll add another scope that allows listing all known projects even if this token has no other powers in them. #os::cmd::expect_success_and_not_text "oc get projects --token='${listprojecttoken}'" "${project}" #os::cmd::expect_failure_and_text "oc get user/~ --token='${listprojecttoken}'" 'User "scoped-user" cannot get resource "users" in API group "user.openshift.io" at the cluster scope' #os::cmd::expect_failure_and_text "oc get pods --token='${listprojecttoken}' -n '${project}'" "User \"scoped-user\" cannot list resource \"pods\" in API group \"\" in the namespace \"${project}\"" # #listprojecttoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=listallprojects SCOPE=user:list-projects USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" #os::cmd::expect_success_and_text "oc get projects --token='${listprojecttoken}'" "${project}" # #adminnonescalatingpowerstoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=admin SCOPE=role:admin:* USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" #os::cmd::expect_failure_and_text "oc get user/~ --token='${adminnonescalatingpowerstoken}'" 'User "scoped-user" cannot get resource "users" in API group "user.openshift.io" at the cluster scope' #os::cmd::expect_failure_and_text "oc get secrets --token='${adminnonescalatingpowerstoken}' -n '${project}'" "User \"scoped-user\" cannot list resource \"secrets\" in API group \"\" in the namespace \"${project}\"" #os::cmd::expect_success_and_text "oc get 'projects/${project}' --token='${adminnonescalatingpowerstoken}' -n '${project}'" "${project}" # #allescalatingpowerstoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=clusteradmin SCOPE='role:cluster-admin:*:!' USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" #os::cmd::expect_success_and_text "oc get user/~ --token='${allescalatingpowerstoken}'" "${username}" #os::cmd::expect_success "oc get secrets --token='${allescalatingpowerstoken}' -n '${project}'" ## scopes allow it, but authorization doesn't #os::cmd::try_until_failure "oc get secrets --token='${allescalatingpowerstoken}' -n default" #os::cmd::expect_failure_and_text "oc get secrets --token='${allescalatingpowerstoken}' -n default" 'cannot list resource "secrets" in API group "" in the namespace' #os::cmd::expect_success_and_text "oc get projects --token='${allescalatingpowerstoken}'" "${project}" #os::cmd::expect_success_and_text "oc policy can-i --list --token='${allescalatingpowerstoken}' -n '${project}'" 'get.*pods' # #accesstoken="$(oc process -f "${OS_ROOT}/test/testdata/authentication/scoped-token-template.yaml" TOKEN_PREFIX=access SCOPE=user:check-access USER_NAME="${username}" USER_UID="${useruid}" | oc create -f - -o name | awk -F/ '{print $2}')" #os::cmd::expect_success_and_text "curl -k -XPOST -H 'Content-Type: application/json' -H 'Authorization: Bearer ${accesstoken}' '${API_SCHEME}://${API_HOST}:${API_PORT}/apis/authorization.openshift.io/v1/namespaces/${project}/localsubjectaccessreviews' -d '{\"kind\":\"LocalSubjectAccessReview\",\"apiVersion\":\"authorization.openshift.io/v1\",\"namespace\":\"${project}\",\"verb\":\"create\",\"resource\":\"pods\"}'" '"kind": "SubjectAccessReviewResponse"' ## verify group and kind defaulting works correctly #os::cmd::expect_success_and_text "curl -k -XPOST -H 'Content-Type: application/json' -H 'Authorization: Bearer ${accesstoken}' '${API_SCHEME}://${API_HOST}:${API_PORT}/apis/authorization.openshift.io/v1/subjectaccessreviews' -d '{\"namespace\":\"${project}\",\"verb\":\"create\",\"resource\":\"pods\"}'" '"kind": "SubjectAccessReviewResponse"' #os::cmd::expect_success_and_text "oc policy can-i create pods --token='${accesstoken}' -n '${project}' --ignore-scopes" 'yes' #os::cmd::expect_success_and_text "oc policy can-i create pods --token='${accesstoken}' -n '${project}'" 'no' #os::cmd::expect_success_and_text "oc policy can-i create subjectaccessreviews.authorization.openshift.io --token='${accesstoken}' -n '${project}'" 'no' #os::cmd::expect_success_and_text "oc policy can-i create subjectaccessreviews.authorization.openshift.io --token='${accesstoken}' -n '${project}' --ignore-scopes" 'yes' #os::cmd::expect_success_and_text "oc policy can-i create pods --token='${accesstoken}' -n '${project}' --scopes='role:admin:*'" 'yes' #os::cmd::expect_success_and_text "oc policy can-i --list --token='${accesstoken}' -n '${project}' --scopes='role:admin:*'" 'get.*pods' #os::cmd::expect_success_and_not_text "oc policy can-i --list --token='${accesstoken}' -n '${project}'" 'get.*pods' # #os::test::junit::declare_suite_end # #os::test::junit::declare_suite_start "cmd/authentication/debugging" #os::cmd::expect_success_and_text 'oc login -u user3 -p pw' 'Login successful' #os::cmd::expect_success 'oc login -u system:admin' #os::cmd::expect_failure_and_text 'oc get --raw /debug/pprof/ --as=user3' 'Forbidden' #os::cmd::expect_failure_and_text 'oc get --raw /metrics --as=user3' 'Forbidden' #os::cmd::expect_success_and_text 'oc get --raw /healthz --as=user3' 'ok' #os::cmd::expect_success 'oc adm policy add-cluster-role-to-user cluster-debugger user3' #os::cmd::try_until_text 'oc get --raw /debug/pprof/ --as=user3' 'full goroutine stack dump' #os::cmd::expect_success_and_text 'oc get --raw /debug/pprof/ --as=user3' 'full goroutine stack dump' #os::cmd::expect_success_and_text 'oc get --raw /metrics --as=user3' 'apiserver_request_latencies' #os::cmd::expect_success_and_text 'oc get --raw /healthz --as=user3' 'ok' ## TODO validate controller #os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/authentication/scopedtokens" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdAuthenticationShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdAuthenticationSh, nil } func testExtendedTestdataCmdTestCmdAuthenticationSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdAuthenticationShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/authentication.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdBuildsSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/builds" # TODO move this file to test/extended/cli/builds.go os::test::junit::declare_suite_start "cmd/builds/start-build" os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-buildcli.json' # a build for which there is not an upstream tag in the corresponding imagerepo, so # the build should use the image field as defined in the buildconfig # Use basename to transform "build/build-name" into "build-name" started="$(basename $(oc start-build -o=name ruby-sample-build-invalidtag))" os::cmd::expect_success_and_text "oc describe build ${started}" 'openshift/ruby$' frombuild="$(basename $(oc start-build -o=name --from-build="${started}"))" os::cmd::expect_success_and_text "oc describe build ${frombuild}" 'openshift/ruby$' os::cmd::expect_failure_and_text "oc start-build ruby-sample-build-invalid-tag --from-dir=. --from-build=${started}" "cannot use '--from-build' flag with binary builds" os::cmd::expect_failure_and_text "oc start-build ruby-sample-build-invalid-tag --from-file=. --from-build=${started}" "cannot use '--from-build' flag with binary builds" os::cmd::expect_failure_and_text "oc start-build ruby-sample-build-invalid-tag --from-repo=. --from-build=${started}" "cannot use '--from-build' flag with binary builds" # --incremental flag should override Spec.Strategy.SourceStrategy.Incremental os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-s2i-build.json' build_name="$(oc start-build -o=name test)" os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'Incremental Build' build_name="$(oc start-build -o=name --incremental test)" os::cmd::expect_success_and_text "oc describe ${build_name}" 'Incremental Build' os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"sourceStrategy\":{\"incremental\": true}}}}'" build_name="$(oc start-build -o=name test)" os::cmd::expect_success_and_text "oc describe ${build_name}" 'Incremental Build' build_name="$(oc start-build -o=name --incremental=false test)" os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'Incremental Build' os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"sourceStrategy\":{\"incremental\": false}}}}'" build_name="$(oc start-build -o=name test)" os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'Incremental Build' build_name="$(oc start-build -o=name --incremental test)" os::cmd::expect_success_and_text "oc describe ${build_name}" 'Incremental Build' os::cmd::expect_failure_and_text "oc start-build test --no-cache" 'Cannot specify Docker build specific options' os::cmd::expect_failure_and_text "oc start-build test --build-arg=a=b" 'Cannot specify Docker build specific options' os::cmd::expect_success 'oc delete all --selector="name=test"' # --no-cache flag should override Spec.Strategy.SourceStrategy.NoCache os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-docker-build.json' build_name="$(oc start-build -o=name test)" os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'No Cache' build_name="$(oc start-build -o=name --no-cache test)" os::cmd::expect_success_and_text "oc describe ${build_name}" 'No Cache' os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"dockerStrategy\":{\"noCache\": true}}}}'" build_name="$(oc start-build -o=name test)" os::cmd::expect_success_and_text "oc describe ${build_name}" 'No Cache' build_name="$(oc start-build -o=name --no-cache=false test)" os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'No Cache' os::cmd::expect_success "oc patch bc/test -p '{\"spec\":{\"strategy\":{\"dockerStrategy\":{\"noCache\": false}}}}'" build_name="$(oc start-build -o=name test)" os::cmd::expect_success_and_not_text "oc describe ${build_name}" 'No Cache' build_name="$(oc start-build -o=name --no-cache test)" os::cmd::expect_success_and_text "oc describe ${build_name}" 'No Cache' os::cmd::expect_failure_and_text "oc start-build test --incremental" 'Cannot specify Source build specific options' # ensure a specific version can be specified for buildconfigs os::cmd::expect_failure_and_not_text "oc logs bc/test --version=1" "cannot specify a version and a build" os::cmd::expect_success 'oc delete all --selector="name=test"' echo "start-build: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/builds/cancel-build" os::cmd::expect_success_and_text "oc cancel-build ${started} --dump-logs --restart" "build.build.openshift.io/${started} restarted" os::cmd::expect_success 'oc delete all --all' os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-dockerbuild.json -l build=docker | oc create -f -' os::cmd::try_until_success 'oc get build/ruby-sample-build-1' # Uses type/name resource syntax to cancel the build and check for proper message os::cmd::expect_success_and_text 'oc cancel-build build/ruby-sample-build-1' 'build.build.openshift.io/ruby-sample-build-1 cancelled' # Make sure canceling already cancelled build returns proper message os::cmd::expect_success 'oc cancel-build build/ruby-sample-build-1' # Cancel all builds from a build configuration os::cmd::expect_success "oc start-build bc/ruby-sample-build" os::cmd::expect_success "oc start-build bc/ruby-sample-build" lastbuild="$(basename $(oc start-build -o=name bc/ruby-sample-build))" os::cmd::expect_success_and_text 'oc cancel-build bc/ruby-sample-build' "build.build.openshift.io/${lastbuild} cancelled" os::cmd::expect_success_and_text "oc get build ${lastbuild} -o template --template '{{.status.phase}}'" 'Cancelled' builds=$(oc get builds -o template --template '{{range .items}}{{ .status.phase }} {{end}}') for state in $builds; do os::cmd::expect_success "[ \"${state}\" == \"Cancelled\" ]" done # Running this command again when all builds are cancelled should be no-op. os::cmd::expect_success 'oc cancel-build bc/ruby-sample-build' os::cmd::expect_success 'oc delete all --all' os::cmd::expect_success 'oc delete secret dbsecret' echo "cancel-build: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdBuildsShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdBuildsSh, nil } func testExtendedTestdataCmdTestCmdBuildsSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdBuildsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/builds.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdConfigSh = []byte(`#!/bin/bash set -o errexit set -o nounset set -o pipefail OS_ROOT=$(dirname "${BASH_SOURCE}")/../.. source "${OS_ROOT}/hack/lib/init.sh" os::log::stacktrace::install trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates,secrets --all exit 0 ) &>/dev/null # check to make sure that "get"ting a resource with no config file present # still returns error indicating that no config-file is set os::test::junit::declare_suite_start "cmd/configuration" os::cmd::expect_success_and_not_text 'oc get bc' 'does not exist' ( export HOME=/tmp unset KUBECONFIG unset KUBERNETES_MASTER os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --user=""' 'Missing or incomplete configuration info' os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --context=""' 'Missing or incomplete configuration info' os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --cluster=""' 'Missing or incomplete configuration info' os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --context="test"' 'context was not found for specified context: test' os::cmd::expect_failure_and_text 'env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --cluster="test"' 'no server found for cluster "test"' # need some level of default (both upstream and here) to get the pretty auth message because you fail on namespace first. os::cmd::expect_failure_and_text 'KUBERNETES_MASTER=anything env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --user="test"' 'auth info "test" does not exist' os::cmd::expect_failure_and_text 'oc get bc --kubeconfig=missing' 'missing: no such file or directory' # define temp location for new config NEW_CONFIG_LOC="${BASETMPDIR}/new-config.yaml" # make sure non-existing --cluster and --user can still be set os::cmd::expect_success_and_text "oc config set-context new-context-name --cluster=missing-cluster --user=missing-user --namespace=default --kubeconfig='${NEW_CONFIG_LOC}'" 'Context "new-context-name" ' os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST -u KUBECONFIG -u KUBERNETES_MASTER oc get buildconfigs --kubeconfig='${NEW_CONFIG_LOC}'" 'Missing or incomplete configuration info' os::cmd::expect_failure_and_text "env -u KUBERNETES_SERVICE_HOST oc get buildconfigs --kubeconfig='${NEW_CONFIG_LOC}'" 'Missing or incomplete configuration info' ) echo "config error handling: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdConfigShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdConfigSh, nil } func testExtendedTestdataCmdTestCmdConfigSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdConfigShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/config.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdDeploymentsSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/deployments" # This test validates deployments and the env command os::cmd::expect_success 'oc get deploymentConfigs' os::cmd::expect_success 'oc get dc' os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml' os::cmd::expect_success 'oc describe deploymentConfigs test-deployment-config' os::cmd::expect_success_and_text 'oc get dc -o name' 'deploymentconfig.apps.openshift.io/test-deployment-config' os::cmd::try_until_success 'oc get rc/test-deployment-config-1' os::cmd::expect_success_and_text 'oc describe dc test-deployment-config' 'deploymentconfig=test-deployment-config' os::cmd::expect_success_and_text 'oc status' 'dc/test-deployment-config deploys image-registry.openshift-image-registry.svc:5000/openshift/tools:latest' os::cmd::expect_success 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json' os::cmd::try_until_text 'oc status' 'pod/hello-openshift runs' os::test::junit::declare_suite_start "cmd/deployments/env" # Patch a nil list os::cmd::expect_success 'oc set env dc/test-deployment-config TEST=value' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'TEST=value' # Remove only env in the list os::cmd::expect_success 'oc set env dc/test-deployment-config TEST-' os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'TEST=value' # Add back to empty list os::cmd::expect_success 'oc set env dc/test-deployment-config TEST=value' os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config TEST=foo --list' 'TEST=value' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config TEST=foo --list' 'TEST=foo' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo --list' 'TEST=value' os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config OTHER=foo -c ruby --list' 'OTHER=foo' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -c ruby* --list' 'OTHER=foo' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -c *hello* --list' 'OTHER=foo' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -c *world --list' 'OTHER=foo' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo --list' 'OTHER=foo' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config OTHER=foo -o yaml' 'name: OTHER' os::cmd::expect_success_and_text 'echo OTHER=foo | oc set env dc/test-deployment-config -e - --list' 'OTHER=foo' os::cmd::expect_success_and_not_text 'echo #OTHER=foo | oc set env dc/test-deployment-config -e - --list' 'OTHER=foo' os::cmd::expect_success 'oc set env dc/test-deployment-config TEST=bar OTHER=baz BAR-' os::cmd::expect_success_and_text 'oc set env -f ${TEST_DATA}/test-deployment-config.yaml TEST=VERSION -o yaml' 'v1' os::cmd::expect_success 'oc set env dc/test-deployment-config A=a B=b C=c D=d E=e F=f G=g' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'A=a' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'B=b' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'C=c' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'D=d' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'E=e' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'F=f' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'G=g' os::cmd::expect_success 'oc set env dc/test-deployment-config H=h G- E=updated C- A-' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'B=b' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'D=d' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'E=updated' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'F=f' os::cmd::expect_success_and_text 'oc set env dc/test-deployment-config --list' 'H=h' os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'A=a' os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'C=c' os::cmd::expect_success_and_not_text 'oc set env dc/test-deployment-config --list' 'G=g' echo "env: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/config" #os::cmd::expect_failure_and_text 'oc rollout latest test-deployment-config' 'already in progress' #os::cmd::expect_failure_and_text 'oc rollout latest dc/test-deployment-config' 'already in progress' ## ensure that a cancelled deployment can be retried successfully #os::cmd::expect_success 'oc rollout cancel dc/test-deployment-config' #os::cmd::expect_success_and_text 'oc rollout retry dc/test-deployment-config' 'deploymentconfig.apps.openshift.io/test-deployment-config retried rollout' #os::cmd::expect_success 'oc delete deploymentConfigs test-deployment-config' echo "deploymentConfigs: ok" os::test::junit::declare_suite_end os::cmd::expect_success 'oc delete all --all' # TODO: remove, flake caused by deployment controller updating the following dc sleep 1 os::cmd::expect_success 'oc delete all --all' os::cmd::expect_success 'oc process -f ${TEST_DATA}/application-template-dockerbuild-dc.json -l app=dockerbuild | oc create -f -' os::cmd::try_until_success 'oc get rc/database-1' os::test::junit::declare_suite_start "cmd/deployments/get" os::cmd::expect_success_and_text "oc get dc --show-labels" "app=dockerbuild,template=application-template-dockerbuild" os::cmd::expect_success_and_text "oc get dc frontend --show-labels" "app=dockerbuild,template=application-template-dockerbuild" os::cmd::expect_success_and_not_text "oc get dc" "app=dockerbuild,template=application-template-dockerbuild" os::cmd::expect_success_and_not_text "oc get dc frontend" "app=dockerbuild,template=application-template-dockerbuild" os::cmd::expect_success "oc process -f ${TEST_DATA}/old-template.json | oc create -f -" os::cmd::expect_success_and_text "oc get dc/eap-app -o yaml" ":latest" echo "get: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/rollout" os::cmd::try_until_success 'oc rollout pause dc/database' os::cmd::try_until_text "oc get dc/database --template='{{.spec.paused}}'" "true" os::cmd::try_until_success 'oc rollout resume dc/database' os::cmd::try_until_text "oc get dc/database --template='{{.spec.paused}}'" "<no value>" # create a replication controller and attempt to perform ` + "`" + `oc rollout cancel` + "`" + ` on it. # expect an error about the resource type, rather than a panic or a success. os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-replication-controller.yaml' os::cmd::expect_failure_and_text 'oc rollout cancel rc/test-replication-controller' 'expected deployment configuration, got replicationcontrollers' echo "rollout: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/rollback" # should fail because there's no previous deployment os::cmd::expect_failure 'oc rollback database --to-version=1 -o=yaml' os::cmd::expect_failure 'oc rollback dc/database --to-version=1 -o=yaml' os::cmd::expect_failure 'oc rollback dc/database --to-version=1 --dry-run' os::cmd::expect_failure 'oc rollback database-1 -o=yaml' os::cmd::expect_failure 'oc rollback rc/database-1 -o=yaml' os::cmd::expect_failure 'oc rollback database -o yaml' # trigger a new deployment with 'foo' image os::cmd::expect_success 'oc set image dc/database ruby-helloworld-database=foo --source=docker' # wait for the new deployment os::cmd::try_until_success 'oc rollout history dc/database --revision=2' # rolling back to the same revision should fail os::cmd::expect_failure 'oc rollback dc/database --to-version=2' # undo --dry-run should report the original image os::cmd::expect_success_and_text 'oc rollout undo dc/database --dry-run' 'registry.redhat.io/rhel8/mysql-80:latest' echo "rollback: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/stop" os::cmd::expect_success 'oc get dc/database' os::cmd::expect_success 'oc expose dc/database --name=fromdc' # should be a service os::cmd::expect_success 'oc get svc/fromdc' os::cmd::expect_success 'oc delete svc/fromdc' os::cmd::expect_success 'oc delete dc/database' os::cmd::expect_failure 'oc get dc/database' os::cmd::try_until_failure 'oc get rc/database-1' echo "stop: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/autoscale" os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml' os::cmd::expect_success 'oc autoscale dc/test-deployment-config --max 5' os::cmd::expect_success_and_text "oc get hpa/test-deployment-config --template='{{.spec.maxReplicas}}'" "5" os::cmd::expect_success_and_text "oc get hpa/test-deployment-config -o jsonpath='{.spec.scaleTargetRef.apiVersion}'" "apps.openshift.io/v1" os::cmd::expect_success 'oc delete dc/test-deployment-config' os::cmd::expect_success 'oc delete hpa/test-deployment-config' echo "autoscale: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/setimage" os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml' os::cmd::expect_success 'oc set image dc/test-deployment-config ruby-helloworld=myshinynewimage --source=docker' os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].image}'" "myshinynewimage" os::cmd::expect_success 'oc delete dc/test-deployment-config' echo "set image: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/deployments/setdeploymenthook" # Validate the set deployment-hook command arg="-f ${TEST_DATA}/test-deployment-config.yaml" os::cmd::expect_failure_and_text "oc set deployment-hook" "error: one or more deployment configs" os::cmd::expect_failure_and_text "oc set deployment-hook ${arg}" "error: you must specify one of --pre, --mid, or --post" os::cmd::expect_failure_and_text "oc set deployment-hook ${arg} -o yaml --pre -- mycmd" 'deploymentconfigs.apps.openshift.io "test-deployment-config" not found' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local -o yaml --post -- mycmd" 'mycmd' os::cmd::expect_success_and_not_text "oc set deployment-hook ${arg} --local -o yaml --post -- mycmd | oc set deployment-hook -f - --local -o yaml --post --remove" 'mycmd' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre -o yaml -- echo 'hello world'" 'pre:' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre -o yaml -- echo 'hello world'" 'execNewPod:' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre -o yaml -- echo 'hello world'" '\- echo' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre -o yaml -- echo 'hello world'" '\- hello world' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --post -o yaml -- echo 'hello world'" 'post:' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --mid -o yaml -- echo 'hello world'" 'mid:' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --failure-policy=ignore -o yaml -- echo 'hello world'" 'failurePolicy: Ignore' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --failure-policy=retry -o yaml -- echo 'hello world'" 'failurePolicy: Retry' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --failure-policy=abort -o yaml -- echo 'hello world'" 'failurePolicy: Abort' # Non-existent container os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --container=blah -o yaml -- echo 'hello world'" 'does not have a container named' # Non-existent volume os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --volumes=blah -o yaml -- echo 'hello world'" 'does not have a volume named' # Existing container os::cmd::expect_success_and_not_text "oc set deployment-hook ${arg} --local --pre --container=ruby-helloworld -o yaml -- echo 'hello world'" 'does not have a container named' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --container=ruby-helloworld -o yaml -- echo 'hello world'" 'containerName: ruby-helloworld' # Existing volume os::cmd::expect_success_and_not_text "oc set deployment-hook ${arg} --local --pre --volumes=vol1 -o yaml -- echo 'hello world'" 'does not have a volume named' os::cmd::expect_success_and_text "oc set deployment-hook ${arg} --local --pre --volumes=vol1 -o yaml -- echo 'hello world'" '\- vol1' # Server object tests os::cmd::expect_success "oc create -f ${TEST_DATA}/test-deployment-config.yaml" os::cmd::expect_failure_and_text "oc set deployment-hook dc/test-deployment-config --pre" "you must specify a command" os::cmd::expect_success_and_text "oc set deployment-hook test-deployment-config --pre -- echo 'hello world'" "updated" os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --loglevel=1 --pre -- echo 'hello world'" "was not changed" os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "pre:" os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre --failure-policy=abort -- echo 'test'" "updated" os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o yaml" "failurePolicy: Abort" os::cmd::expect_success_and_text "oc set deployment-hook --all --pre -- echo 'all dc'" "updated" os::cmd::expect_success_and_text "oc get dc -o yaml" "all dc" os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre --remove" "updated" os::cmd::expect_success_and_not_text "oc get dc/test-deployment-config -o yaml" "pre:" # Environment handling os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre -o yaml --environment X=Y,Z=W -- echo 'test'" "value: Y,Z=W" os::cmd::expect_success_and_text "oc set deployment-hook dc/test-deployment-config --pre -o yaml --environment X=Y,Z=W -- echo 'test'" "no longer accepts comma-separated list" os::cmd::expect_success_and_not_text "oc set deployment-hook dc/test-deployment-config --pre -o yaml --environment X=Y -- echo 'test'" "no longer accepts comma-separated list" os::cmd::expect_success "oc delete dc/test-deployment-config" echo "set deployment-hook: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdDeploymentsShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdDeploymentsSh, nil } func testExtendedTestdataCmdTestCmdDeploymentsSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdDeploymentsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/deployments.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdDescriberSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/describe" # This test validates non-duplicate errors when describing an existing resource without a defined describer os::cmd::expect_success 'oc create -f - << __EOF__ { "apiVersion": "v1", "involvedObject": { "apiVersion": "v1", "kind": "Pod", "name": "test-pod", "namespace": "cmd-describer" }, "kind": "Event", "message": "test message", "metadata": { "name": "test-event" } } __EOF__ ' os::cmd::try_until_success 'eventnum=$(oc get events | wc -l) && [[ $eventnum -gt 0 ]]' # resources without describers get a default os::cmd::expect_success_and_text 'oc describe events' 'Namespace:\s+cmd-describer' # TemplateInstance os::cmd::expect_success 'oc create -f ${TEST_DATA}/templateinstance_objectkinds.yaml' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Name:\s+templateinstance' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Namespace:\s+cmd-describer' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Type:\s+Ready' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Status:\s+True' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Secret:\s+cmd-describer/secret' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Deployment:\s+cmd-describer/deployment' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Route:\s+cmd-describer/route' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'Route:\s+cmd-describer/newroute' os::cmd::expect_success_and_text 'oc describe templateinstances templateinstance' 'NAME:\s+8 bytes' echo "describer: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdDescriberShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdDescriberSh, nil } func testExtendedTestdataCmdTestCmdDescriberSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdDescriberShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/describer.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdEditSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/edit" # This test validates the edit command os::cmd::expect_success 'oc create -f ${TEST_DATA}/hello-openshift/hello-pod.json' os::cmd::expect_success_and_text 'KUBE_EDITOR=cat oc edit pod/hello-openshift' 'Edit cancelled' os::cmd::expect_success_and_text 'KUBE_EDITOR=cat oc edit pod/hello-openshift' 'name: hello-openshift' #os::cmd::expect_success_and_text 'KUBE_EDITOR=cat oc edit --windows-line-endings pod/hello-openshift | file -' 'CRLF' #os::cmd::expect_success_and_not_text 'KUBE_EDITOR=cat oc edit --windows-line-endings=false pod/hello-openshift | file -' 'CRFL' os::cmd::expect_success 'oc create -f ${TEST_DATA}/services.yaml' os::cmd::expect_success_and_text 'KUBE_EDITOR=cat oc edit svc' 'kind: List' os::cmd::expect_success 'oc create imagestream test' os::cmd::expect_success 'oc tag --source=docker quay.io/openshifttest/hello-openshift:openshift test:new' os::cmd::try_until_success 'oc get istag/test:new' os::cmd::expect_success_and_not_text 'oc get istag/test:new -o jsonpath={.metadata.annotations}' "tags.?:.?hidden" editorfile="$(mktemp -d)/tmp-editor.sh" echo '#!/bin/bash' > ${editorfile} echo 'sed -i "s/^tag: null/tag:\n referencePolicy:\n type: Source/g" $1' >> ${editorfile} echo 'sed -i "s/^metadata:$/metadata:\n annotations:\n tags: hidden/g" $1' >> ${editorfile} chmod +x ${editorfile} os::cmd::expect_success "EDITOR=${editorfile} oc edit istag/test:new" os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.metadata.annotations}' "tags.?:.?hidden" echo "edit: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdEditShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdEditSh, nil } func testExtendedTestdataCmdTestCmdEditSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdEditShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/edit.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdEnvSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT os::test::junit::declare_suite_start "cmd/set-env" # This test validates the value of --image for oc run os::cmd::expect_success 'oc create deploymentconfig testdc --image=busybox' os::cmd::expect_failure_and_text 'oc set env dc/testdc' 'error: at least one environment variable must be provided' os::cmd::expect_success_and_text 'oc set env dc/testdc key=value' 'deploymentconfig.apps.openshift.io/testdc updated' os::cmd::expect_success_and_text 'oc set env dc/testdc --list' 'deploymentconfigs/testdc, container default-container' os::cmd::expect_success_and_text 'oc set env dc --all --containers="default-container" key-' 'deploymentconfig.apps.openshift.io/testdc updated' os::cmd::expect_failure_and_text 'oc set env dc --all --containers="default-container"' 'error: at least one environment variable must be provided' os::cmd::expect_failure_and_not_text 'oc set env --from=secret/mysecret dc/testdc' 'error: at least one environment variable must be provided' os::cmd::expect_failure_and_text 'oc set env dc/testdc test#abc=1234' 'environment variable test#abc=1234 is invalid, a valid environment variable name must consist of alphabetic characters' # ensure deleting a var through --env does not result in an error message os::cmd::expect_success_and_text 'oc set env dc/testdc key=value' 'deploymentconfig.apps.openshift.io/testdc updated' os::cmd::expect_success_and_text 'oc set env dc/testdc dots.in.a.key=dots.in.a.value' 'deploymentconfig.apps.openshift.io/testdc updated' os::cmd::expect_success_and_text 'oc set env dc --all --containers="default-container" --env=key-' 'deploymentconfig.apps.openshift.io/testdc updated' # ensure deleting a var through --env actually deletes the env var os::cmd::expect_success_and_not_text "oc get dc/testdc -o jsonpath='{ .spec.template.spec.containers[?(@.name==\"default-container\")].env }'" 'name.?\:.?key' os::cmd::expect_success_and_text "oc get dc/testdc -o jsonpath='{ .spec.template.spec.containers[?(@.name==\"default-container\")].env }'" 'name.?\:.?dots.in.a.key' os::cmd::expect_success_and_text 'oc set env dc --all --containers="default-container" --env=dots.in.a.key-' 'deploymentconfig.apps.openshift.io/testdc updated' os::cmd::expect_success_and_not_text "oc get dc/testdc -o jsonpath='{ .spec.template.spec.containers[?(@.name==\"default-container\")].env }'" 'name.?\:.?dots.in.a.key' # check that env vars are not split at commas os::cmd::expect_success_and_text 'oc set env -o yaml dc/testdc PASS=x,y=z' 'value: x,y=z' os::cmd::expect_success_and_text 'oc set env -o yaml dc/testdc --env PASS=x,y=z' 'value: x,y=z' # warning is printed when --env has comma in it os::cmd::expect_success_and_text 'oc set env dc/testdc --env PASS=x,y=z' 'no longer accepts comma-separated list' # warning is not printed for variables passed as positional arguments os::cmd::expect_success_and_not_text 'oc set env dc/testdc PASS=x,y=z' 'no longer accepts comma-separated list' # create a build-config object with the JenkinsPipeline strategy os::cmd::expect_success 'oc process -p NAMESPACE=openshift -f ${TEST_DATA}/jenkins/jenkins-ephemeral-template.json | oc create -f -' os::cmd::expect_success "echo 'apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: fake-pipeline spec: source: git: uri: https://github.com/openshift/ruby-hello-world.git strategy: jenkinsPipelineStrategy: {} ' | oc create -f -" # ensure build-config has been created and that its type is "JenkinsPipeline" os::cmd::expect_success_and_text "oc get bc fake-pipeline -o jsonpath='{ .spec.strategy.type }'" 'JenkinsPipeline' # attempt to set an environment variable os::cmd::expect_success_and_text 'oc set env bc/fake-pipeline FOO=BAR' 'buildconfig.build.openshift.io/fake\-pipeline updated' # ensure environment variable was set os::cmd::expect_success_and_text "oc get bc fake-pipeline -o jsonpath='{ .spec.strategy.jenkinsPipelineStrategy.env }'" 'name.?\:.?FOO' os::cmd::expect_success 'oc delete bc fake-pipeline' echo "oc set env: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdEnvShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdEnvSh, nil } func testExtendedTestdataCmdTestCmdEnvSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdEnvShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/env.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdFrameworkTestSh = []byte(`#!/usr/bin/env bash # # This script tests os::test::junit functionality. function exit_trap() { local return_code=$? end_time=$(date +%s) if [[ "${return_code}" -eq "0" ]]; then verb="succeeded" else verb="failed" fi echo "$0 ${verb} after $((${end_time} - ${start_time})) seconds" exit "${return_code}" } trap exit_trap EXIT start_time=$(date +%s) source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" # envars used to track these interactions are not propagated out of the subshells used to run these commands # therefore each os::cmd call is its own sandbox and complicated scenarios need to play out inside one call # however, envars from this scope *are* propagated into each subshell, so they need to be cleared in each call os::test::junit::declare_suite_start 'lib/test/junit' # shouldn't be able to end a suite straight away os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_end' '\[ERROR\] jUnit suite marker could not be placed, expected suites in flight, got 0' # should be able to start one straight away os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever' # should be able to start and end a suite os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever os::test::junit::declare_suite_end' # should not be able to end more suites than are in flight os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever os::test::junit::declare_suite_end os::test::junit::declare_suite_end' '\[ERROR\] jUnit suite marker could not be placed, expected suites in flight, got 0' # should not be able to end more suites than are in flight os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever os::test::junit::declare_suite_start whateverelse os::test::junit::declare_suite_end os::test::junit::declare_suite_end os::test::junit::declare_suite_end' '\[ERROR\] jUnit suite marker could not be placed, expected suites in flight, got 0' # should be able to staart a test os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever os::test::junit::declare_test_start' # shouldn't be able to end a test that hasn't been started os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_test_end' '\[ERROR\] jUnit test marker could not be placed, expected one test in flight, got 0' # should be able to start and end a test case os::cmd::expect_success 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever os::test::junit::declare_test_start os::test::junit::declare_test_end' # shouldn't be able to end too many test cases os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_suite_start whatever os::test::junit::declare_test_start os::test::junit::declare_test_end os::test::junit::declare_test_end' '\[ERROR\] jUnit test marker could not be placed, expected one test in flight, got 0' # shouldn't be able to start a test without a suite os::cmd::expect_failure_and_text 'unset NUM_OS_JUNIT_SUITES_IN_FLIGHT NUM_OS_JUNIT_TESTS_IN_FLIGHT JUNIT_REPORT_OUTPUT os::test::junit::declare_test_start' '\[ERROR\] jUnit test marker could not be placed, expected suites in flight, got 0' os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdFrameworkTestShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdFrameworkTestSh, nil } func testExtendedTestdataCmdTestCmdFrameworkTestSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdFrameworkTestShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/framework-test.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdGetSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all oc delete users.user.openshift.io test-user-1 exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/get" os::cmd::expect_success_and_text 'oc create service loadbalancer testsvc1 --tcp=8080' "service/testsvc1 created" # mixed resource output should print resource kind # prefix even when only one type of resource is present os::cmd::expect_success_and_text 'oc get all' "service/testsvc1" # ensure that getting mixed resource types still returns prefixed resources, if there are at most resources of one type os::cmd::expect_success_and_text 'oc get svc,pod' "service/testsvc1" os::cmd::expect_failure_and_text 'oc get svc,pod testsvc1' "testsvc1" # create second resource type and ensure that prefixed resource names are returned for both os::cmd::expect_success_and_text 'oc create imagestream testimg1' "imagestream.image.openshift.io/testimg1 created" os::cmd::expect_success_and_text 'oc get svc,is' "service/testsvc1" # create second service and expect ` + "`" + `get all` + "`" + ` to still append resource kind to multiple of one type of resource os::cmd::expect_success_and_text 'oc create service loadbalancer testsvc2 --tcp=8081' "service/testsvc2 created" os::cmd::expect_success_and_text 'oc get all' "service/testsvc2" # test tuples of same and different resource kinds (tuples of same resource kind should not return prefixed items). os::cmd::expect_success_and_not_text 'oc get svc/testsvc1 svc/testsvc2' "service/testsvc1" os::cmd::expect_success_and_text 'oc get svc/testsvc1 is/testimg1' "service/testsvc1" os::cmd::expect_success_and_text 'oc get --v=8 svc/testsvc1 is/testimg1' "round_trippers.go" # specific resources should not have their kind prefixed os::cmd::expect_success_and_text 'oc get svc' "testsvc1" # test --show-labels displays labels for users os::cmd::expect_success 'oc create user test-user-1' os::cmd::expect_success 'oc label user/test-user-1 customlabel=true' os::cmd::expect_success_and_text 'oc get users test-user-1 --show-labels' "customlabel=true" os::cmd::expect_success_and_not_text 'oc get users test-user-1' "customlabel=true" # test structured and unstructured resources print generically without panic os::cmd::expect_success_and_text 'oc get projectrequests -o yaml' 'status: Success' os::cmd::expect_success_and_text 'oc get projectrequests,svc,pod -o yaml' 'kind: List' # test --wacth does not result in an error when a resource list is served in multiple chunks os::cmd::expect_success 'oc create cm cmone' os::cmd::expect_success 'oc create cm cmtwo' os::cmd::expect_success 'oc create cm cmthree' os::cmd::expect_success_and_not_text 'oc get configmap --chunk-size=1 --watch --request-timeout=1s' 'watch is only supported on individual resources' os::cmd::expect_success_and_not_text 'oc get configmap --chunk-size=1 --watch-only --request-timeout=1s' 'watch is only supported on individual resources' echo "oc get: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdGetShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdGetSh, nil } func testExtendedTestdataCmdTestCmdGetSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdGetShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/get.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdImageLookupSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,is,pods --all exit 0 ) &> /dev/null project="$( oc project -q )" os::test::junit::declare_suite_start "cmd/image-lookup" ## This test validates image lookup resolution # ## TODO: fix and re-enable these tests before 4.0 release # ## Verify image resolution on default resource types os::cmd::expect_success_and_text "oc import-image --confirm --from=nginx:latest nginx:latest" "sha256:" os::cmd::expect_success_and_text "oc set image-lookup is/nginx" "updated" ## Image lookup works for pods os::cmd::expect_success "oc run --restart=Never --image=nginx:latest nginx" os::cmd::expect_success_and_text "oc get pod/nginx -o jsonpath='{.spec.containers[0].image}'" "nginx@sha256:" ## Image lookup works for jobs os::cmd::expect_success "oc create job --image=nginx:latest nginx" os::cmd::expect_success_and_text "oc get job/nginx -o jsonpath='{.spec.template.spec.containers[0].image}'" "nginx@sha256:" ## Image lookup works for replica sets os::cmd::expect_success "oc create deployment --image=nginx:latest nginx" os::cmd::expect_success_and_text "oc get rs -o jsonpath='{..spec.template.spec.containers[0].image}'" "nginx@sha256:" ## Image lookup works for replication controllers rc='{"kind":"ReplicationController","apiVersion":"v1","metadata":{"name":"nginx"},"spec":{"template":{"metadata":{"labels":{"app":"test"}},"spec":{"containers":[{"name":"main","image":"nginx:latest"}]}}}}' os::cmd::expect_success "echo '${rc}' | oc create -f -" os::cmd::expect_success_and_text "oc get rc/nginx -o jsonpath='{.spec.template.spec.containers[0].image}'" "nginx@sha256:" # ## Verify swapping settings on image stream os::cmd::expect_success_and_text "oc set image-lookup is/nginx --v=1" "was not changed" os::cmd::expect_success_and_text "oc set image-lookup nginx --v=1" "was not changed" os::cmd::expect_success_and_text "oc set image-lookup is --list" "nginx.*true" os::cmd::expect_success_and_text "oc set image-lookup nginx --enabled=false" "updated" os::cmd::expect_success_and_text "oc set image-lookup is --list" "nginx.*false" os::cmd::expect_failure_and_text "oc set image-lookup unknown --list" "the server doesn't have a resource type" os::cmd::expect_success_and_text "oc set image-lookup secrets --list" "false" # ## Clear resources os::cmd::expect_success "oc delete deploy,dc,rs,rc,pods --all" # ## Resource annotated with image lookup will create pods that resolve os::cmd::expect_success "oc tag nginx:latest alternate:latest" rc='{"kind":"Deployment","apiVersion":"apps/v1","metadata":{"name":"alternate"},"spec":{"selector":{"matchLabels":{"app":"test"}},"template":{"metadata":{"labels":{"app":"test"}},"spec":{"containers":[{"name":"main","image":"alternate:latest"}]}}}}' os::cmd::expect_success "echo '${rc}' | oc set image-lookup --local -f - -o json | oc create -f -" os::cmd::expect_success "oc run --restart=Never --image=alternate:latest alternate" os::cmd::expect_success_and_text "oc get pod/alternate -o jsonpath='{.spec.containers[0].image}'" "alternate:latest" os::cmd::expect_success_and_text "oc get rs -o jsonpath='{..spec.template.spec.containers[0].image}'" "nginx@sha256:" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdImageLookupShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdImageLookupSh, nil } func testExtendedTestdataCmdTestCmdImageLookupSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdImageLookupShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/image-lookup.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdImagesSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e original_context="$( oc config current-context )" os::cmd::expect_success 'oc login -u system:admin' cluster_admin_context="$( oc config current-context )" os::cmd::expect_success "oc config use-context '${original_context}'" oc delete project test-cmd-images-2 merge-tags --context=${cluster_admin_context} oc delete all,templates --all --context=${cluster_admin_context} exit 0 ) &> /dev/null project="$( oc project -q )" os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}" # This test validates images and image streams along with the tag and import-image commands # some steps below require that we use system:admin privileges, but we don't # want to stomp on whatever context we were given when we started original_context="$( oc config current-context )" os::cmd::expect_success 'oc login -u system:admin' cluster_admin_context="$( oc config current-context )" os::cmd::expect_success "oc config use-context '${original_context}'" os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/images" os::cmd::expect_success "oc get images --context='${cluster_admin_context}'" os::cmd::expect_success "oc create -f '${TEST_DATA}/test-image.json' --context='${cluster_admin_context}'" os::cmd::expect_success "oc delete images test --context='${cluster_admin_context}'" echo "images: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/imagestreams" os::cmd::expect_success 'oc get imageStreams' os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-image-stream.json' # can't check status since there is no registry running so internalRegistryHostname isn't populated. #os::cmd::expect_success_and_text "oc get imageStreams test --template='{{.status.dockerImageRepository}}'" 'test' os::cmd::expect_success 'oc delete imageStreams test' os::cmd::expect_failure 'oc get imageStreams test' os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json' # can't check status since there is no registry running so internalRegistryHostname isn't populated. #os::cmd::expect_success_and_text "oc get imageStreams ruby --template='{{.status.dockerImageRepository}}'" 'ruby' #os::cmd::expect_success_and_text "oc get imageStreams nodejs --template='{{.status.dockerImageRepository}}'" 'nodejs' #os::cmd::expect_success_and_text "oc get imageStreams wildfly --template='{{.status.dockerImageRepository}}'" 'wildfly' #os::cmd::expect_success_and_text "oc get imageStreams mysql --template='{{.status.dockerImageRepository}}'" 'mysql' #os::cmd::expect_success_and_text "oc get imageStreams postgresql --template='{{.status.dockerImageRepository}}'" 'postgresql' #os::cmd::expect_success_and_text "oc get imageStreams mongodb --template='{{.status.dockerImageRepository}}'" 'mongodb' #os::cmd::expect_success_and_text "oc get imageStreams httpd --template='{{.status.dockerImageRepository}}'" 'httpd' # verify the image repository had its tags populated os::cmd::try_until_success 'oc get imagestreamtags wildfly:latest' os::cmd::expect_success_and_text "oc get imageStreams wildfly --template='{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}'" '[0-9]{4}\-[0-9]{2}\-[0-9]{2}' # expect a date like YYYY-MM-DD os::cmd::expect_success_and_text 'oc get istag' 'wildfly' # create an image stream and post a mapping to it #os::cmd::expect_success 'oc create imagestream test' #os::cmd::expect_success 'oc create -f test/testdata/mysql-image-stream-mapping.yaml' #os::cmd::expect_success_and_text 'oc get istag/test:new --template="{{ index .image.dockerImageMetadata.Config.Entrypoint 0 }}"' "docker-entrypoint.sh" #os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.image.metadata.name}' 'sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237' # reference should point to the current repository, and that repository should match the reported dockerImageRepository for pushes #repository="$( oc get is/test -o jsonpath='{.status.dockerImageRepository}' )" #os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.image.dockerImageReference}' "^$repository@sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237" #os::cmd::expect_success_and_text 'oc get istag/test:new -o jsonpath={.image.dockerImageReference}' "/$project/test@sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237" #repository="$( oc get is/test -o jsonpath='{.status.dockerImageRepository}' )" #os::cmd::expect_success "oc annotate --context='${cluster_admin_context}' --overwrite image/sha256:b2f400f4a5e003b0543decf61a0a010939f3fba07bafa226f11ed7b5f1e81237 images.openshift.io/deny-execution=true" # TODO: re-enable before 4.0 release #os::cmd::expect_failure_and_text "oc run vulnerable --image=${repository}:new --restart=Never" 'spec.containers\[0\].image: Forbidden: this image is prohibited by policy' # test image stream tag operations os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.generation}' '2' os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.kind}' 'ImageStreamTag' os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.name}' '21.0' os::cmd::expect_success 'oc annotate istag/wildfly:latest foo=bar' os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.metadata.annotations.foo}' 'bar' os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.annotations.foo}' 'bar' os::cmd::expect_success 'oc annotate istag/wildfly:latest foo-' os::cmd::expect_success_and_not_text 'oc get istag/wildfly:latest -o jsonpath={.metadata.annotations}' 'bar' os::cmd::expect_success_and_not_text 'oc get istag/wildfly:latest -o jsonpath={.tag.annotations}' 'bar' os::cmd::expect_success "oc patch istag/wildfly:latest -p='{\"tag\":{\"from\":{\"kind\":\"DockerImage\",\"name\":\"quay.io/wildfly/wildfly-centos7:19.0\"}}}'" os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.kind}' 'DockerImage' os::cmd::expect_success_and_text 'oc get istag/wildfly:latest -o jsonpath={.tag.from.name}' 'quay.io/wildfly/wildfly-centos7:19.0' os::cmd::expect_success_and_not_text 'oc get istag/wildfly:latest -o jsonpath={.tag.generation}' '2' # create an image stream tag os::cmd::expect_success 'oc create imagestreamtag tag:1 --from=wildfly:21.0' os::cmd::expect_success 'oc create imagestreamtag tag:2 --from-image=quay.io/openshifttest/hello-openshift:openshift' os::cmd::try_until_success 'oc get imagestreamtags tag:2' os::cmd::expect_success 'oc create imagestreamtag tag:3 -A foo=bar' os::cmd::expect_success 'oc create imagestreamtag tag:4 --from=:2' os::cmd::expect_success 'oc create imagestreamtag tag:5 --from=tag:2' os::cmd::expect_success 'oc create imagestreamtag tag:6 --reference --from-image=quay.io/openshifttest/hello-openshift:openshift' os::cmd::expect_success 'oc create imagestreamtag tag:7 --reference-policy=Local --from=tag:2' os::cmd::expect_success 'oc create istag tag:8 --insecure --from-image=quay.io/openshifttest/hello-openshift:openshift' os::cmd::try_until_success 'oc get imagestreamtags tag:8' os::cmd::expect_success 'oc create imagestreamtag tag:9 --scheduled --reference-policy=Local --from-image=quay.io/openshifttest/hello-openshift:openshift' os::cmd::expect_success 'oc create imagestream tag-b' os::cmd::expect_success 'oc create imagestreamtag tag-b:1 --from-image=quay.io/wildfly/wildfly-centos7:20.0' os::cmd::expect_success 'oc create imagestreamtag tag-c:1 -A annotation.with.dots=are.ok' os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-b:1 --from=quay.io/wildfly/wildfly-centos7:20.0' 'registry may not be specified' os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-c --from-image=quay.io/openshifttest/hello-openshift:openshift' 'must be of the form <stream_name>:<tag>' os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-c:1 -A foo' 'annotations must be of the form key=value, but is "foo"' os::cmd::expect_failure_and_text 'oc create imagestreamtag tag-c:2 --from=mysql --from-image=quay.io/openshifttest/hello-openshift:openshift' '\--from and --from-image may not be used together' os::cmd::expect_success_and_text 'oc get istag/tag:1 -o jsonpath={.image.dockerImageReference}' 'wildfly-centos7.*@sha256:' tag1=$( oc get istag/wildfly:20.0 -o jsonpath={.image.metadata.name} ) os::cmd::expect_success_and_text 'oc get istag/tag-b:1 -o jsonpath={.image.metadata.name}' "${tag1}" os::cmd::expect_success_and_text 'oc get istag/tag:2 -o jsonpath={.image.dockerImageReference}' 'hello-openshift@sha256:' tag2=$( oc get istag/tag:2 -o jsonpath={.image.metadata.name} ) os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"3\")].annotations.foo}'" 'bar' os::cmd::expect_success_and_text 'oc get istag/tag:4 -o jsonpath={.image.metadata.name}' "${tag2}" os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"4\")].from.name}'" '^2$' os::cmd::expect_success_and_text 'oc get istag/tag:5 -o jsonpath={.image.metadata.name}' "${tag2}" os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"6\")].reference}'" 'true' os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"7\")].referencePolicy}'" 'Local' os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"8\")].importPolicy.insecure}'" 'true' os::cmd::expect_success_and_text "oc get is/tag -o 'jsonpath={.spec.tags[?(@.name==\"9\")].importPolicy.scheduled}'" 'true' os::cmd::expect_success 'oc delete imageStreams ruby' os::cmd::expect_success 'oc delete imageStreams nodejs' os::cmd::expect_success 'oc delete imageStreams wildfly' os::cmd::expect_success 'oc delete imageStreams postgresql' os::cmd::expect_success 'oc delete imageStreams mongodb' os::cmd::expect_failure 'oc get imageStreams ruby' os::cmd::expect_failure 'oc get imageStreams nodejs' os::cmd::expect_failure 'oc get imageStreams postgresql' os::cmd::expect_failure 'oc get imageStreams mongodb' os::cmd::expect_failure 'oc get imageStreams wildfly' os::cmd::try_until_success 'oc get imagestreamTags mariadb:10.5' os::cmd::expect_success_and_text "oc get imagestreams mysql --template='{{ index .metadata.annotations \"openshift.io/image.dockerRepositoryCheck\"}}'" '[0-9]{4}\-[0-9]{2}\-[0-9]{2}' # expect a date like YYYY-MM-DD os::cmd::expect_success 'oc describe istag/mysql:latest' os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Environment:' os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Image Created:' os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Image Name:' os::cmd::expect_success_and_text 'oc describe istag/mysql:latest' 'Layers:' name=$(oc get istag/mysql:latest --template='{{ .image.metadata.name }}') imagename="isimage/mysql@${name:0:15}" os::cmd::expect_success "oc describe ${imagename}" os::cmd::expect_success_and_text "oc describe ${imagename}" 'Environment:' os::cmd::expect_success_and_text "oc describe ${imagename}" 'Image Created:' os::cmd::expect_success_and_text "oc describe ${imagename}" 'Image Name:' # test prefer-os and prefer-arch annotations os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-multiarch-stream.yaml' os::cmd::try_until_success 'oc get istag test-multiarch-stream:linux-amd64' os::cmd::try_until_success 'oc get istag test-multiarch-stream:linux-s390x' os::cmd::expect_success_and_text 'oc get istag test-multiarch-stream:linux-amd64 --template={{.image.dockerImageMetadata.Architecture}}' 'amd64' os::cmd::expect_success_and_text 'oc get istag test-multiarch-stream:linux-s390x --template={{.image.dockerImageMetadata.Architecture}}' 's390x' os::cmd::expect_success 'oc delete is test-multiarch-stream' echo "imageStreams: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/import-image" # should follow the latest reference to 10.5 and update that, and leave latest unchanged os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 1).from.kind}}'" 'DockerImage' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 2).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 2).from.name}}'" '10.5' # import existing tag (implicit latest) os::cmd::expect_success_and_text 'oc import-image mariadb' 'sha256:' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 1).from.kind}}'" 'DockerImage' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 2).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 2).from.name}}'" '10.5' # should prevent changing source os::cmd::expect_failure_and_text 'oc import-image mariadb --from=quay.io/openshifttest/hello-openshift:openshift' "use the 'tag' command if you want to change the source" os::cmd::expect_success 'oc describe is/mariadb' # import existing tag (explicit) os::cmd::expect_success_and_text 'oc import-image mariadb:10.5' "sha256:" os::cmd::expect_success_and_text 'oc import-image mariadb:latest' "sha256:" # import existing image stream creating new tag os::cmd::expect_success_and_text 'oc import-image mariadb:external --from=quay.io/openshifttest/hello-openshift:openshift' "sha256:" os::cmd::expect_success_and_text "oc get istag/mariadb:external --template='{{.tag.from.kind}}'" 'DockerImage' os::cmd::expect_success_and_text "oc get istag/mariadb:external --template='{{.tag.from.name}}'" 'quay.io/openshifttest/hello-openshift:openshift' # import creates new image stream with single tag os::cmd::expect_failure_and_text 'oc import-image mariadb-new-single:latest --from=quay.io/openshifttest/hello-openshift:openshift' '\-\-confirm' os::cmd::expect_success_and_text 'oc import-image mariadb-new-single:latest --from=quay.io/openshifttest/hello-openshift:openshift --confirm' 'sha256:' os::cmd::expect_success_and_text "oc get is/mariadb-new-single --template='{{(len .spec.tags)}}'" '1' os::cmd::expect_success 'oc delete is/mariadb-new-single' # import creates new image stream with all tags os::cmd::expect_failure_and_text 'oc import-image mariadb-new-all --from=quay.io/openshifttest/hello-openshift --all' '\-\-confirm' os::cmd::expect_success_and_text 'oc import-image mariadb-new-all --from=quay.io/openshifttest/hello-openshift --all --confirm --request-timeout=1m' 'sha256:' name=$(oc get istag/mariadb-new-all:openshift --template='{{ .image.metadata.name }}') echo "import-image: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/tag" # oc tag os::cmd::expect_success 'oc tag mariadb:latest mariadb:tag1 --alias' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 4).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success "oc tag mariadb@${name} mariadb:tag2 --alias" os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 5).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success 'oc tag mariadb:notfound mariadb:tag3 --alias' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 6).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success 'oc tag --source=imagestreamtag mariadb:latest mariadb:tag4 --alias' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 7).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success 'oc tag --source=istag mariadb:latest mariadb:tag5 --alias' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 8).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success "oc tag --source=imagestreamimage mariadb@${name} mariadb:tag6 --alias" os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 9).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success "oc tag --source=isimage mariadb@${name} mariadb:tag7 --alias" os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 10).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success 'oc tag --source=docker mariadb:latest mariadb:tag8 --alias' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 11).from.kind}}'" 'DockerImage' os::cmd::expect_success 'oc tag mariadb:latest mariadb:zzz mariadb:yyy --alias' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 12).from.kind}}'" 'ImageStreamTag' os::cmd::expect_success_and_text "oc get is/mariadb --template='{{(index .spec.tags 13).from.kind}}'" 'ImageStreamTag' os::cmd::expect_failure_and_text 'oc tag mariadb:latest tagtest:tag1 --alias' 'cannot set alias across' # label image imgsha256=$(oc get istag/mariadb:latest --template='{{ .image.metadata.name }}') os::cmd::expect_success "oc label image ${imgsha256} foo=bar || true" os::cmd::expect_success_and_text "oc get image ${imgsha256} --show-labels" 'foo=bar' # tag labeled image os::cmd::expect_success 'oc label is/mariadb labelA=value' os::cmd::expect_success 'oc tag mariadb:latest mariadb:labeled' os::cmd::expect_success_and_text "oc get istag/mariadb:labeled -o jsonpath='{.metadata.labels.labelA}'" 'value' # test copying tags os::cmd::expect_success 'oc tag quay.io/openshift/origin-cli:4.6 newrepo:latest' os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'DockerImage' os::cmd::try_until_success 'oc get istag/mariadb:10.5' # default behavior is to copy the current image, but since this is an external image we preserve the dockerImageReference os::cmd::expect_success 'oc tag mariadb:10.5 newrepo:latest' os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .status.tags 0 \"items\" 0).dockerImageReference}}'" '^quay.io/centos7/mariadb-105-centos7@sha256:' # when copying a tag that points to the internal registry, update the container image reference #os::cmd::expect_success "oc tag test:new newrepo:direct" #os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' "/$project/newrepo@sha256:" # test references os::cmd::expect_success 'oc tag mariadb:10.5 reference:latest --reference' os::cmd::expect_success_and_text "oc get is/reference --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success_and_text "oc get is/reference --template='{{(index .spec.tags 0).reference}}'" 'true' # create a second project to test tagging across projects os::cmd::expect_success 'oc new-project test-cmd-images-2' os::cmd::expect_success "oc tag $project/mariadb:10.5 newrepo:latest" os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success_and_text 'oc get istag/newrepo:latest -o jsonpath={.image.dockerImageReference}' 'quay.io/centos7/mariadb-105-centos7@sha256:' # tag across projects without specifying the source's project os::cmd::expect_success_and_text "oc tag newrepo:latest '${project}/mariadb:tag1'" "mariadb:tag1 set to" os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).name}}'" "latest" # tagging an image with a DockerImageReference that points to the internal registry across namespaces updates the reference #os::cmd::expect_success "oc tag $project/test:new newrepo:direct" # reference should point to the current repository, and that repository should match the reported dockerImageRepository for pushes # can't check status since there is no registry running so internalRegistryHostname isn't populated. #repository="$( oc get is/newrepo -o jsonpath='{.status.dockerImageRepository}' )" #os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' "^$repository@sha256:" #os::cmd::expect_success_and_text 'oc get istag/newrepo:direct -o jsonpath={.image.dockerImageReference}' '/test-cmd-images-2/newrepo@sha256:' # tagging an image using --reference does not #os::cmd::expect_success "oc tag $project/test:new newrepo:indirect --reference" #os::cmd::expect_success_and_text 'oc get istag/newrepo:indirect -o jsonpath={.image.dockerImageReference}' "/$project/test@sha256:" os::cmd::expect_success "oc project $project" # test scheduled and insecure tagging os::cmd::expect_success 'oc tag --source=docker mariadb:10.5 newrepo:latest --scheduled' os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).importPolicy.scheduled}}'" 'true' os::cmd::expect_success_and_text "oc describe is/newrepo" 'updates automatically from registry mariadb:10.5' os::cmd::expect_success 'oc tag --source=docker mariadb:10.5 newrepo:latest --insecure' os::cmd::expect_success_and_text "oc describe is/newrepo" 'will use insecure HTTPS or HTTP connections' os::cmd::expect_success_and_not_text "oc describe is/newrepo" 'updates automatically from' os::cmd::expect_success_and_text "oc get is/newrepo --template='{{(index .spec.tags 0).importPolicy.insecure}}'" 'true' # test creating streams that don't exist os::cmd::expect_failure_and_text 'oc get imageStreams tagtest1' 'not found' os::cmd::expect_failure_and_text 'oc get imageStreams tagtest2' 'not found' os::cmd::expect_success 'oc tag mariadb:latest tagtest1:latest tagtest2:latest' os::cmd::expect_success_and_text "oc get is/tagtest1 --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success_and_text "oc get is/tagtest2 --template='{{(index .spec.tags 0).from.kind}}'" 'ImageStreamImage' os::cmd::expect_success 'oc delete is/tagtest1 is/tagtest2' os::cmd::expect_success_and_text 'oc tag mariadb:latest tagtest:new1' 'Tag tagtest:new1 set to mariadb@sha256:' # test deleting a spec tag using oc tag os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-stream.yaml' os::cmd::expect_success_and_text 'oc tag test-stream:latest -d' 'Deleted' os::cmd::expect_success 'oc delete is/test-stream' echo "tag: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/delete-istag" # test deleting a tag using oc delete os::cmd::expect_success_and_text "oc get is perl --template '{{(index .spec.tags 0).name}}'" '5.30-' os::cmd::expect_success_and_text "oc get is perl --template '{{(index .status.tags 0).tag}}'" '5.30-' os::cmd::expect_success_and_text "oc describe is perl | sed -n -e '0,/^Tags:/d' -e '/^\s\+/d' -e '/./p' | head -n 1" '5.30-' os::cmd::expect_success "oc delete istag/perl:5.30-el7 --context='${cluster_admin_context}'" os::cmd::expect_success_and_not_text 'oc get is/perl --template={{.spec.tags}}' 'name:5.30-el7' os::cmd::expect_success_and_not_text 'oc get is/perl --template={{.status.tags}}' 'tag:5.30-el7' os::cmd::expect_success 'oc delete all --all' echo "delete istag: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/merge-tags-on-apply" os::cmd::expect_success 'oc new-project merge-tags' os::cmd::expect_success 'oc create -f ${TEST_DATA}/image-streams/image-streams-centos7.json' os::cmd::expect_success_and_text 'oc get is ruby -o jsonpath={.spec.tags[*].name}' '2.7-ubi8 3.0-ubi7 3.0-ubi9 3.3-ubi8 latest' os::cmd::expect_success 'oc apply -f ${TEST_DATA}/modified-ruby-imagestream.json' os::cmd::expect_success_and_text 'oc get is ruby -o jsonpath={.spec.tags[*].name}' '2.7-ubi8 3.0-ubi7 3.0-ubi9 3.3-ubi8 latest newtag' os::cmd::expect_success_and_text 'oc get is ruby -o jsonpath={.spec.tags[0].annotations.version}' '2.7 patched' os::cmd::expect_success 'oc delete project merge-tags' echo "apply new imagestream tags: ok" os::test::junit::declare_suite_end # test importing images with wrong docker secrets os::test::junit::declare_suite_start "cmd/images${IMAGES_TESTS_POSTFIX:-}/import-public-images-with-fake-secret" os::cmd::expect_success 'oc new-project import-images' os::cmd::expect_success 'oc create secret docker-registry dummy-secret1 --docker-server=docker.io --docker-username=dummy1 --docker-password=dummy1 --docker-email==dummy1@example.com' os::cmd::expect_success 'oc create secret docker-registry dummy-secret2 --docker-server=docker.io --docker-username=dummy2 --docker-password=dummy2 --docker-email==dummy2@example.com' os::cmd::expect_success_and_text 'oc import-image example --from=openshift/hello-openshift --confirm' 'imagestream.image.openshift.io/example imported' os::cmd::expect_success 'oc delete project import-images' echo "import public images with fake secret ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdImagesShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdImagesSh, nil } func testExtendedTestdataCmdTestCmdImagesSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdImagesShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/images.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdPrinterSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Test that resource printer includes resource kind on multiple resources os::test::junit::declare_suite_start "cmd/basicresources/printer" os::cmd::expect_success 'oc create imagestream test1' os::cmd::expect_success 'oc new-app openshift/nodejs' os::cmd::expect_success_and_text 'oc get all' 'imagestream.image.openshift.io/test1' os::cmd::expect_success_and_not_text 'oc get is' 'imagestream.image.openshift.io/test1' # Test that resource printer includes namespaces for buildconfigs with custom strategies os::cmd::expect_success 'oc create -f ${TEST_DATA}/application-template-custombuild.json' os::cmd::expect_success_and_text 'oc new-app ruby-helloworld-sample' 'deployment.*.apps.* "frontend" created' os::cmd::expect_success_and_text 'oc get all --all-namespaces' 'cmd-printer[\ ]+buildconfig.build.openshift.io\/ruby\-sample\-build' # Test that infos printer supports all outputFormat options os::cmd::expect_success_and_text 'oc new-app openshift/nodejs --dry-run -o yaml | oc set env --local -f - MYVAR=value' 'deployment.*.apps.*/nodejs updated' os::cmd::expect_success_and_text 'oc new-app openshift/nodejs --dry-run -o yaml | oc set env --local -f - MYVAR=value -o yaml' 'apiVersion: apps.*/v1' os::cmd::expect_success_and_text 'oc new-app openshift/nodejs --dry-run -o yaml | oc set env --local -f - MYVAR=value -o json' '"apiVersion": "apps.*/v1"' echo "resource printer: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdPrinterShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdPrinterSh, nil } func testExtendedTestdataCmdTestCmdPrinterSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdPrinterShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/printer.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdQuotaSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT os::test::junit::declare_suite_start "cmd/quota" # Cleanup cluster resources created by this test suite ( set +e oc delete namespace quota-{foo,bar,asmail,images} oc wait --for=delete namespace quota-{foo,bar,asmail,images} --timeout=60s || true oc delete clusterresourcequotas.quota.openshift.io "for-deads" oc delete clusterresourcequotas.quota.openshift.io "for-deads-by-annotation" oc delete clusterresourcequotas.quota.openshift.io "for-deads-email-by-annotation" oc delete clusterresourcequotas.quota.openshift.io "annotation-value-with-commas" exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/quota/clusterquota" # This tests creating a clusterresourcequota against an existing namespace with a known number of resources os::cmd::expect_success 'oc new-project quota-foo --as=deads --as-group=system:authenticated --as-group=system:authenticated:oauth' os::cmd::expect_success 'oc label namespace/quota-foo owner=deads' # before k8s 1.24 this will return 9, starting from 1.24 it'll return 6 # OCP 4.16+ no longer creates legacy API tokens so it will only return 3 os::cmd::try_until_text 'oc get secrets -o name -n quota-foo | wc -l' '3|6|9' os::cmd::expect_success 'oc create clusterquota for-deads --project-label-selector=owner=deads --hard=secrets=10' os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-foo --as deads -o name' "for-deads" # before k8s 1.24 this will return 9, starting from 1.24 it'll return 6 # OCP 4.16+ no longer creates legacy API tokens so it will only return 3 os::cmd::try_until_text 'oc get secrets --all-namespaces; oc get appliedclusterresourcequota/for-deads -n quota-foo --as deads -o jsonpath=used={.status.total.used.secrets}' "used=3|used=6|used=9" os::cmd::expect_failure_and_text 'oc create clusterquota for-deads-malformed --project-annotation-selector="openshift.#$%/requester=deads"' "prefix part a (DNS-1123|lowercase RFC 1123) subdomain must consist of lower case alphanumeric characters" os::cmd::expect_failure_and_text 'oc create clusterquota for-deads-malformed --project-annotation-selector=openshift.io/requester=deads,openshift.io/novalue' "Malformed annotation selector" os::cmd::expect_success 'oc create clusterquota for-deads-by-annotation --project-annotation-selector=openshift.io/requester=deads --hard=secrets=50' os::cmd::expect_success 'oc create clusterquota for-deads-email-by-annotation --project-annotation-selector=openshift.io/requester=deads@deads.io --hard=secrets=50' os::cmd::expect_success 'oc create clusterresourcequota annotation-value-with-commas --project-annotation-selector="openshift.io/requester=deads,\"openshift.io/withcomma=yes,true,1\"" --hard=pods=10' os::cmd::expect_success 'oc new-project quota-bar --as=deads --as-group=system:authenticated --as-group=system:authenticated:oauth' os::cmd::expect_success 'oc new-project quota-asmail --as=deads@deads.io --as-group=system:authenticated --as-group=system:authenticated:oauth' os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-bar --as deads -o name' "for-deads-by-annotation" os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-foo --as deads -o name' "for-deads-by-annotation" os::cmd::try_until_text 'oc get appliedclusterresourcequota -n quota-asmail --as deads@deads.io -o name' "for-deads-email-by-annotation" # the point of the test is to make sure that clusterquota is counting correct and secrets are auto-created and countable # the create_dockercfg controller can issue multiple creates if the token controller doesn't fill them in, but the creates are duplicates # since an annotation tracks the intended secrets to be created. That results in multi-counting quota until reconciliation runs # do not go past 26. If you get to 27, you might be selecting an extra namespace. # OCP 4.16+ no longer creates legacy API tokens so we expect much fewer secrets (6) os::cmd::try_until_text 'oc get secrets --all-namespaces; oc get appliedclusterresourcequota/for-deads-by-annotation -n quota-bar --as deads -o jsonpath=used={.status.total.used.secrets}' "used=([6-9]|1[0-9]|20|21|22|23|24|25|26)" os::cmd::expect_success 'oc delete project quota-foo' os::cmd::try_until_not_text 'oc get clusterresourcequota/for-deads-by-annotation -o jsonpath="{.status.namespaces[*].namespace}"' 'quota-foo' os::cmd::expect_success 'oc delete project quota-bar' os::cmd::expect_success 'oc delete project quota-asmail' echo "clusterquota: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/quota/imagestreams" os::cmd::expect_success 'oc new-project quota-images --as=deads --as-group=system:authenticated --as-group=system:authenticated:oauth' os::cmd::expect_success 'oc create quota -n quota-images is-quota --hard openshift.io/imagestreams=1' os::cmd::try_until_success 'oc tag -n quota-images openshift/hello-openshift myis2:v2' os::cmd::expect_failure_and_text 'oc tag -n quota-images busybox mybox:v1' "exceeded quota" os::cmd::expect_failure_and_text 'oc import-image centos -n quota-images --from=quay.io/centos7:latest --confirm=true' "exceeded quota" os::cmd::expect_success 'oc delete project quota-images' echo "imagestreams: ok" os::test::junit::declare_suite_end os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdQuotaShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdQuotaSh, nil } func testExtendedTestdataCmdTestCmdQuotaSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdQuotaShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/quota.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdSecretsSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates,secrets --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/secrets" # This test validates secret interaction touch Makefile os::cmd::expect_success 'oc create secret generic foo --type=blah --from-file=makefile=Makefile' os::cmd::expect_success_and_text 'oc get secrets/foo -o jsonpath={.type}' 'blah' os::cmd::expect_success 'oc create secret docker-registry dockerconfigjson --docker-username=sample-user --docker-password=sample-password --docker-email=fake@example.org' # can't use a go template here because the output needs to be base64 decoded. base64 isn't installed by default in all distros os::cmd::expect_success "oc get secrets/dockerconfigjson -o jsonpath='{ .data.\.dockerconfigjson }' | base64 -d > ${HOME}/dockerconfigjson" os::cmd::expect_success 'oc create secret generic from-file --from-file=.dockerconfigjson=${HOME}/dockerconfigjson --type=kubernetes.io/dockerconfigjson' # check to make sure the type was correctly auto-detected os::cmd::expect_success_and_text 'oc get secret/from-file --template="{{ .type }}"' 'kubernetes.io/dockerconfigjson' # make sure the -o works correctly os::cmd::expect_success_and_text 'oc create secret docker-registry dockerconfigjson --docker-username=sample-user --docker-password=sample-password --docker-email=fake@example.org --dry-run -o yaml' 'kubernetes.io/dockerconfigjson' os::cmd::expect_success_and_text 'oc create secret generic from-file-again --from-file=.dockerconfigjson=${HOME}/dockerconfigjson --type=kubernetes.io/dockerconfigjson -o yaml' 'kubernetes.io/dockerconfigjson' # check to make sure malformed names fail as expected # TODO(jchaloup): "error: Key names or file paths cannot contain '='" changed into "error: key names or file paths cannot contain '='" (s/K/k) # Once oc rebase to 1.20 is merged, enable this test again with s/K/k # os::cmd::expect_failure_and_text 'oc create secret generic bad-name --from-file=.docker=cfg=${HOME}/dockerconfigjson' "error: key names or file paths cannot contain '='" workingdir="$( mktemp -d )" os::cmd::try_until_success "oc get secret/dockerconfigjson" os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to '${workingdir}'" '.dockerconfigjson' os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to=-" 'sample-user' os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to=-" 'sample-password' os::cmd::expect_success_and_text "cat '${workingdir}/.dockerconfigjson'" 'sample-user' os::cmd::expect_failure_and_text "oc extract secret/dockerconfigjson --to '${workingdir}'" 'error: .dockerconfigjson: file exists, pass --confirm to overwrite' os::cmd::expect_failure_and_text "oc extract secret/dockerconfigjson secret/dockerconfigjson --to '${workingdir}'" 'error: .dockerconfigjson: file exists, pass --confirm to overwrite' os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson secret/dockerconfigjson --to '${workingdir}' --confirm" '.dockerconfigjson' os::cmd::expect_success_and_text "oc extract secret/dockerconfigjson --to '${workingdir}' --confirm" '.dockerconfigjson' os::cmd::expect_success "oc extract secret/dockerconfigjson --to '${workingdir}' --confirm | xargs rm" os::cmd::expect_failure_and_text "oc extract secret/dockerconfigjson --to missing-dir" "stat missing-dir: no such file or directory" # attach secrets to service account # single secret with prefix os::cmd::expect_success 'oc secrets link deployer dockerconfigjson' # don't add the same secret twice os::cmd::expect_success 'oc secrets link serviceaccounts/deployer dockerconfigjson secrets/from-file' # make sure we can add as as pull secret os::cmd::expect_success 'oc secrets link deployer dockerconfigjson from-file --for=pull' # make sure we can add as as pull secret and mount secret at once os::cmd::expect_success 'oc secrets link serviceaccounts/deployer secrets/dockerconfigjson secrets/from-file --for=pull,mount' GIT_CONFIG_PATH="${ARTIFACT_DIR}/.gitconfig" touch "${GIT_CONFIG_PATH}" #git config --file "${GIT_CONFIG_PATH}" user.name sample-user #git config --file "${GIT_CONFIG_PATH}" user.token password function create_valid_file() { echo test_data > "${ARTIFACT_DIR}/${1}" echo "${ARTIFACT_DIR}/${1}" } CA_CERT_PATH=$(create_valid_file ca.pem) PRIVATE_KEY_PATH=$(create_valid_file id_rsa) os::cmd::expect_success "oc create secret generic basicauth --type=kubernetes.io/basic-auth --from-literal=username=sample-user --from-literal=password=sample-password --from-file=gitconfig='${GIT_CONFIG_PATH}' --from-file=ca-cert='${CA_CERT_PATH}'" # check to make sure incorrect .gitconfig path fail as expected os::cmd::expect_failure_and_text 'oc create secret generic bad-file --type=kubernetes.io/basic-auth --from-literal=username=user --from-file=gitconfig=/bad/path' 'error reading /bad/path: no such file or directory' os::cmd::expect_success "oc create secret generic sshauth --from-file=ssh-privatekey='${PRIVATE_KEY_PATH}' --from-file=ca-cert='${CA_CERT_PATH}'" # check to make sure incorrect SSH private-key path fail as expected os::cmd::expect_failure_and_text 'oc create secret generic bad-file --from-file=ssh-privatekey=/bad/path' 'error reading /bad/path: no such file or directory' # attach secrets to service account # single secret with prefix os::cmd::expect_success 'oc secrets link deployer basicauth' # don't add the same secret twice os::cmd::expect_success 'oc secrets link deployer basicauth sshauth' # make sure we can add as as pull secret os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull' # make sure we can add as as pull secret and mount secret at once os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull,mount' # attach secrets to service account # test that those secrets can be unlinked # after they have been deleted. os::cmd::expect_success 'oc create secret generic deleted-secret' os::cmd::expect_success 'oc secrets link deployer deleted-secret' # confirm our soon-to-be-deleted secret has been linked os::cmd::expect_success_and_text "oc get serviceaccount deployer -o jsonpath='{.secrets[?(@.name==\"deleted-secret\")]}'" 'deleted\-secret' # delete "deleted-secret" and attempt to unlink from service account os::cmd::expect_success 'oc delete secret deleted-secret' os::cmd::expect_failure_and_text 'oc secrets unlink deployer secrets/deleted-secret' 'Unlinked deleted secrets' # ensure already-deleted secret has been unlinked os::cmd::expect_success_and_not_text "oc get serviceaccount deployer -o jsonpath='{.secrets[?(@.name==\"deleted-secret\")]}'" 'deleted\-secret' # attach secrets to service account # single secret with prefix os::cmd::expect_success 'oc secrets link deployer basicauth' # don't add the same secret twice os::cmd::expect_success 'oc secrets link deployer basicauth sshauth' # make sure we can add as as pull secret os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull' # make sure we can add as as pull secret and mount secret at once os::cmd::expect_success 'oc secrets link deployer basicauth sshauth --for=pull,mount' # Confirm that all the linked secrets are present os::cmd::expect_success 'oc get serviceaccounts/deployer -o yaml |grep -q basicauth' os::cmd::expect_success 'oc get serviceaccounts/deployer -o yaml |grep -q sshauth' # Remove secrets from service account os::cmd::expect_success 'oc secrets unlink deployer basicauth' # Confirm that the secret was removed os::cmd::expect_failure 'oc get serviceaccounts/deployer -o yaml |grep -q basicauth' # Re-link that secret os::cmd::expect_success 'oc secrets link deployer basicauth' # Removing a non-existent secret should warn but succeed and change nothing os::cmd::expect_failure_and_text 'oc secrets unlink deployer foobar' 'secret "foobar" not found' # Make sure that removing an existent and non-existent secret succeeds but warns about the non-existent one os::cmd::expect_failure_and_text 'oc secrets unlink deployer foobar basicauth' 'secret "foobar" not found' # Make sure that the existing secret is removed os::cmd::expect_failure 'oc get serviceaccounts/deployer -o yaml |grep -q basicauth' # Make sure that removing a real but unlinked secret succeeds # https://github.com/openshift/origin/pull/9234#discussion_r70832486 os::cmd::expect_failure_and_text 'oc secrets unlink deployer basicauth', 'No valid secrets found or secrets not linked to service account' # Make sure that it succeeds if *any* of the secrets are linked # https://github.com/openshift/origin/pull/9234#discussion_r70832486 os::cmd::expect_success 'oc secrets unlink deployer basicauth sshauth' # Confirm that the linked one was removed os::cmd::expect_failure 'oc get serviceaccounts/deployer -o yaml |grep -q sshauth' # command alias os::cmd::expect_success 'oc secret --help' os::cmd::expect_success 'oc secret new --help' os::cmd::expect_success 'oc secret new-dockercfg --help' os::cmd::expect_success 'oc secret new-basicauth --help' os::cmd::expect_success 'oc secret new-sshauth --help' os::cmd::expect_success 'oc secret add --help' os::cmd::expect_success 'oc secret link --help' os::cmd::expect_success 'oc secret unlink --help' echo "secrets: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdSecretsShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdSecretsSh, nil } func testExtendedTestdataCmdTestCmdSecretsSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdSecretsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/secrets.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdSetDataSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete cm --all oc delete secret test exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/oc/set/data" os::cmd::expect_success 'oc create configmap test' tmpfile="$(mktemp)" echo "c" > "${tmpfile}" # test --local flag os::cmd::expect_failure_and_text 'oc set data cm/test a=b --local' 'provide one or more resources by argument or filename' # test --dry-run flag with -o formats os::cmd::expect_success_and_text 'oc set data cm/test a=b --dry-run' 'test' os::cmd::expect_success_and_text 'oc set data cm/test a=b --dry-run -o name' 'configmap/test' os::cmd::expect_success_and_text 'oc set data cm/test a=b --dry-run' 'configmap/test data updated \(dry run\)' os::cmd::expect_failure_and_text 'oc set data cm/test a=c a-' 'you may not remove and set the key' os::cmd::expect_failure_and_text 'oc set data cm/test a=c --from-literal=a=b' 'cannot set key "a" in both argument and flag' os::cmd::expect_success 'oc set data cm/test a=b' os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.a}'" 'b' os::cmd::expect_success_and_text 'oc set data cm/test a=b' 'info: test was not changed' os::cmd::expect_success 'oc set data cm/test a-' os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.a}'" '' os::cmd::expect_success_and_text 'oc set data cm/test a-' 'info: test was not changed' os::cmd::expect_success "oc set data cm/test --from-file=b=${tmpfile}" os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.b}'" 'c' os::cmd::expect_success_and_text "oc set data cm/test --from-file=b=${tmpfile}" 'info: test was not changed' rm -rf ${tmpfile} mkdir -p ${tmpfile} echo '1' > "${tmpfile}/a" echo '2' > "${tmpfile}/b" os::cmd::expect_success 'oc set data cm/test b-' os::cmd::expect_success "oc set data cm/test --from-file=${tmpfile}" os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.a}'" '1' os::cmd::expect_success_and_text "oc get cm/test -o jsonpath='{.data.b}'" '2' os::cmd::expect_success_and_text "oc set data cm/test --from-file=${tmpfile}" "info: test was not changed" os::cmd::expect_success 'oc create secret generic test' os::cmd::expect_success 'oc set data secret/test a=b' os::cmd::expect_success_and_text "oc get secret/test -o jsonpath='{.data.a}'" 'Yg==' os::cmd::expect_success_and_text 'oc set data secret/test a=b' 'info: test was not changed' echo "set-data: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdSetDataShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdSetDataSh, nil } func testExtendedTestdataCmdTestCmdSetDataSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdSetDataShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/set-data.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdSetLivenessProbeSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/set-probe-liveness" # This test setting a liveness probe, without warning about replication controllers whose deployment depends on deployment configs os::cmd::expect_success_and_text 'oc create -f ${TEST_DATA}/simple-deployment.yaml' 'deploymentconfig.apps.openshift.io/simple-deployment created' os::cmd::expect_success_and_text 'oc status --suggest' 'dc/simple-deployment has no liveness probe' # test --local flag os::cmd::expect_failure_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://:8081/ --local' 'You must provide one or more resources by argument or filename' # test --dry-run flag with -o formats os::cmd::expect_success_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://:8081/ --dry-run' 'simple-deployment' os::cmd::expect_success_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://:8081/ --dry-run -o name' 'deploymentconfig.apps.openshift.io/simple-deployment' os::cmd::expect_success_and_not_text 'oc status --suggest' 'rc/simple-deployment-1 has no liveness probe' os::cmd::expect_success_and_text 'oc set probe dc/simple-deployment --liveness --get-url=http://:8081/' 'deploymentconfig.apps.openshift.io/simple-deployment probes updated' os::cmd::expect_success_and_not_text 'oc status --suggest' 'dc/simple-deployment has no liveness probe' echo "set-probe-liveness: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdSetLivenessProbeShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdSetLivenessProbeSh, nil } func testExtendedTestdataCmdTestCmdSetLivenessProbeSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdSetLivenessProbeShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdSetbuildhookSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/builds/setbuildhook" # Validate the set build-hook command arg="-f ${TEST_DATA}/test-bc.yaml" os::cmd::expect_failure_and_text "oc set build-hook" "error: one or more build configs" os::cmd::expect_failure_and_text "oc set build-hook ${arg}" "error: you must specify a type of hook" os::cmd::expect_failure_and_text "oc set build-hook ${arg} --local --post-commit -o yaml -- echo 'hello world'" 'you must specify either a script or command for the build hook' os::cmd::expect_success_and_text "oc set build-hook ${arg} --local --post-commit --command -o yaml -- echo 'hello world'" 'command:' os::cmd::expect_success_and_text "oc set build-hook ${arg} --local --post-commit -o yaml --script='echo \"hello world\"'" 'script: echo \"hello world\"' # Server object tests os::cmd::expect_success "oc create -f ${TEST_DATA}/test-bc.yaml" # Must specify --command or --script os::cmd::expect_failure_and_text "oc set build-hook bc/test-buildconfig --post-commit" "you must specify either a script or command" # Setting args for the default entrypoint is not supported os::cmd::expect_failure_and_text "oc set build-hook test-buildconfig --post-commit -- foo bar" "you must specify either a script or command for the build hook" # Set a command + args on a specific build config os::cmd::expect_success_and_text "oc set build-hook bc/test-buildconfig --post-commit --command -- /bin/bash -c \"echo 'test'\"" "updated" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "command:" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "args:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "script:" # Set a script on a specific build config os::cmd::expect_success_and_text "oc set build-hook bc/test-buildconfig --post-commit --script /bin/script.sh -- arg1 arg2" "updated" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "script:" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "args:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "command:" # Remove the postcommit hook os::cmd::expect_success_and_text "oc set build-hook bc/test-buildconfig --post-commit --remove" "updated" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "args:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "command:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "script:" # Set a command + args on all build configs os::cmd::expect_success_and_text "oc set build-hook --all --post-commit --command -- /bin/bash -c \"echo 'test'\"" "updated" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "command:" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "args:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "script:" # Set a script on all build configs os::cmd::expect_success_and_text "oc set build-hook --all --post-commit --script /bin/script.sh" "updated" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "script:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "args:" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "command:" os::cmd::expect_success "oc delete bc/test-buildconfig" # ensure command behaves as expected when an empty file is given workingdir=$(mktemp -d) touch "${workingdir}/emptyfile.json" os::cmd::expect_failure_and_text "oc set build-hook -f ${workingdir}/emptyfile.json --post-commit=true --script=foo" "no resources found" echo "set build-hook: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdSetbuildhookShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdSetbuildhookSh, nil } func testExtendedTestdataCmdTestCmdSetbuildhookSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdSetbuildhookShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/setbuildhook.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdSetbuildsecretSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/builds/setbuildsecret" # Validate the set build-secret command arg="-f ${TEST_DATA}/test-bc.yaml" os::cmd::expect_failure_and_text "oc set build-secret" "error: a secret name must be specified" os::cmd::expect_failure_and_text "oc set build-secret ${arg}" "error: a secret name must be specified" os::cmd::expect_failure_and_text "oc set build-secret ${arg} mysecret" "error: specify the type of secret" os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --push --local -o yaml" 'pushSecret:' os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --push --local -o yaml" 'name: mysecret' os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --pull --local -o yaml" 'pullSecret:' os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --pull --local -o yaml" 'name: mysecret' os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --source --local -o yaml" 'sourceSecret:' os::cmd::expect_success_and_text "oc set build-secret ${arg} mysecret --source --local -o yaml" 'name: mysecret' os::cmd::expect_success_and_not_text "oc set build-secret ${arg} mysecret --push --local -o yaml | oc set build-secret --local -f - --remove --push -o yaml" 'pushSecret:' os::cmd::expect_success_and_not_text "oc set build-secret ${arg} mysecret --pull --local -o yaml | oc set build-secret --local -f - --remove --pull -o yaml" 'pullSecret:' os::cmd::expect_success_and_not_text "oc set build-secret ${arg} mysecret --push --local -o yaml | oc set build-secret --local -f - --remove --source -o yaml" 'sourceSecret:' # Server object tests os::cmd::expect_success "oc create -f ${TEST_DATA}/test-bc.yaml" os::cmd::expect_success_and_text "oc set build-secret test-buildconfig mysecret --push" "updated" os::cmd::expect_success_and_text "oc set build-secret bc/test-buildconfig mysecret --push --v=1" "was not changed" os::cmd::expect_success_and_text "oc get bc/test-buildconfig -o yaml" "pushSecret:" os::cmd::expect_success_and_text "oc set build-secret bc/test-buildconfig --push --remove" "updated" os::cmd::expect_success_and_not_text "oc get bc/test-buildconfig -o yaml" "pushSecret:" os::cmd::expect_success "oc delete bc/test-buildconfig" echo "set build-secret: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdSetbuildsecretShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdSetbuildsecretSh, nil } func testExtendedTestdataCmdTestCmdSetbuildsecretSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdSetbuildsecretShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/setbuildsecret.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-custom-docker-builder" }, "spec": { "dockerImageRepository": "openshift/origin-custom-docker-builder" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Custom", "customStrategy": { "from": { "kind": "ImageStreamTag", "name": "origin-custom-docker-builder:latest" }, "env": [ { "name": "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE", "value": "openshift/origin-custom-docker-builder" } ], "exposeDockerSocket": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "mid": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } } }, "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-custombuild" } } `) func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson, nil } func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildDcJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27-centos7" }, "spec": { "tags": [ { "from": { "kind": "DockerImage", "name": "registry.redhat.io/ubi8/ruby-30:latest" }, "name": "latest" } ] } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Docker", "dockerStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27-centos7:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "registry.redhat.io/rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-dockerbuild" } } `) func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildDcJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildDcJson, nil } func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildDcJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildDcJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild-dc.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27-centos7" }, "spec": { "tags": [ { "from": { "kind": "DockerImage", "name": "registry.redhat.io/ubi8/ruby-30:latest" }, "name": "latest" } ] } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Docker", "dockerStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27-centos7:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "Deployment", "apiVersion": "apps/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true", "image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"origin-ruby-sample:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" } }, "spec": { "strategy": { "type": "RollingUpdate" }, "replicas": 2, "selector": { "matchLabels": { "name": "frontend" } }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Deployment", "apiVersion": "apps/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "resources": {} }, "replicas": 1, "selector": { "matchLabels": { "name": "database" } }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "registry.redhat.io/rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } } } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-dockerbuild" } } `) func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson, nil } func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateMixJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "Mix of random manifests for testing template rendering picked from application-template-stibuild.json", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27" }, "spec": { "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateMixJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateMixJson, nil } func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateMixJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateMixJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-mix.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "annotations": { "description": "This example shows how to create a simple ruby application in openshift origin v3", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "dbsecret" }, "stringData" : { "mysql-user" : "${MYSQL_USER}", "mysql-password" : "${MYSQL_PASSWORD}" } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample" }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27" }, "spec": { "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "labels": { "name": "ruby-sample-build" }, "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101", "allowEnv": true } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "script": "bundle exec rake test" }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database" }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" } }, "spec": { "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "mid": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } } }, "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "image-registry.openshift-image-registry.svc:5000/openshift/mysql:8.0-el8", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-user" } } }, { "name": "MYSQL_PASSWORD", "valueFrom": { "secretKeyRef" : { "name" : "dbsecret", "key" : "mysql-password" } } }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} } ], "parameters": [ { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson, nil } func testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml = []byte(`apiVersion: v1 kind: Service metadata: labels: external: service name: external resourceVersion: "1" uid: 19cff995-5546-11e5-9f57-080027c5bfa9 spec: ports: - nodePort: 0 port: 443 protocol: TCP targetPort: 443 sessionAffinity: None type: ClusterIP status: loadBalancer: {} `) func testExtendedTestdataCmdTestCmdTestdataExternalServiceYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml, nil } func testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataExternalServiceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/external-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson = []byte(`{ "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "hello-openshift", "creationTimestamp": null, "labels": { "name": "hello-openshift" } }, "spec": { "containers": [ { "name": "hello-openshift", "image": "registry.k8s.io/e2e-test-images/agnhost:2.63.0", "args": [ "netexec" ], "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "resources": {}, "volumeMounts": [ { "name": "tmp", "mountPath": "/tmp" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "tmp", "emptyDir": {} } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" }, "status": {} } `) func testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson, nil } func testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: generateName: idling-echo- labels: app: idling-echo deploymentconfig: idling-echo spec: replicas: 2 selector: app: idling-echo deploymentconfig: idling-echo strategy: type: Rolling template: metadata: labels: app: idling-echo deploymentconfig: idling-echo spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest name: idling-tcp-echo command: - /usr/bin/socat - TCP4-LISTEN:8675,reuseaddr,fork - EXEC:'/bin/cat' ports: - containerPort: 8675 protocol: TCP - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest name: idling-udp-echo command: - /usr/bin/socat - UDP4-LISTEN:3090,reuseaddr,fork - EXEC:'/bin/cat' ports: - containerPort: 3090 protocol: UDP dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} `) func testExtendedTestdataCmdTestCmdTestdataIdlingDcYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml, nil } func testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataIdlingDcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/idling-dc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataIdlingDeploymentYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: generateName: idling-echo- labels: app: idling-echo deployment: idling-echo spec: replicas: 2 selector: matchLabels: app: idling-echo deployment: idling-echo strategy: type: RollingUpdate template: metadata: labels: app: idling-echo deployment: idling-echo spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest name: idling-tcp-echo command: - /usr/bin/socat - TCP4-LISTEN:8675,reuseaddr,fork - EXEC:'/bin/cat' ports: - containerPort: 8675 protocol: TCP - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest name: idling-udp-echo command: - /usr/bin/socat - UDP4-LISTEN:3090,reuseaddr,fork - EXEC:'/bin/cat' ports: - containerPort: 3090 protocol: UDP dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} `) func testExtendedTestdataCmdTestCmdTestdataIdlingDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataIdlingDeploymentYaml, nil } func testExtendedTestdataCmdTestCmdTestdataIdlingDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataIdlingDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/idling-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: v1 kind: Service metadata: name: idling-echo labels: app: idling-echo spec: selector: app: idling-echo ports: - port: 8675 name: tcp-echo protocol: TCP - port: 3090 name: udp-echo protocol: UDP - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo spec: to: kind: Service name: idling-echo - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo-reencrypt spec: tls: termination: reencrypt # the actual certificate here is not relevant, since we're not # actually serving TLS destinationCACertificate: |- -----BEGIN CERTIFICATE----- MIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx CzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl ZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3 dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu Y29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP d3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq hkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx EDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv gu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm 47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M mNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC MAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd TMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m V7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc yfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j jhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q +Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w= -----END CERTIFICATE----- to: kind: Service name: idling-echo `) func testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml, nil } func testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/idling-svc-route.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json = []byte(`{ "kind": "List", "apiVersion": "v1", "items": [ { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Apache HTTP Server (httpd)" }, "name": "httpd" }, "spec": { "tags": [ { "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Httpd available on OpenShift, including major versions updates.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd" }, "from": { "kind": "ImageStreamTag", "name": "2.4" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and serve static content via Apache HTTP Server (httpd) 2.4 on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/httpd-container/blob/master/2.4/README.md.", "iconClass": "icon-apache", "openshift.io/display-name": "Apache HTTP Server 2.4", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/httpd-ex.git", "supports": "httpd", "tags": "builder,httpd", "version": "2.4" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/httpd-24-centos7:centos7" }, "name": "2.4", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Jenkins" }, "name": "jenkins" }, "spec": { "tags": [ { "annotations": { "description": "Provides a Jenkins server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Jenkins available on OpenShift, including major versions updates.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins" }, "from": { "kind": "ImageStreamTag", "name": "2" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a Jenkins v2.x server on CentOS 7. For more information about using this container image, including OpenShift considerations, see https://github.com/openshift/jenkins/blob/master/README.md.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins 2.X", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "jenkins", "version": "2.x" }, "from": { "kind": "DockerImage", "name": "quay.io/openshift/origin-jenkins:v4.0" }, "name": "2", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "MariaDB" }, "name": "mariadb" }, "spec": { "tags": [ { "annotations": { "description": "Provides a MariaDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MariaDB available on OpenShift, including major versions updates.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb" }, "from": { "kind": "ImageStreamTag", "name": "10.5" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a MariaDB 10.1 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.1/README.md.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB 10.1", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", "version": "10.3" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mariadb-103-centos7:centos7" }, "name": "10.3", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a MariaDB 10.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.2/README.md.", "iconClass": "icon-mariadb", "openshift.io/display-name": "MariaDB 10.5", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mariadb", "version": "10.5" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mariadb-105-centos7:centos7" }, "name": "10.5", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "MongoDB" }, "name": "mongodb" }, "spec": { "tags": [ { "annotations": { "description": "Provides a MongoDB database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MongoDB available on OpenShift, including major versions updates.", "iconClass": "icon-mongodb", "openshift.io/display-name": "MongoDB (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mongodb" }, "from": { "kind": "ImageStreamTag", "name": "3.4" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a MongoDB 2.7 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/2.7/README.md.", "iconClass": "icon-mongodb", "openshift.io/display-name": "MongoDB 2.7", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "hidden,database,mongodb", "version": "2.7" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mongodb-26-centos7:centos7" }, "name": "2.7", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a MongoDB 3.2 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.2/README.md.", "iconClass": "icon-mongodb", "openshift.io/display-name": "MongoDB 3.2", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mongodb", "version": "3.2" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mongodb-32-centos7:centos7" }, "name": "3.2", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a MongoDB 3.4 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mongodb-container/blob/master/3.4/README.md.", "iconClass": "icon-mongodb", "openshift.io/display-name": "MongoDB 3.4", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,mongodb", "version": "3.4" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mongodb-34-centos7:centos7" }, "name": "3.4", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "MySQL" }, "name": "mysql" }, "spec": { "tags": [ { "annotations": { "description": "Provides a MySQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of MySQL available on OpenShift, including major versions updates.", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "mysql" }, "from": { "kind": "ImageStreamTag", "name": "8" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a MySQL 8 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/mysql-container/blob/master/README.md.", "iconClass": "icon-mysql-database", "openshift.io/display-name": "MySQL 8", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "hidden,mysql", "version": "8" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/mysql-80-centos7:centos7" }, "name": "8", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (nginx)" }, "name": "nginx" }, "spec": { "tags": [ { "annotations": { "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.14/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.14", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.14" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/nginx-114-centos7:centos7" }, "name": "1.14", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.16/README.md.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy 1.16", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx", "version": "1.16" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/nginx-116-centos7:centos7" }, "name": "1.16", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and serve static content via Nginx HTTP Server and a reverse proxy (nginx) on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/nginx-container/blob/master/1.12/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Nginx available on OpenShift, including major versions updates.", "iconClass": "icon-nginx", "openshift.io/display-name": "Nginx HTTP server and a reverse proxy (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nginx-ex.git", "supports": "nginx", "tags": "builder,nginx" }, "from": { "kind": "ImageStreamTag", "name": "1.16" }, "name": "latest", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Node.js" }, "name": "nodejs" }, "spec": { "tags": [ { "annotations": { "description": "Build and run Node.js applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/nodeshift/centos7-s2i-nodejs.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Node.js available on OpenShift, including major versions updates.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "supports": "nodejs", "tags": "builder,nodejs" }, "from": { "kind": "ImageStreamTag", "name": "12" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run Node.js 10 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/10/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 10", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "10" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/nodejs-10-centos7:centos7" }, "name": "10", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run Node.js 12 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-nodejs-container/blob/master/12/README.md.", "iconClass": "icon-nodejs", "openshift.io/display-name": "Node.js 12", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/nodejs-ex.git", "tags": "builder,nodejs", "version": "12" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/nodejs-12-centos7:centos7" }, "name": "12", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Perl" }, "name": "perl" }, "spec": { "tags": [ { "annotations": { "description": "Build and run Perl applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30-mod_fcgid/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Perl available on OpenShift, including major version updates.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl", "tags": "builder,perl" }, "from": { "kind": "ImageStreamTag", "name": "5.30-ubi8" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "name": "5.30-ubi8", "annotations": { "description": "Build and run Perl 5.30 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30-mod_fcgid/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.30 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.30,perl", "tags": "builder,perl", "version": "5.30" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/perl-530:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "5.30-el7", "annotations": { "description": "Build and run Perl 5.30 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-perl-container/blob/master/5.30/README.md.", "iconClass": "icon-perl", "openshift.io/display-name": "Perl 5.30 (CentOS 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/dancer-ex.git", "supports": "perl:5.30,perl", "tags": "builder,perl", "version": "5.30" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/perl-530-centos7:centos7" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "PHP" }, "name": "php" }, "spec": { "tags": [ { "annotations": { "description": "Build and run PHP applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PHP available on OpenShift, including major versions updates.", "iconClass": "icon-php", "openshift.io/display-name": "PHP (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php", "tags": "builder,php" }, "from": { "kind": "ImageStreamTag", "name": "7.1" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run PHP 7.0 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.0/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 7.0", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:7.0,php", "tags": "builder,php", "version": "7.0" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/php-70-centos7:centos7" }, "name": "7.0", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run PHP 7.1 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-php-container/blob/master/7.1/README.md.", "iconClass": "icon-php", "openshift.io/display-name": "PHP 7.1", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/cakephp-ex.git", "supports": "php:7.1,php", "tags": "builder,php", "version": "7.1" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/php-71-centos7:centos7" }, "name": "7.1", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "PostgreSQL" }, "name": "postgresql" }, "spec": { "tags": [ { "annotations": { "description": "Provides a PostgreSQL database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of PostgreSQL available on OpenShift, including major versions updates.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql" }, "from": { "kind": "ImageStreamTag", "name": "9.6" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a PostgreSQL 9.5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 9.5", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "9.5" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-95-centos7:centos7" }, "name": "9.5", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a PostgreSQL 9.6 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/postgresql-container/blob/master/README.md.", "iconClass": "icon-postgresql", "openshift.io/display-name": "PostgreSQL 9.6", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "database,postgresql", "version": "9.6" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/postgresql-96-centos7:centos7" }, "name": "9.6", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Python" }, "name": "python" }, "spec": { "tags": [ { "annotations": { "description": "Build and run Python applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Python available on OpenShift, including major versions updates.", "iconClass": "icon-python", "openshift.io/display-name": "Python (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python", "tags": "builder,python" }, "from": { "kind": "ImageStreamTag", "name": "3.6" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run Python 2.7 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/2.7/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 2.7", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:2.7,python", "tags": "builder,python", "version": "2.7" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/python-27-centos7:centos7" }, "name": "2.7", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run Python 3.6 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-python-container/blob/master/3.6/README.md.", "iconClass": "icon-python", "openshift.io/display-name": "Python 3.6", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/django-ex.git", "supports": "python:3.6,python", "tags": "builder,python", "version": "3.6" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/python-36-centos7:centos7" }, "name": "3.6", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Redis" }, "name": "redis" }, "spec": { "tags": [ { "annotations": { "description": "Provides a Redis database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Redis available on OpenShift, including major versions updates.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "redis" }, "from": { "kind": "ImageStreamTag", "name": "5" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Provides a Redis 5 database on CentOS 7. For more information about using this database image, including OpenShift considerations, see https://github.com/sclorg/redis-container/blob/master/5/README.md.", "iconClass": "icon-redis", "openshift.io/display-name": "Redis 5", "openshift.io/provider-display-name": "Red Hat, Inc.", "tags": "redis", "version": "5" }, "from": { "kind": "DockerImage", "name": "quay.io/centos7/redis-5-centos7:centos7" }, "name": "5", "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "Ruby" }, "name": "ruby" }, "spec": { "tags": [ { "name": "latest", "annotations": { "description": "Build and run Ruby applications on UBI. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/tree/master/3.0/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major version updates.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby", "tags": "builder,ruby" }, "from": { "kind": "ImageStreamTag", "name": "3.0-ubi8" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.0-ubi9", "annotations": { "description": "Build and run Ruby 3.0 applications on UBI 9. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/3.0/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 3.0 (UBI 9)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:3.0,ruby", "tags": "builder,ruby", "version": "3.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi9/ruby-30:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.3-ubi8", "annotations": { "description": "Build and run Ruby 3.3 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/3.3/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 3.3 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:3.3,ruby", "tags": "builder,ruby", "version": "3.3" }, "from": { "kind": "DockerImage", "name": "registry.redhat.io/ubi8/ruby-33:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "name": "3.0-ubi7", "annotations": { "description": "Build and run Ruby 3.0 applications on UBI 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/3.0/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 3.0 (UBI 7)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:3.0,ruby", "tags": "builder,ruby", "version": "3.0" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi7/ruby-30:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run Ruby applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Ruby available on OpenShift, including major versions updates.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby", "tags": "builder,ruby" }, "from": { "kind": "ImageStreamTag", "name": "2.7" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "name": "2.7-ubi8", "annotations": { "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", "openshift.io/display-name": "Ruby 2.7 (UBI 8)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/sclorg/ruby-ex.git", "supports": "ruby:2.7,ruby", "tags": "builder,ruby", "version": "2.7" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-27:latest" }, "generation": null, "importPolicy": {}, "referencePolicy": { "type": "Local" } } ] } }, { "apiVersion": "image.openshift.io/v1", "kind": "ImageStream", "metadata": { "annotations": { "openshift.io/display-name": "WildFly" }, "name": "wildfly" }, "spec": { "tags": [ { "annotations": { "description": "Build and run WildFly applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of WildFly available on OpenShift, including major versions updates.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly (Latest)", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "jee,java", "tags": "builder,wildfly,java" }, "from": { "kind": "ImageStreamTag", "name": "21.0" }, "name": "latest", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run WildFly 20 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 20", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:20,jee,java", "tags": "builder,wildfly,java", "version": "20.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:20.0" }, "name": "20.0", "referencePolicy": { "type": "Local" } }, { "annotations": { "description": "Build and run WildFly 21 applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/openshift-s2i/s2i-wildfly/blob/master/README.md.", "iconClass": "icon-wildfly", "openshift.io/display-name": "WildFly 21", "openshift.io/provider-display-name": "Red Hat, Inc.", "sampleRepo": "https://github.com/openshift/openshift-jee-sample.git", "supports": "wildfly:21,jee,java", "tags": "builder,wildfly,java", "version": "21.0" }, "from": { "kind": "DockerImage", "name": "quay.io/wildfly/wildfly-centos7:21.0.0" }, "name": "21.0", "referencePolicy": { "type": "Local" } } ] } } ] } `) func testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7JsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json, nil } func testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7JsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/image-streams/image-streams-centos7.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson = []byte(`{ "apiVersion": "template.openshift.io/v1", "kind": "Template", "labels": { "app": "jenkins-ephemeral", "template": "jenkins-ephemeral-template" }, "message": "A Jenkins service has been created in your project. Log into Jenkins with your OpenShift account. The tutorial at https://github.com/openshift/origin/blob/main/examples/jenkins/README.md contains more information about using this template.", "metadata": { "annotations": { "description": "Jenkins service, without persistent storage.\n\nWARNING: Any data stored will be lost upon pod destruction. Only use this template for testing.", "iconClass": "icon-jenkins", "openshift.io/display-name": "Jenkins (Ephemeral)", "openshift.io/documentation-url": "https://docs.okd.io/latest/using_images/other_images/jenkins.html", "openshift.io/long-description": "This template deploys a Jenkins server capable of managing OpenShift Pipeline builds and supporting OpenShift-based oauth login. The Jenkins configuration is stored in non-persistent storage, so this configuration should be used for experimental purposes only.", "openshift.io/provider-display-name": "Red Hat, Inc.", "openshift.io/support-url": "https://access.redhat.com", "tags": "instant-app,jenkins" }, "name": "jenkins-ephemeral" }, "objects": [ { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "annotations": { "haproxy.router.openshift.io/timeout": "4m", "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "tls": { "insecureEdgeTerminationPolicy": "Redirect", "termination": "edge" }, "to": { "kind": "Service", "name": "${JENKINS_SERVICE_NAME}" } } }, { "apiVersion": "apps.openshift.io/v1", "kind": "DeploymentConfig", "metadata": { "annotations": { "template.alpha.openshift.io/wait-for-ready": "true" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "replicas": 1, "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "strategy": { "type": "Recreate" }, "template": { "metadata": { "labels": { "name": "${JENKINS_SERVICE_NAME}" } }, "spec": { "containers": [ { "env": [ { "name": "OPENSHIFT_ENABLE_OAUTH", "value": "${ENABLE_OAUTH}" }, { "name": "OPENSHIFT_ENABLE_REDIRECT_PROMPT", "value": "true" }, { "name": "DISABLE_ADMINISTRATIVE_MONITORS", "value": "${DISABLE_ADMINISTRATIVE_MONITORS}" }, { "name": "KUBERNETES_MASTER", "value": "https://kubernetes.default:443" }, { "name": "KUBERNETES_TRUST_CERTIFICATES", "value": "true" }, { "name": "JENKINS_SERVICE_NAME", "value": "${JENKINS_SERVICE_NAME}" }, { "name": "JNLP_SERVICE_NAME", "value": "${JNLP_SERVICE_NAME}" } ], "image": " ", "imagePullPolicy": "IfNotPresent", "livenessProbe": { "failureThreshold": 2, "httpGet": { "path": "/login", "port": 8080 }, "initialDelaySeconds": 420, "periodSeconds": 360, "timeoutSeconds": 240 }, "name": "jenkins", "readinessProbe": { "httpGet": { "path": "/login", "port": 8080 }, "initialDelaySeconds": 3, "timeoutSeconds": 240 }, "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log", "volumeMounts": [ { "mountPath": "/var/lib/jenkins", "name": "${JENKINS_SERVICE_NAME}-data" } ] } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccountName": "${JENKINS_SERVICE_NAME}", "volumes": [ { "emptyDir": { "medium": "" }, "name": "${JENKINS_SERVICE_NAME}-data" } ] } }, "triggers": [ { "imageChangeParams": { "automatic": true, "containerNames": [ "jenkins" ], "from": { "kind": "ImageStreamTag", "name": "${JENKINS_IMAGE_STREAM_TAG}", "namespace": "${NAMESPACE}" }, "lastTriggeredImage": "" }, "type": "ImageChange" }, { "type": "ConfigChange" } ] } }, { "apiVersion": "v1", "kind": "ServiceAccount", "metadata": { "annotations": { "serviceaccounts.openshift.io/oauth-redirectreference.jenkins": "{\"kind\":\"OAuthRedirectReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"Route\",\"name\":\"${JENKINS_SERVICE_NAME}\"}}" }, "name": "${JENKINS_SERVICE_NAME}" } }, { "apiVersion": "v1", "groupNames": null, "kind": "RoleBinding", "metadata": { "name": "${JENKINS_SERVICE_NAME}_edit" }, "roleRef": { "name": "edit" }, "subjects": [ { "kind": "ServiceAccount", "name": "${JENKINS_SERVICE_NAME}" } ] }, { "apiVersion": "v1", "kind": "Service", "metadata": { "name": "${JNLP_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "agent", "nodePort": 0, "port": 50000, "protocol": "TCP", "targetPort": 50000 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "annotations": { "service.alpha.openshift.io/dependencies": "[{\"name\": \"${JNLP_SERVICE_NAME}\", \"namespace\": \"\", \"kind\": \"Service\"}]", "service.openshift.io/infrastructure": "true" }, "name": "${JENKINS_SERVICE_NAME}" }, "spec": { "ports": [ { "name": "web", "nodePort": 0, "port": 80, "protocol": "TCP", "targetPort": 8080 } ], "selector": { "name": "${JENKINS_SERVICE_NAME}" }, "sessionAffinity": "None", "type": "ClusterIP" } } ], "parameters": [ { "description": "The name of the OpenShift Service exposed for the Jenkins container.", "displayName": "Jenkins Service Name", "name": "JENKINS_SERVICE_NAME", "value": "jenkins" }, { "description": "The name of the service used for master/slave communication.", "displayName": "Jenkins JNLP Service Name", "name": "JNLP_SERVICE_NAME", "value": "jenkins-jnlp" }, { "description": "Whether to enable OAuth OpenShift integration. If false, the static account 'admin' will be initialized with the password 'password'.", "displayName": "Enable OAuth in Jenkins", "name": "ENABLE_OAUTH", "value": "true" }, { "description": "Maximum amount of memory the container can use.", "displayName": "Memory Limit", "name": "MEMORY_LIMIT", "value": "512Mi" }, { "description": "The OpenShift Namespace where the Jenkins ImageStream resides.", "displayName": "Jenkins ImageStream Namespace", "name": "NAMESPACE", "value": "openshift" }, { "description": "Whether to perform memory intensive, possibly slow, synchronization with the Jenkins Update Center on start. If true, the Jenkins core update monitor and site warnings monitor are disabled.", "displayName": "Disable memory intensive administrative monitors", "name": "DISABLE_ADMINISTRATIVE_MONITORS", "value": "false" }, { "description": "Name of the ImageStreamTag to be used for the Jenkins image.", "displayName": "Jenkins ImageStreamTag", "name": "JENKINS_IMAGE_STREAM_TAG", "value": "jenkins:2" } ] } `) func testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson, nil } func testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/jenkins/jenkins-ephemeral-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby", "annotations": { "openshift.io/display-name": "Ruby" } }, "spec": { "tags": [ { "name": "2.7", "annotations": { "openshift.io/display-name": "Ruby Patched", "openshift.io/provider-display-name": "Red Hat, Inc.", "description": "Build and run Ruby 2.7 applications on UBI 8. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/s2i-ruby-container/blob/master/2.7/README.md.", "iconClass": "icon-ruby", "tags": "builder,ruby", "supports": "ruby:2.7,ruby", "version": "2.7 patched", "sampleRepo": "https://github.com/sclorg/ruby-ex.git" }, "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } }, { "name": "newtag", "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/ubi8/ruby-27:latest" } } ] } } `) func testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson, nil } func testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml = []byte(`apiVersion: v1 kind: List items: - apiVersion: v1 kind: Service metadata: creationTimestamp: 2015-10-13T10:13:11Z labels: test: missing-route-port name: frontend resourceVersion: "259" uid: 024d82eb-7193-11e5-b84d-080027c5bfa9 spec: ports: - name: web port: 5432 protocol: TCP targetPort: 8080 - name: web2 port: 5433 protocol: TCP targetPort: 8080 selector: name: frontend sessionAffinity: None type: ClusterIP status: loadBalancer: {} `) func testExtendedTestdataCmdTestCmdTestdataMultiportServiceYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml, nil } func testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataMultiportServiceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/multiport-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: creationTimestamp: null name: bc-from-imagestreamimage objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: creationTimestamp: null labels: name: bc-from-imagestreamimage template: application-template-stibuild name: bc-from-imagestreamimage spec: nodeSelector: null output: to: kind: ImageStreamTag name: origin-ruby-sample:latest postCommit: args: - bundle - exec - rake - test resources: {} runPolicy: Serial source: git: uri: https://github.com/openshift/ruby-hello-world.git type: Git strategy: sourceStrategy: env: - name: EXAMPLE value: sample-app from: kind: ImageStreamImage name: ruby@sha256:5dc0856fea9551e102815863cceeabd3aee862ec4ad5f2625eb51564924f0360 type: Source triggers: - github: secret: secret101 type: GitHub - generic: allowEnv: true secret: secret101 type: Generic - type: ConfigChange status: lastVersion: 0 `) func testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 ARG foo RUN echo $foo `) func testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfileBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml = []byte(`apiVersion: v1 items: - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: newapp-circular-template spec: {} kind: List metadata: {} `) func testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/circular-is.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: circular objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: newapp-circular-template spec: nodeSelector: null output: to: kind: ImageStreamTag name: newapp-circular-template:latest postCommit: {} resources: {} runPolicy: Serial source: git: uri: https://github.com/openshift/ruby-hello-world type: Git strategy: dockerStrategy: from: kind: ImageStreamTag name: newapp-circular-template:latest type: Docker triggers: - github: secret: faSaQS1VY-gdRMwge4eV type: GitHub - generic: secret: u-_J-vtKR5K3GykKwCuK type: Generic - imageChange: {} type: ImageChange status: lastVersion: 0 `) func testExtendedTestdataCmdTestCmdTestdataNewAppCircularYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppCircularYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/circular.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: myruby spec: tags: - from: kind: ImageStreamTag name: "3.3" name: "latest" - from: kind: ImageStreamTag name: ruby:3.3-ubi8 name: "3.3" `) func testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: installable spec: tags: - name: latest from: kind: ImageStreamTag name: installable:token - name: no-token annotations: io.openshift.generate.job: "true" from: kind: DockerImage name: openshift/origin:v1.0.6 - name: token annotations: io.openshift.generate.job: "true" io.openshift.generate.token.as: "env:TOKEN_ENV" from: kind: DockerImage name: openshift/origin:v1.0.6 - name: file annotations: io.openshift.generate.job: "true" io.openshift.generate.token.as: "file:/var/run/openshift.secret.token" from: kind: DockerImage name: openshift/origin:v1.0.6 - name: serviceaccount annotations: io.openshift.generate.job: "true" io.openshift.generate.token.as: "serviceaccount" from: kind: DockerImage name: openshift/origin:v1.0.6 `) func testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/installable-stream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig spec: strategy: type: foobar `) func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid-build-strategy.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson = []byte(`{"test"}`) func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "helloworld-sample" }, "objects": [ { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend" }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "annotations": { "template.openshift.io/expose-uri": "http://{.spec.host}{.spec.path}" } }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} } ], "parameters": [], "labels": { "app": "expose-output" } } `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-minimal-expose.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "creationTimestamp": null, "annotations": { "description": "some objects in this template declare their own app label to confirm new-app will tolerate it", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend", "creationTimestamp": null }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "creationTimestamp": null }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample", "creationTimestamp": null }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27", "creationTimestamp": null }, "spec": { "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "creationTimestamp": null, "labels": { "name": "ruby-sample-build", "app": "myapp" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101" } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "args": ["bundle", "exec", "rake", "test"] }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "creationTimestamp": null }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/false" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "ADMIN_USERNAME", "value": "${ADMIN_USERNAME}" }, { "name": "ADMIN_PASSWORD", "value": "${ADMIN_PASSWORD}" }, { "name": "MYSQL_USER", "value": "${MYSQL_USER}" }, { "name": "MYSQL_PASSWORD", "value": "${MYSQL_PASSWORD}" }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database", "creationTimestamp": null }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "creationTimestamp": null }, "spec": { "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "mid": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/false" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } } }, "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "value": "${MYSQL_USER}" }, { "name": "MYSQL_PASSWORD", "value": "${MYSQL_PASSWORD}" }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} } ], "parameters": [ { "name": "ADMIN_USERNAME", "description": "administrator username", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "description": "administrator password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdNsYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: template-with-crd namespace: openshift objects: - kind: CustomResourceDefinition apiVersion: apiextensions.k8s.io/v1 metadata: name: template-with-crd-ns `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdNsYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdNsYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdNsYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdNsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd-ns.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: template-with-crd objects: - kind: CustomResourceDefinition apiVersion: apiextensions.k8s.io/v1 metadata: name: template-with-crd `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "creationTimestamp": null, "annotations": { "description": "some objects in this template declare their own namespace via a parameter confirm new-app will tolerate it", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge-stripped", "namespace": "STRIPPED" }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge-substituted", "namespace": "${SUBSTITUTED}" }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge-prefix-substituted", "namespace": "prefix-${SUBSTITUTED}" }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge-refstripped", "namespace": "${{SUBSTITUTED}}" }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge-prefix-refstripped", "namespace": "prefix-${{SUBSTITUTED}}" }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge" } }, "status": {} } ], "parameters": [ { "name": "SUBSTITUTED", "description": "namespace value", "value": "substituted", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-namespaces.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "ruby-helloworld-sample", "creationTimestamp": null, "annotations": { "description": "some objects in this template declare their own app label to confirm new-app will tolerate it", "iconClass": "icon-ruby", "tags": "instant-app,ruby,mysql" } }, "objects": [ { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend", "creationTimestamp": null }, "spec": { "ports": [ { "name": "web", "protocol": "TCP", "port": 5432, "targetPort": 8080, "nodePort": 0 } ], "selector": { "name": "frontend" }, "portalIP": "", "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "route-edge", "creationTimestamp": null }, "spec": { "host": "www.example.com", "to": { "kind": "Service", "name": "frontend" }, "tls": { "termination": "edge", "certificate": "-----BEGIN CERTIFICATE-----\nMIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx\nCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl\nZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3\ndy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu\nY29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP\nd3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq\nhkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx\nEDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv\ngu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm\n47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M\nmNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC\nMAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd\nTMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m\nV7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc\nyfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j\njhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q\n+Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w=\n-----END CERTIFICATE-----", "key": "-----BEGIN PRIVATE KEY-----\nMIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMrvgu6ZTTefNN7j\njiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm47VRx5Qrf/YL\nXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1MmNrQUgZyQC6X\nIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAECgYEAnxOjEj/vrLNLMZE1Q9H7PZVF\nWdP/JQVNvQ7tCpZ3ZdjxHwkvf//aQnuxS5yX2Rnf37BS/TZu+TIkK4373CfHomSx\nUTAn2FsLmOJljupgGcoeLx5K5nu7B7rY5L1NHvdpxZ4YjeISrRtEPvRakllENU5y\ngJE8c2eQOx08ZSRE4TkCQQD7dws2/FldqwdjJucYijsJVuUdoTqxP8gWL6bB251q\nelP2/a6W2elqOcWId28560jG9ZS3cuKvnmu/4LG88vZFAkEAzphrH3673oTsHN+d\nuBd5uyrlnGjWjuiMKv2TPITZcWBjB8nJDSvLneHF59MYwejNNEof2tRjgFSdImFH\nmi995wJBAMtPjW6wiqRz0i41VuT9ZgwACJBzOdvzQJfHgSD9qgFb1CU/J/hpSRIM\nkYvrXK9MbvQFvG6x4VuyT1W8mpe1LK0CQAo8VPpffhFdRpF7psXLK/XQ/0VLkG3O\nKburipLyBg/u9ZkaL0Ley5zL5dFBjTV2Qkx367Ic2b0u9AYTCcgi2DsCQQD3zZ7B\nv7BOm7MkylKokY2MduFFXU0Bxg6pfZ7q3rvg8gqhUFbaMStPRYg6myiDiW/JfLhF\nTcFT4touIo7oriFJ\n-----END PRIVATE KEY-----", "caCertificate": "-----BEGIN CERTIFICATE-----\nMIIEFzCCAv+gAwIBAgIJALK1iUpF2VQLMA0GCSqGSIb3DQEBBQUAMIGhMQswCQYD\nVQQGEwJVUzELMAkGA1UECAwCU0MxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoG\nA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDEQMA4GA1UECwwHVGVzdCBDQTEaMBgG\nA1UEAwwRd3d3LmV4YW1wbGVjYS5jb20xIjAgBgkqhkiG9w0BCQEWE2V4YW1wbGVA\nZXhhbXBsZS5jb20wHhcNMTUwMTEyMTQxNTAxWhcNMjUwMTA5MTQxNTAxWjCBoTEL\nMAkGA1UEBhMCVVMxCzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkx\nHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0Ex\nGjAYBgNVBAMMEXd3dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFt\ncGxlQGV4YW1wbGUuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA\nw2rK1J2NMtQj0KDug7g7HRKl5jbf0QMkMKyTU1fBtZ0cCzvsF4CqV11LK4BSVWaK\nrzkaXe99IVJnH8KdOlDl5Dh/+cJ3xdkClSyeUT4zgb6CCBqg78ePp+nN11JKuJlV\nIG1qdJpB1J5O/kCLsGcTf7RS74MtqMFo96446Zvt7YaBhWPz6gDaO/TUzfrNcGLA\nEfHVXkvVWqb3gqXUztZyVex/gtP9FXQ7gxTvJml7UkmT0VAFjtZnCqmFxpLZFZ15\n+qP9O7Q2MpsGUO/4vDAuYrKBeg1ZdPSi8gwqUP2qWsGd9MIWRv3thI2903BczDc7\nr8WaIbm37vYZAS9G56E4+wIDAQABo1AwTjAdBgNVHQ4EFgQUugLrSJshOBk5TSsU\nANs4+SmJUGwwHwYDVR0jBBgwFoAUugLrSJshOBk5TSsUANs4+SmJUGwwDAYDVR0T\nBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaMJ33zAMV4korHo5aPfayV3uHoYZ\n1ChzP3eSsF+FjoscpoNSKs91ZXZF6LquzoNezbfiihK4PYqgwVD2+O0/Ty7UjN4S\nqzFKVR4OS/6lCJ8YncxoFpTntbvjgojf1DEataKFUN196PAANc3yz8cWHF4uvjPv\nWkgFqbIjb+7D1YgglNyovXkRDlRZl0LD1OQ0ZWhd4Ge1qx8mmmanoBeYZ9+DgpFC\nj9tQAbS867yeOryNe7sEOIpXAAqK/DTu0hB6+ySsDfMo4piXCc2aA/eI2DCuw08e\nw17Dz9WnupZjVdwTKzDhFgJZMLDqn37HQnT6EemLFqbcR0VPEnfyhDtZIQ==\n-----END CERTIFICATE-----" } }, "status": {} }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "origin-ruby-sample", "creationTimestamp": null }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-27", "creationTimestamp": null }, "spec": { "dockerImageRepository": "registry.access.redhat.com/ubi8/ruby-27" }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build", "creationTimestamp": null, "labels": { "name": "ruby-sample-build" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "secret101" } }, { "type": "Generic", "generic": { "secret": "secret101" } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "name": "ruby-27:latest" }, "env": [ { "name": "EXAMPLE", "value": "sample-app" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "postCommit": { "args": ["bundle", "exec", "rake", "test"] }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "frontend", "creationTimestamp": null }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "updatePeriodSeconds": 1, "intervalSeconds": 1, "timeoutSeconds": 120, "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld" } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/false" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld" } } }, "resources": {} }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "ruby-helloworld" ], "from": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } } }, { "type": "ConfigChange" } ], "replicas": 2, "selector": { "name": "frontend" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "frontend" } }, "spec": { "containers": [ { "name": "ruby-helloworld", "image": "origin-ruby-sample", "ports": [ { "containerPort": 8080, "protocol": "TCP" } ], "env": [ { "name": "ADMIN_USERNAME", "value": "${ADMIN_USERNAME}" }, { "name": "ADMIN_PASSWORD", "value": "${ADMIN_PASSWORD}" }, { "name": "MYSQL_USER", "value": "${MYSQL_USER}" }, { "name": "MYSQL_PASSWORD", "value": "${MYSQL_PASSWORD}" }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "database", "creationTimestamp": null }, "spec": { "ports": [ { "name": "db", "protocol": "TCP", "port": 5434, "targetPort": 3306, "nodePort": 0 } ], "selector": { "name": "database" }, "portalIP": "", "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "database", "creationTimestamp": null }, "spec": { "strategy": { "type": "Recreate", "recreateParams": { "pre": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR1", "value": "custom_value1" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "mid": { "failurePolicy": "Abort", "execNewPod": { "command": [ "/bin/true" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } }, "post": { "failurePolicy": "Ignore", "execNewPod": { "command": [ "/bin/false" ], "env": [ { "name": "CUSTOM_VAR2", "value": "custom_value2" } ], "containerName": "ruby-helloworld-database", "volumes": ["ruby-helloworld-data"] } } }, "resources": {} }, "triggers": [ { "type": "ConfigChange" } ], "replicas": 1, "selector": { "name": "database" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "database" } }, "spec": { "containers": [ { "name": "ruby-helloworld-database", "image": "rhel8/mysql-80:latest", "ports": [ { "containerPort": 3306, "protocol": "TCP" } ], "env": [ { "name": "MYSQL_USER", "value": "${MYSQL_USER}" }, { "name": "MYSQL_PASSWORD", "value": "${MYSQL_PASSWORD}" }, { "name": "MYSQL_DATABASE", "value": "${MYSQL_DATABASE}" } ], "resources": {}, "volumeMounts": [ { "name": "ruby-helloworld-data", "mountPath": "/var/lib/mysql/data" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "Always", "securityContext": { "capabilities": {}, "privileged": false } } ], "volumes": [ { "name": "ruby-helloworld-data", "emptyDir": { "medium": "" } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst" } } }, "status": {} } ], "parameters": [ { "name": "ADMIN_USERNAME", "description": "administrator username", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "description": "administrator password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "MYSQL_USER", "description": "database username", "generate": "expression", "from": "user[A-Z0-9]{3}", "required": true }, { "name": "MYSQL_PASSWORD", "description": "database password", "generate": "expression", "from": "[a-zA-Z0-9]{8}", "required": true }, { "name": "MYSQL_DATABASE", "description": "database name", "value": "root", "required": true } ], "labels": { "template": "application-template-stibuild" } } `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: prometheus-test annotations: "openshift.io/display-name": Prometheus description: | Creates two resources that are part of different groups with no overlapping groupversions. Used to test ` + "`" + `new-app` + "`" + ` versioned output when dealing with lists of varying objects. iconClass: icon-cogs tags: "monitoring,prometheus, alertmanager,time-series" parameters: - description: The namespace to instantiate prometheus under. Defaults to 'kube-system'. name: NAMESPACE value: kube-system - description: The location of the proxy image name: IMAGE_PROXY value: openshift/oauth-proxy:v1.0.0 - description: The location of the prometheus image name: IMAGE_PROMETHEUS value: openshift/prometheus:v2.0.0-dev - description: The location of the alertmanager image name: IMAGE_ALERTMANAGER # TODO: Change to official openshift build value: openshift/prometheus-alertmanager:dev - description: The location of alert-buffer image name: IMAGE_ALERT_BUFFER # TODO: change to official openshift build value: ilackarms/message-buffer - description: The session secret for the proxy name: SESSION_SECRET generate: expression from: "[a-zA-Z0-9]{43}" objects: - apiVersion: v1 kind: Secret metadata: name: prometheus-proxy namespace: "${NAMESPACE}" stringData: session_secret: "${SESSION_SECRET}=" - apiVersion: apps/v1 kind: Deployment metadata: labels: app: prometheus name: prometheus namespace: "${NAMESPACE}" spec: replicas: 1 selector: matchLabels: app: prometheus template: metadata: labels: app: prometheus name: prometheus spec: serviceAccountName: prometheus containers: # Deploy Prometheus behind an oauth proxy - name: prom-proxy image: ${IMAGE_PROXY} imagePullPolicy: IfNotPresent ports: - containerPort: 8443 name: web args: - -provider=openshift - -https-address=:8443 - -email-domain=* - -upstream=http://localhost:9090 - -client-id=system:serviceaccount:${NAMESPACE}:prometheus - '-openshift-sar={"resource": "namespaces", "verb": "get", "resourceName": "${NAMESPACE}", "namespace": "${NAMESPACE}"}' - '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get", "resourceName": "${NAMESPACE}", "namespace": "${NAMESPACE}"}}' - -tls-cert=/etc/tls/private/tls.crt - -tls-key=/etc/tls/private/tls.key - -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token - -cookie-secret-file=/etc/proxy/secrets/session_secret - -skip-auth-regex=^/metrics volumeMounts: - mountPath: /etc/tls/private name: prometheus-tls - mountPath: /etc/proxy/secrets name: prometheus-secrets - mountPath: /prometheus name: prometheus-data - name: prometheus args: - --storage.tsdb.retention=6h - --config.file=/etc/prometheus/prometheus.yml - --web.listen-address=localhost:9090 image: ${IMAGE_PROMETHEUS} imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /etc/prometheus name: prometheus-config - mountPath: /prometheus name: prometheus-data # Deploy alertmanager behind prometheus-alert-buffer behind an oauth proxy # use http port=4190 and https port=9943 to differ from prom-proxy - name: alerts-proxy image: ${IMAGE_PROXY} imagePullPolicy: IfNotPresent ports: - containerPort: 9443 name: web args: - -provider=openshift - -https-address=:9443 - -http-address=:4190 - -email-domain=* - -upstream=http://localhost:9099 - -client-id=system:serviceaccount:${NAMESPACE}:prometheus - '-openshift-sar={"resource": "namespaces", "verb": "get", "name": "${NAMESPACE}"}' - '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get", "name": "${NAMESPACE}"}}' - -tls-cert=/etc/tls/private/tls.crt - -tls-key=/etc/tls/private/tls.key - -client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token - -cookie-secret-file=/etc/proxy/secrets/session_secret volumeMounts: - mountPath: /etc/tls/private name: alerts-tls - mountPath: /etc/proxy/secrets name: alerts-secrets - name: alert-buffer args: - --storage-path=/alert-buffer/messages.db image: ${IMAGE_ALERT_BUFFER} imagePullPolicy: IfNotPresent volumeMounts: - mountPath: /alert-buffer name: alert-buffer-data ports: - containerPort: 9099 name: alert-buf - name: alertmanager args: - -config.file=/etc/alertmanager/alertmanager.yml image: ${IMAGE_ALERTMANAGER} imagePullPolicy: IfNotPresent ports: - containerPort: 9093 name: web volumeMounts: - mountPath: /etc/alertmanager name: alertmanager-config - mountPath: /alertmanager name: alertmanager-data restartPolicy: Always volumes: - name: prometheus-config configMap: defaultMode: 420 name: prometheus - name: prometheus-secrets secret: secretName: prometheus-proxy - name: prometheus-tls secret: secretName: prometheus-tls - name: prometheus-data emptyDir: {} - name: alertmanager-config configMap: defaultMode: 420 name: prometheus-alerts - name: alerts-secrets secret: secretName: alerts-proxy - name: alerts-tls secret: secretName: prometheus-alerts-tls - name: alertmanager-data emptyDir: {} - name: alert-buffer-data #TODO: make persistent emptyDir: {} `) func testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/template_multiple_resource_gvs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv = []byte(`SOME_VAR=envvarfromfile `) func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnvBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnvBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-env.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv = []byte(`MYSQL_USER='mysql' MYSQL_DATABASE="thisisadatabase" `) func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnvBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv, nil } func testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnvBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-params.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml = []byte(`apiVersion: oauth.openshift.io/v1 clientName: openshift-challenging-client expiresIn: 15552000 kind: OAuthAccessToken metadata: name: sha256~efaca6fab897953ffcb4f857eb5cbf2cf3a4c33f1314b4922656303426b1cfc9 redirectURI: https://localhost:8443/oauth/token/implicit userName: test userUID: 322b236b-22b9-11e6-b307-080027242396 scopes: - user:info `) func testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml, nil } func testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/oauthaccesstoken.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataOldTemplateJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "annotations": { "iconClass": "icon-jboss", "description": "Application template for EAP 6 applications built using S2I.", "tags": "eap,javaee,java,jboss,xpaas", "version": "1.3.2" }, "name": "eap64-basic-s2i" }, "labels": { "template": "eap64-basic-s2i", "xpaas": "1.3.2" }, "parameters": [ { "description": "The name for the application.", "name": "APPLICATION_NAME", "value": "eap-app", "required": true }, { "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>", "name": "HOSTNAME_HTTP", "value": "", "required": false }, { "description": "Git source URI for application", "name": "SOURCE_REPOSITORY_URL", "value": "https://github.com/jboss-developer/jboss-eap-quickstarts", "required": true }, { "description": "Git branch/tag reference", "name": "SOURCE_REPOSITORY_REF", "value": "6.4.x", "required": false }, { "description": "Path within Git project to build; empty for root project directory.", "name": "CONTEXT_DIR", "value": "kitchensink", "required": false }, { "description": "Queue names", "name": "HORNETQ_QUEUES", "value": "", "required": false }, { "description": "Topic names", "name": "HORNETQ_TOPICS", "value": "", "required": false }, { "description": "HornetQ cluster admin password", "name": "HORNETQ_CLUSTER_PASSWORD", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "description": "GitHub trigger secret", "name": "GITHUB_WEBHOOK_SECRET", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "description": "Generic build trigger secret", "name": "GENERIC_WEBHOOK_SECRET", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.", "name": "IMAGE_STREAM_NAMESPACE", "value": "openshift", "required": true }, { "description": "JGroups cluster password", "name": "JGROUPS_CLUSTER_PASSWORD", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "description": "Controls whether exploded deployment content should be automatically deployed", "name": "AUTO_DEPLOY_EXPLODED", "value": "false", "required": false } ], "objects": [ { "kind": "Service", "apiVersion": "v1", "spec": { "ports": [ { "port": 8080, "targetPort": 8080 } ], "selector": { "deploymentConfig": "${APPLICATION_NAME}" } }, "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "The web server's http port." } } }, { "kind": "Route", "apiVersion": "route.openshift.io/v1", "id": "${APPLICATION_NAME}-http", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "Route for application's http service." } }, "spec": { "host": "${HOSTNAME_HTTP}", "to": { "name": "${APPLICATION_NAME}" } } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" } } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" } }, "spec": { "source": { "type": "Git", "git": { "uri": "${SOURCE_REPOSITORY_URL}", "ref": "${SOURCE_REPOSITORY_REF}" }, "contextDir": "${CONTEXT_DIR}" }, "strategy": { "type": "Source", "sourceStrategy": { "forcePull": true, "from": { "kind": "ImageStreamTag", "namespace": "${IMAGE_STREAM_NAMESPACE}", "name": "jboss-eap64-openshift:1.4" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "${APPLICATION_NAME}:latest" } }, "triggers": [ { "type": "GitHub", "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" } }, { "type": "Generic", "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ] } }, { "kind": "DeploymentConfig", "apiVersion": "apps.openshift.io/v1", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" } }, "spec": { "strategy": { "type": "Recreate" }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APPLICATION_NAME}" ], "from": { "kind": "ImageStream", "name": "${APPLICATION_NAME}" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "deploymentConfig": "${APPLICATION_NAME}" }, "template": { "metadata": { "name": "${APPLICATION_NAME}", "labels": { "deploymentConfig": "${APPLICATION_NAME}", "application": "${APPLICATION_NAME}" } }, "spec": { "terminationGracePeriodSeconds": 60, "containers": [ { "name": "${APPLICATION_NAME}", "image": "${APPLICATION_NAME}", "imagePullPolicy": "Always", "livenessProbe": { "exec": { "command": [ "/bin/bash", "-c", "/opt/eap/bin/livenessProbe.sh" ] } }, "readinessProbe": { "exec": { "command": [ "/bin/bash", "-c", "/opt/eap/bin/readinessProbe.sh" ] } }, "ports": [ { "name": "jolokia", "containerPort": 8778, "protocol": "TCP" }, { "name": "http", "containerPort": 8080, "protocol": "TCP" }, { "name": "ping", "containerPort": 8888, "protocol": "TCP" } ], "env": [ { "name": "OPENSHIFT_KUBE_PING_LABELS", "value": "application=${APPLICATION_NAME}" }, { "name": "OPENSHIFT_KUBE_PING_NAMESPACE", "valueFrom": { "fieldRef": { "fieldPath": "metadata.namespace" } } }, { "name": "HORNETQ_CLUSTER_PASSWORD", "value": "${HORNETQ_CLUSTER_PASSWORD}" }, { "name": "HORNETQ_QUEUES", "value": "${HORNETQ_QUEUES}" }, { "name": "HORNETQ_TOPICS", "value": "${HORNETQ_TOPICS}" }, { "name": "JGROUPS_CLUSTER_PASSWORD", "value": "${JGROUPS_CLUSTER_PASSWORD}" }, { "name": "AUTO_DEPLOY_EXPLODED", "value": "${AUTO_DEPLOY_EXPLODED}" } ] } ] } } } } ] } `) func testExtendedTestdataCmdTestCmdTestdataOldTemplateJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataOldTemplateJson, nil } func testExtendedTestdataCmdTestCmdTestdataOldTemplateJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataOldTemplateJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/old-template.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory = []byte(`{"kind":"Secret","apiVersion":"v1","metadata":{"name":"json-no-extension-in-directory"}}`) func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectoryBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory, nil } func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectoryBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-no-extension-in-directory", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson = []byte(`{"kind":"Secret","apiVersion":"v1","metadata":{"name":"json-with-extension"}}`) func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson, nil } func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-with-extension.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile = []byte(`non-api file content`) func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFileBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile, nil } func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/non-api-file", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml = []byte(`apiVersion: v1 kind: Secret metadata: name: yml-with-extension `) func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYmlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml, nil } func testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/yml-with-extension.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension = []byte(`{"kind":"Secret","apiVersion":"v1","metadata":{"name":"json-no-extension"}}`) func testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtensionBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension, nil } func testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtensionBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/json-no-extension", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension = []byte(`apiVersion: v1 kind: Secret metadata: name: yml-no-extension `) func testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtensionBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension, nil } func testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtensionBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/yml-no-extension", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml = []byte(`apiVersion: apps/v1 kind: DaemonSet metadata: name: bind spec: selector: matchLabels: service: bind updateStrategy: type: RollingUpdate rollingUpdate: maxUnavailable: 10% template: metadata: labels: service: bind spec: affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: "service" operator: "In" values: ["bind"] topologyKey: "kubernetes.io/hostname" namespaces: [] containers: - name: kubernetes-pause image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest command: ["/bin/sleep", "84600"] `) func testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml, nil } func testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/rollingupdate-daemonset.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataServicesYaml = []byte(`kind: List apiVersion: v1 items: - kind: Service apiVersion: v1 metadata: name: clusterip spec: ports: - name: http protocol: TCP port: 80 - kind: Endpoints apiVersion: v1 metadata: name: clusterip annotations: "endpoints.beta.kubernetes.io/hostnames-map": '{"10.1.2.4":{"HostName": "test2"}}' subsets: - addresses: - ip: 10.1.2.3 - ip: 10.1.2.4 ports: - name: http protocol: TCP port: 80 - kind: Service apiVersion: v1 metadata: name: headless spec: clusterIP: None ports: - name: http protocol: TCP port: 80 - kind: Endpoints apiVersion: v1 metadata: name: headless subsets: - addresses: - ip: 10.1.2.3 - ip: 10.1.2.4 hostname: test2 ports: - name: http protocol: TCP port: 80`) func testExtendedTestdataCmdTestCmdTestdataServicesYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataServicesYaml, nil } func testExtendedTestdataCmdTestCmdTestdataServicesYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataServicesYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/services.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: simple-deployment spec: replicas: 1 selector: name: simple-deployment strategy: type: Rolling rollingParams: template: metadata: labels: name: simple-deployment spec: containers: - image: "docker.io/openshift/deployment-example:v1" imagePullPolicy: IfNotPresent name: myapp readinessProbe: httpGet: path: / port: 8080 scheme: HTTP triggers: - type: ConfigChange `) func testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml, nil } func testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/simple-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml = []byte(`apiVersion: apps/v1 kind: StatefulSet metadata: name: testapp spec: serviceName: frontend selector: matchLabels: app: testapp replicas: 1 template: metadata: labels: app: testapp spec: containers: - name: testapp image: registry.access.redhat.com/ubi8/ruby-27:latest command: - /bin/sleep args: - infinity `) func testExtendedTestdataCmdTestCmdTestdataStatefulsetYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml, nil } func testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataStatefulsetYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml = []byte(`kind: List apiVersion: v1 items: - kind: Secret apiVersion: v1 metadata: name: configsecret stringData: NAME: template - kind: TemplateInstance apiVersion: template.openshift.io/v1 metadata: name: templateinstance spec: template: kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: Secret apiVersion: v1 metadata: name: secret labels: foo: bar - kind: Deployment apiVersion: apps/v1 metadata: name: deployment spec: replicas: 0 selector: matchLabels: key: value template: metadata: labels: key: value spec: containers: - name: hello-openshift image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 - kind: Route apiVersion: route.openshift.io/v1 metadata: name: route spec: to: name: foo - kind: Route apiVersion: route.openshift.io/v1 metadata: name: newroute spec: to: name: foo parameters: - name: NAME value: ${NAME} secret: name: configsecret `) func testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson = []byte(`{ "kind": "ClusterRoleBinding", "apiVersion": "authorization.openshift.io/v1", "metadata": { "name": "basic-users", "selfLink": "/oapi/v1/clusterrolebindings/basic-users", "uid": "8dcfc4cd-6917-11e5-8b72-3c970e4b7ffe", "resourceVersion": "42", "creationTimestamp": "2015-10-02T15:09:18Z", "labels": { "custom-label":"value" }, "annotations": { "custom-annotation":"value" } }, "subjects": [ { "kind": "SystemGroup", "name": "system:authenticated" }, { "kind": "User", "name": "custom-user" } ], "roleRef": { "name": "cluster-status" } } `) func testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/basic-users-binding.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv = []byte(`ADMIN_USERNAME=root ADMIN_PASSWORD="adminpass" REDIS_PASSWORD='redispass' `) func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnvBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnvBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "guestbook-example", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Guestbook Example", "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker" } }, "message": "Your admin credentials are ${ADMIN_USERNAME}:${ADMIN_PASSWORD}", "objects": [ { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "frontend-route", "creationTimestamp": null }, "spec": { "host": "guestbook.example.com", "to": { "kind": "Service", "name": "frontend-service" } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend-service", "creationTimestamp": null }, "spec": { "ports": [ { "protocol": "TCP", "port": 5432, "targetPort": 5432, "nodePort": 0 } ], "selector": { "name": "frontend-service" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "redis-master", "creationTimestamp": null }, "spec": { "ports": [ { "protocol": "TCP", "port": 10000, "targetPort": 10000, "nodePort": 0 } ], "selector": { "name": "redis-master" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "${SLAVE_SERVICE_NAME}", "creationTimestamp": null }, "spec": { "ports": [ { "protocol": "TCP", "port": 10001, "targetPort": 10001, "nodePort": 0 } ], "selector": { "name": "${SLAVE_SERVICE_NAME}" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "redis-master", "creationTimestamp": null, "labels": { "name": "redis-master" } }, "spec": { "containers": [ { "name": "master", "image": "dockerfile/redis", "ports": [ { "containerPort": 6379, "protocol": "TCP" } ], "env": [ { "name": "REDIS_PASSWORD", "value": "${REDIS_PASSWORD}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" }, "status": {} }, { "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "guestbook", "creationTimestamp": null, "labels": { "name": "frontend-service" } }, "spec": { "replicas": 3, "selector": { "name": "frontend-service" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "frontend-service" } }, "spec": { "containers": [ { "name": "php-redis", "image": "brendanburns/php-redis", "ports": [ { "hostPort": 8000, "containerPort": 80, "protocol": "TCP" } ], "env": [ { "name": "ADMIN_USERNAME", "value": "${ADMIN_USERNAME}" }, { "name": "ADMIN_PASSWORD", "value": "${ADMIN_PASSWORD}" }, { "name": "REDIS_PASSWORD", "value": "${REDIS_PASSWORD}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" } } }, "status": { "replicas": 0 } }, { "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "${SLAVE_SERVICE_NAME}", "creationTimestamp": null, "labels": { "name": "${SLAVE_SERVICE_NAME}" } }, "spec": { "replicas": 2, "selector": { "name": "${SLAVE_SERVICE_NAME}" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "${SLAVE_SERVICE_NAME}" } }, "spec": { "containers": [ { "name": "slave", "image": "brendanburns/${SLAVE_SERVICE_NAME}", "ports": [ { "hostPort": 6380, "containerPort": 6379, "protocol": "TCP" } ], "env": [ { "name": "REDIS_PASSWORD", "value": "${REDIS_PASSWORD}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" } } }, "status": { "replicas": 0 } } ], "parameters": [ { "name": "ADMIN_USERNAME", "description": "Guestbook administrator username", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "description": "Guestbook administrator password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "REDIS_PASSWORD", "description": "Redis password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "SLAVE_SERVICE_NAME", "description": "Slave Service name", "value": "redis-slave" } ] } `) func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "guestbook-example", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Guestbook Example", "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker" } }, "message": "Your admin credentials are adminQ3H:dwNJiJwW", "objects": [ { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "creationTimestamp": null, "name": "frontend-route" }, "spec": { "host": "guestbook.example.com", "to": { "kind": "Service", "name": "frontend-service" } }, "status": {} }, { "apiVersion": "v1", "kind": "Service", "metadata": { "creationTimestamp": null, "name": "frontend-service" }, "spec": { "ports": [ { "nodePort": 0, "port": 5432, "protocol": "TCP", "targetPort": 5432 } ], "selector": { "name": "frontend-service" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "creationTimestamp": null, "name": "redis-master" }, "spec": { "ports": [ { "nodePort": 0, "port": 10000, "protocol": "TCP", "targetPort": 10000 } ], "selector": { "name": "redis-master" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "creationTimestamp": null, "name": "redis-slave" }, "spec": { "ports": [ { "nodePort": 0, "port": 10001, "protocol": "TCP", "targetPort": 10001 } ], "selector": { "name": "redis-slave" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "Pod", "metadata": { "creationTimestamp": null, "labels": { "name": "redis-master" }, "name": "redis-master" }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "REDIS_PASSWORD", "value": "P8vxbV4C" } ], "image": "dockerfile/redis", "imagePullPolicy": "IfNotPresent", "name": "master", "ports": [ { "containerPort": 6379, "protocol": "TCP" } ], "resources": {}, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log" } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccount": "" }, "status": {} }, { "apiVersion": "v1", "kind": "ReplicationController", "metadata": { "creationTimestamp": null, "labels": { "name": "frontend-service" }, "name": "guestbook" }, "spec": { "replicas": 3, "selector": { "name": "frontend-service" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "frontend-service" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "ADMIN_USERNAME", "value": "adminQ3H" }, { "name": "ADMIN_PASSWORD", "value": "dwNJiJwW" }, { "name": "REDIS_PASSWORD", "value": "P8vxbV4C" } ], "image": "brendanburns/php-redis", "imagePullPolicy": "IfNotPresent", "name": "php-redis", "ports": [ { "containerPort": 80, "hostPort": 8000, "protocol": "TCP" } ], "resources": {}, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log" } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccount": "" } } }, "status": { "replicas": 0 } }, { "apiVersion": "v1", "kind": "ReplicationController", "metadata": { "creationTimestamp": null, "labels": { "name": "redis-slave" }, "name": "redis-slave" }, "spec": { "replicas": 2, "selector": { "name": "redis-slave" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "redis-slave" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "REDIS_PASSWORD", "value": "P8vxbV4C" } ], "image": "brendanburns/redis-slave", "imagePullPolicy": "IfNotPresent", "name": "slave", "ports": [ { "containerPort": 6379, "hostPort": 6380, "protocol": "TCP" } ], "resources": {}, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log" } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccount": "" } } }, "status": { "replicas": 0 } } ], "parameters": [ { "name": "ADMIN_USERNAME", "description": "Guestbook administrator username", "value": "adminQ3H", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "description": "Guestbook administrator password", "value": "dwNJiJwW", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "REDIS_PASSWORD", "description": "Redis password", "value": "P8vxbV4C", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "SLAVE_SERVICE_NAME", "description": "Slave Service name", "value": "redis-slave" }, { "name": "CUSTOM_PARAM1", "value": "1" } ] }`) func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook_list.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt = []byte(`Multiple lines also,with=commas. `) func testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxtBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/multiline.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "template-type-precision", "annotations": { "description": "template to test type precision in template processing. Sets supplemental groups of 0, 1000030003, maxint32 and maxint64" } }, "objects": [ { "apiVersion": "v1", "kind": "Pod", "metadata": { "name": "template-type-precision" }, "spec": { "containers": [ { "name": "test", "image": "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest", "imagePullPolicy": "IfNotPresent" } ], "restartPolicy": "Never", "securityContext": { "supplementalGroups": [ 0, 1000030003, 2147483647 ] }, "terminationGracePeriodSeconds": 9223372036854775807 } } ] } `) func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/template-type-precision.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv = []byte(`required_param="first\nsecond" optional_param=foo `) func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnvBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnvBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.env", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: User apiVersion: user.openshift.io/v1 metadata: name: ${required_param} groups: null parameters: - name: optional_param - name: required_param required: true `) func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestBcYaml = []byte(`apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: test-buildconfig spec: output: {} runPolicy: Serial source: git: uri: https://github.com/openshift/ruby-hello-world.git secrets: null type: Git strategy: sourceStrategy: from: kind: DockerImage name: registry.access.redhat.com/ubi8/ruby-27 type: Source triggers: [] status: lastVersion: 0 `) func testExtendedTestdataCmdTestCmdTestdataTestBcYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestBcYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTestBcYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-20-centos7-buildcli", "creationTimestamp": null }, "spec": { "dockerImageRepository": "image-registry.openshift-image-registry.svc:5000/openshift/ruby", "tags": [ { "name": "valid" } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build-validtag", "creationTimestamp": null }, "spec": { "triggers": [ { "type": "imageChange", "imageChange": {} } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby" }, "incremental": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build-invalidtag", "creationTimestamp": null }, "spec": { "triggers": [ { "type": "imageChange", "imageChange": {} } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby" }, "incremental": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "resources": {} }, "status": { "lastVersion": 0 } } ] } `) func testExtendedTestdataCmdTestCmdTestdataTestBuildcliJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestBuildcliJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-buildcli.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: test-deployment-config spec: replicas: 1 selector: name: test-deployment strategy: type: Recreate recreateParams: timeoutSeconds: 20 post: failurePolicy: Ignore tagImages: - containerName: ruby-helloworld to: kind: ImageStreamTag name: origin-ruby-sample:deployed template: metadata: labels: name: test-deployment spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent name: ruby-helloworld ports: - containerPort: 8080 protocol: TCP resources: limits: cpu: 100m memory: 3Gi dnsPolicy: ClusterFirst restartPolicy: Always volumes: - emptyDir: {} name: vol1 triggers: - type: ConfigChange `) func testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-deployment-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestDeploymentYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: name: test-deployment spec: replicas: 1 selector: matchLabels: name: test-deployment strategy: type: Recreate template: metadata: labels: name: test-deployment spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent name: ruby-helloworld ports: - containerPort: 8080 protocol: TCP resources: limits: cpu: 100m memory: 3Gi dnsPolicy: ClusterFirst restartPolicy: Always volumes: - emptyDir: {} name: vol1 `) func testExtendedTestdataCmdTestCmdTestdataTestDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestDeploymentYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTestDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson = []byte(`{ "kind":"BuildConfig", "apiVersion":"build.openshift.io/v1", "metadata":{ "name":"test", "labels":{ "name":"test" } }, "spec":{ "triggers":[], "source":{ "git": { "uri":"https://github.com/sclorg/nodejs-ex" }, "dockerfile": "FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" }, "strategy":{ "type":"Docker", "dockerStrategy":{ "from":{ "kind":"DockerImage", "name":"image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" } } }, "output":{ "to":{ "kind":"ImageStreamTag", "name":"test:latest" }, "imageLabels": [ { "name": "user-specified-label", "value": "arbitrary-value" }, { "name": "io.k8s.display-name", "value": "overridden" }, { "name": "io.openshift.builder-version", "value": "overridden2" } ] } } } `) func testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-docker-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test", "creationTimestamp": null, "labels": { "color": "blue" } }, "spec": {}, "status": { "dockerImageRepository": "" } } `) func testExtendedTestdataCmdTestCmdTestdataTestImageStreamJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestImageStreamJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-image-stream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestImageJson = []byte(`{ "kind": "Image", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test", "creationTimestamp": null }, "dockerImageReference": "registry.redhat.io/ubi8/ruby-27:latest", "dockerImageMetadata": { "kind": "DockerImage", "apiVersion": "1.0", "Id": "", "ContainerConfig": {}, "Config": {} }, "dockerImageLayers": [], "dockerImageMetadataVersion": "1.0" } `) func testExtendedTestdataCmdTestCmdTestdataTestImageJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestImageJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestImageJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestImageJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-image.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: test-multiarch-stream spec: tags: - name: linux-amd64 from: kind: DockerImage name: bparees/multiplatformtest:latest annotations: importer.image.openshift.io/prefer-os: linux importer.image.openshift.io/prefer-arch: amd64 - name: linux-s390x from: kind: DockerImage name: bparees/multiplatformtest:latest annotations: importer.image.openshift.io/prefer-os: linux importer.image.openshift.io/prefer-arch: s390x `) func testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-multiarch-stream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml = []byte(`apiVersion: v1 kind: ReplicationController metadata: annotations: openshift.io/deployment-config.latest-version: "1" openshift.io/deployment-config.name: test-deployment openshift.io/deployment.phase: Complete optnshift.io/deployment.replicas: "1" name: test-replication-controller spec: replicas: 1 selector: deployment: test-deployment deploymentconfig: test-deployment template: metadata: labels: deployment: test-deployment deploymentconfig: test-deployment spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent name: ruby-helloworld ports: - containerPort: 8080 protocol: TCP resources: {} dnsPolicy: ClusterFirst restartPolicy: Always `) func testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-replication-controller.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestRouteJson = []byte(`{ "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "testroute", "creationTimestamp": null, "labels": { "rtlabel1": "greatroute" } }, "spec": { "host": "test.example.com", "to": { "kind": "Service", "name": "testservice" } }, "status": {} } `) func testExtendedTestdataCmdTestCmdTestdataTestRouteJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestRouteJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestRouteJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestRouteJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-route.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson = []byte(`{ "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "test", "labels": { "name": "test" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri":"https://github.com/sclorg/nodejs-ex" } }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/nodejs:latest" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "test:latest" }, "imageLabels": [ { "name": "user-specified-label", "value": "arbitrary-value" }, { "name": "io.k8s.display-name", "value": "overridden" }, { "name": "io.openshift.builder-version", "value": "overridden2" } ] } } } `) func testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-s2i-build.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestServiceJson = []byte(`{ "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend", "creationTimestamp": null, "labels": { "name": "frontend" } }, "spec": { "ports": [ { "protocol": "TCP", "port": 9998, "targetPort": 9998, "nodePort": 0 } ], "selector": { "name": "frontend" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }`) func testExtendedTestdataCmdTestCmdTestdataTestServiceJsonBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestServiceJson, nil } func testExtendedTestdataCmdTestCmdTestdataTestServiceJson() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestServiceJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-service.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTestdataTestStreamYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: creationTimestamp: 2015-10-12T12:16:36Z name: test-stream resourceVersion: "327" selfLink: /oapi/v1/namespaces/test/imagestreams/test-stream uid: 15be89a8-70db-11e5-ae32-080027c5bfa9 spec: dockerImageRepository: 172.30.30.30:5000/test/test-stream tags: - name: latest - name: installable from: kind: DockerImage name: openshift/origin:v1.0.6 annotations: io.openshift.generate.job: "true" `) func testExtendedTestdataCmdTestCmdTestdataTestStreamYamlBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTestdataTestStreamYaml, nil } func testExtendedTestdataCmdTestCmdTestdataTestStreamYaml() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTestdataTestStreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/testdata/test-stream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdTriggersSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all --all exit 0 ) &>/dev/null url=":${API_PORT:-8443}" project="$(oc project -q)" os::test::junit::declare_suite_start "cmd/triggers" # This test validates triggers os::cmd::expect_success 'oc new-app registry.access.redhat.com/ubi8/ruby-27~https://github.com/openshift/ruby-hello-world.git' os::cmd::expect_success 'oc get bc/ruby-hello-world' os::cmd::expect_success "oc new-build --name=scratch --docker-image=scratch --dockerfile='FROM scratch'" os::test::junit::declare_suite_start "cmd/triggers/buildconfigs" ## Build configs # error conditions os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --remove --remove-all' 'specify either --remove or --remove-all' os::cmd::expect_failure_and_text 'oc set triggers bc/ruby-hello-world --auto --manual' 'at most one of --auto or --manual' # print os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*true' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:latest.*true' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github' # note, oc new-app currently does not set up gitlab or bitbucket webhooks by default # remove all os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove-all' 'updated' # add a new secretReference style webhook to the BC os::cmd::expect_success "oc patch bc/ruby-hello-world -p '{\"spec\":{\"triggers\":[{\"github\":{\"secretReference\":{\"name\":\"mysecret\"}},\"type\":\"GitHub\"}]}}'" os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-hello-world' "Webhook GitHub" # make sure we can still add/set other triggers os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-gitlab' 'updated' os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-hello-world' "Webhook GitHub" os::cmd::expect_success_and_text 'oc describe buildConfigs ruby-hello-world' "Webhook GitLab" os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove-all' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook|github' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'config.*false' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:latest.*false' # set github hook os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-github' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'github' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-github' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'github' # set webhook os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-webhook' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-webhook' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook' # set webhook plus envvars os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-webhook-allow-env' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'webhook' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-webhook-allow-env' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'webhook' # set gitlab hook os::cmd::expect_success 'oc set triggers bc/ruby-hello-world --from-gitlab' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'gitlab' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-gitlab' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'gitlab' # set bitbucket hook os::cmd::expect_success 'oc set triggers bc/ruby-hello-world --from-bitbucket' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'bitbucket' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --remove --from-bitbucket' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'bitbucket' # set from-image os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other.*true' # manual and remove both clear build configs os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other --manual' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other.*false' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc/ruby-hello-world --from-image=ruby-27:other --remove' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers bc/ruby-hello-world' 'image.*ruby-27:other' # test --all os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27:latest.*false' os::cmd::expect_success_and_text 'oc set triggers bc --all --auto' 'updated' os::cmd::expect_success_and_text 'oc set triggers bc --all' 'buildconfigs/ruby-hello-world.*image.*ruby-27:latest.*true' # set a trigger on a build that doesn't have an imagestream strategy.from-image os::cmd::expect_success_and_text 'oc set triggers bc/scratch --from-image=test:latest' 'updated' os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/triggers/deploymentconfigs" ## Deployment configs os::cmd::expect_success 'oc create deploymentconfig testdc --image=image-registry.openshift-image-registry.svc:5000/openshift/tools:latest' # error conditions os::cmd::expect_failure_and_text 'oc set triggers dc/testdc --from-github' 'deployment configs do not support GitHub web hooks' os::cmd::expect_failure_and_text 'oc set triggers dc/testdc --from-webhook' 'deployment configs do not support web hooks' os::cmd::expect_failure_and_text 'oc set triggers dc/testdc --from-gitlab' 'deployment configs do not support GitLab web hooks' os::cmd::expect_failure_and_text 'oc set triggers dc/testdc --from-bitbucket' 'deployment configs do not support Bitbucket web hooks' os::cmd::expect_failure_and_text 'oc set triggers dc/testdc --from-image=test:latest' 'you must specify --containers when setting --from-image' os::cmd::expect_failure_and_text 'oc set triggers dc/testdc --from-image=test:latest --containers=other' 'not all container names exist: other \(accepts: default-container\)' # print os::cmd::expect_success_and_text 'oc set triggers dc/testdc' 'config.*true' os::cmd::expect_success_and_not_text 'oc set triggers dc/testdc' 'webhook|github|gitlab|bitbucket' os::cmd::expect_success_and_not_text 'oc set triggers dc/testdc' 'gitlab' os::cmd::expect_success_and_not_text 'oc set triggers dc/testdc' 'bitbucket' # remove all os::cmd::expect_success_and_text 'oc set triggers dc/testdc --remove-all' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers dc/testdc' 'webhook|github|image|gitlab|bitbucket' os::cmd::expect_success_and_text 'oc set triggers dc/testdc' 'config.*false' # auto os::cmd::expect_success_and_text 'oc set triggers dc/testdc --auto' 'updated' os::cmd::expect_success_and_text 'oc set triggers dc/testdc' 'config.*true' os::cmd::expect_success_and_text 'oc set triggers dc/testdc --from-image=ruby-hello-world:latest -c default-container' 'updated' os::cmd::expect_success_and_text 'oc set triggers dc/testdc' 'image.*ruby-hello-world:latest \(default-container\).*true' os::test::junit::declare_suite_end os::test::junit::declare_suite_start "cmd/triggers/annotations" ## Deployment os::cmd::expect_success 'oc create deployment test --image=image-registry.openshift-image-registry.svc:5000/openshift/tools:latest' # error conditions os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-github' 'does not support GitHub web hooks' os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-webhook' 'does not support web hooks' os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-gitlab' 'does not support GitLab web hooks' os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-bitbucket' 'does not support Bitbucket web hooks' os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-image=test:latest' 'you must specify --containers when setting --from-image' os::cmd::expect_failure_and_text 'oc set triggers deploy/test --from-image=test:latest --containers=other' 'not all container names exist: other \(accepts: tools\)' # print os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'config.*true' os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'webhook|github|gitlab|bitbucket' os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'gitlab' os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'bitbucket' # remove all os::cmd::expect_success_and_text 'oc set triggers deploy/test --remove-all' 'updated' os::cmd::expect_success_and_not_text 'oc set triggers deploy/test' 'webhook|github|image|gitlab|bitbucket' os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'config.*false' # auto os::cmd::expect_success_and_text 'oc set triggers deploy/test --auto' 'updated' os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'config.*true' os::cmd::expect_success_and_text 'oc set triggers deploy/test --from-image=ruby-hello-world:latest -c tools' 'updated' os::cmd::expect_success_and_text 'oc set triggers deploy/test' 'image.*ruby-hello-world:latest \(tools\).*true' os::test::junit::declare_suite_end os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdTriggersShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdTriggersSh, nil } func testExtendedTestdataCmdTestCmdTriggersSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdTriggersShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/triggers.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCmdTestCmdVolumesSh = []byte(`#!/bin/bash source "$(dirname "${BASH_SOURCE}")/../../hack/lib/init.sh" trap os::test::junit::reconcile_output EXIT # Cleanup cluster resources created by this test ( set +e oc delete all,templates,pvc --all exit 0 ) &>/dev/null os::test::junit::declare_suite_start "cmd/volumes" # This test validates the 'volume' command os::cmd::expect_success 'oc create -f ${TEST_DATA}/test-deployment-config.yaml' os::cmd::expect_success 'oc create -f ${TEST_DATA}/rollingupdate-daemonset.yaml' os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config' 'vol1' os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --name=vol0 -m /opt5' os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --name=vol2 --type=emptydir -m /opt' os::cmd::expect_failure_and_text "oc set volume dc/test-deployment-config --add --name=vol1 --type=secret --secret-name='\$ecret' -m /data" 'overwrite to replace' os::cmd::expect_success "oc set volume dc/test-deployment-config --add --name=vol10 --secret-name='my-secret' -m /data-2" os::cmd::expect_success "oc set volume dc/test-deployment-config --add --name=vol11 --configmap-name='my-configmap' -m /data-21" os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.containers[0].volumeMounts}' '/data-21' os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.volumes[4].configMap}' 'my-configmap' os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --name=vol1 --type=emptyDir -m /data --overwrite' os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --add -m /opt' "'/opt' already exists" os::cmd::expect_success_and_text "oc set volume dc/test-deployment-config --add --name=vol2 -m /etc -c 'ruby' --overwrite" 'does not have any containers' os::cmd::expect_success "oc set volume dc/test-deployment-config --add --name=vol2 -m /etc -c 'ruby*' --overwrite" os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --name=vol2' 'mounted at /etc' os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --dry-run --add --name=vol3 -o yaml' 'name: vol3' os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --name=vol3' 'volume "vol3" not found' os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --remove' 'confirm for removing more than one volume' os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --name=vol2' os::cmd::expect_success_and_not_text 'oc set volume dc/test-deployment-config' 'vol2' os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --confirm' os::cmd::expect_success_and_not_text 'oc set volume dc/test-deployment-config' 'vol1' # ensure that resources not present in all versions of a target group # are still able to be encoded and patched accordingly os::cmd::expect_success 'oc set volume ds/bind --add --name=vol2 --type=emptydir -m /opt' os::cmd::expect_success 'oc set volume ds/bind --remove --name=vol2' os::cmd::expect_success "oc set volume dc/test-deployment-config --add -t 'secret' --secret-name='asdf' --default-mode '765'" os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.volumes[0]}' '501' os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --confirm' os::cmd::expect_failure "oc set volume dc/test-deployment-config --add -t 'secret' --secret-name='asdf' --default-mode '888'" os::cmd::expect_success "oc set volume dc/test-deployment-config --add -t 'configmap' --configmap-name='asdf' --default-mode '123'" os::cmd::expect_success_and_text 'oc get dc/test-deployment-config -o jsonpath={.spec.template.spec.volumes[0]}' '83' os::cmd::expect_success 'oc set volume dc/test-deployment-config --remove --confirm' os::cmd::expect_success_and_text 'oc get pvc --no-headers | wc -l' '0' os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --mount-path=/other --claim-size=1G' os::cmd::expect_success 'oc set volume dc/test-deployment-config --add --mount-path=/second --type=pvc --claim-size=1G --claim-mode=rwo' os::cmd::expect_success_and_text 'oc get pvc --no-headers | wc -l' '2' # attempt to add the same volume mounted in /other, but with a subpath # we are not using --overwrite, so expect a failure os::cmd::expect_failure_and_text 'oc set volume dc/test-deployment-config --add --mount-path=/second --sub-path=foo' "'/second' already exists" # add --sub-path and expect success and --sub-path added when using --overwrite os::cmd::expect_success_and_text 'oc set volume dc/test-deployment-config --add --mount-path=/second --sub-path=foo --overwrite' 'deploymentconfig.apps.openshift.io/test-deployment-config volume updated' os::cmd::expect_success_and_text "oc get dc/test-deployment-config -o jsonpath='{.spec.template.spec.containers[0].volumeMounts[*].subPath}'" 'foo' # ensure that we can describe volumes of type ConfigMap os::cmd::expect_success " echo 'apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: simple-dc creationTimestamp: null labels: name: test-deployment spec: replicas: 1 selector: name: test-deployment template: metadata: labels: name: test-deployment spec: containers: - image: openshift/origin-ruby-sample name: helloworld ' | oc create -f -" os::cmd::expect_success_and_text 'oc get dc simple-dc' 'simple-dc' os::cmd::expect_success 'oc create cm cmvol' os::cmd::expect_success 'oc set volume dc/simple-dc --add --name=cmvolume --type=configmap --configmap-name=cmvol' os::cmd::expect_success_and_text 'oc set volume dc/simple-dc' 'configMap/cmvol as cmvolume' # command alias os::cmd::expect_success 'oc set volumes --help' os::cmd::expect_success 'oc set volumes --help' os::cmd::expect_success 'oc set volumes dc/test-deployment-config' os::cmd::expect_success 'oc delete dc/test-deployment-config' echo "volumes: ok" os::test::junit::declare_suite_end `) func testExtendedTestdataCmdTestCmdVolumesShBytes() ([]byte, error) { return _testExtendedTestdataCmdTestCmdVolumesSh, nil } func testExtendedTestdataCmdTestCmdVolumesSh() (*asset, error) { bytes, err := testExtendedTestdataCmdTestCmdVolumesShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/cmd/test/cmd/volumes.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCustomSecretBuilderDockerfile = []byte(`FROM openshift/origin-custom-docker-builder # Override the default build script ADD build.sh /tmp/build.sh `) func testExtendedTestdataCustomSecretBuilderDockerfileBytes() ([]byte, error) { return _testExtendedTestdataCustomSecretBuilderDockerfile, nil } func testExtendedTestdataCustomSecretBuilderDockerfile() (*asset, error) { bytes, err := testExtendedTestdataCustomSecretBuilderDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/custom-secret-builder/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataCustomSecretBuilderBuildSh = []byte(`#!/bin/bash set -e set -o pipefail if [ ! -e "${DOCKER_SOCKET}" ]; then echo "Docker socket missing at ${DOCKER_SOCKET}" exit 1 fi SECRET_PATH=${PUSH_DOCKERCFG_PATH:-} if [ -z "${SECRET_PATH}" ]; then echo "The dockercfg not found in /var/run/secrets/openshift.io/push" exit 1 fi if [ -n "${OUTPUT_IMAGE}" ]; then TAG="${OUTPUT_REGISTRY}/${OUTPUT_IMAGE}" fi mkdir -p /tmp/build && cd /tmp/build cp -v $SECRET_PATH /tmp/build/dockercfg chmod 0666 /tmp/build/dockercfg # This ruby app just output content of file referenced by the environment # variable. For example FOO=/tmp/test and then GET /FOO returns content of # /tmp/test cat > config.ru <<- EOF def readfile(name); File.read(ENV[name]) rescue "not found #{ENV[name]}"; end run Proc.new { |env| path = env['PATH_INFO'].gsub(/^\//,'') [200, {"Content-Type" => "text/raw"}, [readfile(path)]] } EOF cat > Dockerfile <<- EOF FROM registry.access.redhat.com/ubi8/ruby-27 ENV SECRET_FILE /opt/openshift/src/dockercfg COPY dockercfg ./ COPY config.ru ./ CMD /usr/local/sti/run EOF docker build --rm -t "${TAG}" . docker push "${TAG}" `) func testExtendedTestdataCustomSecretBuilderBuildShBytes() ([]byte, error) { return _testExtendedTestdataCustomSecretBuilderBuildSh, nil } func testExtendedTestdataCustomSecretBuilderBuildSh() (*asset, error) { bytes, err := testExtendedTestdataCustomSecretBuilderBuildShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/custom-secret-builder/build.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsCustomDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: custom-deployment spec: replicas: 2 selector: name: custom-deployment strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: myapp volumes: - non-existing-volume command: - /bin/echo - test pre hook executed customParams: command: - /bin/sh - -c - | set -e sleep 15 # give tests time to set up openshift-deploy --until=50% echo Halfway openshift-deploy echo Finished template: metadata: labels: name: custom-deployment spec: terminationGracePeriodSeconds: 0 containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" triggers: - type: ConfigChange `) func testExtendedTestdataDeploymentsCustomDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsCustomDeploymentYaml, nil } func testExtendedTestdataDeploymentsCustomDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsCustomDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/custom-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentExampleYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: labels: app: example name: example spec: replicas: 1 template: metadata: labels: app: example spec: containers: - imagePullPolicy: IfNotPresent name: ruby command: - /bin/sleep - "100" ports: - containerPort: 8080 protocol: TCP - imagePullPolicy: IfNotPresent name: postgresql command: - /bin/sleep - "100" ports: - containerPort: 5000 protocol: TCP test: false triggers: - type: ConfigChange - imageChangeParams: automatic: true containerNames: - ruby from: kind: ImageStreamTag name: ruby-30:latest type: ImageChange - imageChangeParams: automatic: true containerNames: - postgresql from: kind: ImageStreamTag name: postgresql-13:latest type: ImageChange `) func testExtendedTestdataDeploymentsDeploymentExampleYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentExampleYaml, nil } func testExtendedTestdataDeploymentsDeploymentExampleYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentExampleYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-example.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: history-limit spec: replicas: 1 strategy: type: Rolling template: metadata: labels: name: history-limit spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" triggers: - type: ConfigChange revisionHistoryLimit: 3 `) func testExtendedTestdataDeploymentsDeploymentHistoryLimitYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml, nil } func testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentHistoryLimitYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-history-limit.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: deploy.openshift.io/deployer-pod.ignore: "true" name: database spec: replicas: 1 selector: name: database template: metadata: labels: name: database spec: terminationGracePeriodSeconds: 0 containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" `) func testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml, nil } func testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-ignores-deployer.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml = []byte(`apiVersion: image.openshift.io/v1 kind: ImageStream metadata: name: deployment-image-resolution spec: tags: - name: pullthrough from: kind: DockerImage name: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" referencePolicy: type: Local - name: direct from: kind: DockerImage name: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" referencePolicy: type: Source `) func testExtendedTestdataDeploymentsDeploymentImageResolutionIsYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml, nil } func testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentImageResolutionIsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-image-resolution-is.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentImageResolutionYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: deployment-image-resolution spec: strategy: type: Rolling rollingParams: template: metadata: labels: name: deployment-image-resolution spec: containers: - name: first image: "" imagePullPolicy: IfNotPresent command: - /bin/sleep - infinity - name: second image: " " imagePullPolicy: IfNotPresent command: - /bin/sleep - infinity triggers: - type: ConfigChange - imageChangeParams: automatic: true containerNames: - first from: kind: ImageStreamTag name: deployment-image-resolution:pullthrough type: ImageChange - imageChangeParams: automatic: true containerNames: - second from: kind: ImageStreamTag name: deployment-image-resolution:direct type: ImageChange `) func testExtendedTestdataDeploymentsDeploymentImageResolutionYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentImageResolutionYaml, nil } func testExtendedTestdataDeploymentsDeploymentImageResolutionYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentImageResolutionYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-image-resolution.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: minreadytest spec: replicas: 2 minReadySeconds: 60 selector: name: minreadytest template: metadata: labels: name: minreadytest spec: terminationGracePeriodSeconds: 0 containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" `) func testExtendedTestdataDeploymentsDeploymentMinReadySecondsYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml, nil } func testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentMinReadySecondsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-min-ready-seconds.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentSimpleSleepYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: name: deployment-simple-sleep spec: replicas: 1 selector: name: deployment-simple-sleep strategy: type: Rolling template: metadata: labels: name: deployment-simple-sleep spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent command: - /bin/sleep - infinity name: myapp readinessProbe: exec: command: - "true" `) func testExtendedTestdataDeploymentsDeploymentSimpleSleepYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentSimpleSleepYaml, nil } func testExtendedTestdataDeploymentsDeploymentSimpleSleepYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentSimpleSleepYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-simple-sleep.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentSimpleYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: deployment-simple spec: replicas: 1 selector: name: deployment-simple strategy: type: Rolling rollingParams: template: metadata: labels: name: deployment-simple spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent command: - /bin/sleep - infinity name: myapp readinessProbe: exec: command: - "true" triggers: - type: ConfigChange `) func testExtendedTestdataDeploymentsDeploymentSimpleYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentSimpleYaml, nil } func testExtendedTestdataDeploymentsDeploymentSimpleYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentSimpleYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-simple.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentTriggerYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: labels: app: example name: example spec: replicas: 1 template: metadata: labels: app: example spec: containers: - imagePullPolicy: Always name: test command: - /bin/sleep - "infinity" test: false triggers: - imageChangeParams: automatic: true containerNames: - test from: kind: ImageStreamTag name: test:v1 type: ImageChange `) func testExtendedTestdataDeploymentsDeploymentTriggerYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentTriggerYaml, nil } func testExtendedTestdataDeploymentsDeploymentTriggerYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentTriggerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-trigger.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: deployment-simple spec: triggers: [] replicas: 1 selector: name: deployment-simple strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: myapp env: - name: HELLO valueFrom: configMapKeyRef: name: test key: foo command: ["/bin/bash", "-c", "echo hello ${HELLO} && exit 1"] template: metadata: labels: name: deployment-simple spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" command: [ "/bin/bash", "-c", "sleep infinity" ] imagePullPolicy: IfNotPresent name: myapp `) func testExtendedTestdataDeploymentsDeploymentWithRefEnvYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml, nil } func testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsDeploymentWithRefEnvYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/deployment-with-ref-env.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsFailingPreHookYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: hook spec: replicas: 1 selector: name: hook strategy: type: Rolling rollingParams: pre: failurePolicy: Retry execNewPod: containerName: myapp command: - /bin/bash - -c - '/bin/echo pre hook logs ; exit 1' template: metadata: labels: name: hook spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" command: - /bin/sleep - infinity name: myapp triggers: - type: ConfigChange `) func testExtendedTestdataDeploymentsFailingPreHookYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsFailingPreHookYaml, nil } func testExtendedTestdataDeploymentsFailingPreHookYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsFailingPreHookYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/failing-pre-hook.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsGenerationTestYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: generation-test spec: replicas: 1 selector: name: generation-test strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: myapp command: - /bin/echo - test pre hook executed template: metadata: labels: name: generation-test spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" triggers: - type: ConfigChange `) func testExtendedTestdataDeploymentsGenerationTestYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsGenerationTestYaml, nil } func testExtendedTestdataDeploymentsGenerationTestYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsGenerationTestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/generation-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsMultiIctDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: labels: app: example name: example spec: replicas: 1 template: metadata: labels: app: example spec: containers: - imagePullPolicy: IfNotPresent name: ruby command: - /bin/sleep - "100" ports: - containerPort: 8080 protocol: TCP - imagePullPolicy: IfNotPresent name: ruby2 command: - /bin/sleep - "100" ports: - containerPort: 8081 protocol: TCP test: false triggers: - type: ConfigChange - imageChangeParams: automatic: true containerNames: - ruby - ruby2 from: kind: ImageStreamTag name: ruby-30:latest type: ImageChange `) func testExtendedTestdataDeploymentsMultiIctDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsMultiIctDeploymentYaml, nil } func testExtendedTestdataDeploymentsMultiIctDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsMultiIctDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/multi-ict-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsPausedDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: paused spec: paused: true replicas: 1 template: metadata: labels: name: paused spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" `) func testExtendedTestdataDeploymentsPausedDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsPausedDeploymentYaml, nil } func testExtendedTestdataDeploymentsPausedDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsPausedDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/paused-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsReadinessTestYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: readiness spec: replicas: 1 strategy: rollingParams: timeoutSeconds: 30 type: Rolling template: metadata: labels: name: readiness-test spec: containers: - command: - /bin/sleep - "infinity" image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: never-ready readinessProbe: exec: command: - /bin/false failureThreshold: 1 `) func testExtendedTestdataDeploymentsReadinessTestYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsReadinessTestYaml, nil } func testExtendedTestdataDeploymentsReadinessTestYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsReadinessTestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/readiness-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsTagImagesDeploymentYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: tag-images spec: replicas: 1 test: true selector: name: tag-images strategy: type: Recreate recreateParams: timeoutSeconds: 600 post: failurePolicy: Abort tagImages: - containerName: sample-name to: kind: ImageStreamTag name: sample-stream:deployed template: metadata: labels: name: tag-images spec: terminationGracePeriodSeconds: 1 containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent command: ["/bin/sh", "-c", "sleep 300"] name: sample-name ports: - containerPort: 8080 protocol: TCP resources: limits: cpu: 100m memory: 1.4Gi `) func testExtendedTestdataDeploymentsTagImagesDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsTagImagesDeploymentYaml, nil } func testExtendedTestdataDeploymentsTagImagesDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsTagImagesDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/tag-images-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsTestDeploymentBrokenYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: brokendeployment spec: replicas: 1 selector: name: brokendeployment strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: myapp command: - /bin/false template: metadata: labels: name: brokendeployment spec: containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" triggers: - type: ConfigChange `) func testExtendedTestdataDeploymentsTestDeploymentBrokenYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsTestDeploymentBrokenYaml, nil } func testExtendedTestdataDeploymentsTestDeploymentBrokenYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsTestDeploymentBrokenYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/test-deployment-broken.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataDeploymentsTestDeploymentTestYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: deployment-test spec: replicas: 2 selector: name: deployment-test strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: myapp command: - /bin/bash - -c - | sleep 15 # give tests time to setup echo 'test pre hook executed' template: metadata: labels: name: deployment-test spec: terminationGracePeriodSeconds: 0 containers: - image: "image-registry.openshift-image-registry.svc:5000/openshift/tools:latest" imagePullPolicy: IfNotPresent name: myapp command: - /bin/sleep - "infinity" test: true triggers: - type: ConfigChange `) func testExtendedTestdataDeploymentsTestDeploymentTestYamlBytes() ([]byte, error) { return _testExtendedTestdataDeploymentsTestDeploymentTestYaml, nil } func testExtendedTestdataDeploymentsTestDeploymentTestYaml() (*asset, error) { bytes, err := testExtendedTestdataDeploymentsTestDeploymentTestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/deployments/test-deployment-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataEdge_topologiesBaremetalhostTemplateYaml = []byte(`apiVersion: metal3.io/v1alpha1 kind: BareMetalHost metadata: finalizers: - baremetalhost.metal3.io labels: installer.openshift.io/role: control-plane name: {BMH_NAME} namespace: openshift-machine-api spec: architecture: x86_64 automatedCleaningMode: metadata bmc: address: redfish+https://{REDFISH_AUTHORITY}/redfish/v1/Systems/{UUID} credentialsName: {CREDENTIALS_NAME} disableCertificateVerification: true bootMACAddress: {BOOT_MAC_ADDRESS} bootMode: UEFI customDeploy: method: install_coreos hardwareProfile: unknown online: true rootDeviceHints: deviceName: /dev/sda userData: name: master-user-data-managed namespace: openshift-machine-api`) func testExtendedTestdataEdge_topologiesBaremetalhostTemplateYamlBytes() ([]byte, error) { return _testExtendedTestdataEdge_topologiesBaremetalhostTemplateYaml, nil } func testExtendedTestdataEdge_topologiesBaremetalhostTemplateYaml() (*asset, error) { bytes, err := testExtendedTestdataEdge_topologiesBaremetalhostTemplateYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/edge_topologies/baremetalhost-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataEdge_topologiesMachineTemplateYaml = []byte(`apiVersion: machine.openshift.io/v1beta1 kind: Machine metadata: annotations: metal3.io/BareMetalHost: openshift-machine-api/{BMH_NAME} finalizers: - machine.machine.openshift.io labels: machine.openshift.io/cluster-api-cluster: ostest-{MACHINE_HASH} machine.openshift.io/cluster-api-machine-role: master machine.openshift.io/cluster-api-machine-type: master name: {MACHINE_NAME} namespace: openshift-machine-api spec: authoritativeAPI: MachineAPI metadata: {} providerSpec: value: apiVersion: baremetal.cluster.k8s.io/v1alpha1 customDeploy: method: install_coreos hostSelector: {} image: checksum: "" url: "" kind: BareMetalMachineProviderSpec metadata: creationTimestamp: null userData: name: master-user-data-managed`) func testExtendedTestdataEdge_topologiesMachineTemplateYamlBytes() ([]byte, error) { return _testExtendedTestdataEdge_topologiesMachineTemplateYaml, nil } func testExtendedTestdataEdge_topologiesMachineTemplateYaml() (*asset, error) { bytes, err := testExtendedTestdataEdge_topologiesMachineTemplateYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/edge_topologies/machine-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataEgressFirewallOvnkEgressfirewallTestYaml = []byte(`apiVersion: k8s.ovn.org/v1 kind: EgressFirewall metadata: name: default spec: egress: - type: Allow to: dnsName: redhat.com - type: Allow to: dnsName: AMAZON.COM - type: Deny to: dnsName: www.google.com ports: - port: 80 protocol: TCP - type: Allow to: cidrSelector: 8.8.8.8/32 - type: Allow to: nodeSelector: matchLabels: node-role.kubernetes.io/control-plane: '' - type: Deny # IPv4 default deny-all to: cidrSelector: 0.0.0.0/0 - type: Deny # IPv6 default deny-all to: cidrSelector: ::/0 `) func testExtendedTestdataEgressFirewallOvnkEgressfirewallTestYamlBytes() ([]byte, error) { return _testExtendedTestdataEgressFirewallOvnkEgressfirewallTestYaml, nil } func testExtendedTestdataEgressFirewallOvnkEgressfirewallTestYaml() (*asset, error) { bytes, err := testExtendedTestdataEgressFirewallOvnkEgressfirewallTestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/egress-firewall/ovnk-egressfirewall-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataEgressFirewallOvnkEgressfirewallWildcardTestYaml = []byte(`apiVersion: k8s.ovn.org/v1 kind: EgressFirewall metadata: name: default spec: egress: - type: Allow to: dnsName: redhat.com - type: Allow to: dnsName: AMAZON.COM - type: Allow to: dnsName: "*.google.com" - type: Allow to: cidrSelector: 8.8.8.8/32 - type: Allow to: nodeSelector: matchLabels: node-role.kubernetes.io/control-plane: '' - type: Deny # IPv4 default deny-all to: cidrSelector: 0.0.0.0/0 - type: Deny # IPv6 default deny-all to: cidrSelector: ::/0 `) func testExtendedTestdataEgressFirewallOvnkEgressfirewallWildcardTestYamlBytes() ([]byte, error) { return _testExtendedTestdataEgressFirewallOvnkEgressfirewallWildcardTestYaml, nil } func testExtendedTestdataEgressFirewallOvnkEgressfirewallWildcardTestYaml() (*asset, error) { bytes, err := testExtendedTestdataEgressFirewallOvnkEgressfirewallWildcardTestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/egress-firewall/ovnk-egressfirewall-wildcard-test.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataEgressRouterCniEgressRouterCniV4CrYaml = []byte(`--- apiVersion: network.operator.openshift.io/v1 kind: EgressRouter metadata: name: egress-router-ipv4-test spec: addresses: [ { ip: "192.168.3.10/24", gateway: "192.168.3.1", }, ] mode: Redirect redirect: { redirectRules: [ { destinationIP: "10.100.3.0", port: 80, protocol: UDP, }, { destinationIP: "203.0.113.26", port: 8080, protocol: SCTP, targetPort: 80 }, { destinationIP: "203.0.113.27", port: 8443, protocol: TCP, targetPort: 443 }, ] } `) func testExtendedTestdataEgressRouterCniEgressRouterCniV4CrYamlBytes() ([]byte, error) { return _testExtendedTestdataEgressRouterCniEgressRouterCniV4CrYaml, nil } func testExtendedTestdataEgressRouterCniEgressRouterCniV4CrYaml() (*asset, error) { bytes, err := testExtendedTestdataEgressRouterCniEgressRouterCniV4CrYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/egress-router-cni/egress-router-cni-v4-cr.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataEgressRouterCniEgressRouterCniV6CrYaml = []byte(`--- apiVersion: network.operator.openshift.io/v1 kind: EgressRouter metadata: name: egress-router-ipv6-test spec: addresses: [ { ip: "192:168:3::10/64", gateway: "192:168:3::1", }, ] mode: Redirect redirect: { redirectRules: [ { destinationIP: "10:100:3::0", port: 80, protocol: UDP, }, { destinationIP: "203:0:113::26", port: 8080, protocol: SCTP, targetPort: 80 }, { destinationIP: "203:0:113::27", port: 8443, protocol: TCP, targetPort: 443 }, ] } `) func testExtendedTestdataEgressRouterCniEgressRouterCniV6CrYamlBytes() ([]byte, error) { return _testExtendedTestdataEgressRouterCniEgressRouterCniV6CrYaml, nil } func testExtendedTestdataEgressRouterCniEgressRouterCniV6CrYaml() (*asset, error) { bytes, err := testExtendedTestdataEgressRouterCniEgressRouterCniV6CrYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/egress-router-cni/egress-router-cni-v6-cr.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataForcepullTestJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build-tc", "creationTimestamp": null, "labels": { "name": "ruby-sample-build-tc" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Custom", "customStrategy": { "from": { "kind": "ImageStreamTag", "namespace": "openshift", "name": "ruby:latest" }, "env": [ { "name": "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE", "value": "ruby:latest" }, { "name": "BUILD_LOGLEVEL", "value": "5" } ], "exposeDockerSocket": true, "forcePull": true } } } }, { "kind": "BuildConfig", "apiVersion": "v1", "metadata": { "name": "ruby-sample-build-td", "creationTimestamp": null, "labels": { "name": "ruby-sample-build-td" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Docker", "dockerStrategy": { "from": { "kind": "ImageStreamTag", "namespace": "openshift", "name": "ruby:latest" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "forcePull": true } } } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build-ts", "creationTimestamp": null, "labels": { "name": "ruby-sample-build-ts" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "namespace": "openshift", "name": "ruby:latest" }, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" } ], "forcePull": true } } } } ] } `) func testExtendedTestdataForcepullTestJsonBytes() ([]byte, error) { return _testExtendedTestdataForcepullTestJson, nil } func testExtendedTestdataForcepullTestJson() (*asset, error) { bytes, err := testExtendedTestdataForcepullTestJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/forcepull-test.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiConfigKubeconfig = []byte(`apiVersion: v1 clusters: - cluster: certificate-authority: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt server: https://openshift.default.svc.cluster.local:443 name: GSSAPITEST contexts: - context: cluster: GSSAPITEST namespace: gssapiproxy name: gssapi current-context: gssapi kind: Config preferences: {} users: [] `) func testExtendedTestdataGssapiConfigKubeconfigBytes() ([]byte, error) { return _testExtendedTestdataGssapiConfigKubeconfig, nil } func testExtendedTestdataGssapiConfigKubeconfig() (*asset, error) { bytes, err := testExtendedTestdataGssapiConfigKubeconfigBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/config/kubeconfig", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiConfigOauth_configJson = []byte(`{ "oauthConfig": { "identityProviders": [{ "name": "header", "challenge": true, "mappingMethod": "add", "provider": { "apiVersion": "v1", "kind": "RequestHeaderIdentityProvider", "challengeURL": "http://HOST_NAME/mod_auth/oauth/authorize?${query}", "headers": ["Remote-User"] } }] } } `) func testExtendedTestdataGssapiConfigOauth_configJsonBytes() ([]byte, error) { return _testExtendedTestdataGssapiConfigOauth_configJson, nil } func testExtendedTestdataGssapiConfigOauth_configJson() (*asset, error) { bytes, err := testExtendedTestdataGssapiConfigOauth_configJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/config/oauth_config.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiFedoraBaseDockerfile = []byte(`# Clone from the Fedora 23 image FROM fedora:23 ARG REALM ARG HOST ENV REALM ${REALM} ENV HOST ${HOST} ENV CLIENT CLIENT_HAS_LIBS ENV OS_ROOT /run/os ENV KUBECONFIG ${OS_ROOT}/kubeconfig ENV PATH ${OS_ROOT}/bin:${PATH} WORKDIR ${OS_ROOT} ADD gssapi-tests.sh gssapi-tests.sh ADD test-wrapper.sh test-wrapper.sh ADD kubeconfig kubeconfig ADD hack hack ADD oc bin/oc # KEYRING does not work inside of a container since it is part of the kernel RUN sed -i.bak1 's#KEYRING:persistent:#DIR:/tmp/krb5cc_#' /etc/krb5.conf && \ dnf install -y findutils bc && \ chmod +x gssapi-tests.sh test-wrapper.sh ENTRYPOINT /run/os/test-wrapper.sh `) func testExtendedTestdataGssapiFedoraBaseDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiFedoraBaseDockerfile, nil } func testExtendedTestdataGssapiFedoraBaseDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiFedoraBaseDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/fedora/base/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiFedoraKerberosDockerfile = []byte(`FROM gssapiproxy/fedora-gssapi-base ENV CLIENT CLIENT_HAS_LIBS RUN dnf install -y krb5-workstation `) func testExtendedTestdataGssapiFedoraKerberosDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiFedoraKerberosDockerfile, nil } func testExtendedTestdataGssapiFedoraKerberosDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiFedoraKerberosDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/fedora/kerberos/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile = []byte(`FROM gssapiproxy/fedora-gssapi-kerberos ENV CLIENT CLIENT_HAS_LIBS_IS_CONFIGURED RUN sed -i.bak1 -e "s/\[realms\]/\[realms\]\n${REALM} = {\n kdc = ${HOST}\n admin_server = ${HOST}\n default_domain = ${HOST}\n}/" /etc/krb5.conf && \ sed -i.bak2 -e "s/\[domain_realm\]/\[domain_realm\]\n.${HOST} = ${REALM}\n${HOST} = ${REALM}/" /etc/krb5.conf && \ sed -i.bak3 -e "s!# default_realm = ! default_realm = ${REALM}\n#!" /etc/krb5.conf `) func testExtendedTestdataGssapiFedoraKerberos_configuredDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile, nil } func testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiFedoraKerberos_configuredDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/fedora/kerberos_configured/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyDockerfile = []byte(`# Clone from the Fedora 23 image FROM fedora:23 # Install GSSAPI RUN dnf install -y \ apr-util-openssl \ authconfig \ httpd \ krb5-libs \ krb5-server \ krb5-workstation \ mod_auth_gssapi \ mod_ssl \ && dnf clean all # Add conf files for Kerberos ADD krb5.conf /etc/krb5.conf ADD kdc.conf /var/kerberos/krb5kdc/kdc.conf ADD kadm5.acl /var/kerberos/krb5kdc/kadm5.acl # Add conf file for Apache ADD proxy.conf /etc/httpd/conf.d/proxy.conf # Add health check file ADD healthz /var/www/html/healthz # 80 = http # 443 = https # 88 = kerberos EXPOSE 80 443 88 88/udp ADD configure.sh /usr/sbin/configure.sh ENTRYPOINT /usr/sbin/configure.sh `) func testExtendedTestdataGssapiProxyDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyDockerfile, nil } func testExtendedTestdataGssapiProxyDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyConfigureSh = []byte(`#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail cd / # Get environment export USER="$(whoami)" # Edit kerberos config files, replacing EXAMPLE.COM with ${REALM}, and example.com with ${HOST} for file in /etc/krb5.conf /var/kerberos/krb5kdc/kdc.conf /var/kerberos/krb5kdc/kadm5.acl; do sed -i.bak1 -e "s/EXAMPLE\.COM/${REALM}/g" $file sed -i.bak2 -e "s/example\.com/${HOST}/g" $file done # Temporary hack to get around hairpin issue sed -i.bak3 -e "s/kdc = ${HOST}/kdc = localhost/g" /etc/krb5.conf # Create ticket database kdb5_util create -s -r "${REALM}" -P password # Add local user as admin kadmin.local -q "addprinc -pw password ${USER}/admin@${REALM}" # Start ticket server krb5kdc # Add user principal for current user, for test users user1-user5, the host principal (for ssh), the HTTP principal (for Apache), and create keytab for u in "${USER}" user1 user2 user3 user4 user5; do kadmin.local -q "addprinc -pw password ${u}@${REALM}" done # Setup keytab for sshd kadmin.local -q "addprinc -randkey host/${HOST}@${REALM}" kadmin.local -q "ktadd -k /etc/krb5.keytab host/${HOST}@${REALM}" # Setup keytab for apache kadmin.local -q "addprinc -randkey HTTP/${HOST}@${REALM}" kadmin.local -q "ktadd -k /etc/httpd.keytab HTTP/${HOST}@${REALM}" chown apache /etc/httpd.keytab # configure Apache proxy and auth sed -i.bak1 -e "s#proxy\.example\.com#${HOST}#g" /etc/httpd/conf.d/proxy.conf sed -i.bak2 -e "s#https://backend\.example\.com#${BACKEND}#g" /etc/httpd/conf.d/proxy.conf # Start apache httpd -k start # Keep the service running while true ; do sleep 60 ; done `) func testExtendedTestdataGssapiProxyConfigureShBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyConfigureSh, nil } func testExtendedTestdataGssapiProxyConfigureSh() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyConfigureShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/configure.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml = []byte(`kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "gssapiproxy" labels: name: "gssapiproxy" spec: triggers: [] source: type: "Binary" binary: {} strategy: type: "Docker" env: - name: "BUILD_LOGLEVEL" value: "5" dockerStrategy: from: kind: "DockerImage" name: "quay.io/fedora/fedora:34-x86_64" output: to: kind: "ImageStreamTag" name: "gssapiproxy:latest" `) func testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYamlBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml, nil } func testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml = []byte(`kind: "DeploymentConfig" apiVersion: "apps.openshift.io/v1" metadata: name: "gssapiproxy-server" creationTimestamp: null spec: strategy: type: "Recreate" resources: {} triggers: - type: "ImageChange" imageChangeParams: automatic: true containerNames: - "gssapiproxy-server" from: kind: "ImageStreamTag" name: "gssapiproxy:latest" lastTriggeredImage: "" - type: "ConfigChange" replicas: 1 selector: name: "gssapiproxy-server" template: metadata: creationTimestamp: null labels: name: "gssapiproxy-server" spec: containers: - name: "gssapiproxy-server" image: "gssapiproxy" ports: - containerPort: 80 protocol: "TCP" - containerPort: 443 protocol: "TCP" - containerPort: 88 protocol: "TCP" - containerPort: 88 protocol: "UDP" resources: {} terminationMessagePath: "/dev/termination-log" imagePullPolicy: "IfNotPresent" capabilities: {} securityContext: capabilities: {} privileged: false runAsUser: 0 readinessProbe: httpGet: path: "/healthz" port: 80 initialDelaySeconds: 15 timeoutSeconds: 1 restartPolicy: "Always" dnsPolicy: "ClusterFirst" serviceAccount: "" status: {} `) func testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYamlBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml, nil } func testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-deploymentconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml = []byte(`kind: "ImageStream" apiVersion: "image.openshift.io/v1" metadata: name: "gssapiproxy" creationTimestamp: null `) func testExtendedTestdataGssapiProxyGssapiproxyImagestreamYamlBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml, nil } func testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyGssapiproxyImagestreamYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-imagestream.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyGssapiproxyServiceYaml = []byte(`kind: "Service" apiVersion: "v1" metadata: name: "gssapiproxy-server" creationTimestamp: null spec: ports: - name: "http" protocol: "TCP" port: 80 targetPort: 80 nodePort: 0 - name: "https" protocol: "TCP" port: 443 targetPort: 443 nodePort: 0 - name: "kerberos" protocol: "TCP" port: 88 targetPort: 88 nodePort: 0 - name: "kerberos-udp" protocol: "UDP" port: 88 targetPort: 88 nodePort: 0 selector: name: "gssapiproxy-server" type: "ClusterIP" sessionAffinity: "None" status: loadBalancer: {} `) func testExtendedTestdataGssapiProxyGssapiproxyServiceYamlBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyGssapiproxyServiceYaml, nil } func testExtendedTestdataGssapiProxyGssapiproxyServiceYaml() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyGssapiproxyServiceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/gssapiproxy-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyHealthz = []byte(`ok `) func testExtendedTestdataGssapiProxyHealthzBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyHealthz, nil } func testExtendedTestdataGssapiProxyHealthz() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyHealthzBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/healthz", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyKadm5Acl = []byte(`*/admin@EXAMPLE.COM * `) func testExtendedTestdataGssapiProxyKadm5AclBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyKadm5Acl, nil } func testExtendedTestdataGssapiProxyKadm5Acl() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyKadm5AclBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/kadm5.acl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyKdcConf = []byte(`[kdcdefaults] kdc_ports = 88 kdc_tcp_ports = 88 [realms] EXAMPLE.COM = { #master_key_type = aes256-cts acl_file = /var/kerberos/krb5kdc/kadm5.acl dict_file = /usr/share/dict/words admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal } `) func testExtendedTestdataGssapiProxyKdcConfBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyKdcConf, nil } func testExtendedTestdataGssapiProxyKdcConf() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyKdcConfBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/kdc.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyKrb5Conf = []byte(`[logging] default = FILE:/var/log/krb5libs.log kdc = FILE:/var/log/krb5kdc.log admin_server = FILE:/var/log/kadmind.log [libdefaults] dns_lookup_realm = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true rdns = false default_realm = EXAMPLE.COM default_ccache_name = DIR:/tmp/krb5cc_%{uid} [appdefaults] pam = { debug = true dns_lookup_realm = false ticket_lifetime = 24h renew_lifetime = 7d forwardable = true rdns = false default_realm = EXAMPLE.COM default_ccache_name = DIR:/tmp/krb5cc_%{uid} } [realms] EXAMPLE.COM = { kdc = example.com admin_server = example.com default_domain = example.com } [domain_realm] .example.com = EXAMPLE.COM example.com = EXAMPLE.COM `) func testExtendedTestdataGssapiProxyKrb5ConfBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyKrb5Conf, nil } func testExtendedTestdataGssapiProxyKrb5Conf() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyKrb5ConfBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/krb5.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiProxyProxyConf = []byte(`ServerName proxy.example.com SSLProxyEngine On SSLProxyCheckPeerCN Off SSLProxyCheckPeerName Off SSLProxyCheckPeerExpire Off <If "env('SERVER') == 'SERVER_GSSAPI_BASIC_FALLBACK'"> # In order to use the basic-auth proxy, an X-Csrf-Token must be present # Fail anything that doesn't have that header RewriteEngine On RewriteCond %{REQUEST_URI} ^/mod_auth/? RewriteCond %{HTTP:X-Csrf-Token} ^$ [NC] RewriteRule ^.* - [F,L] </If> <Location /mod_auth/> ProxyPass https://backend.example.com/ Require valid-user AuthType GSSAPI AuthName "GSSAPI Login" RequestHeader set Remote-User %{REMOTE_USER}s <If "env('SERVER') == 'SERVER_GSSAPI_ONLY'"> # Kerberos auth-protected GssapiCredStore keytab:/etc/httpd.keytab </If> <If "env('SERVER') == 'SERVER_GSSAPI_BASIC_FALLBACK'"> GssapiCredStore keytab:/etc/httpd.keytab GssapiBasicAuth on </If> </Location> RequestHeader unset Remote-User RequestHeader unset X-Remote-User `) func testExtendedTestdataGssapiProxyProxyConfBytes() ([]byte, error) { return _testExtendedTestdataGssapiProxyProxyConf, nil } func testExtendedTestdataGssapiProxyProxyConf() (*asset, error) { bytes, err := testExtendedTestdataGssapiProxyProxyConfBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/proxy/proxy.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiScriptsGssapiTestsSh = []byte(`#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail echo "Running ${TEST_NAME}" cd "${OS_ROOT}" source hack/lib/init.sh function cleanup() { out=$? # get the jUnit output file into a workable state in case we crashed in the middle of testing something os::test::junit::reconcile_output # check that we didn't mangle jUnit output os::test::junit::check_test_counters exit $out } trap "cleanup" EXIT os::test::junit::declare_suite_start "${TEST_NAME}" # Client has no GSSAPI libs and server is GSSAPI only # Everything fails # Errors do NOT mention Kerberos if [[ "${CLIENT}" = 'CLIENT_MISSING_LIBS' && "${SERVER}" = 'SERVER_GSSAPI_ONLY' ]]; then os::cmd::expect_failure_and_text 'oc login' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous' os::cmd::expect_failure_and_text 'oc login -u user1' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user1' os::cmd::expect_failure_and_text 'oc login -u user2 -p wrongpassword' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user2' os::cmd::expect_failure_and_text 'oc login -u user2 -p password' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user2' os::cmd::expect_failure_and_text "oc login -u 'user3@${REALM}'" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user3' os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p wrongpassword" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p password" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user5' fi # Client has uncofigured GSSAPI libs and server is GSSAPI only # Everything fails # Errors mention Kerberos if [[ "${CLIENT}" = 'CLIENT_HAS_LIBS' && "${SERVER}" = 'SERVER_GSSAPI_ONLY' ]]; then DEFAULT_REALM="$(grep default_realm /etc/krb5.conf | awk {'printf $3'})" os::cmd::expect_failure_and_text 'oc login' 'No Kerberos credentials available' os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous' # Fedora has no default realm, so a realm-less username is considered invalid # Ubuntu has a default realm, so will complain about not finding the credentials for it # Hence we accept either of those error messages in the next three sets of tests os::cmd::expect_failure_and_text 'oc login -u user1' "An invalid name was supplied|Can't find client principal user1@${DEFAULT_REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user1' os::cmd::expect_failure_and_text 'oc login -u user2 -p wrongpassword' "An invalid name was supplied|Can't find client principal user2@${DEFAULT_REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user2' os::cmd::expect_failure_and_text 'oc login -u user2 -p password' "An invalid name was supplied|Can't find client principal user2@${DEFAULT_REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user2' os::cmd::expect_failure_and_text "oc login -u 'user3@${REALM}'" "Can't find client principal user3@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user3' os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p wrongpassword" "Can't find client principal user4@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p password" "Can't find client principal user5@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user5' fi # Client has GSSAPI configured and server is GSSAPI only # Only GSSAPI works # Errors mention Kerberos if [[ "${CLIENT}" = 'CLIENT_HAS_LIBS_IS_CONFIGURED' && "${SERVER}" = 'SERVER_GSSAPI_ONLY' ]]; then # No ticket os::cmd::expect_failure_and_text 'oc login' 'No Kerberos credentials available' os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous' os::cmd::expect_failure 'kinit user1 <<< wrongpassword' os::cmd::expect_failure_and_text 'oc login' 'No Kerberos credentials available' os::cmd::expect_failure_and_not_text 'oc whoami' 'user1' # Single ticket os::cmd::expect_success 'kinit user1 <<< password' os::cmd::expect_success_and_text 'oc login' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}" # Having multiple tickets os::cmd::expect_success "kinit user2@${REALM} <<< password" os::cmd::expect_success 'kinit user3 <<< password' os::cmd::expect_failure 'kinit user4 <<< wrongpassword' os::cmd::expect_failure "kinit user5@${REALM} <<< wrongpassword" # Shortname, non-default ticket os::cmd::expect_success_and_text 'oc login -u user1' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}" # Longname, non-default ticket os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}'" 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}" # Default ticket os::cmd::expect_success_and_text 'oc login' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user3@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user3@${REALM}" # Non-ticket users os::cmd::expect_failure_and_text 'oc login -u user4' "Can't find client principal user4@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}'" "Can't find client principal user4@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text 'oc login -u user4 -p password' "Can't find client principal user4@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p password" "Can't find client principal user4@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text 'oc login -u user5 -p wrongpassword' "Can't find client principal user5@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user5' os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p wrongpassword" "Can't find client principal user5@${REALM} in cache collection" os::cmd::expect_failure_and_not_text 'oc whoami' 'user5' # Password is ignored if you have the ticket for the user os::cmd::expect_success_and_text 'oc login -u user1 -p wrongpassword' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}" os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}' -p wrongpassword" 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}" fi # Client has no GSSAPI libs or unconfigured GSSAPI libs and server is GSSAPI with Basic fallback # Only BASIC works # Errors do NOT mention Kerberos if [[ ( "${CLIENT}" = 'CLIENT_MISSING_LIBS' || "${CLIENT}" = 'CLIENT_HAS_LIBS' ) && "${SERVER}" = 'SERVER_GSSAPI_BASIC_FALLBACK' ]]; then os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous' os::cmd::expect_failure_and_text 'oc login -u user1 <<EOF EOF' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user1' os::cmd::expect_failure_and_text 'oc login -u user2 -p wrongpassword' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user2' os::cmd::expect_success_and_text 'oc login -u user2 -p password' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}" os::cmd::expect_failure_and_text "oc login -u 'user3@${REALM}' <<EOF EOF" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user3' os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' -p wrongpassword" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_success_and_text "oc login -u 'user5@${REALM}' -p password" 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user5@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user5@${REALM}" fi # Client has GSSAPI configured and server is GSSAPI with Basic fallback # Everything works # Errors do NOT mention Kerberos if [[ "${CLIENT}" = 'CLIENT_HAS_LIBS_IS_CONFIGURED' && "${SERVER}" = 'SERVER_GSSAPI_BASIC_FALLBACK' ]]; then # No ticket os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_text 'oc whoami' 'system:anonymous' os::cmd::expect_failure 'kinit user1 <<< wrongpassword' os::cmd::expect_failure_and_text 'oc login <<< \n' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user1' # Single ticket os::cmd::expect_success 'kinit user1 <<< password' os::cmd::expect_success_and_text 'oc login' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}" # Having multiple tickets os::cmd::expect_success "kinit user2@${REALM} <<< password" os::cmd::expect_success 'kinit user3 <<< password' os::cmd::expect_failure 'kinit user4 <<< wrongpassword' os::cmd::expect_failure "kinit user5@${REALM} <<< wrongpassword" # Shortname, non-default ticket os::cmd::expect_success_and_text 'oc login -u user1' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}" # Longname, non-default ticket os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}'" 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}" # Default ticket os::cmd::expect_success_and_text 'oc login' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user3@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user3@${REALM}" # Non-ticket users os::cmd::expect_failure_and_text 'oc login -u user4 <<EOF EOF' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_failure_and_text "oc login -u 'user4@${REALM}' <<EOF EOF" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user4' os::cmd::expect_success_and_text 'oc login -u user4 -p password' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user4@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user4@${REALM}" os::cmd::expect_success_and_text "oc login -u 'user4@${REALM}' -p password" 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user4@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user4@${REALM}" os::cmd::expect_failure_and_text 'oc login -u user5 -p wrongpassword' 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user5' os::cmd::expect_failure_and_text "oc login -u 'user5@${REALM}' -p wrongpassword" 'Login failed \(401 Unauthorized\)' os::cmd::expect_failure_and_not_text 'oc whoami' 'user5' # Password is ignored if you have the ticket for the user os::cmd::expect_success_and_text 'oc login -u user1 -p wrongpassword' 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user1@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user1@${REALM}" os::cmd::expect_success_and_text "oc login -u 'user2@${REALM}' -p wrongpassword" 'Login successful.' os::cmd::expect_success_and_text 'oc whoami' "user2@${REALM}" os::cmd::expect_success_and_text 'oc logout' "user2@${REALM}" fi os::test::junit::declare_suite_end # Make sure we made it to the end of the script echo "Finished running ${TEST_NAME}" `) func testExtendedTestdataGssapiScriptsGssapiTestsShBytes() ([]byte, error) { return _testExtendedTestdataGssapiScriptsGssapiTestsSh, nil } func testExtendedTestdataGssapiScriptsGssapiTestsSh() (*asset, error) { bytes, err := testExtendedTestdataGssapiScriptsGssapiTestsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/scripts/gssapi-tests.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiScriptsTestWrapperSh = []byte(`#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail cd "${OS_ROOT}" source hack/lib/init.sh export TEST_NAME="test-extended/gssapiproxy-tests/$(uname -n)-${CLIENT}-${SERVER}" os::util::environment::setup_time_vars os::cleanup::tmpdir export JUNIT_REPORT_OUTPUT="${LOG_DIR}/raw_test_output.log" # use a subshell and ` + "`" + `if` + "`" + ` statement to prevent ` + "`" + `exit` + "`" + ` calls from killing this script if ! ( './gssapi-tests.sh' ) 2>&1; then return_code=$? fi cat "${JUNIT_REPORT_OUTPUT}" 1>&2 exit "${return_code:-0}" `) func testExtendedTestdataGssapiScriptsTestWrapperShBytes() ([]byte, error) { return _testExtendedTestdataGssapiScriptsTestWrapperSh, nil } func testExtendedTestdataGssapiScriptsTestWrapperSh() (*asset, error) { bytes, err := testExtendedTestdataGssapiScriptsTestWrapperShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/scripts/test-wrapper.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiUbuntuBaseDockerfile = []byte(`# Clone from the Ubuntu 16.04 LTS image FROM ubuntu:16.04 ARG REALM ARG HOST ENV REALM ${REALM} ENV HOST ${HOST} ENV CLIENT CLIENT_MISSING_LIBS ENV OS_ROOT /run/os ENV KUBECONFIG ${OS_ROOT}/kubeconfig ENV PATH ${OS_ROOT}/bin:${PATH} WORKDIR ${OS_ROOT} ADD gssapi-tests.sh gssapi-tests.sh ADD test-wrapper.sh test-wrapper.sh ADD kubeconfig kubeconfig ADD hack hack ADD oc bin/oc RUN chmod +x gssapi-tests.sh test-wrapper.sh && \ apt-get update && apt-get install -y bc ENTRYPOINT /run/os/test-wrapper.sh `) func testExtendedTestdataGssapiUbuntuBaseDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiUbuntuBaseDockerfile, nil } func testExtendedTestdataGssapiUbuntuBaseDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiUbuntuBaseDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/ubuntu/base/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiUbuntuKerberosDockerfile = []byte(`FROM gssapiproxy/ubuntu-gssapi-base ENV CLIENT CLIENT_HAS_LIBS RUN apt-get install -y krb5-user `) func testExtendedTestdataGssapiUbuntuKerberosDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiUbuntuKerberosDockerfile, nil } func testExtendedTestdataGssapiUbuntuKerberosDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiUbuntuKerberosDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/ubuntu/kerberos/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile = []byte(`FROM gssapiproxy/ubuntu-gssapi-kerberos ENV CLIENT CLIENT_HAS_LIBS_IS_CONFIGURED RUN sed -i.bak1 -e "s/\[realms\]/\[realms\]\n${REALM} = {\n kdc = ${HOST}\n admin_server = ${HOST}\n default_domain = ${HOST}\n}/" /etc/krb5.conf && \ sed -i.bak2 -e "s/\[domain_realm\]/\[domain_realm\]\n.${HOST} = ${REALM}\n${HOST} = ${REALM}/" /etc/krb5.conf && \ sed -i.bak3 -e "s!default_realm = !default_realm = ${REALM}\ndefault_ccache_name = DIR:/tmp/krb5cc_%{uid}\n#!" /etc/krb5.conf `) func testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfileBytes() ([]byte, error) { return _testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile, nil } func testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile() (*asset, error) { bytes, err := testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/gssapi/ubuntu/kerberos_configured/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataHelloBuilderDockerfile = []byte(`FROM openshift/origin-release:latest LABEL io.openshift.s2i.scripts-url=image:///usr/libexec/s2i ENV STI_SCRIPTS_PATH=/usr/libexec/s2i COPY scripts $STI_SCRIPTS_PATH RUN chown 1001 /openshifttmp USER 1001 `) func testExtendedTestdataHelloBuilderDockerfileBytes() ([]byte, error) { return _testExtendedTestdataHelloBuilderDockerfile, nil } func testExtendedTestdataHelloBuilderDockerfile() (*asset, error) { bytes, err := testExtendedTestdataHelloBuilderDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/hello-builder/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataHelloBuilderScriptsAssemble = []byte(`#!/bin/sh unset GOPATH cd /tmp/src CGO_ENABLED=0 go build -a -installsuffix cgo -o hello-openshift -tags netgo mv hello-openshift /tmp `) func testExtendedTestdataHelloBuilderScriptsAssembleBytes() ([]byte, error) { return _testExtendedTestdataHelloBuilderScriptsAssemble, nil } func testExtendedTestdataHelloBuilderScriptsAssemble() (*asset, error) { bytes, err := testExtendedTestdataHelloBuilderScriptsAssembleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/hello-builder/scripts/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataHelloBuilderScriptsRun = []byte(`#!/bin/sh echo This image is not meant to be run by itself `) func testExtendedTestdataHelloBuilderScriptsRunBytes() ([]byte, error) { return _testExtendedTestdataHelloBuilderScriptsRun, nil } func testExtendedTestdataHelloBuilderScriptsRun() (*asset, error) { bytes, err := testExtendedTestdataHelloBuilderScriptsRunBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/hello-builder/scripts/run", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataIdlingEchoServerDeploymentYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: apps/v1 kind: Deployment metadata: name: idling-echo spec: replicas: 2 selector: matchLabels: app: idling-echo deployment: idling-echo strategy: type: RollingUpdate template: metadata: labels: app: idling-echo deployment: idling-echo spec: containers: - image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 name: idling-echo-server args: [ "netexec", "--http-port", "8675", "--udp-port", "3090" ] ports: - containerPort: 8675 protocol: TCP - containerPort: 3090 protocol: UDP dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} - apiVersion: v1 kind: Service metadata: name: idling-echo labels: app: idling-echo spec: selector: app: idling-echo ports: - port: 8675 name: tcp-echo protocol: TCP - port: 3090 name: udp-echo protocol: UDP - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo spec: to: kind: Service name: idling-echo - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo-reencrypt spec: tls: termination: reencrypt # the actual certificate here is not relevant, since we're not # actually serving TLS destinationCACertificate: |- -----BEGIN CERTIFICATE----- MIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx CzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl ZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3 dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu Y29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP d3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq hkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx EDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv gu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm 47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M mNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC MAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd TMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m V7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc yfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j jhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q +Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w= -----END CERTIFICATE----- to: kind: Service name: idling-echo `) func testExtendedTestdataIdlingEchoServerDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataIdlingEchoServerDeploymentYaml, nil } func testExtendedTestdataIdlingEchoServerDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataIdlingEchoServerDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/idling-echo-server-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataIdlingEchoServerRcYaml = []byte(`apiVersion: v1 kind: List items: - apiVersion: v1 kind: ReplicationController metadata: name: idling-echo-rc spec: replicas: 2 selector: app: idling-echo replicationcontroller: idling-echo template: metadata: labels: app: idling-echo replicationcontroller: idling-echo spec: containers: - image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 name: idling-echo-server args: [ "netexec", "--http-port", "8675" ] ports: - containerPort: 8675 protocol: TCP dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} - apiVersion: v1 kind: Service metadata: name: idling-echo spec: selector: app: idling-echo ports: - port: 8675 - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo spec: to: kind: Service name: idling-echo `) func testExtendedTestdataIdlingEchoServerRcYamlBytes() ([]byte, error) { return _testExtendedTestdataIdlingEchoServerRcYaml, nil } func testExtendedTestdataIdlingEchoServerRcYaml() (*asset, error) { bytes, err := testExtendedTestdataIdlingEchoServerRcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/idling-echo-server-rc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataIdlingEchoServerYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: idling-echo spec: replicas: 2 selector: app: idling-echo deploymentconfig: idling-echo strategy: type: Rolling template: metadata: labels: app: idling-echo deploymentconfig: idling-echo spec: containers: - image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 name: idling-echo-server args: [ "netexec", "--http-port", "8675", "--udp-port", "3090" ] ports: - containerPort: 8675 protocol: TCP - containerPort: 3090 protocol: UDP dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} - apiVersion: v1 kind: Service metadata: name: idling-echo labels: app: idling-echo spec: selector: app: idling-echo ports: - port: 8675 name: tcp-echo protocol: TCP - port: 3090 name: udp-echo protocol: UDP - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo spec: to: kind: Service name: idling-echo - apiVersion: route.openshift.io/v1 kind: Route metadata: name: idling-echo-reencrypt spec: tls: termination: reencrypt # the actual certificate here is not relevant, since we're not # actually serving TLS destinationCACertificate: |- -----BEGIN CERTIFICATE----- MIIDIjCCAgqgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBoTELMAkGA1UEBhMCVVMx CzAJBgNVBAgMAlNDMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0Rl ZmF1bHQgQ29tcGFueSBMdGQxEDAOBgNVBAsMB1Rlc3QgQ0ExGjAYBgNVBAMMEXd3 dy5leGFtcGxlY2EuY29tMSIwIAYJKoZIhvcNAQkBFhNleGFtcGxlQGV4YW1wbGUu Y29tMB4XDTE1MDExMjE0MTk0MVoXDTE2MDExMjE0MTk0MVowfDEYMBYGA1UEAwwP d3d3LmV4YW1wbGUuY29tMQswCQYDVQQIDAJTQzELMAkGA1UEBhMCVVMxIjAgBgkq hkiG9w0BCQEWE2V4YW1wbGVAZXhhbXBsZS5jb20xEDAOBgNVBAoMB0V4YW1wbGUx EDAOBgNVBAsMB0V4YW1wbGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMrv gu6ZTTefNN7jjiZbS/xvQjyXjYMN7oVXv76jbX8gjMOmg9m0xoVZZFAE4XyQDuCm 47VRx5Qrf/YLXmB2VtCFvB0AhXr5zSeWzPwaAPrjA4ebG+LUo24ziS8KqNxrFs1M mNrQUgZyQC6XIe1JHXc9t+JlL5UZyZQC1IfaJulDAgMBAAGjDTALMAkGA1UdEwQC MAAwDQYJKoZIhvcNAQEFBQADggEBAFCi7ZlkMnESvzlZCvv82Pq6S46AAOTPXdFd TMvrh12E1sdVALF1P1oYFJzG1EiZ5ezOx88fEDTW+Lxb9anw5/KJzwtWcfsupf1m V7J0D3qKzw5C1wjzYHh9/Pz7B1D0KthQRATQCfNf8s6bbFLaw/dmiIUhHLtIH5Qc yfrejTZbOSP77z8NOWir+BWWgIDDB2//3AkDIQvT20vmkZRhkqSdT7et4NmXOX/j jhPti4b2Fie0LeuvgaOdKjCpQQNrYthZHXeVlOLRhMTSk3qUczenkKTOhvP7IS9q +Dzv5hqgSfvMG392KWh5f8xXfJNs4W5KLbZyl901MeReiLrPH3w= -----END CERTIFICATE----- to: kind: Service name: idling-echo `) func testExtendedTestdataIdlingEchoServerYamlBytes() ([]byte, error) { return _testExtendedTestdataIdlingEchoServerYaml, nil } func testExtendedTestdataIdlingEchoServerYaml() (*asset, error) { bytes, err := testExtendedTestdataIdlingEchoServerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/idling-echo-server.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: annotations: image.openshift.io/triggers: '[{"from":{"kind":"ImageStreamTag","name":"test:v1"},"fieldPath":"spec.template.spec.containers[?(@.name==\"test\")].image"}]' name: test spec: progressDeadlineSeconds: 600 replicas: 1 revisionHistoryLimit: 10 selector: matchLabels: app: test strategy: type: Recreate template: metadata: labels: app: test spec: containers: - image: " " name: test command: ["/bin/sleep"] args: - infinity `) func testExtendedTestdataImageDeploymentWithAnnotationTriggerYamlBytes() ([]byte, error) { return _testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml, nil } func testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml() (*asset, error) { bytes, err := testExtendedTestdataImageDeploymentWithAnnotationTriggerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image/deployment-with-annotation-trigger.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImageTestImageJson = []byte(`{ "kind": "Image", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "test", "creationTimestamp": null }, "dockerImageReference": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8", "dockerImageMetadata": { "kind": "DockerImage", "apiVersion": "1.0", "Id": "", "ContainerConfig": {}, "Config": {} }, "dockerImageLayers": [], "dockerImageMetadataVersion": "1.0" } `) func testExtendedTestdataImageTestImageJsonBytes() ([]byte, error) { return _testExtendedTestdataImageTestImageJson, nil } func testExtendedTestdataImageTestImageJson() (*asset, error) { bytes, err := testExtendedTestdataImageTestImageJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image/test-image.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: DeploymentConfig apiVersion: apps.openshift.io/v1 metadata: name: my-dc spec: replicas: 1 selector: deploymentconfig: my-dc strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: dc-pod command: - ls template: metadata: labels: deploymentconfig: my-dc spec: containers: - name: dc-pod image: ${DOCKER_REGISTRY}/image-ns/busybox imagePullSecrets: - name: image-ns-pull parameters: - name: DOCKER_REGISTRY `) func testExtendedTestdataImagePullSecretsDcWithNewPullSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml, nil } func testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataImagePullSecretsDcWithNewPullSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/dc-with-new-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: DeploymentConfig apiVersion: apps.openshift.io/v1 metadata: name: my-dc-old spec: replicas: 1 selector: deploymentconfig: my-dc-old strategy: type: Rolling rollingParams: pre: failurePolicy: Abort execNewPod: containerName: dc-pod-old command: - ls template: metadata: labels: deploymentconfig: my-dc-old spec: containers: - name: dc-pod-old image: ${DOCKER_REGISTRY}/image-ns/busybox imagePullSecrets: - name: image-ns-pull-old parameters: - name: DOCKER_REGISTRY `) func testExtendedTestdataImagePullSecretsDcWithOldPullSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml, nil } func testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataImagePullSecretsDcWithOldPullSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/dc-with-old-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: Pod apiVersion: v1 metadata: name: new-pull-pod spec: containers: - name: new-pull-pod image: ${DOCKER_REGISTRY}/image-ns/busybox command: - ls imagePullSecrets: - name: image-ns-pull parameters: - name: DOCKER_REGISTRY `) func testExtendedTestdataImagePullSecretsPodWithNewPullSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml, nil } func testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataImagePullSecretsPodWithNewPullSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/pod-with-new-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: Pod apiVersion: v1 metadata: name: no-pull-pod spec: containers: - name: no-pull-pod image: ${DOCKER_REGISTRY}/image-ns/busybox command: - ls parameters: - name: DOCKER_REGISTRY `) func testExtendedTestdataImagePullSecretsPodWithNoPullSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml, nil } func testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataImagePullSecretsPodWithNoPullSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/pod-with-no-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: Pod apiVersion: v1 metadata: name: old-pull-pod spec: containers: - name: old-pull-pod image: ${DOCKER_REGISTRY}/image-ns/busybox command: - ls imagePullSecrets: - name: image-ns-pull-old parameters: - name: DOCKER_REGISTRY `) func testExtendedTestdataImagePullSecretsPodWithOldPullSecretYamlBytes() ([]byte, error) { return _testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml, nil } func testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml() (*asset, error) { bytes, err := testExtendedTestdataImagePullSecretsPodWithOldPullSecretYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image-pull-secrets/pod-with-old-pull-secret.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl = []byte(`#!/usr/bin/perl use strict; use warnings; use File::Basename qw(dirname); use Cwd qw(abs_path); use lib (dirname abs_path $0) .'/lib'; use My::Test qw(test); print qq(Content-type: text/plain\n\n); test(); `) func testExtendedTestdataImage_ecosystemPerlHotdeployIndexPlBytes() ([]byte, error) { return _testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl, nil } func testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl() (*asset, error) { bytes, err := testExtendedTestdataImage_ecosystemPerlHotdeployIndexPlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image_ecosystem/perl-hotdeploy/index.pl", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm = []byte(`package My::Test; use strict; use warnings; use Exporter qw(import); our @EXPORT_OK = qw(test); sub test { print "initial value\n"; } 1; `) func testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPmBytes() ([]byte, error) { return _testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm, nil } func testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm() (*asset, error) { bytes, err := testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPmBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image_ecosystem/perl-hotdeploy/lib/My/Test.pm", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "perl-hotdeploy-example" }, "objects": [ { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "${NAME}" }, "spec": { "ports": [ { "name": "web", "port": 8080, "targetPort": 8080 } ], "selector": { "name": "${NAME}" } } }, { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "${NAME}", "annotations": { "description": "Keeps track of changes in the application image" } } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "${NAME}" }, "spec": { "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "ImageStreamTag", "namespace": "openshift", "name": "perl:5.32-ubi9" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "${NAME}:latest" } } } }, { "kind": "Deployment", "apiVersion": "apps/v1", "metadata": { "name": "${NAME}", "annotations": { "image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"${NAME}:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" } }, "spec": { "strategy": { "type": "RollingUpdate" }, "replicas": 1, "selector": { "matchLabels": { "name": "${NAME}" } }, "template": { "metadata": { "name": "${NAME}", "labels": { "name": "${NAME}" } }, "spec": { "containers": [ { "name": "perl", "image": " ", "ports": [ { "containerPort": 8080 } ], "readinessProbe": { "timeoutSeconds": 3, "initialDelaySeconds": 3, "httpGet": { "path": "/", "port": 8080 } } } ] } } } } ], "parameters": [ { "name": "NAME", "displayName": "Name", "description": "The name assigned to all of the frontend objects defined in this template.", "required": true, "value": "perl" } ] } `) func testExtendedTestdataImage_ecosystemPerlHotdeployPerlJsonBytes() ([]byte, error) { return _testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson, nil } func testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson() (*asset, error) { bytes, err := testExtendedTestdataImage_ecosystemPerlHotdeployPerlJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/image_ecosystem/perl-hotdeploy/perl.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataIpsecNmstateYaml = []byte(`apiVersion: nmstate.io/v1 kind: NMState metadata: name: nmstate `) func testExtendedTestdataIpsecNmstateYamlBytes() ([]byte, error) { return _testExtendedTestdataIpsecNmstateYaml, nil } func testExtendedTestdataIpsecNmstateYaml() (*asset, error) { bytes, err := testExtendedTestdataIpsecNmstateYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ipsec/nmstate.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataIpsecNsconfigMachineConfigYaml = []byte(`# Generated by Butane; do not edit apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: worker name: 99-worker-north-south-ipsec-config spec: config: ignition: version: 3.4.0 storage: files: - contents: compression: gzip source: data:;base64,H4sIAAAAAAAC/2TTOdOyTBYG4Jxf0bk1hbLKV/UETXeD7LSgiJkgsgrKqvz6qeedqgne70TnXMG5o1u95QCOY18m05gNDAAAPPoya+/N1709s38Agn+w6dJbY2VfA/8DRAUIAhBFoGhAJUDigLYF3BbIKtjugCIDEQFVBgoP9grQtN8FawApQOUAM0xJlaXjD3LBz+/zchimrP//+Z/fUYluuACRY2hoBoIh+aOMYxioWRGCl00OF0OFuaFBxxLLsl4wjU2ruxrFnLqQElulcMEhsR1Y63B3IvDjIIZuyXIoUtep6OJi8nFwvDqV8Yl+bf3LKug6dFgQjfGZUkwWEzM0RAgGxt9pqkohznPiQ4wQpB3Kc6JCWz5zgmLf9i/zZUu9Ng0e06W2jJ7U4NpqUxiPoHDVbjQ/Se5KL9aRlOBqzKckjyof8oeR3wgTOh7Ghxc/ycMd5Iw5wjBEKi73nmDC9CzOUSsUrz5R+gHziNWFaVsd+ZY97d96M73O3e7eyl894D/ivRW9lCFpI30FKWlziK0wtYU21RaDjaqUYvKYVmcO0Tftj81lz40J6zR2pMSD5WuG4M3CujCzOISXPI3Z72zvheHw7c+rv1HLUtE5rEfXemxxnZnBWKuFhOvn/nWBukj8HV2LOdBEZoo6ao8Unh7Xfgiu7ChNvugX8BJbu+PY4DLlC6c7VNe1ImMhitmtrHYX61wcxs3FMQhjrQTBhUAYQlfN63dRl7qybFVIBw1CD0FKYMCj4xi3hkJumlEM92yVbo9oTCr7WzLyK6yXB9tMLeeYmhn1yvzOY1UictwEbOFm3EtfuYYGdf/2Oy5v5G7SI0TWyOTuj55jnMSnKxt61uFITv3He505m8tR+j2929MpmqdFi6T3hEzp6UWpLV3fmRWd09o6fE/2/LkxfutFz85Udp4rjnKg17BLNnu+osfH54bM/BbuNPwR0rYPhvtVKfY6ir3vfSuYlygRWZcpnVnF7HojgpK/YT6J6vaYi893jJ3pPuxEEvd1mYutdq2uWrb3T5cmmj2MVDnlrF09M/qinHZKmMtbPbLmbCvZFuvcEZsi1xB4Pn/Rt32enIH3OaM1NzTdmElBdlqx/Pz8r6XExf/u6H8DAAD//zcw/5BQBAAA mode: 256 overwrite: true path: /etc/pki/certs/ca.pem - contents: compression: gzip source: data:;base64,H4sIAAAAAAAC/4SVeTQUjrvGZ5ixb1kGWRpE1gxjGSYJyTJEyBplGURki5JlGusYZRtDY0/JEpKdlH3Jvu8M0SBbsi+55/e73/P93nvuvec+f7znvM/7vP9+HhiGCkgNw9DQS0bqRh4wA2mB2ZjLGBCWKQqG+V9s8BsYFpwJw4JJNIx/nZgYgFTZWDAShgUrw+z//gAzw8xg8H9WJpgYiI3/2oC+wETmLXW1fZjdXAuRipr+SiMVEApjoKH7zyAVPUyAhv5BpC4QTQ0CSoLYNLTCQMkddz+7CLZ43+HYKANhQQNdluDxHvtXxujHCUtZDmQXuTsquV5M/HPzACjwhWJTl8GzqK9Swc/KzvPc0IuqqVH5EqeWZkd56u1BGKfiAGl2/ird4ydFlOjDqqx+2YPYQx6ZxGrt6hKFQl6X7QeCyOraOmiDEyjvodZUwloac6X/p4MCxfBrjhtqWXe6Q1qvmG8hQ7IiryQtntQMd6AOBTe0qU0NZxkSWPiJ/S64TlH1SuxePl84o4diHIxP/5hLQ4r++a7cnxKhYdEtQR6rDKdTVeAaoU0IVDmZV1URejdfwe2Sm85oYluV23568VAPIGXT33GZt0yfdwvxPUXKlSSCqy6CpO857YToZqsZpIHT9CnXwlk4tKf9qMv0AnalJ5PtWhoDoKgIVbowUVeew2dhduR4tTvLvlnO++piCBeuSpB1oy43n+f7hautKznECYswL7kXboTGrV/PsASf7n7CLW9laQtLXG3PAqpCI0LSeeeiF+ejZMnsmxAiN7uphMPOCYu2h4XzAAQn1lRrEC+Xs6vftC2Vcy247fYswyeAaMf49K3X8DOsaCkk50dxkxBaB3mjcCvESjXG3DHztX0iu/q+6XwcOxSnm1FCVnn0O4nj3R7RsPt3CS3utUps+VypOKlJ1I7jEkBgxmJ01bY6SpnI3wKoUslpbSlp10lSaoEo6Ju357OS3lPxCoSihKpq0JaPQdZNqLs5cuFtm0+Ck2Rdr5hGYZu/0Sx1bTLOdoc+/LagfqPo4e9qVnTQNFAxzsRonIEQ9utCGpUrMdzwKN2rc+Wn67BgPSsFYsZn6SXSJ/ggnX0TxBub2PXiI2EDYoChFcLo4a0vq0GXr7Y5xnI27q4m7xvnzSYSP2fAm8lZvmvbYylCAwSUz8sabavej4cpM9xMENFu2KBss40ywCYp8zHSxXlO02/1m0lERVw7TlzGRfno+uI9MWAiyoQFT7Vc6f1MtytGV+syc41N7mjd3Bqebsn2Z8kaljRSyFcydD55VQS+jTa1OhcXsnWnq7HuoVuTOK+rN26+yM3U0QW4mKyZJfoDgjq7+IVDeuG5lZU4mzIbuDxaYNmdPvSTT3aGkc2pu3VqHP2CZktnlynNq5zZVR/mkGbherovlGeVct7RDHkMJ4dZwj+/Dm9M7dHrX5x4kJK7/jISobzc5jU125eBDM1MR50O5ZsQDD/JH9B/ZY12uhI9frfBRCXupZj28SzYP6Hs8HcSkV6j5VPm2Wiy21l5tucHQe+qxX6r/N3k0wyXwO4Nt3ztkw/M+zjh5+Rpnzv4mMdSOqyIMe0DeETyPCcN00j/9bMffIFjnU4SiG33Az690l6lmToVeftpgRAr1NKz+r15wawvwo0j7+/crzvVEvMKOpCoS5BWGlH9bDkXeqJEcq8nYmi0r5Am5HXJIeRc0CmLtLzQcad36FZPi1rp70oeteh1LRIY131btQn+qq2un2921Y1NgYVtUoOruqrN7l1qPDBNFWsb1Hm+/alA54cK6VHZ0EqvZ9SV6DpFxFJYndcKxC3TBanDS45KDGJZLd5ybBo/U+HVE6tV/vSL4ewsvoxZgZ+xj0X2dgS7+GRCtT5ku8bP7anZkxd0vAk44vRncqrtdwSxLEHmnU0z7pAoQIDd9fQpOW9ffCNe+3wgPNdUzgAm+jcp6TnleAQhgEcANMAZ4Ae4D/AFoAE+AP9/TZjIPzEuOQiIc/YdhrFW5jDiWsAk8nsnE7rk+eMjwL/1X+FNk435F+f/mwf8/1jNzK4j8m6xJYi+rymrPll66i9Ws/1frKYCsV3n2LdTPHc6ET0ZnIi9ODCVjQFhaaB3YmuHoLFOaSs51hYLstWhwLXaMOXXpYq66N0++dUgJ8536qUxO/BrI269SAfr3ZcZhmk3XxmYLhb8jNX8bjMmzEmr4QTpdaQkhn5xTzHEd2Z0Jxa9ZoW37UUOsa6/4YP/ScNacX8biP5cmd83RS4of7QUa/PxK6VH0RGmVbdfrN+JgCA7xNyq1o6HR7EvLtR4BLkmfT2W9qXvLKGEO6w0+vH1R5P4jd6bwdTg0gVFD/CmNZzBJwiuH/Nj6PZOf+p+jhxNVZEy9NuwX47qVhFgz97leJZt8lWhLZzmdaeZOez50Onm/Fi5EcisdD3gM+Xo+nLz+DE62KcogmNiPZAwPlqSgCe85TKhFTVapeXNGoFG83B77PsKt+Fk4w3yzroUcnOM5HV21OlYObg4PfhVDZASTeGxtjcKwzGOADM2r12EWUGkaud5WzbELH3omampoKiUKuU9HStLr+W9GbupfCGlsRs6CtCbXfoNM5vuMVReMiqvEU8XBfG7lLUxn74kjsm9N4vDIi/hSa3Ocdtvb+WKTuvEBfqWzUeLG7beX0qVfKwC6wiJIkmp2wmahLXRvzXr0g6fSBv3V6tQs354mHbZH54GiFqzFVgwtHz+5r6Me4V5obuTp/4HPgLvtJ9TxmthzFYK3dpM36ESNJ/tyET9Klsmd6HPQyiCKEncfCrCiyJ47Q0uuDxV0C06H+Q2bq8zh6LYiZZ6343xnBabm3FaphfWNX6ynef2oJmzXJlbn8TDj0uLnA5wkYYyybJHlYArzXuDaxvG/Caak86bRyUtCAmpbEMZ3T+JUqC5z3f9O8M1D3SGRe1RHReYcV2nrzyQhMMVWVNG2VRb5vUCuUAby7D8BrIvlNBBlEtoLEZK2TtJNhRqBmql3whftFCte3hMwp+iIJPsb1LY+Ge/xcSC5WVkTyFGkxw5zMcjZn+aKN3FJ82j8L0E6vbcldxej+NeNVdmuTKthNXQl7Uj5CalwRgmo5i0aVHGBmTgqjAR7n+pymwrlLGWd0HXrAGkZsjfY1tcrBem+hG93zso/spm4CTQDxd/b6ei2vNIzBh/EtYSuG2aAG+5sBMzqKsHHJj4MKrlKGm07Y8YYJW/zygp7KGBfOtJpadWXdq1mUMp39RpZr561WAWXOdn5+DWvZOopi8Af7dvf+nXUjWB2hG/xL5ZbZNOOuzMDe/7sXpbpzxe29nrMPKMUQRojDS+rWloUPlEXiH53ihG2X6xRxzk7ndUqje76BB0s6jeXOYqT3vS0AjyvTRu2GaNd4FoecnTiC/AdmSUE3cAfZHC/nKeIR/DV8OVCprLnzmKC8O0D1um9tsMohpR3ifsj+aF5gvIDYiUnhDfKK/Bpj6SniOwMfh3R6sXKdEm4RaX6PVYRpAKObjBh+zg9wFvUeBsLr2R56S6dthGt/J4spXa+GAaMXOYMK/BeSeGNOZ7b+7JEzwXfbJZu6+IxyhlS7OfPXMkuayksOFXhCE/YICecPvktBumPuAJ/cCQ0kMbpORz0zNhk+xqMG/fdbcVHm3eRFMh0VKh4X9J+XGIyuVRm5AHYRwlZ6OoP7rmS8GOa1z9AhwuXPU+dH14T3qpTSz3F3NKIOVm8/qfPi5QpqSJvDT0PdSbJzdx+2R5YBUXNnOzLFAnAgzvYkKv1V33nq8H7Yw+pOxcOPchPdJWOG0W/X5p98eTPWJD+e7212jlB2eC+oGsYhS8DLNYCLp6azeunPLt6UnN9fcB3yzvqef0JiY7YC+nNN54GhOFyB06619XEqdsyBeeVrEqXFqv1zBFAr7UItpSDryAqR7xhPMLX94VUTPsNlzbHtfPwMItA+5ldOfkfzywHwg4ftt9S6xXtQSfyTMZhWWUumGnr7xITqoS0Q9rxqtvPlWv6JMqFJjaNbt4seu3CckiTzn+U7Y3BmRz4rD0aIOCEt6smepdfK6dLijZMwZ7c4bUFJuYdNNhkRxc74qm9XUXkzDuE2IQTB3qYe3VhTQe5TJVVYA34NGe3Phh1v5fNYKHNqkKe/yq5DoOANdkck8yQsGMUyrSet+GeGsx+TsuS21dnBx7HNYUvyJUu7j6Ov12J4gtP0qiFzSZezz1A1fqy9AaDPgfgunD5GDMf5cNFRAMAEFpr80s2H+DZ34Wv5FPQ1LkqKLBeDvCvk4H5sVxfOhGpYHYYhiL1lmAtOUiLQryYFRd7b87DAD4jwAAAP//Yjvm6PUMAAA= mode: 256 overwrite: true path: /etc/pki/certs/left_server.p12 - contents: compression: gzip source: data:;base64,H4sIAAAAAAAC/4SVdzgbDLvGIyL2aKtolNaIeI0moWq9r5Ui1dqlRhFqjxptlfJGxB4htfeMvV5qF0lF0aL2KFoUtam9Odf3ne96v3Ouc8517j+e63ru537+/d0IHJCGFoEDM4qFokMPWWnoaXJwwjgQniUCgftfbDoSAk+Xg8DTZYCZ/3ViYaIB5uDpFBF4OlmE9d8fdKyIxwjpf68sCBEQxy8Fst/LLFDhIu275fbJpzxAWkYYBUhzG8EEZvjPIJARwQdmxISiaexoQTRiIA5WQTdJQijHHs3tcXPtNgoVhAcNKEs1vE/QVXJ2JHh64B54YKfZHL5suJPIs9ZT8WaFyLRjkkkYc204EgYuBEk//UzavAlIrJOUZDZSruDZxO4+Jdj85rjLzQZ1W73VSJ9hoHAzOGpworFgdu9RwmF+aW49zll1puxrccTPWJsm2axXvBjtUUAM1QSR8V3HkCxAytByqRQf1PtJYL2oFxXv2YbFfTWbiw8Xu2tgu4G+V5SQ+wzqttoc1rJrMrtiytIZF+ijGY5qn8zb4rGEv+IeDMBAmDl5OO14yOuQhuilJVbbE/5ygTUmPKC/R0LzdyERPmarE5HqdDGh0vihUtfCBKDBykhamXFyFztcppbETEoy7jt8WMsGYlA1QxYcR7fMhTmwKuV1ZjMKNjQOEQKO2vn3fxjlLgm72eglGjW7rtJWa/Qbs5nS76YIqN1afrwPXUuxV3QL+XI3CA8xDvVdkQl/EYFe3PCc6oPKLYrXopYWxQEosbuNtAKo0QaFeMQIW7iFBhyn6GvvyZUbyG01wBvt4NythlRcGzEt2E71O6hhm5P4MXYg1tF5+mLvilUbLXijOjEPPyBudx0r63RGHMH4/6IVWRAb3xyenTnsaEmtWH154Xx4NeZ82bEh92NOX1f7khnMhaumwHtMi4TRLBcJIDm/UyP80T9jkO1nadE0Ehk+rrUVTNcGPMs48iV9OwyEO+RNGQ08R43VP/QkwOi5FO/y1LHBs4mk3pIxs8ZLu/Dme7LH3cRnY1PrSri92ZphwtrKsH8B96s0LLUDe4Pakz2/YOrz2Pd+bLBE9Ehl4+YeuNOe90DF4jj54JzFZTQwSlbqBuzbdV8RA1ZND4n8+xniyOz0qxtTVyoIMzKGvcZW99OloWYX0oru1YUXJrddKj+yq18Wc/RD8UThK0n8oPfu2DFDPUlaVvKnnR/1GrckBGJdnSvCdFusyPb7nNJd8zD5dpTjaJ+nVwi/u+r2s/DWlxq3itzSOTfn5cFQWEFYO6P3Jp9Ytc7TubfE4pvWipEQps/jw8Zq49fmSzvzKF+9465FRY1LmTqaO2HAQ6LGA44Da4WdB4RuegFR105zDNyaW+6mKnj29dWkN/uemXOnbWNbYY+3apkpDqNzPqRlYZdLE4VpRaSzUSxXM7T0UW9DGj5fVdr+hP3IJ4vHYogTtcVtKhUQfNNFNT9al8yMouxf858AH0JurMvY62w+Ul4+cp1r9X5TRafpmHZkJhNKI8mX3VJxkfWH7O5fkeL0P1Q6tgIMWxzrUfpE9uOWPLdklcwYJ5Ze1Tbv/ts7z1XIErWSr3hZ5NohnhI7H2/IDdZxUCd0J1OnTYSRyS5uS6DKbZCE+zdBAWUUvBdOK40+3F+/XPcJLHVUl/D8MN425S7t4XKU22PUJntwli8tVvDqDki0XBrElp2T9sCdMxRF4JoylneGKE4mH+SeSFI07DKZVHgStAnQQ7uPzXwYqDhrMm2r33MtTWeVPc81df/jU47ykgZuIonu4Ur795JexqEQ6n6QjoleaHRI6qKKR2baI2hOQM8XlZtyXoZjJ08jm2gHgMOFz06u1epfzdZ0XslKI8afq7qtDlynGvKeJqyUJ5tdRP4lE4R2I6Bx8pdyhZgH/G6p9Mm2NwC/y+2ADL10Rm521npS2pA6CNjfpGTkREL4eQBeACeAA8AR8BJgBXgBsAN4Abz/MRFC/w5eR3KBODkKXpqrXXouZFh8tQ0KVmgtuPdEG/BP/Vd8g3Nw/yD9f/No/l9a2z3+ftqxqyA7mGxy8uD8w79ozfF/0RoI4sBcg/qMOpT9pHFq+vRyIs4vBwfCg297sevuB+CsjEJM9hQ2KywgKOaqVayEjoW1ep1DNLskr3VhozlhgEgWbil5kMhPTdIVcHuRYTE/nebx8/vTMX0LrPYMBPzEXT1E1I1xlHJkJ0idJjGrSfa8RssVaNSgmGwyZnKsIMrzlxMBdUbfzU80HzWKaInNlZxhjTTyP+dNbPvbHPeX7OyFyQNmmtRCNZOmTEqiJ5ccEsZ3qYO937OCuWlbs4WxfFVzShseDqKJ09/mSgkvRxJ+oPrBFrPvQyt7Ehrc47wv74xrmW62LrbCGTQbHzxWrFRSF4lSI5uszUK6FgF0mpKxKhXzqZ8GSW8KbTquyUW2phB7zyg29idMbeh+ipS9q1kw2ruqMwTcx3x1SGWd7qggDhcbzDBlu+aMHb11JR198hyWFdTZC5/ol7gSgAc8eucC1WKrTCxbzgs7k09yU2C39W26ZhT7Wy5wFAEm2NwyhlAn0qhrcTzBSg6chfvinpdw8aK5lQ+Q35fqulKZ8UrDU6XZVPbbmfM4hZy0vT+MEwLXrlvOpZtqGWZccDKkhN00XJJunywsPV322tL6zuD8McXSuuo+LdrLjHtsh2si9TOKK43wm40a+kzIzCD6fVWG7bnWMTwtYq2vI753UykC8qv8Q9OFi/d944x+yN0xpi47qDMSfZ7ZndVDx9inPdk1r8wBB5kXXHe3+rkU3lyNGU1YmK+tv8/+LScQkDRwSj7D7PmvPdGXdOJRQ3ajfdJrTiyvk+nZdCM5T/IcnsDk6Scd1YqX5Q16l/udio8zBa2axgxTZD5W4L/MMIgKw1Z6RcNystzXuzrojJX4jU2LPlsYV5y003aL2yVW77ywQTx8zQ9wWGxTvlW0NZ1/Bf4zJhdSXLpzRLjg1UGytFIf0CRH6tc0v+ZRxRjmubFku3/YgUCMughMsYPMf5p1RW0mlh+uDu9a+psI9Vtbt2WdvwnUK7UcJ35L+kjlcQj62iv2i1jfNGKJt+jifxeen3paw0FNVn77SN3FbiOfxS5xyeDJLZdZ77fP9X8jq5c+sUqG5PPlzHvr5Dpx6vVC3+eUqZfFG6ssvOhd27ngUHkn730izy/Hd5Wh6V6MS+v5egLN7jTvj+WgMNu/9O8cPLOXwgQOUj4Wha/wJ+CA2BvAQaLZXMzNiqe5pG4hUL22QkH0V1ykE0Mz+a9X8Qfit4thw3Bpj0VAg7iHx7gPVXtbAXjoqfujuKakQJDL4+HbJgP34lrrZnopyAR3r4lGCMvtLOCdhBGTiDmz8pbJ1WM6ruzeTWPbsghuwRlKEXRVwcrhw/vhbKJuaYD9UzxH3UOAHJUpAXtM3L24rpTuet9GgPRr4S2lNt22CvVNIMOJ6UWIOVcQzCyWbkmYxmpPZthgY+dc/bBCCRBdMF1Rp/aaB6eh/H5h66GBQYoeb/VX2bAyNoBcY3lDt1B8471gKSAyYqlzglluowyg4RxXzZ36qKiJPFSfYYEQ56Cksxz4qHFJgXai2K+3XW1axAQ3UCSk2a3mlSPt95viCDxs29i766TutRUS0rUCDC6yYfDf3942HH51KpKPHETViNxl7eA6erZB/hpzrhEjTAKdXd1+lvN2N142OCJyz9cA6xkbpFqWCibvJDBr5BSmALuEglQ+uUVYDqXwN2LpFSBah3a81jvigi1ah1m4pnd/vhnebY2A2/OkpgAfkpF+IcetPtPR2z5OVHJdkHKNTCasisjTKBIm6sun0vLayyO9HBV1tVrviLHNX+okRlBiz79KAZNmLel7T8IEsOwCZlcX6rMl/pQgwu7Az/9Qojgaz1GIdxp2xza4e1QuUs2ZurMrY+93nI/lmsdPfuq/uCu0kNIO1JoFWr6UZJRJTTUo7H+n+DvWBDPJj8ok7bddGzwRZZHXNYqr5K/0ac+azs8cU4T/MXT4WcmB5Th97E+oU19w1HxB+P7rO9uFcnXomD59fF0IWr71sgTq4yFEXH+sPeS143fvUiIyOCrfVWTjBqIUdjebdXGjHb65r+P0KX0S2zxtN9s48yeFhn6WynTsRoWbL/Dp9/vBGDHhPWWtCx7ho94Ny81iX/Qy5gOD0g+ASb7yaO7GLhDHwMVSZMN8vCeX4Ivq9h3Qe8D/EEILgUSw/l02QBo6AOh2gPv6gZMKqXOx4JnP/pGfnBk3S9aPk9xwkZ65z3k+290gjmsCqU/MxyMql70v1s6dJLv/2WEAwH8EAAD//x7O3tr3DAAA mode: 256 overwrite: true path: /etc/pki/certs/right_server.p12 - contents: compression: gzip source: data:;base64,H4sIAAAAAAAC/5zOPW6EMBAF4J5TTCatzQhugFwnDZFSRuBMYAQYyz+cP2JpKBbtasuR5r33vb9RL476Lo6guWA7roCy+DUkcQNYDgnSCp9ti8V+5CQz6Aa0AzQNgk6A5ksZZRD0L9DWBZqlJ/GRLbkYCbQAcbLkJ6G9IpLtSs9L4aeqPvq+AfHO38x/6Sdy2DiUvqovBk6uj5vrFDuAWWWVr3yPGUGG8RXHOfcM5D8AAP//8sHozowBAAA= mode: 480 overwrite: true path: /usr/local/bin/ipsec-addcert.sh systemd: units: - contents: | [Unit] Description=Import external certs into ipsec NSS Before=ipsec.service [Service] Type=oneshot ExecStart=/usr/local/bin/ipsec-addcert.sh RemainAfterExit=false StandardOutput=journal [Install] WantedBy=multi-user.target enabled: true name: ipsec-import.service `) func testExtendedTestdataIpsecNsconfigMachineConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataIpsecNsconfigMachineConfigYaml, nil } func testExtendedTestdataIpsecNsconfigMachineConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataIpsecNsconfigMachineConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ipsec/nsconfig-machine-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataIpsecNsconfigRebootNonePolicyYaml = []byte(`apiVersion: operator.openshift.io/v1 kind: MachineConfiguration metadata: name: cluster namespace: openshift-machine-config-operator spec: nodeDisruptionPolicy: files: - actions: - type: None path: /usr/local/bin/ipsec-addcert.sh - actions: - type: None path: /etc/pki/certs/ca.pem - actions: - type: None path: /etc/pki/certs/left_server.p12 - actions: - type: None path: /etc/pki/certs/right_server.p12 units: - name: ipsec-import.service actions: - restart: serviceName: ipsec-import.service type: Restart `) func testExtendedTestdataIpsecNsconfigRebootNonePolicyYamlBytes() ([]byte, error) { return _testExtendedTestdataIpsecNsconfigRebootNonePolicyYaml, nil } func testExtendedTestdataIpsecNsconfigRebootNonePolicyYaml() (*asset, error) { bytes, err := testExtendedTestdataIpsecNsconfigRebootNonePolicyYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ipsec/nsconfig-reboot-none-policy.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataKernelRtTestsEnvironmentYaml = []byte(`kind: Project apiVersion: project.openshift.io/v1 metadata: name: ci-realtime-testbed labels: kubernetes.io/metadata.name: rt-tests pod-security.kubernetes.io/enforce: privileged pod-security.kubernetes.io/audit: privileged pod-security.kubernetes.io/warn: privileged annotations: workload.openshift.io/allowed: management spec: {} --- apiVersion: v1 kind: ServiceAccount metadata: name: rt-tests namespace: ci-realtime-testbed --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: system:openshift:scc:privileged roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: system:openshift:scc:privileged subjects: - kind: ServiceAccount name: rt-tests namespace: ci-realtime-testbed`) func testExtendedTestdataKernelRtTestsEnvironmentYamlBytes() ([]byte, error) { return _testExtendedTestdataKernelRtTestsEnvironmentYaml, nil } func testExtendedTestdataKernelRtTestsEnvironmentYaml() (*asset, error) { bytes, err := testExtendedTestdataKernelRtTestsEnvironmentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/kernel/rt-tests-environment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataKernelRtTestsPodYaml = []byte(`apiVersion: v1 kind: Pod metadata: name: rt-tests namespace: ci-realtime-testbed spec: hostPID: true hostIPC: true hostNetwork: true volumes: - name: host hostPath: path: /sys/kernel/debug type: Directory containers: - name: rt-tests image: image-registry.openshift-image-registry.svc:5000/openshift/tests command: - "sh" - "-c" - "sleep 999999" resources: {} securityContext: privileged: true volumeMounts: - mountPath: /sys/kernel/debug name: host serviceAccount: rt-tests serviceAccountName: rt-tests terminationGracePeriodSeconds: 30`) func testExtendedTestdataKernelRtTestsPodYamlBytes() ([]byte, error) { return _testExtendedTestdataKernelRtTestsPodYaml, nil } func testExtendedTestdataKernelRtTestsPodYaml() (*asset, error) { bytes, err := testExtendedTestdataKernelRtTestsPodYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/kernel/rt-tests-pod.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdBlacklist_ldapTxt = []byte(`group1 group3 `) func testExtendedTestdataLdapGroupsyncAdBlacklist_ldapTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdBlacklist_ldapTxt, nil } func testExtendedTestdataLdapGroupsyncAdBlacklist_ldapTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdBlacklist_ldapTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/blacklist_ldap.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdBlacklist_openshiftTxt = []byte(`group1 group/group3 `) func testExtendedTestdataLdapGroupsyncAdBlacklist_openshiftTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdBlacklist_openshiftTxt, nil } func testExtendedTestdataLdapGroupsyncAdBlacklist_openshiftTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdBlacklist_openshiftTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/blacklist_openshift.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdLdapgroupuidsTxt = []byte(`group1 group2 group3`) func testExtendedTestdataLdapGroupsyncAdLdapgroupuidsTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdLdapgroupuidsTxt, nil } func testExtendedTestdataLdapGroupsyncAdLdapgroupuidsTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdLdapgroupuidsTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/ldapgroupuids.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdOsgroupuidsTxt = []byte(`group1 group2 group3`) func testExtendedTestdataLdapGroupsyncAdOsgroupuidsTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdOsgroupuidsTxt, nil } func testExtendedTestdataLdapGroupsyncAdOsgroupuidsTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdOsgroupuidsTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/osgroupuids.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdSyncConfigDnEverywhereYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA activeDirectory: usersQuery: baseDN: "ou=people,ou=ad,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ dn ]`) func testExtendedTestdataLdapGroupsyncAdSyncConfigDnEverywhereYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdSyncConfigDnEverywhereYaml, nil } func testExtendedTestdataLdapGroupsyncAdSyncConfigDnEverywhereYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdSyncConfigDnEverywhereYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/sync-config-dn-everywhere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdSyncConfigPagingYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA activeDirectory: usersQuery: baseDN: "ou=people,ou=ad,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) pageSize: 1 groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncAdSyncConfigPagingYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdSyncConfigPagingYaml, nil } func testExtendedTestdataLdapGroupsyncAdSyncConfigPagingYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdSyncConfigPagingYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/sync-config-paging.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdSyncConfigPartiallyUserDefinedYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA groupUIDNameMapping: group1: firstgroup group3: thirdgroup activeDirectory: usersQuery: baseDN: "ou=people,ou=ad,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncAdSyncConfigPartiallyUserDefinedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdSyncConfigPartiallyUserDefinedYaml, nil } func testExtendedTestdataLdapGroupsyncAdSyncConfigPartiallyUserDefinedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdSyncConfigPartiallyUserDefinedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/sync-config-partially-user-defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdSyncConfigUserDefinedYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA groupUIDNameMapping: group1: firstgroup group2: secondgroup group3: thirdgroup activeDirectory: usersQuery: baseDN: "ou=people,ou=ad,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncAdSyncConfigUserDefinedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdSyncConfigUserDefinedYaml, nil } func testExtendedTestdataLdapGroupsyncAdSyncConfigUserDefinedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdSyncConfigUserDefinedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/sync-config-user-defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdSyncConfigYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA activeDirectory: usersQuery: baseDN: "ou=people,ou=ad,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncAdSyncConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdSyncConfigYaml, nil } func testExtendedTestdataLdapGroupsyncAdSyncConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdSyncConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/sync-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_blacklist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_all_blacklist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_blacklist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_blacklist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_blacklist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_blacklist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group3 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_ldap_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_dn_everywhereYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - cn=Person1,ou=people,ou=ad,dc=example,dc=com - cn=Person2,ou=people,ou=ad,dc=example,dc=com - cn=Person3,ou=people,ou=ad,dc=example,dc=com - cn=Person4,ou=people,ou=ad,dc=example,dc=com - cn=Person5,ou=people,ou=ad,dc=example,dc=com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - cn=Person1,ou=people,ou=ad,dc=example,dc=com - cn=Person2,ou=people,ou=ad,dc=example,dc=com - cn=Person3,ou=people,ou=ad,dc=example,dc=com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group3 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: - cn=Person1,ou=people,ou=ad,dc=example,dc=com - cn=Person5,ou=people,ou=ad,dc=example,dc=com `) func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_dn_everywhereYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_dn_everywhereYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_dn_everywhereYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_dn_everywhereYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_dn_everywhere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_partially_user_definedYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: firstgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group3 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: thirdgroup users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_partially_user_definedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_partially_user_definedYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_partially_user_definedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_partially_user_definedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_partially_user_defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_pruneYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group3 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_pruneYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_pruneYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_pruneYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_pruneYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_prune.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_user_definedYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: firstgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: secondgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group3 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: thirdgroup users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_user_definedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_user_definedYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_user_definedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_user_definedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_user_defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_all_openshift_blacklist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: [] apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group3 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: [] `) func testExtendedTestdataLdapGroupsyncAdValid_all_openshift_blacklist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_all_openshift_blacklist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_all_openshift_blacklist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_all_openshift_blacklist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_all_openshift_blacklist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_whitelist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_whitelist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_whitelist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_whitelist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_whitelist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_whitelist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdValid_whitelist_union_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group1 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: group2 openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com `) func testExtendedTestdataLdapGroupsyncAdValid_whitelist_union_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdValid_whitelist_union_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAdValid_whitelist_union_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdValid_whitelist_union_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/valid_whitelist_union_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdWhitelist_ldapTxt = []byte(`group1`) func testExtendedTestdataLdapGroupsyncAdWhitelist_ldapTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdWhitelist_ldapTxt, nil } func testExtendedTestdataLdapGroupsyncAdWhitelist_ldapTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdWhitelist_ldapTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/whitelist_ldap.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAdWhitelist_openshiftTxt = []byte(`groups/group1`) func testExtendedTestdataLdapGroupsyncAdWhitelist_openshiftTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAdWhitelist_openshiftTxt, nil } func testExtendedTestdataLdapGroupsyncAdWhitelist_openshiftTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAdWhitelist_openshiftTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/ad/whitelist_openshift.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_ldapTxt = []byte(`cn=group1,ou=groups,ou=adextended,dc=example,dc=com cn=group3,ou=groups,ou=adextended,dc=example,dc=com `) func testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_ldapTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_ldapTxt, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_ldapTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_ldapTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/blacklist_ldap.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_openshiftTxt = []byte(`extended-group1 extended-group3 `) func testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_openshiftTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_openshiftTxt, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_openshiftTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_openshiftTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/blacklist_openshift.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdLdapgroupuidsTxt = []byte(`cn=group1,ou=groups,ou=adextended,dc=example,dc=com cn=group2,ou=groups,ou=adextended,dc=example,dc=com cn=group3,ou=groups,ou=adextended,dc=example,dc=com`) func testExtendedTestdataLdapGroupsyncAugmentedAdLdapgroupuidsTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdLdapgroupuidsTxt, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdLdapgroupuidsTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdLdapgroupuidsTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/ldapgroupuids.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdOsgroupuidsTxt = []byte(`extended-group1 extended-group2 extended-group3`) func testExtendedTestdataLdapGroupsyncAugmentedAdOsgroupuidsTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdOsgroupuidsTxt, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdOsgroupuidsTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdOsgroupuidsTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/osgroupuids.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigDnEverywhereYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA augmentedActiveDirectory: usersQuery: baseDN: "ou=people,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ dn ] groupsQuery: baseDN: "ou=groups,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never groupUIDAttribute: dn groupNameAttributes: [ dn ] `) func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigDnEverywhereYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigDnEverywhereYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigDnEverywhereYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigDnEverywhereYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-dn-everywhere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPagingYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA augmentedActiveDirectory: usersQuery: baseDN: "ou=people,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) pageSize: 1 groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ] groupsQuery: baseDN: "ou=groups,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never pageSize: 1 groupUIDAttribute: dn groupNameAttributes: [ cn ] `) func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPagingYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPagingYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPagingYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPagingYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-paging.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPartiallyUserDefinedYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA groupUIDNameMapping: cn=group1,ou=groups,ou=adextended,dc=example,dc=com: firstgroup cn=group3,ou=groups,ou=adextended,dc=example,dc=com: thirdgroup augmentedActiveDirectory: usersQuery: baseDN: "ou=people,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ] groupsQuery: baseDN: "ou=groups,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never groupUIDAttribute: dn groupNameAttributes: [ cn ] `) func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPartiallyUserDefinedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPartiallyUserDefinedYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPartiallyUserDefinedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPartiallyUserDefinedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-partially-user-defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigUserDefinedYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA groupUIDNameMapping: cn=group1,ou=groups,ou=adextended,dc=example,dc=com: firstgroup cn=group2,ou=groups,ou=adextended,dc=example,dc=com: secondgroup cn=group3,ou=groups,ou=adextended,dc=example,dc=com: thirdgroup augmentedActiveDirectory: usersQuery: baseDN: "ou=people,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ] groupsQuery: baseDN: "ou=groups,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never groupUIDAttribute: dn groupNameAttributes: [ cn ] `) func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigUserDefinedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigUserDefinedYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigUserDefinedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigUserDefinedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-user-defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA augmentedActiveDirectory: usersQuery: baseDN: "ou=people,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=inetOrgPerson) groupMembershipAttributes: [ testMemberOf ] userNameAttributes: [ mail ] groupsQuery: baseDN: "ou=groups,ou=adextended,dc=example,dc=com" scope: sub derefAliases: never groupUIDAttribute: dn groupNameAttributes: [ cn ] `) func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_blacklist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_blacklist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_blacklist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_blacklist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_blacklist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_blacklist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_delete_pruneYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_delete_pruneYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_delete_pruneYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_delete_pruneYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_delete_pruneYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_delete_prune.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_dn_everywhereYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: cn=group1,ou=groups,ou=adextended,dc=example,dc=com users: - cn=Person1,ou=people,ou=adextended,dc=example,dc=com - cn=Person2,ou=people,ou=adextended,dc=example,dc=com - cn=Person3,ou=people,ou=adextended,dc=example,dc=com - cn=Person4,ou=people,ou=adextended,dc=example,dc=com - cn=Person5,ou=people,ou=adextended,dc=example,dc=com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: cn=group2,ou=groups,ou=adextended,dc=example,dc=com users: - cn=Person1,ou=people,ou=adextended,dc=example,dc=com - cn=Person2,ou=people,ou=adextended,dc=example,dc=com - cn=Person3,ou=people,ou=adextended,dc=example,dc=com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: cn=group3,ou=groups,ou=adextended,dc=example,dc=com users: - cn=Person1,ou=people,ou=adextended,dc=example,dc=com - cn=Person5,ou=people,ou=adextended,dc=example,dc=com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_dn_everywhereYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_dn_everywhereYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_dn_everywhereYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_dn_everywhereYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_dn_everywhere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_partially_user_definedYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: firstgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: thirdgroup users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_partially_user_definedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_partially_user_definedYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_partially_user_definedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_partially_user_definedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_partially_user_defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_pruneYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_pruneYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_pruneYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_pruneYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_pruneYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_prune.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_user_definedYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: firstgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: secondgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: thirdgroup users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_user_definedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_user_definedYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_user_definedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_user_definedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_user_defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_openshift_blacklist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group1 users: [] apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group3 users: [] `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_openshift_blacklist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_openshift_blacklist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_openshift_blacklist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_openshift_blacklist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_openshift_blacklist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_whitelist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_union_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=adextended,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: extended-group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com `) func testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_union_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_union_syncYaml, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_union_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_union_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/valid_whitelist_union_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_ldapTxt = []byte(`cn=group1,ou=groups,ou=adextended,dc=example,dc=com`) func testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_ldapTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_ldapTxt, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_ldapTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_ldapTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/whitelist_ldap.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_openshiftTxt = []byte(`extended-group1`) func testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_openshiftTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_openshiftTxt, nil } func testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_openshiftTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_openshiftTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/augmented-ad/whitelist_openshift.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Blacklist_ldapTxt = []byte(`cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com `) func testExtendedTestdataLdapGroupsyncRfc2307Blacklist_ldapTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Blacklist_ldapTxt, nil } func testExtendedTestdataLdapGroupsyncRfc2307Blacklist_ldapTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Blacklist_ldapTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/blacklist_ldap.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Blacklist_openshiftTxt = []byte(`group1 group3 `) func testExtendedTestdataLdapGroupsyncRfc2307Blacklist_openshiftTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Blacklist_openshiftTxt, nil } func testExtendedTestdataLdapGroupsyncRfc2307Blacklist_openshiftTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Blacklist_openshiftTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/blacklist_openshift.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307LdapgroupuidsTxt = []byte(`cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com`) func testExtendedTestdataLdapGroupsyncRfc2307LdapgroupuidsTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307LdapgroupuidsTxt, nil } func testExtendedTestdataLdapGroupsyncRfc2307LdapgroupuidsTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307LdapgroupuidsTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/ldapgroupuids.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307OsgroupuidsTxt = []byte(`group1 group2 group3`) func testExtendedTestdataLdapGroupsyncRfc2307OsgroupuidsTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307OsgroupuidsTxt, nil } func testExtendedTestdataLdapGroupsyncRfc2307OsgroupuidsTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307OsgroupuidsTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/osgroupuids.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigDnEverywhereYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA rfc2307: groupsQuery: baseDN: "ou=groups,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=groupOfNames) groupUIDAttribute: dn groupNameAttributes: [ dn ] groupMembershipAttributes: [ member ] usersQuery: baseDN: "ou=people,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never userUIDAttribute: dn userNameAttributes: [ dn ]`) func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigDnEverywhereYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigDnEverywhereYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigDnEverywhereYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307SyncConfigDnEverywhereYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-dn-everywhere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPagingYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA rfc2307: groupsQuery: baseDN: "ou=groups,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=groupOfNames) pageSize: 1 groupUIDAttribute: dn groupNameAttributes: [ cn ] groupMembershipAttributes: [ member ] usersQuery: baseDN: "ou=people,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never pageSize: 1 userUIDAttribute: dn userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPagingYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPagingYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPagingYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPagingYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-paging.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPartiallyUserDefinedYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA groupUIDNameMapping: "cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com": firstgroup "cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com": thirdgroup rfc2307: groupsQuery: baseDN: "ou=groups,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=groupOfNames) groupUIDAttribute: dn groupNameAttributes: [ cn ] groupMembershipAttributes: [ member ] usersQuery: baseDN: "ou=people,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never userUIDAttribute: dn userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPartiallyUserDefinedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPartiallyUserDefinedYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPartiallyUserDefinedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPartiallyUserDefinedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-partially-user-defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigToleratingYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA rfc2307: groupsQuery: baseDN: "ou=groups,ou=incomplete-rfc2307,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=groupOfNames) groupUIDAttribute: dn groupNameAttributes: [ cn ] groupMembershipAttributes: [ member ] usersQuery: baseDN: "ou=people,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never userUIDAttribute: dn userNameAttributes: [ mail ] tolerateMemberNotFoundErrors: true tolerateMemberOutOfScopeErrors: true`) func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigToleratingYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigToleratingYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigToleratingYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307SyncConfigToleratingYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-tolerating.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigUserDefinedYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA groupUIDNameMapping: "cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com": firstgroup "cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com": secondgroup "cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com": thirdgroup rfc2307: groupsQuery: baseDN: "ou=groups,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=groupOfNames) groupUIDAttribute: dn groupNameAttributes: [ cn ] groupMembershipAttributes: [ member ] usersQuery: baseDN: "ou=people,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never userUIDAttribute: dn userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigUserDefinedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigUserDefinedYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigUserDefinedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307SyncConfigUserDefinedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-user-defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigYaml = []byte(`kind: LDAPSyncConfig apiVersion: v1 url: ldap://LDAP_SERVICE_IP:389 insecure: false ca: LDAP_CA rfc2307: groupsQuery: baseDN: "ou=groups,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never filter: (objectclass=groupOfNames) groupUIDAttribute: dn groupNameAttributes: [ cn ] groupMembershipAttributes: [ member ] usersQuery: baseDN: "ou=people,ou=rfc2307,dc=example,dc=com" scope: sub derefAliases: never userUIDAttribute: dn userNameAttributes: [ mail ]`) func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307SyncConfigYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307SyncConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307SyncConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/sync-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_blacklist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_blacklist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_blacklist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_blacklist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_blacklist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_blacklist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_syncYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_dn_everywhereYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com users: - cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com users: - cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com users: - cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com - cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_dn_everywhereYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_dn_everywhereYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_dn_everywhereYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_dn_everywhereYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_dn_everywhere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_partially_user_definedYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: firstgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: thirdgroup users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_partially_user_definedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_partially_user_definedYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_partially_user_definedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_partially_user_definedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_partially_user_defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_pruneYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_pruneYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_pruneYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_pruneYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_pruneYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_prune.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_toleratingYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_toleratingYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_toleratingYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_toleratingYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_toleratingYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_tolerating.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_user_definedYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: firstgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: secondgroup users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: thirdgroup users: - person1smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_user_definedYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_user_definedYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_user_definedYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_user_definedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_user_defined.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_openshift_blacklist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: [] apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group3 users: [] `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_openshift_blacklist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_all_openshift_blacklist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_all_openshift_blacklist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_all_openshift_blacklist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_openshift_blacklist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_syncYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_whitelist_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_union_syncYaml = []byte(`apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group1 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com - person4smith@example.com - person5smith@example.com apiVersion: user.openshift.io/v1 kind: Group metadata: annotations: openshift.io/ldap.uid: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com openshift.io/ldap.url: LDAP_SERVICE_IP:389 labels: openshift.io/ldap.host: LDAP_SERVICE_IP name: group2 users: - person1smith@example.com - person2smith@example.com - person3smith@example.com `) func testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_union_syncYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_union_syncYaml, nil } func testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_union_syncYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_union_syncYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/valid_whitelist_union_sync.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Whitelist_ldapTxt = []byte(`cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com`) func testExtendedTestdataLdapGroupsyncRfc2307Whitelist_ldapTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Whitelist_ldapTxt, nil } func testExtendedTestdataLdapGroupsyncRfc2307Whitelist_ldapTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Whitelist_ldapTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/whitelist_ldap.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapGroupsyncRfc2307Whitelist_openshiftTxt = []byte(`group1`) func testExtendedTestdataLdapGroupsyncRfc2307Whitelist_openshiftTxtBytes() ([]byte, error) { return _testExtendedTestdataLdapGroupsyncRfc2307Whitelist_openshiftTxt, nil } func testExtendedTestdataLdapGroupsyncRfc2307Whitelist_openshiftTxt() (*asset, error) { bytes, err := testExtendedTestdataLdapGroupsyncRfc2307Whitelist_openshiftTxtBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/groupsync/rfc2307/whitelist_openshift.txt", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapLdapserverConfigCmYaml = []byte(`--- apiVersion: v1 kind: ConfigMap metadata: name: ldap-config data: ldap.conf: | TLS_CACERTDIR /usr/local/etc/ldapcert TLS_CACERT /usr/local/etc/ldapcert/ca.crt tls_conf.ldif: | # Configures the TLS certs for slapd dn: cn=config changetype: modify add: olcTLSCACertificateFile olcTLSCACertificateFile: /usr/local/etc/ldapcert/ca.crt - replace: olcTLSCertificateFile olcTLSCertificateFile: /usr/local/etc/ldapcert/tls.crt - replace: olcTLSCertificateKeyFile olcTLSCertificateKeyFile: /usr/local/etc/ldapcert/tls.key base_conf.ldif: | # The base LDIF data dn: dc=example,dc=com objectClass: top objectClass: dcObject objectclass: organization o: Example Com dc: Example dn: cn=Manager,dc=example,dc=com objectClass: organizationalRole cn: Manager description: LDAP Directory Manager dn: ou=People,dc=example,dc=com objectClass: organizationalUnit ou: People dn: ou=Group,dc=example,dc=com objectClass: organizationalUnit ou: Group domain_conf.ldif: | # Domain setup dn: olcDatabase={1}monitor,cn=config changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=example,dc=com" read by * none dn: olcDatabase={2}mdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=example,dc=com dn: olcDatabase={2}mdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=Manager,dc=example,dc=com dn: olcDatabase={2}mdb,cn=config changetype: modify add: olcRootPW olcRootPW: admin dn: olcDatabase={2}mdb,cn=config changetype: modify add: olcAccess olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=example,dc=com" write by anonymous auth by self write by * none olcAccess: {1}to dn.base="" by * read olcAccess: {2}to * by dn="cn=Manager,dc=example,dc=com" write by * read groupsync.ldif: | # Groupsync LDIF data dn: ou=rfc2307,dc=example,dc=com objectClass: organizationalUnit ou: rfc2307 description: RFC2307-style Entries dn: ou=groups,ou=rfc2307,dc=example,dc=com objectClass: organizationalUnit ou: groups description: User Groups dn: ou=people,ou=rfc2307,dc=example,dc=com objectClass: organizationalUnit ou: people description: Users dn: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: Smith cn: Person1 displayName: person1smith mail: person1smith@example.com dn: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: Smith cn: Person2 displayName: person2smith mail: person2smith@example.com dn: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: Smith cn: Person3 displayName: person3smith mail: person3smith@example.com dn: cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: Smith cn: Person4 displayName: person4smith mail: person4smith@example.com dn: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson sn: Smith cn: Person5 displayName: person5smith mail: person5smith@example.com dn: cn=group1,ou=groups,ou=rfc2307,dc=example,dc=com objectClass: groupOfNames cn: group1 owner: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com description: Person1's Group member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com dn: cn=group2,ou=groups,ou=rfc2307,dc=example,dc=com objectClass: groupOfNames cn: group2 owner: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com description: Person2's Group member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com dn: cn=group3,ou=groups,ou=rfc2307,dc=example,dc=com objectClass: groupOfNames cn: group3 owner: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com description: Person3's Group member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com dn: ou=ad,dc=example,dc=com objectClass: organizationalUnit ou: ad description: Active Directory-style Entries dn: ou=people,ou=ad,dc=example,dc=com objectClass: organizationalUnit ou: people description: AD-style users dn: cn=Person1,ou=people,ou=ad,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person1 displayName: person1smith mail: person1smith@example.com testMemberOf: group1 testMemberOf: group2 testMemberOf: group3 dn: cn=Person2,ou=people,ou=ad,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person2 displayName: person2smith mail: person2smith@example.com testMemberOf: group1 testMemberOf: group2 dn: cn=Person3,ou=people,ou=ad,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person3 displayName: person3smith mail: person3smith@example.com testMemberOf: group1 testMemberOf: group2 dn: cn=Person4,ou=people,ou=ad,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person4 displayName: person4smith mail: person4smith@example.com testMemberOf: group1 dn: cn=Person5,ou=people,ou=ad,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person5 displayName: person5smith mail: person5smith@example.com testMemberOf: group1 testMemberOf: group3 dn: ou=adextended,dc=example,dc=com objectClass: organizationalUnit ou: adextended description: AD-style Entries with Group Entries dn: ou=people,ou=adextended,dc=example,dc=com objectClass: organizationalUnit ou: people description: AD-style users dn: cn=Person1,ou=people,ou=adextended,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person1 displayName: person1smith mail: person1smith@example.com testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com testMemberOf: cn=group2,ou=groups,ou=adextended,dc=example,dc=com testMemberOf: cn=group3,ou=groups,ou=adextended,dc=example,dc=com dn: cn=Person2,ou=people,ou=adextended,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person2 displayName: person2smith mail: person2smith@example.com testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com testMemberOf: cn=group2,ou=groups,ou=adextended,dc=example,dc=com dn: cn=Person3,ou=people,ou=adextended,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person3 displayName: person3smith mail: person3smith@example.com testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com testMemberOf: cn=group2,ou=groups,ou=adextended,dc=example,dc=com dn: cn=Person4,ou=people,ou=adextended,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: Person4 displayName: person4smith mail: person4smith@example.com testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com dn: cn=Person5,ou=people,ou=adextended,dc=example,dc=com objectClass: person objectClass: organizationalPerson objectClass: inetOrgPerson objectClass: testPerson sn: Smith cn: person5smith displayName: person5smith mail: person5smith@example.com testMemberOf: cn=group1,ou=groups,ou=adextended,dc=example,dc=com testMemberOf: cn=group3,ou=groups,ou=adextended,dc=example,dc=com dn: ou=groups,ou=adextended,dc=example,dc=com objectClass: organizationalUnit ou: groups description: Group entries with metadata dn: cn=group1,ou=groups,ou=adextended,dc=example,dc=com objectClass: groupOfNames cn: extended-group1 owner: cn=Person1,ou=people,ou=adextended,dc=example,dc=com description: Person1's Group member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com dn: cn=group2,ou=groups,ou=adextended,dc=example,dc=com objectClass: groupOfNames cn: extended-group2 owner: cn=Person2,ou=people,ou=adextended,dc=example,dc=com description: Person2's Group member: cn=fake dn: cn=group3,ou=groups,ou=adextended,dc=example,dc=com objectClass: groupOfNames cn: extended-group3 owner: cn=Person3,ou=people,ou=adextended,dc=example,dc=com description: Person3's Group member: cn=fake dn: ou=incomplete-rfc2307,dc=example,dc=com objectClass: organizationalUnit ou: incomplete-rfc2307 description: OrganizationalUnit to hold malformed entries dn: ou=groups,ou=incomplete-rfc2307,dc=example,dc=com objectClass: organizationalUnit ou: groups description: Group entries with member lists containing missing members dn: cn=group1,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com objectClass: groupOfNames cn: group1 owner: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com description: Person1's Group member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person4,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com member: cn=INVALID,ou=people,ou=rfc2307,dc=example,dc=com dn: cn=group2,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com objectClass: groupOfNames cn: group2 owner: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com description: Person2's Group member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person2,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com member: cn=OUTOFSCOPE,ou=people,ou=OUTOFSCOPE,dc=example,dc=com dn: cn=group3,ou=groups,ou=incomplete-rfc2307,dc=example,dc=com objectClass: groupOfNames cn: group3 owner: cn=Person3,ou=people,ou=rfc2307,dc=example,dc=com description: Person3's Group member: cn=Person1,ou=people,ou=rfc2307,dc=example,dc=com member: cn=Person5,ou=people,ou=rfc2307,dc=example,dc=com member: cn=INVALID,ou=people,ou=rfc2307,dc=example,dc=com member: cn=OUTOFSCOPE,ou=people,ou=OUTOFSCOPE,dc=example,dc=com `) func testExtendedTestdataLdapLdapserverConfigCmYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapLdapserverConfigCmYaml, nil } func testExtendedTestdataLdapLdapserverConfigCmYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapLdapserverConfigCmYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-config-cm.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapLdapserverDeploymentYaml = []byte(`--- kind: Deployment apiVersion: apps/v1 metadata: name: openldap-server labels: app: openldap-server spec: replicas: 1 selector: matchLabels: app: openldap-server template: metadata: name: openldap-server labels: app: openldap-server spec: serviceAccountName: ldap containers: - name: openldap-server securityContext: privileged: true # This image is built from the openshift/openldap directory. image: quay.io/openshifttest/ldap:1.2 ports: # StartTLS works over 389 - containerPort: 389 protocol: TCP terminationMessagePath: "/dev/termination-log" imagePullPolicy: Always volumeMounts: - name: ldap-config # Configs get copied to /etc/openldap by container run script. mountPath: /usr/local/etc/ldapconf - name: scripts mountPath: /usr/local/bin - name: ldap-cert mountPath: /usr/local/etc/ldapcert volumes: - name: ldap-cert secret: secretName: ldap-cert - name: ldap-config configMap: name: ldap-config - name: scripts configMap: name: scripts defaultMode: 0777 restartPolicy: Always `) func testExtendedTestdataLdapLdapserverDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapLdapserverDeploymentYaml, nil } func testExtendedTestdataLdapLdapserverDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapLdapserverDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapLdapserverScriptsCmYaml = []byte(`--- apiVersion: v1 kind: ConfigMap metadata: name: scripts data: run-openldap.sh: | #!/bin/bash -x # This script is the entrypoint for the openldap container. It configures and runs slapd. # Modified slightly from https://raw.githubusercontent.com/openshift/openldap/master/2.4.41/run-openldap.sh # Reduce maximum number of number of open file descriptors to 1024 # otherwise slapd consumes two orders of magnitude more of RAM # see https://github.com/docker/docker/issues/8231 ulimit -n 1024 OPENLDAP_ROOT_PASSWORD=${OPENLDAP_ROOT_PASSWORD:-admin} OPENLDAP_ROOT_DN_PREFIX=${OPENLDAP_ROOT_DN_PREFIX:-'cn=Manager'} OPENLDAP_ROOT_DN_SUFFIX=${OPENLDAP_ROOT_DN_SUFFIX:-'dc=example,dc=com'} OPENLDAP_DEBUG_LEVEL=${OPENLDAP_DEBUG_LEVEL:-256} # Only run if no config has happened fully before if [ ! -f /etc/openldap/CONFIGURED ]; then user=` + "`" + `id | grep -Po "(?<=uid=)\d+"` + "`" + ` if (( user == 0 )) then # We are root, we can use user input! # Bring in default databse config cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG # start the daemon in another process and make config changes slapd -h "ldap:/// ldaps:/// ldapi:///" -d $OPENLDAP_DEBUG_LEVEL & for ((i=30; i>0; i--)) do ping_result=` + "`" + `ldapsearch 2>&1 | grep "Can.t contact LDAP server"` + "`" + ` if [ -z "$ping_result" ] then break fi sleep 1 done if [ $i -eq 0 ] then echo "slapd did not start correctly" exit 1 fi # add useful schemas ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif -d $OPENLDAP_DEBUG_LEVEL ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif -d $OPENLDAP_DEBUG_LEVEL ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif -d $OPENLDAP_DEBUG_LEVEL ldapadd -Y EXTERNAL -H ldapi:/// -f /usr/local/etc/openldap/testPerson.ldif -d $OPENLDAP_DEBUG_LEVEL # domain and TLS setup ldapmodify -Y EXTERNAL -H ldapi:/// -f /usr/local/etc/ldapconf/domain_conf.ldif -d $OPENLDAP_DEBUG_LEVEL ldapmodify -Y EXTERNAL -H ldapi:/// -f /usr/local/etc/ldapconf/tls_conf.ldif -d $OPENLDAP_DEBUG_LEVEL # base and groupsync data ldapadd -x -D cn=Manager,dc=example,dc=com -w admin -f /usr/local/etc/ldapconf/base_conf.ldif -d $OPENLDAP_DEBUG_LEVEL ldapadd -x -D cn=Manager,dc=example,dc=com -w admin -f /usr/local/etc/ldapconf/groupsync.ldif -d $OPENLDAP_DEBUG_LEVEL # stop the daemon pid=$(ps -A | grep slapd | awk '{print $1}') kill -2 $pid || echo $? # ensure the daemon stopped for ((i=30; i>0; i--)) do exists=$(ps -A | grep $pid) if [ -z "${exists}" ] then break fi sleep 1 done if [ $i -eq 0 ] then echo "slapd did not stop correctly" exit 1 fi else # Something has gone wrong with our image build echo "FAILURE: Need to run pod as root" exit 1 fi # copy in ldap.conf cp /usr/local/etc/ldapconf/*.conf /etc/openldap/ # Test configuration files, log checksum errors. Errors may be tolerated and repaired by slapd so don't exit LOG=` + "`" + `slaptest 2>&1` + "`" + ` CHECKSUM_ERR=$(echo "${LOG}" | grep -Po "(?<=ldif_read_file: checksum error on \").+(?=\")") for err in $CHECKSUM_ERR do echo "The file ${err} has a checksum error. Ensure that this file is not edited manually, or re-calculate the checksum." done touch /etc/openldap/CONFIGURED fi # Start the slapd service exec slapd -h "ldap:/// ldapi:/// ldaps:///" -d $OPENLDAP_DEBUG_LEVEL `) func testExtendedTestdataLdapLdapserverScriptsCmYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapLdapserverScriptsCmYaml, nil } func testExtendedTestdataLdapLdapserverScriptsCmYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapLdapserverScriptsCmYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-scripts-cm.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLdapLdapserverServiceYaml = []byte(`--- kind: Service apiVersion: v1 metadata: name: openldap-server spec: ports: - name: ldap protocol: TCP port: 389 targetPort: 389 selector: app: openldap-server type: ClusterIP `) func testExtendedTestdataLdapLdapserverServiceYamlBytes() ([]byte, error) { return _testExtendedTestdataLdapLdapserverServiceYaml, nil } func testExtendedTestdataLdapLdapserverServiceYaml() (*asset, error) { bytes, err := testExtendedTestdataLdapLdapserverServiceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/ldap/ldapserver-service.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLong_namesDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27 CMD ["/bin/sh", "-c", "echo", "hello"] `) func testExtendedTestdataLong_namesDockerfileBytes() ([]byte, error) { return _testExtendedTestdataLong_namesDockerfile, nil } func testExtendedTestdataLong_namesDockerfile() (*asset, error) { bytes, err := testExtendedTestdataLong_namesDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/long_names/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataLong_namesFixtureJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890a", "labels": { "name": "12345678901234567890123456789012345678901234567890123456789012a" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "env": [], "sourceStrategy": { "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" } } } } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890b", "labels": { "name": "12345678901234567890123456789012345678901234567890123456789012b" } }, "spec": { "triggers": [], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "env": [], "sourceStrategy": { "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" } } } } } ] } `) func testExtendedTestdataLong_namesFixtureJsonBytes() ([]byte, error) { return _testExtendedTestdataLong_namesFixtureJson, nil } func testExtendedTestdataLong_namesFixtureJson() (*asset, error) { bytes, err := testExtendedTestdataLong_namesFixtureJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/long_names/fixture.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configKubeletconfigGckcYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: custom-gc-config spec: machineConfigPoolSelector: matchLabels: pools.operator.machineconfiguration.openshift.io/custom: "" kubeletConfig: imageMinimumGCAge: 1s imageGCHighThresholdPercent: 2 imageGCLowThresholdPercent: 1 `) func testExtendedTestdataMachine_configKubeletconfigGckcYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configKubeletconfigGckcYaml, nil } func testExtendedTestdataMachine_configKubeletconfigGckcYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configKubeletconfigGckcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/kubeletconfig/gcKC.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfig0InfraMcYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: infra name: 90-infra-testfile spec: config: ignition: version: 3.2.0 storage: files: - contents: source: data:,hello%20world%0A mode: 420 path: /home/core/test `) func testExtendedTestdataMachine_configMachineconfig0InfraMcYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfig0InfraMcYaml, nil } func testExtendedTestdataMachine_configMachineconfig0InfraMcYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfig0InfraMcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfig/0-infra-mc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfig0MasterMcYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: master name: 90-master-testfile spec: config: ignition: version: 3.2.0 storage: files: - contents: source: data:,hello%20world%0A mode: 420 path: /home/core/test `) func testExtendedTestdataMachine_configMachineconfig0MasterMcYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfig0MasterMcYaml, nil } func testExtendedTestdataMachine_configMachineconfig0MasterMcYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfig0MasterMcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfig/0-master-mc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfig1MasterInvalidMcYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: master name: 91-master-testfile-invalid spec: config: ignition: version: 3.2.0 storage: files: - contents: source: data:,hello%20world%0A mode: 420 path: /home/core `) func testExtendedTestdataMachine_configMachineconfig1MasterInvalidMcYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfig1MasterInvalidMcYaml, nil } func testExtendedTestdataMachine_configMachineconfig1MasterInvalidMcYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfig1MasterInvalidMcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfig/1-master-invalid-mc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfig1WorkerInvalidMcYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfig metadata: labels: machineconfiguration.openshift.io/role: worker name: 91-worker-testfile-invalid spec: config: ignition: version: 3.2.0 storage: files: - contents: source: data:,hello%20world%0A mode: 420 path: /home/core `) func testExtendedTestdataMachine_configMachineconfig1WorkerInvalidMcYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfig1WorkerInvalidMcYaml, nil } func testExtendedTestdataMachine_configMachineconfig1WorkerInvalidMcYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfig1WorkerInvalidMcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfig/1-worker-invalid-mc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfigpoolCustommcpYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfigPool metadata: name: custom labels: pools.operator.machineconfiguration.openshift.io/custom: "" spec: machineConfigSelector: matchExpressions: - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,custom]} nodeSelector: matchLabels: node-role.kubernetes.io/custom: "" `) func testExtendedTestdataMachine_configMachineconfigpoolCustommcpYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfigpoolCustommcpYaml, nil } func testExtendedTestdataMachine_configMachineconfigpoolCustommcpYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfigpoolCustommcpYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfigpool/customMCP.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfigpoolInfraMcpYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfigPool metadata: name: infra spec: machineConfigSelector: matchExpressions: - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,infra]} nodeSelector: matchLabels: node-role.kubernetes.io/infra: "" `) func testExtendedTestdataMachine_configMachineconfigpoolInfraMcpYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfigpoolInfraMcpYaml, nil } func testExtendedTestdataMachine_configMachineconfigpoolInfraMcpYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfigpoolInfraMcpYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfigpool/infra-mcp.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfigurationsManagedbootimagesEmptyYaml = []byte(`apiVersion: operator.openshift.io/v1 kind: MachineConfiguration metadata: name: cluster namespace: openshift-machine-config-operator spec: logLevel: Normal operatorLogLevel: Normal `) func testExtendedTestdataMachine_configMachineconfigurationsManagedbootimagesEmptyYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfigurationsManagedbootimagesEmptyYaml, nil } func testExtendedTestdataMachine_configMachineconfigurationsManagedbootimagesEmptyYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfigurationsManagedbootimagesEmptyYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfigurations/managedbootimages-empty.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configMachineconfigurationsNodedisruptionpolicyRebootlessPathYaml = []byte(`apiVersion: operator.openshift.io/v1 kind: MachineConfiguration metadata: name: cluster namespace: openshift-machine-config-operator spec: nodeDisruptionPolicy: files: - path: /home/core/test actions: - type: None `) func testExtendedTestdataMachine_configMachineconfigurationsNodedisruptionpolicyRebootlessPathYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configMachineconfigurationsNodedisruptionpolicyRebootlessPathYaml, nil } func testExtendedTestdataMachine_configMachineconfigurationsNodedisruptionpolicyRebootlessPathYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configMachineconfigurationsNodedisruptionpolicyRebootlessPathYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/machineconfigurations/nodedisruptionpolicy-rebootless-path.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimageCustomgcmcppisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "custom" spec: pinnedImages: - name: quay.io/openshifttest/busybox@sha256:c5439d7db88ab5423999530349d327b04279ad3161d7596d2126dfb5b02bfd1f `) func testExtendedTestdataMachine_configPinnedimageCustomgcmcppisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimageCustomgcmcppisYaml, nil } func testExtendedTestdataMachine_configPinnedimageCustomgcmcppisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimageCustomgcmcppisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/customGCMCPpis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimageCustominvalidpisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "custom" spec: pinnedImages: - name: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:86d26e7ebcccd6f07a75db5b1e56283b25c2ee1c6a755d6ffc5a4d59beb9cdef `) func testExtendedTestdataMachine_configPinnedimageCustominvalidpisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimageCustominvalidpisYaml, nil } func testExtendedTestdataMachine_configPinnedimageCustominvalidpisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimageCustominvalidpisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/customInvalidPis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimageCustommcppisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "custom" spec: pinnedImages: - name: quay.io/openshifttest/busybox@sha256:c5439d7db88ab5423999530349d327b04279ad3161d7596d2126dfb5b02bfd1f `) func testExtendedTestdataMachine_configPinnedimageCustommcppisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimageCustommcppisYaml, nil } func testExtendedTestdataMachine_configPinnedimageCustommcppisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimageCustommcppisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/customMCPpis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimageInvalidpisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "worker" spec: pinnedImages: - name: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:86d26e7ebcccd6f07a75db5b1e56283b25c2ee1c6a755d6ffc5a4d59beb9cdef `) func testExtendedTestdataMachine_configPinnedimageInvalidpisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimageInvalidpisYaml, nil } func testExtendedTestdataMachine_configPinnedimageInvalidpisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimageInvalidpisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/invalidPis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimageMasterinvalidpisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "master" spec: pinnedImages: - name: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:86d26e7ebcccd6f07a75db5b1e56283b25c2ee1c6a755d6ffc5a4d59beb9cdef `) func testExtendedTestdataMachine_configPinnedimageMasterinvalidpisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimageMasterinvalidpisYaml, nil } func testExtendedTestdataMachine_configPinnedimageMasterinvalidpisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimageMasterinvalidpisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/masterInvalidPis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimageMasterpisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "master" spec: pinnedImages: - name: quay.io/openshifttest/busybox@sha256:c5439d7db88ab5423999530349d327b04279ad3161d7596d2126dfb5b02bfd1f `) func testExtendedTestdataMachine_configPinnedimageMasterpisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimageMasterpisYaml, nil } func testExtendedTestdataMachine_configPinnedimageMasterpisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimageMasterpisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/masterPis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMachine_configPinnedimagePisYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: PinnedImageSet metadata: name: test-pinned labels: machineconfiguration.openshift.io/role: "worker" spec: pinnedImages: - name: quay.io/openshifttest/busybox@sha256:c5439d7db88ab5423999530349d327b04279ad3161d7596d2126dfb5b02bfd1f `) func testExtendedTestdataMachine_configPinnedimagePisYamlBytes() ([]byte, error) { return _testExtendedTestdataMachine_configPinnedimagePisYaml, nil } func testExtendedTestdataMachine_configPinnedimagePisYaml() (*asset, error) { bytes, err := testExtendedTestdataMachine_configPinnedimagePisYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/machine_config/pinnedimage/pis.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMarketplaceCsc02CscYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: csc-template objects: - apiVersion: operators.coreos.com/v1 kind: CatalogSourceConfig metadata: name: "${NAME}" namespace: "${MARKETPLACE}" spec: targetNamespace: "${NAMESPACE}" source: "" packages: "${PACKAGES}" csDisplayName: "${DISPLAYNAME}" csPublisher: "${PUBLISHER}" parameters: - name: NAME - name: NAMESPACE - name: MARKETPLACE - name: PACKAGES - name: DISPLAYNAME - name: PUBLISHER `) func testExtendedTestdataMarketplaceCsc02CscYamlBytes() ([]byte, error) { return _testExtendedTestdataMarketplaceCsc02CscYaml, nil } func testExtendedTestdataMarketplaceCsc02CscYaml() (*asset, error) { bytes, err := testExtendedTestdataMarketplaceCsc02CscYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/marketplace/csc/02-csc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMarketplaceOpsrc02OpsrcYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: opsrc-template objects: - apiVersion: operators.coreos.com/v1 kind: OperatorSource metadata: name: "${NAME}" namespace: "${MARKETPLACE}" labels: opsrc-provider: "${LABEL}" spec: type: appregistry endpoint: "https://quay.io/cnr" registryNamespace: "${NAMESPACE}" displayName: "${DISPLAYNAME}" publisher: "${PUBLISHER}" parameters: - name: NAME - name: NAMESPACE - name: MARKETPLACE - name: LABEL - name: DISPLAYNAME - name: PUBLISHER `) func testExtendedTestdataMarketplaceOpsrc02OpsrcYamlBytes() ([]byte, error) { return _testExtendedTestdataMarketplaceOpsrc02OpsrcYaml, nil } func testExtendedTestdataMarketplaceOpsrc02OpsrcYaml() (*asset, error) { bytes, err := testExtendedTestdataMarketplaceOpsrc02OpsrcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/marketplace/opsrc/02-opsrc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMixedApiVersionsYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: v1 kind: Secret metadata: annotations: description: v1 Secret - used to test v1 negotiation of k8s objects name: v1-secret - apiVersion: route.openshift.io/v1 kind: Route metadata: annotations: description: v1 Route - used to test v1 negotiation of origin objects name: v1-route spec: to: kind: Service name: test - apiVersion: batch/v1 kind: Job metadata: annotations: description: v1 Job - used to test v1 negotiation of group k8s objects name: v1-job spec: template: metadata: labels: run: v1-job spec: containers: - image: openshift/hello-openshift name: hello-container restartPolicy: Never - apiVersion: v1 kind: ConfigMap metadata: annotations: description: v1 ConfigMap - used to test v1 negotiation of k8s objects name: v1-configmap `) func testExtendedTestdataMixedApiVersionsYamlBytes() ([]byte, error) { return _testExtendedTestdataMixedApiVersionsYaml, nil } func testExtendedTestdataMixedApiVersionsYaml() (*asset, error) { bytes, err := testExtendedTestdataMixedApiVersionsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/mixed-api-versions.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMultiNamespacePipelineYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template labels: template: multi-namespace-pipeline metadata: annotations: iconClass: icon-jenkins tags: instant-app,jenkins name: parameters: - description: namespace displayName: namespace name: NAMESPACE value: namespace - description: namespace2 displayName: namespace2 name: NAMESPACE2 value: namespace2 - description: namespace3 displayName: namespace3 name: NAMESPACE3 value: namespace3 objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: name: multi-namespace-pipeline name: multi-namespace-pipeline spec: strategy: jenkinsPipelineStrategy: env: - name: NAMESPACE value: ${NAMESPACE} - name: NAMESPACE2 value: ${NAMESPACE2} - name: NAMESPACE3 value: ${NAMESPACE3} jenkinsfile: |- try { timeout(time: 20, unit: 'MINUTES') { // Select the default cluster openshift.withCluster() { // Select the default project openshift.withProject() { // Output the url of the currently selected cluster echo "Using project ${openshift.project()} in cluster with url ${openshift.cluster()}" template = openshift.create('https://raw.githubusercontent.com/openshift/origin/main/test/extended/testdata/multi-namespace-template.yaml').object() // Explore the Groovy object which models the OpenShift template as a Map echo "Template contains ${template.parameters.size()} parameters" // Process the modeled template. We could also pass JSON/YAML, a template name, or a url instead. def objectModels = openshift.process( template, "-p", "NAMESPACE=${env.NAMESPACE}", "-p", "NAMESPACE2=${env.NAMESPACE2}", "-p", "NAMESPACE3=${env.NAMESPACE3}" ) // objectModels is a list of objects the template defined, modeled as Groovy objects echo "The template references ${objectModels.size()} objects" def objects = openshift.create(objectModels) // Create returns a selector which will always select the objects created objects.withEach { // Each loop binds the variable 'it' to a selector which selects a single object echo "Created ${it.name()} from template with labels ${it.object().metadata.labels}" } } } } } catch (err) { echo "in catch block" echo "Caught: ${err}" currentBuild.result = 'FAILURE' throw err } type: JenkinsPipeline `) func testExtendedTestdataMultiNamespacePipelineYamlBytes() ([]byte, error) { return _testExtendedTestdataMultiNamespacePipelineYaml, nil } func testExtendedTestdataMultiNamespacePipelineYaml() (*asset, error) { bytes, err := testExtendedTestdataMultiNamespacePipelineYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/multi-namespace-pipeline.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMultiNamespaceTemplateYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: mariadb-ephemeral creationTimestamp: null annotations: description: |- MariaDB database service, without persistent storage. For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md. WARNING: Any data stored will be lost upon pod destruction. Only use this template for testing iconClass: icon-mariadb openshift.io/display-name: MariaDB (Ephemeral) openshift.io/documentation-url: https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md openshift.io/long-description: This template provides a standalone MariaDB server with a database created. The database is not stored on persistent storage, so any restart of the service will result in all data being lost. The database name, username, and password are chosen via parameters when provisioning this service. openshift.io/provider-display-name: Red Hat, Inc. openshift.io/support-url: https://access.redhat.com tags: database,mariadb message: |- The following service(s) have been created in your project: ${DATABASE_SERVICE_NAME}. Username: ${MYSQL_USER} Password: ${MYSQL_PASSWORD} Database Name: ${MYSQL_DATABASE} Connection URL: mysql://${DATABASE_SERVICE_NAME}:3306/ For more information about using this template, including OpenShift considerations, see https://github.com/sclorg/mariadb-container/blob/master/10.3/root/usr/share/container-scripts/mysql/README.md. objects: - apiVersion: v1 kind: Secret metadata: annotations: template.openshift.io/expose-database_name: '{.data[''database-name'']}' template.openshift.io/expose-password: '{.data[''database-password'']}' template.openshift.io/expose-root_password: '{.data[''database-root-password'']}' template.openshift.io/expose-username: '{.data[''database-user'']}' name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE2} stringData: database-name: ${MYSQL_DATABASE} database-password: ${MYSQL_PASSWORD} database-root-password: ${MYSQL_ROOT_PASSWORD} database-user: ${MYSQL_USER} - apiVersion: v1 kind: Service metadata: annotations: template.openshift.io/expose-uri: mysql://{.spec.clusterIP}:{.spec.ports[?(.name=="mariadb")].port} name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE3} spec: ports: - name: mariadb port: 3306 selector: name: ${DATABASE_SERVICE_NAME} - apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: annotations: template.alpha.openshift.io/wait-for-ready: "true" name: ${DATABASE_SERVICE_NAME} namespace: ${NAMESPACE2} spec: replicas: 1 selector: name: ${DATABASE_SERVICE_NAME} strategy: type: Recreate template: metadata: labels: name: ${DATABASE_SERVICE_NAME} spec: containers: - env: - name: MYSQL_USER valueFrom: secretKeyRef: key: database-user name: ${DATABASE_SERVICE_NAME} - name: MYSQL_PASSWORD valueFrom: secretKeyRef: key: database-password name: ${DATABASE_SERVICE_NAME} - name: MYSQL_ROOT_PASSWORD valueFrom: secretKeyRef: key: database-root-password name: ${DATABASE_SERVICE_NAME} - name: MYSQL_DATABASE valueFrom: secretKeyRef: key: database-name name: ${DATABASE_SERVICE_NAME} image: ' ' imagePullPolicy: IfNotPresent livenessProbe: exec: command: - /bin/sh - -i - -c - MYSQL_PWD="$MYSQL_PASSWORD" mysqladmin -u $MYSQL_USER ping initialDelaySeconds: 30 timeoutSeconds: 1 name: mariadb ports: - containerPort: 3306 readinessProbe: exec: command: - /bin/sh - -i - -c - MYSQL_PWD="$MYSQL_PASSWORD" mysqladmin -u $MYSQL_USER ping initialDelaySeconds: 5 timeoutSeconds: 1 resources: limits: memory: ${MEMORY_LIMIT} volumeMounts: - mountPath: /var/lib/mysql/data name: ${DATABASE_SERVICE_NAME}-data volumes: - emptyDir: medium: "" name: ${DATABASE_SERVICE_NAME}-data triggers: - imageChangeParams: automatic: true containerNames: - mariadb from: kind: ImageStreamTag name: mariadb:${MARIADB_VERSION} namespace: ${NAMESPACE} type: ImageChange - type: ConfigChange parameters: - name: MEMORY_LIMIT displayName: Memory Limit description: Maximum amount of memory the container can use. value: 512Mi required: true - name: NAMESPACE displayName: Namespace description: The OpenShift Namespace where the ImageStream resides. value: openshift - name: NAMESPACE2 displayName: Namespace2 description: The OpenShift Namespace where the DeploymentConfig will reside. value: ggm-namespace - name: NAMESPACE3 displayName: Namespace3 description: The OpenShift Namespace where the Service will reside. value: myproject - name: DATABASE_SERVICE_NAME displayName: Database Service Name description: The name of the OpenShift Service exposed for the database. value: mariadb required: true - name: MYSQL_USER displayName: MariaDB Connection Username description: Username for MariaDB user that will be used for accessing the database. generate: expression from: user[A-Z0-9]{3} required: true - name: MYSQL_PASSWORD displayName: MariaDB Connection Password description: Password for the MariaDB connection user. generate: expression from: '[a-zA-Z0-9]{16}' required: true - name: MYSQL_ROOT_PASSWORD displayName: MariaDB root Password description: Password for the MariaDB root user. generate: expression from: '[a-zA-Z0-9]{16}' required: true - name: MYSQL_DATABASE displayName: MariaDB Database Name description: Name of the MariaDB database accessed. value: sampledb required: true - name: MARIADB_VERSION displayName: Version of MariaDB Image description: Version of MariaDB image to be used (10.3-el7, 10.3-el8, or latest). value: 10.3-el8 required: true labels: template: mariadb-ephemeral-template `) func testExtendedTestdataMultiNamespaceTemplateYamlBytes() ([]byte, error) { return _testExtendedTestdataMultiNamespaceTemplateYaml, nil } func testExtendedTestdataMultiNamespaceTemplateYaml() (*asset, error) { bytes, err := testExtendedTestdataMultiNamespaceTemplateYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/multi-namespace-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataMultinetpolicyDenyIngressPodAYml = []byte(`apiVersion: k8s.cni.cncf.io/v1beta1 kind: MultiNetworkPolicy metadata: generateName: deny-ingress-pod-a annotations: k8s.v1.cni.cncf.io/policy-for: macvlan1-nad spec: podSelector: matchLabels: pod: a policyTypes: - Ingress ingress: [] `) func testExtendedTestdataMultinetpolicyDenyIngressPodAYmlBytes() ([]byte, error) { return _testExtendedTestdataMultinetpolicyDenyIngressPodAYml, nil } func testExtendedTestdataMultinetpolicyDenyIngressPodAYml() (*asset, error) { bytes, err := testExtendedTestdataMultinetpolicyDenyIngressPodAYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/multinetpolicy/deny-ingress-pod-a.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNetAttachDefsBridgeNadYml = []byte(`apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: bridge-nad spec: config: '{ "name": "multustestbridge", "type": "bridge", "bridge": "multustestbr0", "isDefaultGateway": true, "forceAddress": false, "ipMasq": true, "hairpinMode": true, "ipam": { "type": "static", "addresses": [{"address": "10.10.0.1/24"}] } }'`) func testExtendedTestdataNetAttachDefsBridgeNadYmlBytes() ([]byte, error) { return _testExtendedTestdataNetAttachDefsBridgeNadYml, nil } func testExtendedTestdataNetAttachDefsBridgeNadYml() (*asset, error) { bytes, err := testExtendedTestdataNetAttachDefsBridgeNadYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/net-attach-defs/bridge-nad.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNetAttachDefsMacvlanNadYml = []byte(`apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: macvlan1-nad spec: config: '{ "cniVersion": "0.3.1", "name": "macvlan1-nad", "plugins": [ { "type": "macvlan", "capabilities": { "ips": true }, "mode": "bridge", "ipam": { "type": "static" } }] }'`) func testExtendedTestdataNetAttachDefsMacvlanNadYmlBytes() ([]byte, error) { return _testExtendedTestdataNetAttachDefsMacvlanNadYml, nil } func testExtendedTestdataNetAttachDefsMacvlanNadYml() (*asset, error) { bytes, err := testExtendedTestdataNetAttachDefsMacvlanNadYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/net-attach-defs/macvlan-nad.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNetAttachDefsWhereaboutsNadYml = []byte(`apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: wa-conf spec: config: '{ "cniVersion": "0.3.0", "name": "whereaboutstestbridge", "type": "bridge", "bridge": "watestbr0", "isDefaultGateway": true, "forceAddress": false, "ipMasq": true, "hairpinMode": true, "ipam": { "type": "whereabouts", "range": "192.168.2.225/29", "exclude": [ "192.168.2.225/30" ], "log_file": "/tmp/whereabouts.log", "log_level": "debug" } }'`) func testExtendedTestdataNetAttachDefsWhereaboutsNadYmlBytes() ([]byte, error) { return _testExtendedTestdataNetAttachDefsWhereaboutsNadYml, nil } func testExtendedTestdataNetAttachDefsWhereaboutsNadYml() (*asset, error) { bytes, err := testExtendedTestdataNetAttachDefsWhereaboutsNadYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/net-attach-defs/whereabouts-nad.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNetAttachDefsWhereaboutsRaceAwakeYml = []byte(`apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: wa-awake-conf spec: config: '{ "cniVersion": "0.3.0", "name": "whereaboutsexample", "type": "bridge", "bridge": "watestbr1", "isDefaultGateway": true, "forceAddress": false, "ipMasq": true, "hairpinMode": true, "ipam": { "type": "whereabouts", "range": "192.168.2.240/28", "log_file": "/tmp/whereabouts.log", "log_level": "debug" } }' `) func testExtendedTestdataNetAttachDefsWhereaboutsRaceAwakeYmlBytes() ([]byte, error) { return _testExtendedTestdataNetAttachDefsWhereaboutsRaceAwakeYml, nil } func testExtendedTestdataNetAttachDefsWhereaboutsRaceAwakeYml() (*asset, error) { bytes, err := testExtendedTestdataNetAttachDefsWhereaboutsRaceAwakeYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/net-attach-defs/whereabouts-race-awake.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNetAttachDefsWhereaboutsRaceSleepyYml = []byte(`apiVersion: "k8s.cni.cncf.io/v1" kind: NetworkAttachmentDefinition metadata: name: wa-sleepy-conf spec: config: '{ "cniVersion": "0.3.0", "name": "whereaboutsexample", "type": "bridge", "bridge": "watestbr1", "isDefaultGateway": true, "forceAddress": false, "ipMasq": true, "hairpinMode": true, "ipam": { "type": "whereabouts", "sleep_for_race": 5, "range": "192.168.2.240/28", "log_file": "/tmp/whereabouts.log", "log_level": "debug" } }'`) func testExtendedTestdataNetAttachDefsWhereaboutsRaceSleepyYmlBytes() ([]byte, error) { return _testExtendedTestdataNetAttachDefsWhereaboutsRaceSleepyYml, nil } func testExtendedTestdataNetAttachDefsWhereaboutsRaceSleepyYml() (*asset, error) { bytes, err := testExtendedTestdataNetAttachDefsWhereaboutsRaceSleepyYmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/net-attach-defs/whereabouts-race-sleepy.yml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeCnvSwapCnvHyperconvergedYaml = []byte(`apiVersion: hco.kubevirt.io/v1beta1 kind: HyperConverged metadata: name: kubevirt-hyperconverged namespace: openshift-cnv spec: BareMetalPlatform: true infra: {} workloads: {} `) func testExtendedTestdataNodeCnvSwapCnvHyperconvergedYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeCnvSwapCnvHyperconvergedYaml, nil } func testExtendedTestdataNodeCnvSwapCnvHyperconvergedYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeCnvSwapCnvHyperconvergedYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/cnv-swap/cnv-hyperconverged.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeCnvSwapCnvNamespaceYaml = []byte(`apiVersion: v1 kind: Namespace metadata: name: openshift-cnv labels: openshift.io/cluster-monitoring: "true" `) func testExtendedTestdataNodeCnvSwapCnvNamespaceYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeCnvSwapCnvNamespaceYaml, nil } func testExtendedTestdataNodeCnvSwapCnvNamespaceYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeCnvSwapCnvNamespaceYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/cnv-swap/cnv-namespace.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeCnvSwapCnvOperatorgroupYaml = []byte(`apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: kubevirt-hyperconverged-group namespace: openshift-cnv spec: targetNamespaces: - openshift-cnv `) func testExtendedTestdataNodeCnvSwapCnvOperatorgroupYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeCnvSwapCnvOperatorgroupYaml, nil } func testExtendedTestdataNodeCnvSwapCnvOperatorgroupYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeCnvSwapCnvOperatorgroupYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/cnv-swap/cnv-operatorgroup.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeCnvSwapCnvSubscriptionYaml = []byte(`apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: hco-operatorhub namespace: openshift-cnv spec: source: redhat-operators sourceNamespace: openshift-marketplace name: kubevirt-hyperconverged channel: "stable" installPlanApproval: Automatic # Uncomment to pin to a specific version: # startingCSV: kubevirt-hyperconverged-operator.v4.17.0 `) func testExtendedTestdataNodeCnvSwapCnvSubscriptionYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeCnvSwapCnvSubscriptionYaml, nil } func testExtendedTestdataNodeCnvSwapCnvSubscriptionYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeCnvSwapCnvSubscriptionYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/cnv-swap/cnv-subscription.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeCnvSwapKubeletLimitedswapDropinYaml = []byte(`# Kubelet drop-in configuration for LimitedSwap # Place this file at: /etc/openshift/kubelet.conf.d/99-kubelet-limited-swap.conf apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration memorySwap: swapBehavior: LimitedSwap `) func testExtendedTestdataNodeCnvSwapKubeletLimitedswapDropinYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeCnvSwapKubeletLimitedswapDropinYaml, nil } func testExtendedTestdataNodeCnvSwapKubeletLimitedswapDropinYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeCnvSwapKubeletLimitedswapDropinYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/cnv-swap/kubelet-limitedswap-dropin.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeCnvSwapKubeletNoswapDropinYaml = []byte(`# Kubelet drop-in configuration for NoSwap (default behavior) # Place this file at: /etc/openshift/kubelet.conf.d/99-kubelet-no-swap.conf apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration memorySwap: swapBehavior: NoSwap `) func testExtendedTestdataNodeCnvSwapKubeletNoswapDropinYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeCnvSwapKubeletNoswapDropinYaml, nil } func testExtendedTestdataNodeCnvSwapKubeletNoswapDropinYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeCnvSwapKubeletNoswapDropinYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/cnv-swap/kubelet-noswap-dropin.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeKubeletconfigLoggingkcYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: KubeletConfig metadata: name: custom-logging-config spec: machineConfigPoolSelector: matchLabels: pools.operator.machineconfiguration.openshift.io/custom: "" kubeletConfig: logging: verbosity: 4 `) func testExtendedTestdataNodeKubeletconfigLoggingkcYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeKubeletconfigLoggingkcYaml, nil } func testExtendedTestdataNodeKubeletconfigLoggingkcYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeKubeletconfigLoggingkcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/kubeletconfig/loggingKC.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeMachineconfigpoolCustommcpYaml = []byte(`apiVersion: machineconfiguration.openshift.io/v1 kind: MachineConfigPool metadata: name: custom labels: pools.operator.machineconfiguration.openshift.io/custom: "" spec: machineConfigSelector: matchExpressions: - {key: machineconfiguration.openshift.io/role, operator: In, values: [worker,custom]} nodeSelector: matchLabels: node-role.kubernetes.io/custom: "" `) func testExtendedTestdataNodeMachineconfigpoolCustommcpYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeMachineconfigpoolCustommcpYaml, nil } func testExtendedTestdataNodeMachineconfigpoolCustommcpYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeMachineconfigpoolCustommcpYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/machineconfigpool/customMCP.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeNested_containerDockerfile = []byte(`FROM registry.fedoraproject.org/fedora:41 ARG VERSION=v5.4.0 # TODO: rpm --setcaps... needed due to Fedora (base) image builds # being (maybe still?) affected by # https://bugzilla.redhat.com/show_bug.cgi?id=1995337#c3 RUN dnf -y makecache && \ dnf -y update && \ rpm --setcaps shadow-utils 2>/dev/null && \ dnf -y install \ awk \ podman \ fuse-overlayfs \ openssh-clients \ ucpp \ bats \ buildah \ file \ git \ go \ gpgme-devel \ htpasswd \ jq \ libseccomp-devel \ make \ nc \ openssl \ procps \ python-yaml \ skopeo \ slirp4netns \ socat \ ss \ timeout \ --exclude container-selinux && \ ln -s /usr/bin/ucpp /usr/local/bin/cpp && \ dnf clean all && \ rm -rf /var/cache /var/log/dnf* /var/log/yum.* RUN useradd podman && \ echo -e "podman:1:999\npodman:1001:64535" > /etc/subuid && \ echo -e "podman:1:999\npodman:1001:64535" > /etc/subgid ADD /containers.conf /etc/containers/containers.conf RUN mkdir -p /home/podman/.local/share/containers && \ chown podman:podman -R /home/podman && \ chmod 644 /etc/containers/containers.conf # Copy & modify the defaults to provide reference if runtime changes needed. # Changes here are required for running with fuse-overlay storage inside container. RUN sed -e 's|^#mount_program|mount_program|g' \ -e '/additionalimage.*/a "/var/lib/shared",' \ -e 's|^mountopt[[:space:]]*=.*$|mountopt = "nodev,fsync=0"|g' \ /usr/share/containers/storage.conf \ > /etc/containers/storage.conf RUN mkdir -p /run/user/1000 && chown podman:podman $_ USER podman RUN mkdir -p /home/podman/go/src/github.com/containers && \ cd $_ && \ git clone --depth=1 --branch ${VERSION} https://github.com/containers/podman && \ cd podman && \ make bin/podman-testing bin/podman WORKDIR /home/podman/go/src/github.com/containers/podman COPY --chown=podman:podman --chmod=755 skip_tests.sh skip_tests.sh RUN ./skip_tests.sh COPY --chown=podman:podman --chmod=755 run_tests.sh run_tests.sh ENTRYPOINT ["/usr/libexec/podman/catatonit", "--"] CMD [ "./run_tests.sh" ]`) func testExtendedTestdataNodeNested_containerDockerfileBytes() ([]byte, error) { return _testExtendedTestdataNodeNested_containerDockerfile, nil } func testExtendedTestdataNodeNested_containerDockerfile() (*asset, error) { bytes, err := testExtendedTestdataNodeNested_containerDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/nested_container/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeNested_containerContainersConf = []byte(`[containers] netns="private" userns="host" ipcns="shareable" utsns="private" cgroupns="private" cgroups="enabled" log_driver = "k8s-file" volumes = [ "/proc:/proc", "/sys:/sys", ] default_sysctls = [] [engine] cgroup_manager = "cgroupfs" events_logger="file" runtime="crun"`) func testExtendedTestdataNodeNested_containerContainersConfBytes() ([]byte, error) { return _testExtendedTestdataNodeNested_containerContainersConf, nil } func testExtendedTestdataNodeNested_containerContainersConf() (*asset, error) { bytes, err := testExtendedTestdataNodeNested_containerContainersConfBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/nested_container/containers.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeNested_containerRun_testsSh = []byte(`#!/usr/bin/env bash mkdir -p serial-junit PODMAN=$(pwd)/bin/podman bats -T --report-formatter junit -o serial-junit --filter-tags '!ci:parallel' test/system/ || touch fail mkdir -p parallel-junit PODMAN=$(pwd)/bin/podman bats -T --report-formatter junit -o parallel-junit --filter-tags ci:parallel -j $(nproc) test/system/ || touch fail touch done echo "Finished running tests." # wait for the test results to be retrieved tail -f /dev/null `) func testExtendedTestdataNodeNested_containerRun_testsShBytes() ([]byte, error) { return _testExtendedTestdataNodeNested_containerRun_testsSh, nil } func testExtendedTestdataNodeNested_containerRun_testsSh() (*asset, error) { bytes, err := testExtendedTestdataNodeNested_containerRun_testsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/nested_container/run_tests.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeNested_containerSkip_testsSh = []byte(`#!/usr/bin/env bash set -e TEST_DIR=test/system function insert_skip { file=$1 testcase=$2 # escape slash testcase=$(echo $testcase | sed 's/\//\\\//g') echo $testcase sed -i "/$testcase/a\ skip 'not working in cri-o'" "$TEST_DIR/$file" } # cannot pause without cgroup, and no cgroup in rootless container rm $TEST_DIR/080-pause.bats # systemd rm $TEST_DIR/250-systemd.bats rm $TEST_DIR/251-system-service.bats rm $TEST_DIR/252-quadlet.bats rm $TEST_DIR/255-auto-update.bats rm $TEST_DIR/270-socket-activation.bats # broken tests https://github.com/containers/podman/commit/c65bb903b63c60a1ef2ccd3c21e118c4784d2f6b#diff-78c7444aee8aa212e7101395b618015dec2d5d1eab06fb7de2a8ecdf7418cde4 insert_skip 030-run.bats 'podman run - basic tests' insert_skip 030-run.bats 'podman run - no entrypoint' # Error: retrieving label for image "a6b6f7ac212ddfdb879e9b9c4df1655c9b07ead8b028110e657364485c577bff": you may need to remove the image to resolve the error: fallback error checking whether image is a manifest list: choosing image instance: no image found in manifest list for architecture "amd64", variant "", OS "linux": choosing image instance: no image found in manifest list for architecture "amd64", variant "", OS "linux" insert_skip 012-manifest.bats "podman images - bare manifest" # There is only one tty - /dev/tty insert_skip 030-run.bats 'podman run --privileged as rootless will not mount /dev/tty\\d+' # systemd can't run in nested container insert_skip 030-run.bats "podman run - /run must not be world-writable in systemd containers" # Error: OCI runtime error: crun: write to ` + "`" + `/proc/self/oom_score_adj` + "`" + `: Invalid argument insert_skip 030-run.bats "podman run doesn't override oom-score-adj" # flaky https://issues.redhat.com/browse/OCPBUGS-77991?focusedId=29224925&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-29224925 insert_skip 070-build.bats "podman build - URLs" # flaky insert_skip 090-events.bats "image events" # mount not shown insert_skip 160-volumes.bats "podman run --volumes : basic" # ping: permission denied (are you root?) insert_skip 200-pod.bats "podman pod create - hashtag AllTheOptions" # /home/podman/go/src/github.com/containers/podman/test/system/helpers.bash: line 1117: /usr/bin/expr: Argument list too long insert_skip 200-pod.bats "podman pod top - containers in different PID namespaces" # flaky insert_skip 320-system-df.bats "podman system df --format json functionality" # FAIL: Pause process 42825 is still running even after podman system migrate insert_skip 550-pause-process.bats "rootless podman only ever uses single pause process" # Error: cannot remove container 31261d3890fe98a254b9fc2eb219753bc28df05efdf22c0f34222c33a2185a27 as it could not be stopped: given PID did not die within timeout insert_skip 065-cp.bats "podman cp file from/to host while --pid=host" insert_skip 195-run-namespaces.bats "podman test all namespaces" # userns insert_skip 170-run-userns.bats "podman userns=auto in config file" insert_skip 170-run-userns.bats "podman userns=auto and secrets" insert_skip 170-run-userns.bats "podman userns=auto with id mapping" insert_skip 700-play.bats "podman kube restore user namespace" # usernamespace # # won't fix # cat: /proc/sys/net/core/wmem_default: No such file or directory # https://github.com/moby/moby/issues/30778 insert_skip 505-networking-pasta.bats "UDP/IPv4 large transfer, tap" insert_skip 505-networking-pasta.bats "UDP/IPv4 large transfer, loopback" insert_skip 505-networking-pasta.bats "UDP/IPv6 large transfer, tap" insert_skip 505-networking-pasta.bats "UDP/IPv6 large transfer, loopback" # healthcheck insert_skip 055-rm.bats "podman container rm doesn't affect stopping containers" insert_skip 055-rm.bats "podman container rm --force doesn't leave running processes" insert_skip 220-healthcheck.bats "podman healthcheck" insert_skip 700-play.bats "podman kube play healthcheck should wait initialDelaySeconds before updating status" # cgroup # cannot pause the container without a cgroup # https://github.com/containers/podman/issues/12782 insert_skip 200-pod.bats "podman pod cleans cgroup and keeps limits" # opening file ` + "`" + `memory.max` + "`" + ` for writing: Permission denied insert_skip 280-update.bats "podman update - test all options" insert_skip 280-update.bats "podman update - resources on update are not changed unless requested" insert_skip 600-completion.bats "podman shell completion test" # systemd insert_skip 030-run.bats "podman run --log-driver" # FAIL: podman logs, with driver 'journald' insert_skip 035-logs.bats "podman logs - tail test, journald" insert_skip 035-logs.bats "podman logs - multi journald" insert_skip 035-logs.bats "podman logs restarted journald" insert_skip 035-logs.bats "podman logs - since journald" insert_skip 035-logs.bats "podman logs - until journald" insert_skip 035-logs.bats "podman logs - --follow journald" insert_skip 035-logs.bats "podman logs - --since --follow journald" insert_skip 035-logs.bats "podman logs - --until --follow journald" insert_skip 035-logs.bats "podman logs - journald log driver requires journald events backend" insert_skip 090-events.bats "events with disjunctive filters - journald" insert_skip 090-events.bats "events with file backend and journald logdriver with --follow failure" insert_skip 090-events.bats "events - container inspect data - journald" insert_skip 220-healthcheck.bats "podman healthcheck --health-log-destination journal" insert_skip 420-cgroups.bats "podman run, preserves initial --cgroup-manager" # Replace ` + "`" + `mount` + "`" + ` with /proc/self/mounts — BusyBox mount truncates output # when /proc/self/mounts entries exceed ~1008 bytes # https://redhat.atlassian.net/browse/OCPBUGS-88742?focusedCommentId=17458910 sed -i 's#mount | grep /tmp#grep /tmp /proc/self/mounts#' $TEST_DIR/700-play.bats `) func testExtendedTestdataNodeNested_containerSkip_testsShBytes() ([]byte, error) { return _testExtendedTestdataNodeNested_containerSkip_testsSh, nil } func testExtendedTestdataNodeNested_containerSkip_testsSh() (*asset, error) { bytes, err := testExtendedTestdataNodeNested_containerSkip_testsShBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/nested_container/skip_tests.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNodeNode_e2ePodDevFuseYaml = []byte(`apiVersion: v1 kind: Pod metadata: name: pod-devfuse annotations: io.kubernetes.cri-o.Devices: "/dev/fuse" spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault containers: - name: pod-devfuse image: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest command: ["sleep", "infinity"] securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL `) func testExtendedTestdataNodeNode_e2ePodDevFuseYamlBytes() ([]byte, error) { return _testExtendedTestdataNodeNode_e2ePodDevFuseYaml, nil } func testExtendedTestdataNodeNode_e2ePodDevFuseYaml() (*asset, error) { bytes, err := testExtendedTestdataNodeNode_e2ePodDevFuseYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node/node_e2e/pod-dev-fuse.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataNode_tuningNtoStalldYaml = []byte(`apiVersion: tuned.openshift.io/v1 kind: Tuned metadata: name: openshift-stalld namespace: openshift-cluster-node-tuning-operator spec: profile: - data: | [main] summary=Custom OpenShift profile include=openshift-node,realtime [sysctl] kernel.sched_rt_runtime_us = -1 [service] service.stalld=start,enable name: openshift-stalld recommend: - match: - label: node-role.kubernetes.io/worker-stalld priority: 20 profile: openshift-stalld `) func testExtendedTestdataNode_tuningNtoStalldYamlBytes() ([]byte, error) { return _testExtendedTestdataNode_tuningNtoStalldYaml, nil } func testExtendedTestdataNode_tuningNtoStalldYaml() (*asset, error) { bytes, err := testExtendedTestdataNode_tuningNtoStalldYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/node_tuning/nto-stalld.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataOauthserverCabundleCmYaml = []byte(`apiVersion: v1 kind: ConfigMap metadata: annotations: service.beta.openshift.io/inject-cabundle: "true" labels: app: test-oauth-server name: service-ca `) func testExtendedTestdataOauthserverCabundleCmYamlBytes() ([]byte, error) { return _testExtendedTestdataOauthserverCabundleCmYaml, nil } func testExtendedTestdataOauthserverCabundleCmYaml() (*asset, error) { bytes, err := testExtendedTestdataOauthserverCabundleCmYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/oauthserver/cabundle-cm.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataOauthserverOauthNetworkYaml = []byte(`apiVersion: v1 kind: Service metadata: annotations: service.alpha.openshift.io/serving-cert-secret-name: serving-cert labels: app: test-oauth-server name: test-oauth-svc spec: ports: - name: https port: 443 protocol: TCP targetPort: 6443 selector: app: test-oauth-server type: ClusterIP --- apiVersion: route.openshift.io/v1 kind: Route metadata: labels: app: test-oauth-server name: test-oauth-route spec: port: targetPort: 6443 tls: insecureEdgeTerminationPolicy: Redirect termination: passthrough to: kind: Service name: test-oauth-svc weight: 100 wildcardPolicy: None `) func testExtendedTestdataOauthserverOauthNetworkYamlBytes() ([]byte, error) { return _testExtendedTestdataOauthserverOauthNetworkYaml, nil } func testExtendedTestdataOauthserverOauthNetworkYaml() (*asset, error) { bytes, err := testExtendedTestdataOauthserverOauthNetworkYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/oauthserver/oauth-network.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataOauthserverOauthPodYaml = []byte(`apiVersion: v1 kind: Pod metadata: labels: app: test-oauth-server name: test-oauth-server spec: containers: - command: - oauth-server - osinserver - --config=/var/config/system/configmaps/oauth-config/oauth.conf - --v=100 image: quay.io/openshift/origin-oauth-server:latest imagePullPolicy: IfNotPresent name: oauth-server ports: - containerPort: 6443 name: https protocol: TCP readinessProbe: failureThreshold: 3 httpGet: path: /healthz port: 6443 scheme: HTTPS initialDelaySeconds: 5 periodSeconds: 10 successThreshold: 1 timeoutSeconds: 1 resources: requests: cpu: 10m memory: 50Mi securityContext: capabilities: drop: - MKNOD procMount: Default volumeMounts: - mountPath: /var/config/system/secrets/session-secret name: session-secret readOnly: true - mountPath: /var/config/system/configmaps/oauth-config name: oauth-config readOnly: true - mountPath: /var/config/system/secrets/serving-cert name: serving-cert readOnly: true - mountPath: /var/config/system/secrets/router-certs name: router-certs readOnly: true - mountPath: /var/config/system/configmaps/service-ca name: service-ca readOnly: true serviceAccountName: e2e-oauth volumes: - configMap: defaultMode: 420 items: - key: oauth.conf path: oauth.conf name: oauth-config name: oauth-config - name: session-secret secret: defaultMode: 420 items: - key: session path: session secretName: session-secret - name: serving-cert secret: defaultMode: 420 items: - key: tls.crt path: tls.crt - key: tls.key path: tls.key secretName: serving-cert - name: router-certs secret: defaultMode: 420 secretName: router-certs - configMap: defaultMode: 420 items: - key: service-ca.crt path: service-ca.crt name: service-ca name: service-ca `) func testExtendedTestdataOauthserverOauthPodYamlBytes() ([]byte, error) { return _testExtendedTestdataOauthserverOauthPodYaml, nil } func testExtendedTestdataOauthserverOauthPodYaml() (*asset, error) { bytes, err := testExtendedTestdataOauthserverOauthPodYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/oauthserver/oauth-pod.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataOauthserverOauthSaYaml = []byte(`apiVersion: v1 kind: ServiceAccount metadata: name: e2e-oauth labels: app: test-oauth-server `) func testExtendedTestdataOauthserverOauthSaYamlBytes() ([]byte, error) { return _testExtendedTestdataOauthserverOauthSaYaml, nil } func testExtendedTestdataOauthserverOauthSaYaml() (*asset, error) { bytes, err := testExtendedTestdataOauthserverOauthSaYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/oauthserver/oauth-sa.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataOlmOperatorgroupYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: operatorgroup-template objects: - kind: OperatorGroup apiVersion: operators.coreos.com/v1 metadata: name: "${NAME}" namespace: "${NAMESPACE}" parameters: - name: NAME - name: NAMESPACE `) func testExtendedTestdataOlmOperatorgroupYamlBytes() ([]byte, error) { return _testExtendedTestdataOlmOperatorgroupYaml, nil } func testExtendedTestdataOlmOperatorgroupYaml() (*asset, error) { bytes, err := testExtendedTestdataOlmOperatorgroupYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/olm/operatorgroup.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataOlmSubscriptionYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: subscription-template objects: - apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: "${NAME}" namespace: "${NAMESPACE}" spec: installPlanApproval: Automatic channel: "${CHANNEL}" name: "${PACKAGE}" source: "${SOURCENAME}" sourceNamespace: "${SOURCENAMESPACE}" parameters: - name: NAME - name: NAMESPACE - name: SOURCENAME - name: SOURCENAMESPACE - name: PACKAGE - name: CHANNEL `) func testExtendedTestdataOlmSubscriptionYamlBytes() ([]byte, error) { return _testExtendedTestdataOlmSubscriptionYaml, nil } func testExtendedTestdataOlmSubscriptionYaml() (*asset, error) { bytes, err := testExtendedTestdataOlmSubscriptionYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/olm/subscription.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataPoddisruptionbudgetsAlwaysAllowPolicyPdbYaml = []byte(`--- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: always-allow-policy spec: maxUnavailable: 1 unhealthyPodEvictionPolicy: AlwaysAllow selector: matchLabels: app: nginx-with-delayed-ready `) func testExtendedTestdataPoddisruptionbudgetsAlwaysAllowPolicyPdbYamlBytes() ([]byte, error) { return _testExtendedTestdataPoddisruptionbudgetsAlwaysAllowPolicyPdbYaml, nil } func testExtendedTestdataPoddisruptionbudgetsAlwaysAllowPolicyPdbYaml() (*asset, error) { bytes, err := testExtendedTestdataPoddisruptionbudgetsAlwaysAllowPolicyPdbYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/poddisruptionbudgets/always-allow-policy-pdb.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataPoddisruptionbudgetsIfHealthyBudgetPolicyPdbYaml = []byte(`--- apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: if-healthy-budget-policy spec: maxUnavailable: 1 unhealthyPodEvictionPolicy: IfHealthyBudget selector: matchLabels: app: nginx-with-delayed-ready `) func testExtendedTestdataPoddisruptionbudgetsIfHealthyBudgetPolicyPdbYamlBytes() ([]byte, error) { return _testExtendedTestdataPoddisruptionbudgetsIfHealthyBudgetPolicyPdbYaml, nil } func testExtendedTestdataPoddisruptionbudgetsIfHealthyBudgetPolicyPdbYaml() (*asset, error) { bytes, err := testExtendedTestdataPoddisruptionbudgetsIfHealthyBudgetPolicyPdbYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/poddisruptionbudgets/if-healthy-budget-policy-pdb.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataPoddisruptionbudgetsNginxWithDelayedReadyDeploymentYaml = []byte(`--- kind: Deployment apiVersion: apps/v1 metadata: name: nginx-with-delayed-ready labels: app: nginx-with-delayed-ready spec: replicas: 3 selector: matchLabels: app: nginx-with-delayed-ready template: metadata: labels: app: nginx-with-delayed-ready spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault terminationGracePeriodSeconds: 5 containers: - name: nginx-with-delayed-ready image: registry.k8s.io/e2e-test-images/nginx:1.15-4 command: - /usr/sbin/nginx args: - "-g" - "daemon off;" imagePullPolicy: IfNotPresent readinessProbe: httpGet: path: / port: 8080 initialDelaySeconds: 310 successThreshold: 2 ports: - name: http containerPort: 8080 volumeMounts: - name: conf mountPath: /etc/nginx/conf.d - name: tmp mountPath: /var/cache/nginx - name: tmp2 mountPath: /var/run securityContext: runAsNonRoot: true allowPrivilegeEscalation: false capabilities: drop: - ALL volumes: - name: conf configMap: name: nginx-conf - name: tmp emptyDir: {} - name: tmp2 emptyDir: {} --- apiVersion: v1 kind: ConfigMap metadata: name: nginx-conf data: default.conf: | server { listen 8080; listen [::]:8080; server_name localhost; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } `) func testExtendedTestdataPoddisruptionbudgetsNginxWithDelayedReadyDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataPoddisruptionbudgetsNginxWithDelayedReadyDeploymentYaml, nil } func testExtendedTestdataPoddisruptionbudgetsNginxWithDelayedReadyDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataPoddisruptionbudgetsNginxWithDelayedReadyDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/poddisruptionbudgets/nginx-with-delayed-ready-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataProjectProjectRequestLimitsQuotaYaml = []byte(`- apiVersion: v1 kind: "LimitRange" metadata: name: ${PROJECT_NAME}-limits spec: limits: - type: "Container" default: cpu: "1" memory: "1Gi" defaultRequest: cpu: "500m" memory: "500Mi" - apiVersion: v1 kind: ResourceQuota metadata: name: ${PROJECT_NAME}-quota namespace: ${PROJECT_NAME} spec: hard: pods: "10" requests.cpu: "4" requests.memory: 8Gi limits.cpu: "6" limits.memory: 16Gi requests.storage: "20G" `) func testExtendedTestdataProjectProjectRequestLimitsQuotaYamlBytes() ([]byte, error) { return _testExtendedTestdataProjectProjectRequestLimitsQuotaYaml, nil } func testExtendedTestdataProjectProjectRequestLimitsQuotaYaml() (*asset, error) { bytes, err := testExtendedTestdataProjectProjectRequestLimitsQuotaYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/project/project-request-limits-quota.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences = []byte(`kind: ImageStream apiVersion: image.openshift.io/v1 spec: tags: - name: etcd-operator from: name: quay.io/coreos/etcd-operator kind: DockerImage `) func testExtendedTestdataReleasesPayload1EtcdOperatorImageReferencesBytes() ([]byte, error) { return _testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences, nil } func testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences() (*asset, error) { bytes, err := testExtendedTestdataReleasesPayload1EtcdOperatorImageReferencesBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/etcd-operator/image-references", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml = []byte(`kind: List apiVersion: v1 items: - kind: ServiceAccount apiVersion: v1 metadata: name: etcd-operator - kind: Deployment apiVersion: apps/v1 metadata: name: etcd-operator spec: template: spec: containers: - name: main image: quay.io/coreos/etcd-operator@sha256:12341234`) func testExtendedTestdataReleasesPayload1EtcdOperatorManifestYamlBytes() ([]byte, error) { return _testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml, nil } func testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml() (*asset, error) { bytes, err := testExtendedTestdataReleasesPayload1EtcdOperatorManifestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/etcd-operator/manifest.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml = []byte(`kind: CustomResourceDefinition apiVersion: apiextensions/v1 metadata: name: registry`) func testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYamlBytes() ([]byte, error) { return _testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml, nil } func testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml() (*asset, error) { bytes, err := testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/image-registry/10_image-registry_crd.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataReleasesPayload1ImageRegistryImageReferences = []byte(`kind: ImageStream apiVersion: image.openshift.io/v1 spec: tags: - name: image-registry from: name: openshift/origin-image-registry kind: DockerImage `) func testExtendedTestdataReleasesPayload1ImageRegistryImageReferencesBytes() ([]byte, error) { return _testExtendedTestdataReleasesPayload1ImageRegistryImageReferences, nil } func testExtendedTestdataReleasesPayload1ImageRegistryImageReferences() (*asset, error) { bytes, err := testExtendedTestdataReleasesPayload1ImageRegistryImageReferencesBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/image-registry/image-references", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml = []byte(`kind: List apiVersion: v1 items: - kind: ServiceAccount apiVersion: v1 metadata: name: image-registry - kind: Deployment apiVersion: apps/v1 metadata: name: image-registry spec: template: spec: containers: - name: main image: openshift/origin-image-registry:latest`) func testExtendedTestdataReleasesPayload1ImageRegistryManifestYamlBytes() ([]byte, error) { return _testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml, nil } func testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml() (*asset, error) { bytes, err := testExtendedTestdataReleasesPayload1ImageRegistryManifestYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/releases/payload-1/image-registry/manifest.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRolesEmptyRoleYaml = []byte(`apiVersion: v1 kind: Role metadata: name: empty-role `) func testExtendedTestdataRolesEmptyRoleYamlBytes() ([]byte, error) { return _testExtendedTestdataRolesEmptyRoleYaml, nil } func testExtendedTestdataRolesEmptyRoleYaml() (*asset, error) { bytes, err := testExtendedTestdataRolesEmptyRoleYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/roles/empty-role.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRolesPolicyClusterrolesYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: "policy-roles-template" labels: createdBy: "policy-roles-template" parameters: - description: "The name for the cluster role." name: ROLE_NAME required: true - description: "The name for the cluster role binding." name: BINDING_NAME required: true objects: - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: ${ROLE_NAME} rules: - apiGroups: - "" attributeRestrictions: null resourceNames: - "~" resources: - users verbs: - get - apiGroups: - project.openshift.io attributeRestrictions: null resources: - projectrequests verbs: - list - apiGroups: - rbac.authorization.k8s.io attributeRestrictions: null resources: - clusterroles verbs: - get - list - apiGroups: - project.openshift.io attributeRestrictions: null resources: - projects verbs: - list - apiGroups: - authorization.k8s.io attributeRestrictions: null resources: - selfsubjectaccessreviews verbs: - create - apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: ${BINDING_NAME} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: ${ROLE_NAME} subjects: - apiGroup: rbac.authorization.k8s.io kind: Group name: system:authenticated `) func testExtendedTestdataRolesPolicyClusterrolesYamlBytes() ([]byte, error) { return _testExtendedTestdataRolesPolicyClusterrolesYaml, nil } func testExtendedTestdataRolesPolicyClusterrolesYaml() (*asset, error) { bytes, err := testExtendedTestdataRolesPolicyClusterrolesYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/roles/policy-clusterroles.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRolesPolicyRolesYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: "policy-roles-template" labels: createdBy: "policy-roles-template" parameters: - description: "The namespace to create roles in." name: NAMESPACE required: true objects: - apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: basic-user rules: - apiGroups: - "" attributeRestrictions: null resourceNames: - "~" resources: - users verbs: - get - apiGroups: - project.openshift.io attributeRestrictions: null resources: - projectrequests verbs: - list - apiGroups: - rbac.authorization.k8s.io attributeRestrictions: null resources: - clusterroles verbs: - get - list - apiGroups: - project.openshift.io attributeRestrictions: null resources: - projects verbs: - list - apiGroups: - authorization.k8s.io attributeRestrictions: null resources: - selfsubjectaccessreviews verbs: - create - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: namespace: ${NAMESPACE} name: basic-users roleRef: apiGroup: rbac.authorization.k8s.io kind: Role name: basic-user subjects: - apiGroup: rbac.authorization.k8s.io kind: Group name: system:authenticated userNames: null `) func testExtendedTestdataRolesPolicyRolesYamlBytes() ([]byte, error) { return _testExtendedTestdataRolesPolicyRolesYaml, nil } func testExtendedTestdataRolesPolicyRolesYaml() (*asset, error) { bytes, err := testExtendedTestdataRolesPolicyRolesYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/roles/policy-roles.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRouterIngressYaml = []byte(`kind: List apiVersion: v1 items: # an ingress that should be captured as individual routes - apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: test spec: tls: - hosts: - 3.ingress-test.com secretName: ingress-endpoint-secret rules: - host: 1.ingress-test.com http: paths: - path: /test pathType: Prefix backend: service: name: ingress-endpoint-1 port: number: 80 - path: /other pathType: Prefix backend: service: name: ingress-endpoint-2 port: number: 80 - host: 2.ingress-test.com http: paths: - path: / pathType: Prefix backend: service: name: ingress-endpoint-1 port: number: 80 - host: 3.ingress-test.com http: paths: - path: / pathType: Prefix backend: service: name: ingress-endpoint-1 port: number: 80 # an empty secret - apiVersion: v1 kind: Secret metadata: name: ingress-endpoint-secret type: kubernetes.io/tls stringData: tls.key: "" tls.crt: "" # a service to be routed to - apiVersion: v1 kind: Service metadata: name: ingress-endpoint-1 spec: selector: app: ingress-endpoint-1 ports: - port: 80 targetPort: 8080 # a service to be routed to - apiVersion: v1 kind: Service metadata: name: ingress-endpoint-2 spec: selector: app: ingress-endpoint-2 ports: - port: 80 targetPort: 8080 # a pod that serves a response - apiVersion: v1 kind: Pod metadata: name: ingress-endpoint-1 labels: app: ingress-endpoint-1 spec: terminationGracePeriodSeconds: 1 containers: - name: test image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 args: ["netexec"] ports: - containerPort: 8080 name: http - containerPort: 100 protocol: UDP # a pod that serves a response - apiVersion: v1 kind: Pod metadata: name: ingress-endpoint-2 labels: app: ingress-endpoint-2 spec: terminationGracePeriodSeconds: 1 containers: - name: test image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 args: ["netexec"] ports: - containerPort: 8080 name: http - containerPort: 100 protocol: UDP `) func testExtendedTestdataRouterIngressYamlBytes() ([]byte, error) { return _testExtendedTestdataRouterIngressYaml, nil } func testExtendedTestdataRouterIngressYaml() (*asset, error) { bytes, err := testExtendedTestdataRouterIngressYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/router/ingress.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRouterReencryptServingCertYaml = []byte(`apiVersion: v1 kind: List items: - apiVersion: v1 kind: Pod metadata: name: serving-cert labels: app: serving-cert spec: containers: - image: registry.k8s.io/e2e-test-images/nginx:1.15-4 name: serve command: - /usr/sbin/nginx args: - -c - /etc/nginx/nginx.conf ports: - containerPort: 8443 protocol: TCP volumeMounts: - name: cert mountPath: /etc/serving-cert - name: conf mountPath: /etc/nginx - name: tmp mountPath: /var/cache/nginx - name: tmp2 mountPath: /var/run volumes: - name: conf configMap: name: serving-cert - name: cert secret: secretName: serving-cert - name: tmp emptyDir: {} - name: tmp2 emptyDir: {} - apiVersion: v1 kind: ConfigMap metadata: name: serving-cert data: nginx.conf: | daemon off; events { } http { server { listen 8443; listen [::]:8443 ipv6only=on; ssl on; ssl_certificate /etc/serving-cert/tls.crt; ssl_certificate_key /etc/serving-cert/tls.key; server_name "*.svc"; location / { root /usr/share/nginx/html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } } } - apiVersion: v1 kind: Service metadata: name: serving-cert annotations: service.alpha.openshift.io/serving-cert-secret-name: serving-cert spec: selector: app: serving-cert ports: - port: 443 name: https targetPort: 8443 protocol: TCP - apiVersion: route.openshift.io/v1 kind: Route metadata: name: serving-cert spec: tls: termination: Reencrypt # no destination CA certificate needed to: kind: Service name: serving-cert `) func testExtendedTestdataRouterReencryptServingCertYamlBytes() ([]byte, error) { return _testExtendedTestdataRouterReencryptServingCertYaml, nil } func testExtendedTestdataRouterReencryptServingCertYaml() (*asset, error) { bytes, err := testExtendedTestdataRouterReencryptServingCertYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/router/reencrypt-serving-cert.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRouterRouterCommonYaml = []byte(`kind: List apiVersion: v1 items: # ensure the router can access routes and endpoints - apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: name: system-router subjects: - kind: ServiceAccount name: default roleRef: kind: ClusterRole apiGroup: rbac.authorization.k8s.io name: system:router # two routes that differ only by their labels and names - apiVersion: route.openshift.io/v1 kind: Route metadata: name: route-1 labels: test: router select: first spec: host: first.example.com path: /Letter tls: insecureEdgeTerminationPolicy: Allow termination: Edge to: name: endpoints ports: - targetPort: 8080 - apiVersion: route.openshift.io/v1 kind: Route metadata: name: route-2 labels: test: router select: second spec: host: second.example.com path: /Letter tls: insecureEdgeTerminationPolicy: Allow termination: Edge to: name: endpoints ports: - targetPort: http # routes that contain overridden domains - apiVersion: route.openshift.io/v1 kind: Route metadata: name: route-override-domain-1 labels: test: router select: override-domains spec: host: y.a.null.ptr path: /Letter to: name: endpoints ports: - targetPort: 8080 - apiVersion: route.openshift.io/v1 kind: Route metadata: name: route-override-domain-2 labels: test: router select: override-domains spec: host: main.void.str path: /Letter to: name: endpoints ports: - targetPort: 8080 # a service to be routed to - apiVersion: v1 kind: Service metadata: name: endpoints labels: test: router spec: selector: test: router endpoints: router ports: - port: 8080 # a pod that serves a response - apiVersion: v1 kind: Pod metadata: name: endpoint-1 labels: test: router endpoints: router spec: terminationGracePeriodSeconds: 1 containers: - name: test image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 args: ["netexec"] ports: - containerPort: 8080 name: http - containerPort: 100 protocol: UDP `) func testExtendedTestdataRouterRouterCommonYamlBytes() ([]byte, error) { return _testExtendedTestdataRouterRouterCommonYaml, nil } func testExtendedTestdataRouterRouterCommonYaml() (*asset, error) { bytes, err := testExtendedTestdataRouterRouterCommonYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/router/router-common.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRouterRouterHttpEchoServerYaml = []byte(`apiVersion: v1 kind: List metadata: {} items: - apiVersion: apps/v1 kind: Deployment metadata: name: router-http-echo spec: replicas: 1 selector: matchLabels: app: router-http-echo strategy: type: RollingUpdate template: metadata: labels: app: router-http-echo spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest name: router-http-echo command: - /usr/bin/socat - TCP4-LISTEN:8676,reuseaddr,fork - EXEC:'/bin/bash -c \"printf \\\"HTTP/1.0 200 OK\r\n\r\n\\\"; sed -e \\\"/^\r/q\\\"\"' ports: - containerPort: 8676 protocol: TCP dnsPolicy: ClusterFirst restartPolicy: Always securityContext: {} - apiVersion: v1 kind: Service metadata: name: router-http-echo labels: app: router-http-echo spec: selector: app: router-http-echo ports: - port: 8676 name: router-http-echo protocol: TCP - apiVersion: route.openshift.io/v1 kind: Route metadata: name: router-http-echo spec: host: router-headers.example.com to: kind: Service name: router-http-echo `) func testExtendedTestdataRouterRouterHttpEchoServerYamlBytes() ([]byte, error) { return _testExtendedTestdataRouterRouterHttpEchoServerYaml, nil } func testExtendedTestdataRouterRouterHttpEchoServerYaml() (*asset, error) { bytes, err := testExtendedTestdataRouterRouterHttpEchoServerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/router/router-http-echo-server.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRouterRouterMetricsYaml = []byte(`apiVersion: v1 kind: List items: # a route that has multiple weighted services that it points to - apiVersion: route.openshift.io/v1 kind: Route metadata: name: weightedroute labels: test: router select: weighted spec: to: name: weightedendpoints1 kind: Service weight: 50 alternateBackends: - name: weightedendpoints2 kind: Service weight: 50 port: targetPort: 8080 # a route that has multiple services but all weights are zero - apiVersion: route.openshift.io/v1 kind: Route metadata: name: zeroweightroute labels: test: router select: weighted spec: to: name: weightedendpoints1 kind: Service weight: 0 alternateBackends: - name: weightedendpoints2 kind: Service weight: 0 port: targetPort: 8080 # two services that can be routed to - apiVersion: v1 kind: Service metadata: name: weightedendpoints1 labels: test: router spec: selector: test: weightedrouter1 endpoints: weightedrouter1 ports: - port: 8080 - apiVersion: v1 kind: Service metadata: name: weightedendpoints2 labels: test: router spec: selector: test: weightedrouter2 endpoints: weightedrouter2 ports: - port: 8080 # two pods that serves a response - apiVersion: v1 kind: Pod metadata: name: endpoint-1 labels: test: weightedrouter1 endpoints: weightedrouter1 spec: terminationGracePeriodSeconds: 1 containers: - name: test image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 args: ["netexec"] ports: - containerPort: 8080 name: http - containerPort: 100 protocol: UDP - apiVersion: v1 kind: Pod metadata: name: endpoint-2 labels: test: weightedrouter2 endpoints: weightedrouter2 spec: terminationGracePeriodSeconds: 1 containers: - name: test image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 args: ["netexec"] ports: - containerPort: 8080 name: http - containerPort: 100 protocol: UDP `) func testExtendedTestdataRouterRouterMetricsYamlBytes() ([]byte, error) { return _testExtendedTestdataRouterRouterMetricsYaml, nil } func testExtendedTestdataRouterRouterMetricsYaml() (*asset, error) { bytes, err := testExtendedTestdataRouterRouterMetricsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/router/router-metrics.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRun_policyParallelBcYaml = []byte(`--- kind: "List" apiVersion: "v1" metadata: {} items: - kind: "ImageStream" apiVersion: "image.openshift.io/v1" metadata: name: "origin-ruby-sample" creationTimestamp: null spec: {} status: dockerImageRepository: "" - kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "sample-parallel-build" spec: runPolicy: "Parallel" triggers: - type: "imageChange" imageChange: {} source: type: "Git" git: uri: "https://github.com/openshift/ruby-hello-world.git" strategy: type: "Source" sourceStrategy: from: kind: "DockerImage" name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" resources: {} status: lastVersion: 0 `) func testExtendedTestdataRun_policyParallelBcYamlBytes() ([]byte, error) { return _testExtendedTestdataRun_policyParallelBcYaml, nil } func testExtendedTestdataRun_policyParallelBcYaml() (*asset, error) { bytes, err := testExtendedTestdataRun_policyParallelBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/run_policy/parallel-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRun_policySerialBcYaml = []byte(`--- kind: "List" apiVersion: "v1" metadata: {} items: - kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "sample-serial-build" spec: runPolicy: "Serial" triggers: - type: "imageChange" imageChange: {} source: type: "Git" git: uri: "https://github.com/openshift/ruby-hello-world.git" strategy: type: "Source" sourceStrategy: from: kind: "DockerImage" name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" - kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "sample-serial-build-fail" spec: runPolicy: "Serial" triggers: - type: "imageChange" imageChange: {} source: type: "Git" git: uri: "https://github.com/openshift/invalidrepo.git" strategy: type: "Source" sourceStrategy: from: kind: "DockerImage" name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" `) func testExtendedTestdataRun_policySerialBcYamlBytes() ([]byte, error) { return _testExtendedTestdataRun_policySerialBcYaml, nil } func testExtendedTestdataRun_policySerialBcYaml() (*asset, error) { bytes, err := testExtendedTestdataRun_policySerialBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/run_policy/serial-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataRun_policySerialLatestOnlyBcYaml = []byte(`--- kind: "List" apiVersion: "v1" metadata: {} items: - kind: "BuildConfig" apiVersion: "build.openshift.io/v1" metadata: name: "sample-serial-latest-only-build" spec: runPolicy: "SerialLatestOnly" triggers: - type: "imageChange" imageChange: {} source: type: "Git" git: uri: "https://github.com/openshift/ruby-hello-world.git" strategy: type: "Source" sourceStrategy: from: kind: "DockerImage" name: "image-registry.openshift-image-registry.svc:5000/openshift/ruby:3.3-ubi8" resources: {} status: lastVersion: 0 `) func testExtendedTestdataRun_policySerialLatestOnlyBcYamlBytes() ([]byte, error) { return _testExtendedTestdataRun_policySerialLatestOnlyBcYaml, nil } func testExtendedTestdataRun_policySerialLatestOnlyBcYaml() (*asset, error) { bytes, err := testExtendedTestdataRun_policySerialLatestOnlyBcYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/run_policy/serial-latest-only-bc.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataS2iDropcapsRootAccessBuildYaml = []byte(`apiVersion: v1 items: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: build: root-access-build name: root-access-build spec: output: to: kind: ImageStreamTag name: root-access-build:latest postCommit: {} resources: {} source: git: uri: https://github.com/openshift/ruby-hello-world.git secrets: [] type: Git strategy: sourceStrategy: from: kind: ImageStreamTag name: rootable-ruby:latest type: Source triggers: [] - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: labels: build: root-access-build name: root-access-build spec: {} kind: List metadata: {} `) func testExtendedTestdataS2iDropcapsRootAccessBuildYamlBytes() ([]byte, error) { return _testExtendedTestdataS2iDropcapsRootAccessBuildYaml, nil } func testExtendedTestdataS2iDropcapsRootAccessBuildYaml() (*asset, error) { bytes, err := testExtendedTestdataS2iDropcapsRootAccessBuildYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/root-access-build.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataS2iDropcapsRootableRubyDockerfile = []byte(`FROM registry.access.redhat.com/ubi8/ruby-27:latest USER root RUN rm -f /usr/bin/ls RUN echo "root:redhat" | chpasswd USER 1001 COPY ./adduser /usr/libexec/s2i/ COPY ./assemble /usr/libexec/s2i/ `) func testExtendedTestdataS2iDropcapsRootableRubyDockerfileBytes() ([]byte, error) { return _testExtendedTestdataS2iDropcapsRootableRubyDockerfile, nil } func testExtendedTestdataS2iDropcapsRootableRubyDockerfile() (*asset, error) { bytes, err := testExtendedTestdataS2iDropcapsRootableRubyDockerfileBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataS2iDropcapsRootableRubyAdduser = []byte(`#!/usr/bin/expect spawn su expect "Password:" { send "redhat\r" } expect "#" { send "adduser mytestuser\r" } expect "#" { send "exit\r" } expect "$" {} `) func testExtendedTestdataS2iDropcapsRootableRubyAdduserBytes() ([]byte, error) { return _testExtendedTestdataS2iDropcapsRootableRubyAdduser, nil } func testExtendedTestdataS2iDropcapsRootableRubyAdduser() (*asset, error) { bytes, err := testExtendedTestdataS2iDropcapsRootableRubyAdduserBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/rootable-ruby/adduser", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataS2iDropcapsRootableRubyAssemble = []byte(`#!/bin/bash set -e /usr/libexec/s2i/adduser cat /etc/passwd grep "mytestuser" /etc/passwd `) func testExtendedTestdataS2iDropcapsRootableRubyAssembleBytes() ([]byte, error) { return _testExtendedTestdataS2iDropcapsRootableRubyAssemble, nil } func testExtendedTestdataS2iDropcapsRootableRubyAssemble() (*asset, error) { bytes, err := testExtendedTestdataS2iDropcapsRootableRubyAssembleBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/s2i-dropcaps/rootable-ruby/assemble", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataSampleImageStreamJson = []byte(`{ "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "samplerepository", "creationTimestamp": null }, "spec": {}, "status": { "dockerImageRepository": "" } } `) func testExtendedTestdataSampleImageStreamJsonBytes() ([]byte, error) { return _testExtendedTestdataSampleImageStreamJson, nil } func testExtendedTestdataSampleImageStreamJson() (*asset, error) { bytes, err := testExtendedTestdataSampleImageStreamJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/sample-image-stream.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataSamplepipelineWithenvsYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template labels: template: application-template-sample-pipeline metadata: annotations: iconClass: icon-jenkins tags: instant-app,jenkins name: jenkins-pipeline-example parameters: objects: - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: labels: name: sample-pipeline-withenvs name: sample-pipeline-withenvs spec: strategy: jenkinsPipelineStrategy: env: - name: FOO1 value: BAR1 jenkinsfile: |- node() { echo "FOO1 is ${env.FOO1}" echo "FOO2 is ${env.FOO2}" } type: JenkinsPipeline `) func testExtendedTestdataSamplepipelineWithenvsYamlBytes() ([]byte, error) { return _testExtendedTestdataSamplepipelineWithenvsYaml, nil } func testExtendedTestdataSamplepipelineWithenvsYaml() (*asset, error) { bytes, err := testExtendedTestdataSamplepipelineWithenvsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/samplepipeline-withenvs.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataServiceServingCertNginxServingCertConf = []byte(`server { listen 443; ssl on; ssl_certificate /etc/serving-cert/tls.crt; ssl_certificate_key /etc/serving-cert/tls.key; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass http://127.0.0.1; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # #location ~ \.php$ { # root html; # fastcgi_pass 127.0.0.1:9000; # fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; # include fastcgi_params; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } `) func testExtendedTestdataServiceServingCertNginxServingCertConfBytes() ([]byte, error) { return _testExtendedTestdataServiceServingCertNginxServingCertConf, nil } func testExtendedTestdataServiceServingCertNginxServingCertConf() (*asset, error) { bytes, err := testExtendedTestdataServiceServingCertNginxServingCertConfBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/service-serving-cert/nginx-serving-cert.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataServicecidrYaml = []byte(`apiVersion: networking.k8s.io/v1beta1 kind: ServiceCIDR metadata: name: newcidr1 spec: cidrs: - 10.96.0.0/24 `) func testExtendedTestdataServicecidrYamlBytes() ([]byte, error) { return _testExtendedTestdataServicecidrYaml, nil } func testExtendedTestdataServicecidrYaml() (*asset, error) { bytes, err := testExtendedTestdataServicecidrYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/servicecidr.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataSignerBuildconfigYaml = []byte(`kind: List apiVersion: v1 items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: signer - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: signer spec: triggers: - type: ConfigChange source: dockerfile: | FROM quay.io/openshift/origin-cli:latest WORKDIR /var/lib/origin ENV ART_DNF_WRAPPER_POLICY=skip RUN source /etc/os-release \ && rhel_major=${VERSION_ID%.*} \ && if ! yum install -y skopeo; then \ echo "Unable to install skopeo; adding UBI repositories and retrying" && \ yum config-manager \ --add-repo "https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi${rhel_major}/${rhel_major}/\$basearch/baseos/os/" \ --add-repo "https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi${rhel_major}/${rhel_major}/\$basearch/appstream/os/" && \ yum install -y skopeo ; \ fi RUN yum clean all && mkdir -p gnupg && chmod -R 0777 /var/lib/origin RUN echo $'%echo Generating openpgp key ...\n\ Key-Type: RSA \n\ Key-Length: 2048 \n\ Subkey-Type: ELG-E \n\ Subkey-Length: 1024 \n\ Name-Real: Joe Tester \n\ Name-Comment: with stupid passphrase \n\ Name-Email: joe@foo.bar \n\ Expire-Date: 0 \n\ Creation-Date: 2017-01-01 \n\ %commit \n\ %echo done \n' >> dummy_key.conf strategy: type: Docker dockerStrategy: env: - name: "BUILD_LOGLEVEL" value: "2" from: kind: DockerImage name: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest output: to: kind: ImageStreamTag name: signer:latest `) func testExtendedTestdataSignerBuildconfigYamlBytes() ([]byte, error) { return _testExtendedTestdataSignerBuildconfigYaml, nil } func testExtendedTestdataSignerBuildconfigYaml() (*asset, error) { bytes, err := testExtendedTestdataSignerBuildconfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/signer-buildconfig.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataStableBusyboxYaml = []byte(`kind: List apiVersion: v1 metadata: {} items: - apiVersion: image.openshift.io/v1 dockerImageConfig: '{"architecture":"amd64","config":{"Hostname":"55cd1f8f6e5b","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["sh"],"Image":"sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"container":"764ef4448baa9a1ce19e4ae95f8cdd4eda7a1186c512773e56dc634dff208a59","container_config":{"Hostname":"55cd1f8f6e5b","Domainname":"","User":"","AttachStdin":false,"AttachStdout":false,"AttachStderr":false,"Tty":false,"OpenStdin":false,"StdinOnce":false,"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Cmd":["/bin/sh","-c","#(nop) CMD [\"sh\"]"],"Image":"sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2","Volumes":null,"WorkingDir":"","Entrypoint":null,"OnBuild":null,"Labels":{}},"created":"2016-06-23T23:23:37.198943461Z","docker_version":"1.10.3","history":[{"created":"2016-06-23T23:23:36.73131105Z","created_by":"/bin/sh -c #(nop) ADD file:9ca60502d646bdd815bb51e612c458e2d447b597b95cf435f9673f0966d41c1a in /"},{"created":"2016-06-23T23:23:37.198943461Z","created_by":"/bin/sh -c #(nop) CMD [\"sh\"]","empty_layer":true}],"os":"linux","rootfs":{"type":"layers","diff_ids":["sha256:8ac8bfaff55af948c796026ee867448c5b5b5d9dd3549f4006d9759b25d4a893"]}}' dockerImageLayers: - mediaType: application/vnd.docker.image.rootfs.diff.tar.gzip name: sha256:8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f size: 667590 dockerImageManifest: |- { "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/octet-stream", "size": 1459, "digest": "sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 667590, "digest": "sha256:8ddc19f16526912237dd8af81971d5e4dd0587907234be2b83e249518d5b673f" } ] } dockerImageManifestMediaType: application/vnd.docker.distribution.manifest.v2+json dockerImageMetadata: Architecture: amd64 Config: Cmd: - sh Env: - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Hostname: 55cd1f8f6e5b Image: sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2 Container: 764ef4448baa9a1ce19e4ae95f8cdd4eda7a1186c512773e56dc634dff208a59 ContainerConfig: Cmd: - /bin/sh - -c - '#(nop) CMD ["sh"]' Env: - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Hostname: 55cd1f8f6e5b Image: sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2 Created: 2016-06-23T23:23:37Z DockerVersion: 1.10.3 Id: sha256:2b8fd9751c4c0f5dd266fcae00707e67a2545ef34f9a29354585f93dac906749 Size: 669049 apiVersion: "1.0" kind: DockerImage dockerImageMetadataVersion: "1.0" dockerImageReference: busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 kind: Image metadata: creationTimestamp: 2016-07-27T15:12:10Z name: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 resourceVersion: "504" selfLink: /oapi/v1/images/sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 uid: 7d6849b4-540c-11e6-809f-525400f25e34 - apiVersion: image.openshift.io/v1 kind: ImageStream metadata: annotations: openshift.io/image.dockerRepositoryCheck: 2016-07-27T16:08:39Z generation: 1 name: busybox namespace: default resourceVersion: "505" selfLink: /oapi/v1/namespaces/default/imagestreams/busybox uid: 7d687e72-540c-11e6-809f-525400f25e34 - apiVersion: image.openshift.io/v1 kind: ImageStreamMapping metadata: name: busybox namespace: default tag: latest image: apiVersion: image.openshift.io/v1 kind: Image metadata: name: sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 dockerImageReference: busybox@sha256:a59906e33509d14c036c8678d687bd4eec81ed7c4b8ce907b888c607f6a1e0e6 dockerImageLayers: [] `) func testExtendedTestdataStableBusyboxYamlBytes() ([]byte, error) { return _testExtendedTestdataStableBusyboxYaml, nil } func testExtendedTestdataStableBusyboxYaml() (*asset, error) { bytes, err := testExtendedTestdataStableBusyboxYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/stable-busybox.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesCrunchydataPodJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "node-example", "creationTimestamp": null }, "objects": [ { "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "pg-standalone-1", "creationTimestamp": null, "labels": { "name": "crunchy-node" } }, "spec": { "volumes": [ { "name": "pgdata", "hostPath": { "path": "/var/lib/pgsql/exampleuser" }, "rbd": null } ], "containers": [ { "name": "master", "image": "registry:5000/crunchy-node", "ports": [ { "hostPort": 9000, "containerPort": 5432, "protocol": "TCP" } ], "env": [ { "name": "PG_USERNAME", "value": "exampleuser" }, { "name": "PG_PASSWORD", "value": "example" } ], "resources": {}, "volumeMounts": [ { "name": "pgdata", "mountPath": "/pgdata" } ], "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "capabilities": {}, "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" }, "status": {} } ] } `) func testExtendedTestdataTemplatesCrunchydataPodJsonBytes() ([]byte, error) { return _testExtendedTestdataTemplatesCrunchydataPodJson, nil } func testExtendedTestdataTemplatesCrunchydataPodJson() (*asset, error) { bytes, err := testExtendedTestdataTemplatesCrunchydataPodJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/crunchydata-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesGuestbookJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "guestbook-example", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Guestbook Example", "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker" } }, "message": "Your admin credentials are ${ADMIN_USERNAME}:${ADMIN_PASSWORD}", "objects": [ { "kind": "Route", "apiVersion": "route.openshift.io/v1", "metadata": { "name": "frontend-route", "creationTimestamp": null }, "spec": { "host": "guestbook.example.com", "to": { "kind": "Service", "name": "frontend-service" } }, "status": {} }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "frontend-service", "creationTimestamp": null }, "spec": { "ports": [ { "protocol": "TCP", "port": 5432, "targetPort": 5432, "nodePort": 0 } ], "selector": { "name": "frontend-service" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "redis-master", "creationTimestamp": null }, "spec": { "ports": [ { "protocol": "TCP", "port": 10000, "targetPort": 10000, "nodePort": 0 } ], "selector": { "name": "redis-master" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Service", "apiVersion": "v1", "metadata": { "name": "${SLAVE_SERVICE_NAME}", "creationTimestamp": null }, "spec": { "ports": [ { "protocol": "TCP", "port": 10001, "targetPort": 10001, "nodePort": 0 } ], "selector": { "name": "${SLAVE_SERVICE_NAME}" }, "type": "ClusterIP", "sessionAffinity": "None" }, "status": { "loadBalancer": {} } }, { "kind": "Pod", "apiVersion": "v1", "metadata": { "name": "redis-master", "creationTimestamp": null, "labels": { "name": "redis-master" } }, "spec": { "containers": [ { "name": "master", "image": "dockerfile/redis", "ports": [ { "containerPort": 6379, "protocol": "TCP" } ], "env": [ { "name": "REDIS_PASSWORD", "value": "${REDIS_PASSWORD}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" }, "status": {} }, { "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "guestbook", "creationTimestamp": null, "labels": { "name": "frontend-service" } }, "spec": { "replicas": 3, "selector": { "name": "frontend-service" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "frontend-service" } }, "spec": { "containers": [ { "name": "php-redis", "image": "brendanburns/php-redis", "ports": [ { "hostPort": 8000, "containerPort": 80, "protocol": "TCP" } ], "env": [ { "name": "ADMIN_USERNAME", "value": "${ADMIN_USERNAME}" }, { "name": "ADMIN_PASSWORD", "value": "${ADMIN_PASSWORD}" }, { "name": "REDIS_PASSWORD", "value": "${REDIS_PASSWORD}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" } } }, "status": { "replicas": 0 } }, { "kind": "ReplicationController", "apiVersion": "v1", "metadata": { "name": "${SLAVE_SERVICE_NAME}", "creationTimestamp": null, "labels": { "name": "${SLAVE_SERVICE_NAME}" } }, "spec": { "replicas": 2, "selector": { "name": "${SLAVE_SERVICE_NAME}" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "${SLAVE_SERVICE_NAME}" } }, "spec": { "containers": [ { "name": "slave", "image": "brendanburns/${SLAVE_SERVICE_NAME}", "ports": [ { "hostPort": 6380, "containerPort": 6379, "protocol": "TCP" } ], "env": [ { "name": "REDIS_PASSWORD", "value": "${REDIS_PASSWORD}" } ], "resources": {}, "terminationMessagePath": "/dev/termination-log", "imagePullPolicy": "IfNotPresent", "securityContext": { "capabilities": {}, "privileged": false } } ], "restartPolicy": "Always", "dnsPolicy": "ClusterFirst", "serviceAccount": "" } } }, "status": { "replicas": 0 } } ], "parameters": [ { "name": "ADMIN_USERNAME", "description": "Guestbook administrator username", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "description": "Guestbook administrator password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "REDIS_PASSWORD", "description": "Redis password", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "SLAVE_SERVICE_NAME", "description": "Slave Service name", "value": "redis-slave" } ] } `) func testExtendedTestdataTemplatesGuestbookJsonBytes() ([]byte, error) { return _testExtendedTestdataTemplatesGuestbookJson, nil } func testExtendedTestdataTemplatesGuestbookJson() (*asset, error) { bytes, err := testExtendedTestdataTemplatesGuestbookJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/guestbook.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesGuestbook_listJson = []byte(`{ "kind": "Template", "apiVersion": "template.openshift.io/v1", "metadata": { "name": "guestbook-example", "creationTimestamp": null, "annotations": { "openshift.io/display-name": "Guestbook Example", "description": "Example shows how to build a simple multi-tier application using Kubernetes and Docker" } }, "message": "Your admin credentials are adminQ3H:dwNJiJwW", "objects": [ { "apiVersion": "route.openshift.io/v1", "kind": "Route", "metadata": { "creationTimestamp": null, "name": "frontend-route" }, "spec": { "host": "guestbook.example.com", "to": { "kind": "Service", "name": "frontend-service" } }, "status": {} }, { "apiVersion": "v1", "kind": "Service", "metadata": { "creationTimestamp": null, "name": "frontend-service" }, "spec": { "ports": [ { "nodePort": 0, "port": 5432, "protocol": "TCP", "targetPort": 5432 } ], "selector": { "name": "frontend-service" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "creationTimestamp": null, "name": "redis-master" }, "spec": { "ports": [ { "nodePort": 0, "port": 10000, "protocol": "TCP", "targetPort": 10000 } ], "selector": { "name": "redis-master" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "Service", "metadata": { "creationTimestamp": null, "name": "redis-slave" }, "spec": { "ports": [ { "nodePort": 0, "port": 10001, "protocol": "TCP", "targetPort": 10001 } ], "selector": { "name": "redis-slave" }, "sessionAffinity": "None", "type": "ClusterIP" }, "status": { "loadBalancer": {} } }, { "apiVersion": "v1", "kind": "Pod", "metadata": { "creationTimestamp": null, "labels": { "name": "redis-master" }, "name": "redis-master" }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "REDIS_PASSWORD", "value": "P8vxbV4C" } ], "image": "dockerfile/redis", "imagePullPolicy": "IfNotPresent", "name": "master", "ports": [ { "containerPort": 6379, "protocol": "TCP" } ], "resources": {}, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log" } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccount": "" }, "status": {} }, { "apiVersion": "v1", "kind": "ReplicationController", "metadata": { "creationTimestamp": null, "labels": { "name": "frontend-service" }, "name": "guestbook" }, "spec": { "replicas": 3, "selector": { "name": "frontend-service" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "frontend-service" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "ADMIN_USERNAME", "value": "adminQ3H" }, { "name": "ADMIN_PASSWORD", "value": "dwNJiJwW" }, { "name": "REDIS_PASSWORD", "value": "P8vxbV4C" } ], "image": "brendanburns/php-redis", "imagePullPolicy": "IfNotPresent", "name": "php-redis", "ports": [ { "containerPort": 80, "hostPort": 8000, "protocol": "TCP" } ], "resources": {}, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log" } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccount": "" } } }, "status": { "replicas": 0 } }, { "apiVersion": "v1", "kind": "ReplicationController", "metadata": { "creationTimestamp": null, "labels": { "name": "redis-slave" }, "name": "redis-slave" }, "spec": { "replicas": 2, "selector": { "name": "redis-slave" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "name": "redis-slave" } }, "spec": { "containers": [ { "capabilities": {}, "env": [ { "name": "REDIS_PASSWORD", "value": "P8vxbV4C" } ], "image": "brendanburns/redis-slave", "imagePullPolicy": "IfNotPresent", "name": "slave", "ports": [ { "containerPort": 6379, "hostPort": 6380, "protocol": "TCP" } ], "resources": {}, "securityContext": { "capabilities": {}, "privileged": false }, "terminationMessagePath": "/dev/termination-log" } ], "dnsPolicy": "ClusterFirst", "restartPolicy": "Always", "serviceAccount": "" } } }, "status": { "replicas": 0 } } ], "parameters": [ { "name": "ADMIN_USERNAME", "description": "Guestbook administrator username", "value": "adminQ3H", "generate": "expression", "from": "admin[A-Z0-9]{3}" }, { "name": "ADMIN_PASSWORD", "description": "Guestbook administrator password", "value": "dwNJiJwW", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "REDIS_PASSWORD", "description": "Redis password", "value": "P8vxbV4C", "generate": "expression", "from": "[a-zA-Z0-9]{8}" }, { "name": "SLAVE_SERVICE_NAME", "description": "Slave Service name", "value": "redis-slave" }, { "name": "CUSTOM_PARAM1", "value": "1" } ] } `) func testExtendedTestdataTemplatesGuestbook_listJsonBytes() ([]byte, error) { return _testExtendedTestdataTemplatesGuestbook_listJson, nil } func testExtendedTestdataTemplatesGuestbook_listJson() (*asset, error) { bytes, err := testExtendedTestdataTemplatesGuestbook_listJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/guestbook_list.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesTemplateinstance_badobjectYaml = []byte(`kind: List apiVersion: v1 items: - kind: TemplateInstance apiVersion: template.openshift.io/v1 metadata: name: invalidtemplateinstance spec: template: kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: Deployment apiVersion: apps/v1 metadata: name: "invalidname!@#$%^&*" spec: replicas: 0 selector: matchLabels: key: value template: metadata: labels: key: value spec: containers: - name: hello-openshift image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 `) func testExtendedTestdataTemplatesTemplateinstance_badobjectYamlBytes() ([]byte, error) { return _testExtendedTestdataTemplatesTemplateinstance_badobjectYaml, nil } func testExtendedTestdataTemplatesTemplateinstance_badobjectYaml() (*asset, error) { bytes, err := testExtendedTestdataTemplatesTemplateinstance_badobjectYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/templateinstance_badobject.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml = []byte(`kind: List apiVersion: v1 items: - kind: Secret apiVersion: v1 metadata: name: configsecret stringData: NAME: template - kind: TemplateInstance apiVersion: template.openshift.io/v1 metadata: name: templateinstance spec: template: kind: Template apiVersion: template.openshift.io/v1 metadata: name: template objects: - kind: Secret apiVersion: v1 metadata: name: secret labels: foo: bar - kind: Deployment apiVersion: apps/v1 metadata: name: deployment spec: replicas: 0 selector: matchLabels: key: value template: metadata: labels: key: value spec: containers: - name: hello-openshift image: registry.k8s.io/e2e-test-images/agnhost:2.63.0 - kind: Route apiVersion: route.openshift.io/v1 metadata: name: route spec: to: name: foo - kind: Route apiVersion: route.openshift.io/v1 metadata: name: newroute spec: to: name: foo parameters: - name: NAME value: ${NAME} secret: name: configsecret `) func testExtendedTestdataTemplatesTemplateinstance_objectkindsYamlBytes() ([]byte, error) { return _testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml, nil } func testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml() (*asset, error) { bytes, err := testExtendedTestdataTemplatesTemplateinstance_objectkindsYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/templateinstance_objectkinds.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesTemplateinstance_readinessYaml = []byte(`kind: Template apiVersion: template.openshift.io/v1 metadata: name: simple-example annotations: objects: - kind: Service apiVersion: v1 metadata: name: "${NAME}" annotations: description: Exposes and load balances the application pods spec: ports: - name: web port: 8080 targetPort: 8080 selector: name: "${NAME}" - kind: Route apiVersion: route.openshift.io/v1 metadata: name: "${NAME}" spec: host: "${APPLICATION_DOMAIN}" to: kind: Service name: "${NAME}" - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: "${NAME}" annotations: description: Keeps track of changes in the application image - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: "${NAME}" annotations: description: Defines how to build the application template.alpha.openshift.io/wait-for-ready: 'true' spec: source: type: Git git: uri: ${SOURCE_REPOSITORY_URL} strategy: type: Source sourceStrategy: from: kind: DockerImage name: quay.io/redhat-developer/test-build-simples2i:1.2 output: to: kind: ImageStreamTag name: "${NAME}:latest" triggers: - type: ConfigChange - kind: Deployment apiVersion: apps/v1 metadata: name: "${NAME}" annotations: description: Defines how to deploy the application server template.alpha.openshift.io/wait-for-ready: 'true' image.openshift.io/triggers: "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"${NAME}:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" spec: strategy: type: RollingUpdate replicas: 1 selector: matchLabels: name: "${NAME}" template: metadata: name: "${NAME}" labels: name: "${NAME}" spec: containers: - name: simple-example image: " " ports: - containerPort: 8080 parameters: - name: NAME displayName: Name description: The name assigned to all of the frontend objects defined in this template. required: true value: simple-example - name: SOURCE_REPOSITORY_URL displayName: sourceurl required: true value: https://github.com/sclorg/nodejs-ex - name: APPLICATION_DOMAIN displayName: Application Hostname description: The exposed hostname that will route to the Node.js service, if left blank a value will be defaulted. value: '' `) func testExtendedTestdataTemplatesTemplateinstance_readinessYamlBytes() ([]byte, error) { return _testExtendedTestdataTemplatesTemplateinstance_readinessYaml, nil } func testExtendedTestdataTemplatesTemplateinstance_readinessYaml() (*asset, error) { bytes, err := testExtendedTestdataTemplatesTemplateinstance_readinessYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/templateinstance_readiness.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTemplatesTemplateservicebroker_bindYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template metadata: name: tsbtemplate objects: - apiVersion: v1 kind: Secret metadata: name: aadda50d-d92c-402d-bd29-5ed2095aad2c namespace: ${NAMESPACE} - apiVersion: template.openshift.io/v1 kind: TemplateInstance metadata: name: aadda50d-d92c-402d-bd29-5ed2095aad2c namespace: ${NAMESPACE} spec: template: apiVersion: template.openshift.io/v1 kind: Template metadata: uid: d261a5c9-db37-40b5-ac0f-5709e0e3aac4 objects: - apiVersion: v1 data: username: configmap-username kind: ConfigMap metadata: annotations: template.openshift.io/expose-configmap-username: "{.data['username']}" name: configmap - apiVersion: v1 kind: Secret metadata: annotations: template.openshift.io/base64-expose-secret-password: "{.data['password']}" template.openshift.io/expose-secret-username: "{.data['username']}" name: secret stringData: password: secret-password username: secret-username - apiVersion: v1 kind: Service metadata: annotations: template.openshift.io/expose-service-uri: http://{.spec.clusterIP}:{.spec.ports[?(.name=="port")].port} name: service spec: ports: - name: port port: 1234 - apiVersion: route.openshift.io/v1 kind: Route metadata: annotations: template.openshift.io/expose-route-uri: http://{.spec.host}{.spec.path} name: route spec: host: host path: /path to: kind: Service name: service - apiVersion: template.openshift.io/v1 kind: BrokerTemplateInstance metadata: name: aadda50d-d92c-402d-bd29-5ed2095aad2c spec: templateInstance: apiVersion: template.openshift.io/v1 kind: TemplateInstance name: aadda50d-d92c-402d-bd29-5ed2095aad2c namespace: ${NAMESPACE} secret: apiVersion: v1 kind: Secret name: aadda50d-d92c-402d-bd29-5ed2095aad2c namespace: ${NAMESPACE} parameters: - name: NAMESPACE required: true `) func testExtendedTestdataTemplatesTemplateservicebroker_bindYamlBytes() ([]byte, error) { return _testExtendedTestdataTemplatesTemplateservicebroker_bindYaml, nil } func testExtendedTestdataTemplatesTemplateservicebroker_bindYaml() (*asset, error) { bytes, err := testExtendedTestdataTemplatesTemplateservicebroker_bindYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/templates/templateservicebroker_bind.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestBuildcliJson = []byte(`{ "kind": "List", "apiVersion": "v1", "metadata": {}, "items": [ { "kind": "ImageStream", "apiVersion": "image.openshift.io/v1", "metadata": { "name": "ruby-20-centos7-buildcli", "creationTimestamp": null }, "spec": { "dockerImageRepository": "image-registry.openshift-image-registry.svc:5000/openshift/ruby", "tags": [ { "name": "valid" } ] }, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build-validtag", "creationTimestamp": null }, "spec": { "triggers": [ { "type": "imageChange", "imageChange": {} } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby" }, "incremental": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "BuildConfig", "apiVersion": "build.openshift.io/v1", "metadata": { "name": "ruby-sample-build-invalidtag", "creationTimestamp": null }, "spec": { "triggers": [ { "type": "imageChange", "imageChange": {} } ], "source": { "type": "Git", "git": { "uri": "https://github.com/openshift/ruby-hello-world.git" } }, "strategy": { "type": "Source", "sourceStrategy": { "env":[ { "name":"BUILD_LOGLEVEL", "value":"2" } ], "from": { "kind": "DockerImage", "name": "image-registry.openshift-image-registry.svc:5000/openshift/ruby" }, "incremental": true } }, "output": { "to": { "kind": "ImageStreamTag", "name": "origin-ruby-sample:latest" } }, "resources": {} }, "status": { "lastVersion": 0 } } ] } `) func testExtendedTestdataTestBuildcliJsonBytes() ([]byte, error) { return _testExtendedTestdataTestBuildcliJson, nil } func testExtendedTestdataTestBuildcliJson() (*asset, error) { bytes, err := testExtendedTestdataTestBuildcliJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-buildcli.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestCliDebugYaml = []byte(`kind: List apiVersion: v1 items: - kind: ImageStream apiVersion: image.openshift.io/v1 metadata: name: local-busybox - kind: BuildConfig apiVersion: build.openshift.io/v1 metadata: name: local-busybox spec: strategy: type: Docker source: type: Git dockerfile: "FROM image-registry.openshift-image-registry.svc:5000/openshift/tools:latest\n" output: to: kind: ImageStreamTag name: local-busybox:latest triggers: - type: ConfigChange - kind: Deployment apiVersion: apps/v1 metadata: name: local-busybox1 annotations: "image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"local-busybox:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" spec: replicas: 0 selector: matchLabels: deployment: local-busybox1 template: metadata: labels: deployment: local-busybox1 spec: containers: - name: local-busybox image: " " - kind: Deployment apiVersion: apps/v1 metadata: name: local-busybox2 annotations: "image.openshift.io/triggers": "[{\"from\":{\"kind\":\"ImageStreamTag\",\"name\":\"local-busybox:latest\"},\"fieldPath\": \"spec.template.spec.containers[0].image\"}]" spec: replicas: 0 selector: matchLabels: deployment: local-busybox2 template: metadata: labels: deployment: local-busybox2 spec: containers: - name: local-busybox image: " " command: - foo - bar args: - baz - qux - kind: Deployment apiVersion: apps/v1 metadata: name: busybox1 spec: replicas: 0 selector: matchLabels: deployment: busybox1 template: metadata: labels: deployment: busybox1 spec: containers: - name: busybox image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest - kind: Deployment apiVersion: apps/v1 metadata: name: busybox2 spec: replicas: 0 selector: matchLabels: deployment: busybox2 template: metadata: labels: deployment: busybox2 spec: containers: - name: busybox image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest command: - foo - bar args: - baz - qux `) func testExtendedTestdataTestCliDebugYamlBytes() ([]byte, error) { return _testExtendedTestdataTestCliDebugYaml, nil } func testExtendedTestdataTestCliDebugYaml() (*asset, error) { bytes, err := testExtendedTestdataTestCliDebugYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-cli-debug.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestDeploymentConfigYaml = []byte(`apiVersion: apps.openshift.io/v1 kind: DeploymentConfig metadata: name: test-deployment-config spec: replicas: 1 selector: name: test-deployment strategy: type: Recreate recreateParams: timeoutSeconds: 20 post: failurePolicy: Ignore tagImages: - containerName: ruby-helloworld to: kind: ImageStreamTag name: origin-ruby-sample:deployed template: metadata: labels: name: test-deployment spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent name: ruby-helloworld ports: - containerPort: 8080 protocol: TCP resources: limits: cpu: 100m memory: 3Gi dnsPolicy: ClusterFirst restartPolicy: Always volumes: - emptyDir: {} name: vol1 triggers: - type: ConfigChange `) func testExtendedTestdataTestDeploymentConfigYamlBytes() ([]byte, error) { return _testExtendedTestdataTestDeploymentConfigYaml, nil } func testExtendedTestdataTestDeploymentConfigYaml() (*asset, error) { bytes, err := testExtendedTestdataTestDeploymentConfigYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-deployment-config.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestDeploymentYaml = []byte(`apiVersion: apps/v1 kind: Deployment metadata: name: test-deployment spec: replicas: 1 selector: matchLabels: name: test-deployment strategy: type: Recreate template: metadata: labels: name: test-deployment spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent name: ruby-helloworld ports: - containerPort: 8080 protocol: TCP resources: limits: cpu: 100m memory: 3Gi dnsPolicy: ClusterFirst restartPolicy: Always volumes: - emptyDir: {} name: vol1 `) func testExtendedTestdataTestDeploymentYamlBytes() ([]byte, error) { return _testExtendedTestdataTestDeploymentYaml, nil } func testExtendedTestdataTestDeploymentYaml() (*asset, error) { bytes, err := testExtendedTestdataTestDeploymentYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-deployment.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestEnvPodJson = []byte(`{ "kind":"Pod", "apiVersion":"v1", "metadata":{ "name":"test-pod", "labels":{ "name":"test-pod" } }, "spec":{ "containers":[ { "name":"test", "image":"image-registry.openshift-image-registry.svc:5000/openshift/tools:latest", "env": [ { "name":"podname", "valueFrom": { "fieldRef": { "fieldPath":"metadata.name" } } }, { "name":"podname_composed", "value":"$(podname)_composed" }, { "name":"var1", "value":"value1" }, { "name":"var2", "value":"$(var1)" }, { "name":"var3", "value":"120" } ], "command": [ "sleep", "$(var3)" ] } ], "restartPolicy":"Never", "dnsPolicy":"ClusterFirst" } } `) func testExtendedTestdataTestEnvPodJsonBytes() ([]byte, error) { return _testExtendedTestdataTestEnvPodJson, nil } func testExtendedTestdataTestEnvPodJson() (*asset, error) { bytes, err := testExtendedTestdataTestEnvPodJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-env-pod.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestReplicationControllerYaml = []byte(`apiVersion: v1 kind: ReplicationController metadata: annotations: openshift.io/deployment-config.latest-version: "1" openshift.io/deployment-config.name: test-deployment openshift.io/deployment.phase: Complete optnshift.io/deployment.replicas: "1" name: test-replication-controller spec: replicas: 1 selector: deployment: test-deployment deploymentconfig: test-deployment template: metadata: labels: deployment: test-deployment deploymentconfig: test-deployment spec: containers: - image: image-registry.openshift-image-registry.svc:5000/openshift/tools:latest imagePullPolicy: IfNotPresent name: ruby-helloworld ports: - containerPort: 8080 protocol: TCP resources: {} dnsPolicy: ClusterFirst restartPolicy: Always `) func testExtendedTestdataTestReplicationControllerYamlBytes() ([]byte, error) { return _testExtendedTestdataTestReplicationControllerYaml, nil } func testExtendedTestdataTestReplicationControllerYaml() (*asset, error) { bytes, err := testExtendedTestdataTestReplicationControllerYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-replication-controller.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataTestSecretJson = []byte(`{ "kind": "Secret", "apiVersion": "v1", "metadata": { "name": "docker", "creationTimestamp": null }, "data": { "dockercfg": "eyJodHRwczovL3JlZ2lzdHJ5aG9zdC92MSI6eyJhdXRoIjoic2VjcmV0IiwiZW1haWwiOiJqb2huQGRvZS5jb20ifX0K" }, "type": "Opaque" }`) func testExtendedTestdataTestSecretJsonBytes() ([]byte, error) { return _testExtendedTestdataTestSecretJson, nil } func testExtendedTestdataTestSecretJson() (*asset, error) { bytes, err := testExtendedTestdataTestSecretJsonBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/test-secret.json", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _testExtendedTestdataVerifyservicePipelineTemplateYaml = []byte(`apiVersion: template.openshift.io/v1 kind: Template labels: template: jenkins-verifyservice-pipeline metadata: name: redis-verifyservice-test app: redis objects: - apiVersion: v1 kind: Service metadata: name: redis-headless app: redis spec: clusterIP: None ports: - port: 6379 targetPort: 6379 selector: name: redis - apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: jenkins-verifyservice-pipeline app: redis spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- try { timeout(time: 20, unit: 'MINUTES') { // Select the default cluster openshift.withCluster() { // Select the default project openshift.withProject() { // Verify Normal Services def connectedNormalService = openshift.verifyService('redis') // Verify Headless Services with Selectors def connectedHeadlessService = openshift.verifyService('redis-headless') } } } } catch (err) { echo "in catch block" echo "Caught: ${err}" currentBuild.result = 'FAILURE' throw err } type: JenkinsPipeline `) func testExtendedTestdataVerifyservicePipelineTemplateYamlBytes() ([]byte, error) { return _testExtendedTestdataVerifyservicePipelineTemplateYaml, nil } func testExtendedTestdataVerifyservicePipelineTemplateYaml() (*asset, error) { bytes, err := testExtendedTestdataVerifyservicePipelineTemplateYamlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "test/extended/testdata/verifyservice-pipeline-template.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _e2echartE2eChartTemplateHtml = []byte(`<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>EVENT_INTERVAL_TITLE_GOES_HERE</title> <script src="https://cdn.jsdelivr.net/npm/timelines-chart"></script> <script src="https://d3js.org/d3-array.v1.min.js"></script> <script src="https://d3js.org/d3-collection.v1.min.js"></script> <script src="https://d3js.org/d3-color.v1.min.js"></script> <script src="https://d3js.org/d3-format.v1.min.js"></script> <script src="https://d3js.org/d3-interpolate.v1.min.js"></script> <script src="https://d3js.org/d3-time.v1.min.js"></script> <script src="https://d3js.org/d3-time-format.v2.min.js"></script> <script src="https://d3js.org/d3-scale.v2.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> </head> <body> <div id="search" class="form-control-lg"> <form> <input class="form-control" type="text" id="filterInput" placeholder="RegExp Filter"> </form> </div> <div id="chart"></div> <div class="modal" id="myModal" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Resource</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <pre><code id="myModalContent"></code></pre> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <script> var eventIntervals = EVENT_INTERVAL_JSON_GOES_HERE </script> <script> // Re-render the chart with input as a regexp. Timeout for event debouncing. $('#filterInput').on('input', (e) => { var $this = $(this); clearTimeout($this.data('timeout')); $this.data('timeout', setTimeout(() => { document.getElementById("chart").innerHTML = ""; renderChart(new RegExp(e.target.value)) }, 250)); }); // Prevent page refresh from pressing enter in input box $('#filterInput').keypress((e) => { if (event.which == '13') { event.preventDefault(); } }); function isOperatorAvailable(eventInterval) { return eventInterval.locator.type === "ClusterOperator" && eventInterval.message.annotations["condition"] === "Available" && eventInterval.message.annotations["status"] === "False"; } function isOperatorDegraded(eventInterval) { return eventInterval.locator.type === "ClusterOperator" && eventInterval.message.annotations["condition"] === "Degraded" && eventInterval.message.annotations["status"] === "True"; } function isOperatorProgressing(eventInterval) { return eventInterval.locator.type === "ClusterOperator" && eventInterval.message.annotations["condition"] === "Progressing" && eventInterval.message.annotations["status"] === "True"; } // When an interval in the openshift-etcd namespace had a reason of LeaderFound, LeaderLost, // LeaderElected, or LeaderMissing, source was set to 'EtcdLeadership'. function isEtcdLeadership(eventInterval) { return eventInterval.source === 'EtcdLeadership'; } function isEtcdBootstrap(eventInterval) { return eventInterval.source === 'PodLog' && eventInterval.message.reason === "EtcdBootstrap"; } function isPodLog(eventInterval) { if (eventInterval.source === 'PodLog') { return true } return eventInterval.source === 'EtcdLog'; } function isInterestingOrPathological(eventInterval) { return eventInterval.source === 'KubeEvent' && eventInterval.message.annotations["pathological"] === "true"; } function isE2EFailed(eventInterval) { if (eventInterval.source === "E2ETest" && eventInterval.message.annotations["status"] === "Failed") { return true } return false } function isE2EFlaked(eventInterval) { if (eventInterval.source === "E2ETest" && eventInterval.message.annotations["status"] === "Flaked") { return true } return false } function isE2EPassed(eventInterval) { if (eventInterval.source === "E2ETest" && eventInterval.message.annotations["status"] === "Passed") { return true } return false } function isGracefulShutdownActivity(eventInterval) { return (eventInterval.source === "APIServerGracefulShutdown") } function isAPIUnreachableFromClientActivity(eventInterval) { return (eventInterval.source === "APIUnreachableFromClient") } function isOnPremHaproxyActivity(eventInterval) { return (eventInterval.source === "OnPremHaproxyMonitor") } function isStaticPodInstallMonitorActivity(eventInterval) { return (eventInterval.source === "StaticPodInstallMonitor") } function isEndpointConnectivity(eventInterval) { if (eventInterval.message.reason !== "DisruptionBegan" && eventInterval.message.reason !== "DisruptionSamplerOutageBegan") { return false } if (eventInterval.source === "Disruption") { return true } if (eventInterval.locator.keys["namespace"] === "e2e-k8s-service-lb-available") { return true } if (eventInterval.locator.keys.has("route")) { return true } return false } function isNodeState(eventInterval) { return eventInterval.source === "NodeState" } function isCloudMetrics(eventInterval) { return eventInterval.source === "CloudMetrics"; } function isAlert(eventInterval) { return eventInterval.source === "Alert" } function isHighCPU(eventInterval) { return eventInterval.source === "CPUMonitor" && eventInterval.message.reason === "HighCPUUsage" } function isTestBucket(eventInterval) { return eventInterval.source === "TestBucket" } function testBucketValue(item) { const bucketName = item.locator.keys['test-bucket'] || 'Unknown' return [bucketName, "", "TestBucket"] } function pathologicalEvents(item) { if (item.message.annotations["pathological"] === "true") { if (item.message.annotations["interesting"] === "true") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pathological known)` + "`" + `, "PathologicalKnown"]; } else { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pathological new)` + "`" + `, "PathologicalNew"]; } } // TODO: hack that can likely be removed when we get to structured intervals for these // Always show pod sandbox events even if they didn't make it to pathological if (item.message.annotations["interesting"] === "true" && item.message.humanMessage.includes("pod sandbox")) { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod sandbox)` + "`" + `, "PodSandbox"]; } } function podLogs(item) { if (item.level == "Warning") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod log)` + "`" + `, "PodLogWarning"]; } if (item.level == "Error") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod log)` + "`" + `, "PodLogError"]; } return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod log)` + "`" + `, "PodLogInfo"]; } const rePhase = new RegExp("(^| )phase/([^ ]+)") function nodeStateValue(item) { let roles = "" if (item.message.annotations.hasOwnProperty('roles')) { roles = item.message.annotations.roles } if (item.message.reason === 'NotReady') { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (${roles})` + "`" + `, "NodeNotReady"] } let m = item.message.annotations.phase; return [buildLocatorDisplayString(item.locator), ` + "`" + ` (${roles})` + "`" + `, m]; } function etcdLeadershipLogsValue(item) { // If source is isEtcdLeadership, the term is always there. const term = item.message.annotations['term'] // We are only charting the intervals with a node. const nodeVal = item.locator.keys['node'] // Get etcd-member value (this will be present for a leader change). let etcdMemberVal = item.locator.keys['etcd-member'] || '' if (etcdMemberVal.length > 0) { etcdMemberVal = ` + "`" + `etcd-member/${etcdMemberVal} ` + "`" + ` } let reason = item.message.reason let color = 'EtcdOther' if (reason.length > 0) { color = reason reason = ` + "`" + `reason/${reason}` + "`" + ` } return [` + "`" + `node/${nodeVal} ${etcdMemberVal} term/${term}` + "`" + `, ` + "`" + ` ${reason}` + "`" + `, color ] } function cloudMetricsValue(item) { return [buildLocatorDisplayString(item.locator), "", "CloudMetric"]; } function alertSeverity(item) { // the other types can be pending, so check pending first if (item.message.annotations["alertstate"] === "pending") { return [buildLocatorDisplayString(item.locator), "", "AlertPending"] } if (item.message.annotations["severity"] === "info") { return [buildLocatorDisplayString(item.locator), "", "AlertInfo"] } if (item.message.annotations["severity"] === "warning") { return [buildLocatorDisplayString(item.locator), "", "AlertWarning"] } if (item.message.annotations["severity"] === "critical") { return [buildLocatorDisplayString(item.locator), "", "AlertCritical"] } // color as critical if nothing matches so that we notice that something has gone wrong return [buildLocatorDisplayString(item.locator), "", "AlertCritical"] } function apiserverDisruptionValue(item) { // TODO: isolate DNS error into CIClusterDisruption return [buildLocatorDisplayString(item.locator), "", "Disruption"] } function apiserverShutdownValue(item) { // TODO: isolate DNS error into CIClusterDisruption return [buildLocatorDisplayString(item.locator), "", "GracefulShutdownInterval"] } function isAPIUnreachableFromClientValue(item) { return [buildLocatorDisplayString(item.locator), "", "APIUnreachableFromClientMetrics"] } function onPremHaproxyValue(item) { return [buildLocatorDisplayString(item.locator), "", "Disruption"] } function isStaticPodInstallMonitorValue(item) { return [buildLocatorDisplayString(item.locator), "", item.message.reason] } function disruptionValue(item) { // We classify these disruption samples with this message if it thinks // it looks like a problem in the CI cluster running the tests, not the cluster under test. // (typically DNS lookup problems) if (item.message.reason === "DisruptionSamplerOutageBegan") { return [buildLocatorDisplayString(item.locator), "", "CIClusterDisruption"] } return [buildLocatorDisplayString(item.locator), "", "Disruption"] } function apiserverShutdownEventsValue(item) { // TODO: isolate DNS error into CIClusterDisruption return [buildLocatorDisplayString(item.locator), "", "GracefulShutdownWindow"] } function getDurationString(durationSeconds) { const seconds = durationSeconds % 60; const minutes = Math.floor(durationSeconds/60); var durationString = "["; if (minutes !== 0) { durationString += minutes + "m" } durationString += seconds + "s]"; return durationString; } function defaultToolTip(item) { if (!item.message || !item.message.annotations) { return ''; } const structuredMessage = item.message; const annotations = structuredMessage.annotations; const keyValuePairs = Object.entries(annotations).map(([key, value]) => { return ` + "`" + `${key}/${value}` + "`" + `; }); let tt = keyValuePairs.join(' ') + ' ' + structuredMessage.humanMessage; // TODO: can probably remove this once we're confident all displayed intervals have it set if ('display' in item) { tt = "display/" + item.display + " " + tt } if ('source' in item) { tt = "source/" + item.source + " " + tt } tt = tt + " " + getDurationString(((new Date(item.to)).getTime() - (new Date(item.from).getTime()))/1000); return tt } // Used for the actual locators displayed on the right hand side of the chart. Based on the origin go code that does // similar for whenever we serialize a locator to display. function buildLocatorDisplayString(i) { let keys = Object.keys(i.keys); keys = sortKeys(keys); let annotations = []; for (let k of keys) { let v = i.keys[k]; if (k === 'LocatorE2ETestKey') { annotations.push(` + "`" + `${k}/${JSON.stringify(v)}` + "`" + `); } else { annotations.push(` + "`" + `${k}/${v}` + "`" + `); } } return annotations.join(' '); } function sortKeys(keys) { // Ensure these keys appear in this order. Other keys can be mixed in and will appear at the end in alphabetical order. const orderedKeys = ["namespace", "node", "pod", "uid", "server", "container", "shutdown", "row"]; // Create a map to store the indices of keys in the orderedKeys array. // This will allow us to efficiently check if a key is in orderedKeys and find its position. const orderedKeyIndices = {}; orderedKeys.forEach((key, index) => { orderedKeyIndices[key] = index; }); // Define a custom sorting function that orders the keys based on the orderedKeys array. keys.sort((a, b) => { // Get the indices of keys a and b in orderedKeys. const indexA = orderedKeyIndices[a]; const indexB = orderedKeyIndices[b]; // If both keys exist in orderedKeys, sort them based on their order. if (indexA !== undefined && indexB !== undefined) { return indexA - indexB; } // If only one of the keys exists in orderedKeys, move it to the front. if (indexA !== undefined) { return -1; } else if (indexB !== undefined) { return 1; } // If neither key is in orderedKeys, sort alphabetically so we have predictable ordering. return a.localeCompare(b); }); return keys; } function segmentTooltipFunc(d) { return '<span style="max-inline-size: min-content; display: inline-block;">' + '<strong>' + d.labelVal + '</strong><br/>' + '<strong>From: </strong>' + new Date(d.timeRange[0]).toUTCString() + '<br>' + '<strong>To: </strong>' + new Date(d.timeRange[1]).toUTCString() + '</span>'; } function createTimelineData(timelineVal, timelineData, rawEventIntervals, preconditionFunc, regex) { const data = {} var now = new Date(); var earliest = rawEventIntervals.items.reduce( (accumulator, currentValue) => !currentValue.from || accumulator < new Date(currentValue.from) ? accumulator : new Date(currentValue.from), new Date(now.getTime() + 1), ); var latest = rawEventIntervals.items.reduce( (accumulator, currentValue) => !currentValue.to || accumulator > new Date(currentValue.to) ? accumulator : new Date(currentValue.to), new Date(now.getTime() - 1), ); rawEventIntervals.items.forEach((item) => { if (!preconditionFunc(item)) { return } var startDate = new Date(item.from) if (!item.from) { startDate = earliest; } var endDate = new Date(item.to) if (!item.to) { endDate = latest } let label = buildLocatorDisplayString(item.locator) let sub = "" let val = timelineVal if (typeof val === "function") { [label, sub, val] = timelineVal(item) } let section = data[label] if (!section) { section = {}; data[label] = section } let ranges = section[sub] if (!ranges) { ranges = []; section[sub] = ranges } ranges.push({ timeRange: [startDate, endDate], val: val, labelVal: defaultToolTip(item) }); }); for (const label in data) { const section = data[label] for (const sub in section) { if (regex == null || (regex != null && regex.test(label))) { const data = section[sub]; const totalDurationSeconds = data.reduce( (prev, curr) => prev + (curr.timeRange[1].getTime() - curr.timeRange[0].getTime())/1000, 0); timelineData.push({label: label + sub + " " + getDurationString(totalDurationSeconds), data: data}) } } } } function isEtcdLeadershipAndNotEmpty(item) { if (isEtcdLeadership(item)) { // Don't chart the ones where the node is empty. const node = item.locator.keys['node'] || '' if (node.length > 0) { return true } } return false } function renderChart(regex) { var loc = window.location.href; var timelineGroups = [] timelineGroups.push({group: "test-buckets", data: []}) createTimelineData(testBucketValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isTestBucket, regex) timelineGroups.push({group: "operator-unavailable", data: []}) createTimelineData("OperatorUnavailable", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isOperatorAvailable, regex) timelineGroups.push({group: "operator-degraded", data: []}) createTimelineData("OperatorDegraded", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isOperatorDegraded, regex) timelineGroups.push({group: "operator-progressing", data: []}) createTimelineData("OperatorProgressing", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isOperatorProgressing, regex) timelineGroups.push({group: "node-state", data: []}) createTimelineData(nodeStateValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isNodeState, regex) // Sort the node-state intervals so rows are grouped by node timelineGroups[timelineGroups.length - 1].data.sort(function (e1 ,e2){ return e1.label < e2.label ? -1 : e1.label > e2.label; }) timelineGroups.push({group: "high-cpu", data: []}) createTimelineData("HighCPU", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isHighCPU, regex) timelineGroups.push({group: "disruption", data: []}) createTimelineData(disruptionValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isEndpointConnectivity, regex) timelineGroups.push({group: "apiserver-shutdown", data: []}) createTimelineData(apiserverShutdownValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isGracefulShutdownActivity, regex) timelineGroups.push({group: "api-unreachable", data: []}) createTimelineData(isAPIUnreachableFromClientValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isAPIUnreachableFromClientActivity, regex) timelineGroups.push({group: "onprem-haproxy", data: []}) createTimelineData(onPremHaproxyValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isOnPremHaproxyActivity, regex) timelineGroups.push({group: "staticpod-install", data: []}) createTimelineData(isStaticPodInstallMonitorValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isStaticPodInstallMonitorActivity, regex) timelineGroups.push({ group: "etcd-leaders", data: [] }) createTimelineData(etcdLeadershipLogsValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isEtcdLeadershipAndNotEmpty, regex) createTimelineData("Bootstrap", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isEtcdBootstrap, regex) timelineGroups.push({group: "cloud-metrics", data: []}) createTimelineData(cloudMetricsValue, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isCloudMetrics, regex) timelineGroups.push({group: "pod-logs", data: []}) createTimelineData(podLogs, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isPodLog, regex) timelineGroups.push({group: "alerts", data: []}) createTimelineData(alertSeverity, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isAlert, regex) // leaving this for posterity so future me (or someone else) can try it, but I think ordering by name makes the // patterns shown by timing hide and timing appears more relevant to my eyes. // sort alerts alphabetically for display purposes, but keep the json itself ordered by time. // timelineGroups[timelineGroups.length - 1].data.sort(function (e1 ,e2){ // if (e1.label.includes("alert") && e2.label.includes("alert")) { // return e1.label < e2.label ? -1 : e1.label > e2.label; // } // return 0 // }) timelineGroups.push({group: "e2e-test-failed", data: []}) createTimelineData("Failed", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isE2EFailed, regex) timelineGroups.push({group: "e2e-test-flaked", data: []}) createTimelineData("Flaked", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isE2EFlaked, regex) timelineGroups.push({group: "e2e-test-passed", data: []}) createTimelineData("Passed", timelineGroups[timelineGroups.length - 1].data, eventIntervals, isE2EPassed, regex) timelineGroups.push({group: "pathological-events", data: []}) createTimelineData(pathologicalEvents, timelineGroups[timelineGroups.length - 1].data, eventIntervals, isInterestingOrPathological, regex) var segmentFunc = function (segment) { // Copy label to clipboard navigator.clipboard.writeText(segment.labelVal); // for (var i in data) { // if (data[i].group == segment.group) { // var groupdata = data[i].data // for (var j in groupdata) { // if (groupdata[j].label == segment.label) { // labeldata = groupdata[j].data // for (var k in labeldata) { // var startDate = new Date(labeldata[k].timeRange[0]) // var endDate = new Date(labeldata[k].timeRange[1]) // if (startDate.getTime() == segment.timeRange[0].getTime() && // endDate.getTime() == segment.timeRange[1].getTime()) { // $('#myModalContent').text(labeldata[k].extended) // $('#myModal').modal() // } // } // } // } // } // } } const el = document.querySelector('#chart'); const myChart = TimelinesChart(); var ordinalScale = d3.scaleOrdinal() .domain([ 'TestBucket', // test bucket intervals 'InterestingEvent', 'PathologicalKnown', "PathologicalNew", "PodSandbox", // interesting and pathological events 'AlertInfo', 'AlertPending', 'AlertWarning', 'AlertCritical', // alerts 'OperatorUnavailable', 'OperatorDegraded', 'OperatorProgressing', // operators 'Update', 'Drain', 'Reboot', 'OperatingSystemUpdate', 'NodeNotReady', // nodes 'Passed', 'Skipped', 'Flaked', 'Failed', // tests 'PodCreated', 'PodScheduled', 'PodTerminating','ContainerWait', 'ContainerStart', 'ContainerNotReady', 'ContainerReady', 'ContainerReadinessFailed', 'ContainerReadinessErrored', 'StartupProbeFailed', // pods 'CIClusterDisruption', 'Disruption', // disruption 'Degraded', 'Upgradeable', 'False', 'Unknown', 'PodLogInfo', 'PodLogWarning', 'PodLogError', 'EtcdOther', 'EtcdLeaderFound', 'EtcdLeaderLost', 'EtcdLeaderElected', 'EtcdLeaderMissing']) .range([ '#9370DB', // test bucket intervals - medium purple '#6E6E6E', '#0000ff', '#d0312d', '#ffa500', // pathological and interesting events '#fada5e','#fada5e','#ffa500', '#d0312d', // alerts '#d0312d', '#ffa500', '#fada5e', // operators '#1e7bd9', '#4294e6', '#6aaef2', '#96cbff', '#fada5e', // nodes '#3cb043', '#ceba76', '#ffa500', '#d0312d', // tests '#96cbff', '#1e7bd9', '#ffa500', '#ca8dfd', '#9300ff', '#fada5e','#3cb043', '#d0312d', '#d0312d', '#c90076', // pods '#96cbff', '#d0312d', // disruption '#b65049', '#32b8b6', '#ffffff', '#bbbbbb', '#96cbff', '#fada5e', '#d0312d', '#d3d3de', '#03fc62', '#fc0303', '#fada5e', '#8c5efa']); // EtcdLeadership myChart. data(timelineGroups). useUtc(true). zQualitative(true). enableAnimations(false). leftMargin(240). rightMargin(1550). maxLineHeight(20). maxHeight(10000). zColorScale(ordinalScale). zoomX([new Date(eventIntervals.items[0].from), new Date(eventIntervals.items[eventIntervals.items.length - 1].to)]). onSegmentClick(segmentFunc). segmentTooltipContent(segmentTooltipFunc) (el); // force a minimum width for smaller devices (which otherwise get an unusable display) setTimeout(() => { if (myChart.width() < 3100) { myChart.width(3100) }}, 1) } renderChart(null) </script> </body> </html> `) func e2echartE2eChartTemplateHtmlBytes() ([]byte, error) { return _e2echartE2eChartTemplateHtml, nil } func e2echartE2eChartTemplateHtml() (*asset, error) { bytes, err := e2echartE2eChartTemplateHtmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "e2echart/e2e-chart-template.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _e2echartNonSpyglassE2eChartTemplateHtml = []byte(`<html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>EVENT_INTERVAL_TITLE_GOES_HERE</title> <script src="https://cdn.jsdelivr.net/npm/timelines-chart"></script> <script src="https://d3js.org/d3-array.v1.min.js"></script> <script src="https://d3js.org/d3-collection.v1.min.js"></script> <script src="https://d3js.org/d3-color.v1.min.js"></script> <script src="https://d3js.org/d3-format.v1.min.js"></script> <script src="https://d3js.org/d3-interpolate.v1.min.js"></script> <script src="https://d3js.org/d3-time.v1.min.js"></script> <script src="https://d3js.org/d3-time-format.v2.min.js"></script> <script src="https://d3js.org/d3-scale.v2.min.js"></script> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> <script type="text/javascript"> /** * @license * Lodash <https://lodash.com/> * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> * Released under MIT license <https://lodash.com/license> * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ (function(){function n(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function t(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u<i;){var o=n[u];t(e,o,r(o),n)}return e}function r(n,t){for(var r=-1,e=null==n?0:n.length;++r<e&&t(n[r],r,n)!==!1;);return n}function e(n,t){for(var r=null==n?0:n.length;r--&&t(n[r],r,n)!==!1;);return n}function u(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(!t(n[r],r,n))return!1; return!0}function i(n,t){for(var r=-1,e=null==n?0:n.length,u=0,i=[];++r<e;){var o=n[r];t(o,r,n)&&(i[u++]=o)}return i}function o(n,t){return!!(null==n?0:n.length)&&y(n,t,0)>-1}function f(n,t,r){for(var e=-1,u=null==n?0:n.length;++e<u;)if(r(t,n[e]))return!0;return!1}function c(n,t){for(var r=-1,e=null==n?0:n.length,u=Array(e);++r<e;)u[r]=t(n[r],r,n);return u}function a(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function l(n,t,r,e){var u=-1,i=null==n?0:n.length;for(e&&i&&(r=n[++u]);++u<i;)r=t(r,n[u],u,n); return r}function s(n,t,r,e){var u=null==n?0:n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r}function h(n,t){for(var r=-1,e=null==n?0:n.length;++r<e;)if(t(n[r],r,n))return!0;return!1}function p(n){return n.split("")}function _(n){return n.match($t)||[]}function v(n,t,r){var e;return r(n,function(n,r,u){if(t(n,r,u))return e=r,!1}),e}function g(n,t,r,e){for(var u=n.length,i=r+(e?1:-1);e?i--:++i<u;)if(t(n[i],i,n))return i;return-1}function y(n,t,r){return t===t?Z(n,t,r):g(n,b,r)}function d(n,t,r,e){ for(var u=r-1,i=n.length;++u<i;)if(e(n[u],t))return u;return-1}function b(n){return n!==n}function w(n,t){var r=null==n?0:n.length;return r?k(n,t)/r:Cn}function m(n){return function(t){return null==t?X:t[n]}}function x(n){return function(t){return null==n?X:n[t]}}function j(n,t,r,e,u){return u(n,function(n,u,i){r=e?(e=!1,n):t(r,n,u,i)}),r}function A(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].value;return n}function k(n,t){for(var r,e=-1,u=n.length;++e<u;){var i=t(n[e]);i!==X&&(r=r===X?i:r+i); }return r}function O(n,t){for(var r=-1,e=Array(n);++r<n;)e[r]=t(r);return e}function I(n,t){return c(t,function(t){return[t,n[t]]})}function R(n){return n?n.slice(0,H(n)+1).replace(Lt,""):n}function z(n){return function(t){return n(t)}}function E(n,t){return c(t,function(t){return n[t]})}function S(n,t){return n.has(t)}function W(n,t){for(var r=-1,e=n.length;++r<e&&y(t,n[r],0)>-1;);return r}function L(n,t){for(var r=n.length;r--&&y(t,n[r],0)>-1;);return r}function C(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e; return e}function U(n){return"\\"+Yr[n]}function B(n,t){return null==n?X:n[t]}function T(n){return Nr.test(n)}function $(n){return Pr.test(n)}function D(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}function M(n){var t=-1,r=Array(n.size);return n.forEach(function(n,e){r[++t]=[e,n]}),r}function F(n,t){return function(r){return n(t(r))}}function N(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){var o=n[r];o!==t&&o!==cn||(n[r]=cn,i[u++]=r)}return i}function P(n){var t=-1,r=Array(n.size); return n.forEach(function(n){r[++t]=n}),r}function q(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=[n,n]}),r}function Z(n,t,r){for(var e=r-1,u=n.length;++e<u;)if(n[e]===t)return e;return-1}function K(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}function V(n){return T(n)?J(n):_e(n)}function G(n){return T(n)?Y(n):p(n)}function H(n){for(var t=n.length;t--&&Ct.test(n.charAt(t)););return t}function J(n){for(var t=Mr.lastIndex=0;Mr.test(n);)++t;return t}function Y(n){return n.match(Mr)||[]; }function Q(n){return n.match(Fr)||[]}var X,nn="4.17.21",tn=200,rn="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",en="Expected a function",un="Invalid ` + "`" + `variable` + "`" + ` option passed into ` + "`" + `_.template` + "`" + `",on="__lodash_hash_undefined__",fn=500,cn="__lodash_placeholder__",an=1,ln=2,sn=4,hn=1,pn=2,_n=1,vn=2,gn=4,yn=8,dn=16,bn=32,wn=64,mn=128,xn=256,jn=512,An=30,kn="...",On=800,In=16,Rn=1,zn=2,En=3,Sn=1/0,Wn=9007199254740991,Ln=1.7976931348623157e308,Cn=NaN,Un=4294967295,Bn=Un-1,Tn=Un>>>1,$n=[["ary",mn],["bind",_n],["bindKey",vn],["curry",yn],["curryRight",dn],["flip",jn],["partial",bn],["partialRight",wn],["rearg",xn]],Dn="[object Arguments]",Mn="[object Array]",Fn="[object AsyncFunction]",Nn="[object Boolean]",Pn="[object Date]",qn="[object DOMException]",Zn="[object Error]",Kn="[object Function]",Vn="[object GeneratorFunction]",Gn="[object Map]",Hn="[object Number]",Jn="[object Null]",Yn="[object Object]",Qn="[object Promise]",Xn="[object Proxy]",nt="[object RegExp]",tt="[object Set]",rt="[object String]",et="[object Symbol]",ut="[object Undefined]",it="[object WeakMap]",ot="[object WeakSet]",ft="[object ArrayBuffer]",ct="[object DataView]",at="[object Float32Array]",lt="[object Float64Array]",st="[object Int8Array]",ht="[object Int16Array]",pt="[object Int32Array]",_t="[object Uint8Array]",vt="[object Uint8ClampedArray]",gt="[object Uint16Array]",yt="[object Uint32Array]",dt=/\b__p \+= '';/g,bt=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39);/g,xt=/[&<>"']/g,jt=RegExp(mt.source),At=RegExp(xt.source),kt=/<%-([\s\S]+?)%>/g,Ot=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,Rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zt=/^\w*$/,Et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,St=/[\\^$.*+?()[\]{}|]/g,Wt=RegExp(St.source),Lt=/^\s+/,Ct=/\s/,Ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Bt=/\{\n\/\* \[wrapped with (.+)\] \*/,Tt=/,? & /,$t=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Dt=/[()=,{}\[\]\/\s]/,Mt=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,Pt=/^[-+]0x[0-9a-f]+$/i,qt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Kt=/^0o[0-7]+$/i,Vt=/^(?:0|[1-9]\d*)$/,Gt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ht=/($^)/,Jt=/['\n\r\u2028\u2029\\]/g,Yt="\\ud800-\\udfff",Qt="\\u0300-\\u036f",Xt="\\ufe20-\\ufe2f",nr="\\u20d0-\\u20ff",tr=Qt+Xt+nr,rr="\\u2700-\\u27bf",er="a-z\\xdf-\\xf6\\xf8-\\xff",ur="\\xac\\xb1\\xd7\\xf7",ir="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",or="\\u2000-\\u206f",fr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",cr="A-Z\\xc0-\\xd6\\xd8-\\xde",ar="\\ufe0e\\ufe0f",lr=ur+ir+or+fr,sr="['\u2019]",hr="["+Yt+"]",pr="["+lr+"]",_r="["+tr+"]",vr="\\d+",gr="["+rr+"]",yr="["+er+"]",dr="[^"+Yt+lr+vr+rr+er+cr+"]",br="\\ud83c[\\udffb-\\udfff]",wr="(?:"+_r+"|"+br+")",mr="[^"+Yt+"]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",jr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ar="["+cr+"]",kr="\\u200d",Or="(?:"+yr+"|"+dr+")",Ir="(?:"+Ar+"|"+dr+")",Rr="(?:"+sr+"(?:d|ll|m|re|s|t|ve))?",zr="(?:"+sr+"(?:D|LL|M|RE|S|T|VE))?",Er=wr+"?",Sr="["+ar+"]?",Wr="(?:"+kr+"(?:"+[mr,xr,jr].join("|")+")"+Sr+Er+")*",Lr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Cr="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ur=Sr+Er+Wr,Br="(?:"+[gr,xr,jr].join("|")+")"+Ur,Tr="(?:"+[mr+_r+"?",_r,xr,jr,hr].join("|")+")",$r=RegExp(sr,"g"),Dr=RegExp(_r,"g"),Mr=RegExp(br+"(?="+br+")|"+Tr+Ur,"g"),Fr=RegExp([Ar+"?"+yr+"+"+Rr+"(?="+[pr,Ar,"$"].join("|")+")",Ir+"+"+zr+"(?="+[pr,Ar+Or,"$"].join("|")+")",Ar+"?"+Or+"+"+Rr,Ar+"+"+zr,Cr,Lr,vr,Br].join("|"),"g"),Nr=RegExp("["+kr+Yt+tr+ar+"]"),Pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qr=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Zr=-1,Kr={}; Kr[at]=Kr[lt]=Kr[st]=Kr[ht]=Kr[pt]=Kr[_t]=Kr[vt]=Kr[gt]=Kr[yt]=!0,Kr[Dn]=Kr[Mn]=Kr[ft]=Kr[Nn]=Kr[ct]=Kr[Pn]=Kr[Zn]=Kr[Kn]=Kr[Gn]=Kr[Hn]=Kr[Yn]=Kr[nt]=Kr[tt]=Kr[rt]=Kr[it]=!1;var Vr={};Vr[Dn]=Vr[Mn]=Vr[ft]=Vr[ct]=Vr[Nn]=Vr[Pn]=Vr[at]=Vr[lt]=Vr[st]=Vr[ht]=Vr[pt]=Vr[Gn]=Vr[Hn]=Vr[Yn]=Vr[nt]=Vr[tt]=Vr[rt]=Vr[et]=Vr[_t]=Vr[vt]=Vr[gt]=Vr[yt]=!0,Vr[Zn]=Vr[Kn]=Vr[it]=!1;var Gr={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a", "\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae", "\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g", "\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O", "\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w", "\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"},Hr={"&":"&","<":"<",">":">",'"':""","'":"'"},Jr={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Qr=parseFloat,Xr=parseInt,ne="object"==typeof global&&global&&global.Object===Object&&global,te="object"==typeof self&&self&&self.Object===Object&&self,re=ne||te||Function("return this")(),ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,ue=ee&&"object"==typeof module&&module&&!module.nodeType&&module,ie=ue&&ue.exports===ee,oe=ie&&ne.process,fe=function(){ try{var n=ue&&ue.require&&ue.require("util").types;return n?n:oe&&oe.binding&&oe.binding("util")}catch(n){}}(),ce=fe&&fe.isArrayBuffer,ae=fe&&fe.isDate,le=fe&&fe.isMap,se=fe&&fe.isRegExp,he=fe&&fe.isSet,pe=fe&&fe.isTypedArray,_e=m("length"),ve=x(Gr),ge=x(Hr),ye=x(Jr),de=function p(x){function Z(n){if(cc(n)&&!bh(n)&&!(n instanceof Ct)){if(n instanceof Y)return n;if(bl.call(n,"__wrapped__"))return eo(n)}return new Y(n)}function J(){}function Y(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t, this.__index__=0,this.__values__=X}function Ct(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Un,this.__views__=[]}function $t(){var n=new Ct(this.__wrapped__);return n.__actions__=Tu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Tu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Tu(this.__views__),n}function Yt(){if(this.__filtered__){var n=new Ct(this);n.__dir__=-1, n.__filtered__=!0}else n=this.clone(),n.__dir__*=-1;return n}function Qt(){var n=this.__wrapped__.value(),t=this.__dir__,r=bh(n),e=t<0,u=r?n.length:0,i=Oi(0,u,this.__views__),o=i.start,f=i.end,c=f-o,a=e?f:o-1,l=this.__iteratees__,s=l.length,h=0,p=Hl(c,this.__takeCount__);if(!r||!e&&u==c&&p==c)return wu(n,this.__actions__);var _=[];n:for(;c--&&h<p;){a+=t;for(var v=-1,g=n[a];++v<s;){var y=l[v],d=y.iteratee,b=y.type,w=d(g);if(b==zn)g=w;else if(!w){if(b==Rn)continue n;break n}}_[h++]=g}return _}function Xt(n){ var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function nr(){this.__data__=is?is(null):{},this.size=0}function tr(n){var t=this.has(n)&&delete this.__data__[n];return this.size-=t?1:0,t}function rr(n){var t=this.__data__;if(is){var r=t[n];return r===on?X:r}return bl.call(t,n)?t[n]:X}function er(n){var t=this.__data__;return is?t[n]!==X:bl.call(t,n)}function ur(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=is&&t===X?on:t,this}function ir(n){ var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){var e=n[t];this.set(e[0],e[1])}}function or(){this.__data__=[],this.size=0}function fr(n){var t=this.__data__,r=Wr(t,n);return!(r<0)&&(r==t.length-1?t.pop():Ll.call(t,r,1),--this.size,!0)}function cr(n){var t=this.__data__,r=Wr(t,n);return r<0?X:t[r][1]}function ar(n){return Wr(this.__data__,n)>-1}function lr(n,t){var r=this.__data__,e=Wr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this}function sr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t<r;){ var e=n[t];this.set(e[0],e[1])}}function hr(){this.size=0,this.__data__={hash:new Xt,map:new(ts||ir),string:new Xt}}function pr(n){var t=xi(this,n).delete(n);return this.size-=t?1:0,t}function _r(n){return xi(this,n).get(n)}function vr(n){return xi(this,n).has(n)}function gr(n,t){var r=xi(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this}function yr(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new sr;++t<r;)this.add(n[t])}function dr(n){return this.__data__.set(n,on),this}function br(n){ return this.__data__.has(n)}function wr(n){this.size=(this.__data__=new ir(n)).size}function mr(){this.__data__=new ir,this.size=0}function xr(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r}function jr(n){return this.__data__.get(n)}function Ar(n){return this.__data__.has(n)}function kr(n,t){var r=this.__data__;if(r instanceof ir){var e=r.__data__;if(!ts||e.length<tn-1)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new sr(e)}return r.set(n,t),this.size=r.size,this}function Or(n,t){ var r=bh(n),e=!r&&dh(n),u=!r&&!e&&mh(n),i=!r&&!e&&!u&&Oh(n),o=r||e||u||i,f=o?O(n.length,hl):[],c=f.length;for(var a in n)!t&&!bl.call(n,a)||o&&("length"==a||u&&("offset"==a||"parent"==a)||i&&("buffer"==a||"byteLength"==a||"byteOffset"==a)||Ci(a,c))||f.push(a);return f}function Ir(n){var t=n.length;return t?n[tu(0,t-1)]:X}function Rr(n,t){return Xi(Tu(n),Mr(t,0,n.length))}function zr(n){return Xi(Tu(n))}function Er(n,t,r){(r===X||Gf(n[t],r))&&(r!==X||t in n)||Br(n,t,r)}function Sr(n,t,r){var e=n[t]; bl.call(n,t)&&Gf(e,r)&&(r!==X||t in n)||Br(n,t,r)}function Wr(n,t){for(var r=n.length;r--;)if(Gf(n[r][0],t))return r;return-1}function Lr(n,t,r,e){return ys(n,function(n,u,i){t(e,n,r(n),i)}),e}function Cr(n,t){return n&&$u(t,Pc(t),n)}function Ur(n,t){return n&&$u(t,qc(t),n)}function Br(n,t,r){"__proto__"==t&&Tl?Tl(n,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[t]=r}function Tr(n,t){for(var r=-1,e=t.length,u=il(e),i=null==n;++r<e;)u[r]=i?X:Mc(n,t[r]);return u}function Mr(n,t,r){return n===n&&(r!==X&&(n=n<=r?n:r), t!==X&&(n=n>=t?n:t)),n}function Fr(n,t,e,u,i,o){var f,c=t&an,a=t&ln,l=t&sn;if(e&&(f=i?e(n,u,i,o):e(n)),f!==X)return f;if(!fc(n))return n;var s=bh(n);if(s){if(f=zi(n),!c)return Tu(n,f)}else{var h=zs(n),p=h==Kn||h==Vn;if(mh(n))return Iu(n,c);if(h==Yn||h==Dn||p&&!i){if(f=a||p?{}:Ei(n),!c)return a?Mu(n,Ur(f,n)):Du(n,Cr(f,n))}else{if(!Vr[h])return i?n:{};f=Si(n,h,c)}}o||(o=new wr);var _=o.get(n);if(_)return _;o.set(n,f),kh(n)?n.forEach(function(r){f.add(Fr(r,t,e,r,n,o))}):jh(n)&&n.forEach(function(r,u){ f.set(u,Fr(r,t,e,u,n,o))});var v=l?a?di:yi:a?qc:Pc,g=s?X:v(n);return r(g||n,function(r,u){g&&(u=r,r=n[u]),Sr(f,u,Fr(r,t,e,u,n,o))}),f}function Nr(n){var t=Pc(n);return function(r){return Pr(r,n,t)}}function Pr(n,t,r){var e=r.length;if(null==n)return!e;for(n=ll(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===X&&!(u in n)||!i(o))return!1}return!0}function Gr(n,t,r){if("function"!=typeof n)throw new pl(en);return Ws(function(){n.apply(X,r)},t)}function Hr(n,t,r,e){var u=-1,i=o,a=!0,l=n.length,s=[],h=t.length; if(!l)return s;r&&(t=c(t,z(r))),e?(i=f,a=!1):t.length>=tn&&(i=S,a=!1,t=new yr(t));n:for(;++u<l;){var p=n[u],_=null==r?p:r(p);if(p=e||0!==p?p:0,a&&_===_){for(var v=h;v--;)if(t[v]===_)continue n;s.push(p)}else i(t,_,e)||s.push(p)}return s}function Jr(n,t){var r=!0;return ys(n,function(n,e,u){return r=!!t(n,e,u)}),r}function Yr(n,t,r){for(var e=-1,u=n.length;++e<u;){var i=n[e],o=t(i);if(null!=o&&(f===X?o===o&&!bc(o):r(o,f)))var f=o,c=i}return c}function ne(n,t,r,e){var u=n.length;for(r=kc(r),r<0&&(r=-r>u?0:u+r), e=e===X||e>u?u:kc(e),e<0&&(e+=u),e=r>e?0:Oc(e);r<e;)n[r++]=t;return n}function te(n,t){var r=[];return ys(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ee(n,t,r,e,u){var i=-1,o=n.length;for(r||(r=Li),u||(u=[]);++i<o;){var f=n[i];t>0&&r(f)?t>1?ee(f,t-1,r,e,u):a(u,f):e||(u[u.length]=f)}return u}function ue(n,t){return n&&bs(n,t,Pc)}function oe(n,t){return n&&ws(n,t,Pc)}function fe(n,t){return i(t,function(t){return uc(n[t])})}function _e(n,t){t=ku(t,n);for(var r=0,e=t.length;null!=n&&r<e;)n=n[no(t[r++])]; return r&&r==e?n:X}function de(n,t,r){var e=t(n);return bh(n)?e:a(e,r(n))}function we(n){return null==n?n===X?ut:Jn:Bl&&Bl in ll(n)?ki(n):Ki(n)}function me(n,t){return n>t}function xe(n,t){return null!=n&&bl.call(n,t)}function je(n,t){return null!=n&&t in ll(n)}function Ae(n,t,r){return n>=Hl(t,r)&&n<Gl(t,r)}function ke(n,t,r){for(var e=r?f:o,u=n[0].length,i=n.length,a=i,l=il(i),s=1/0,h=[];a--;){var p=n[a];a&&t&&(p=c(p,z(t))),s=Hl(p.length,s),l[a]=!r&&(t||u>=120&&p.length>=120)?new yr(a&&p):X}p=n[0]; var _=-1,v=l[0];n:for(;++_<u&&h.length<s;){var g=p[_],y=t?t(g):g;if(g=r||0!==g?g:0,!(v?S(v,y):e(h,y,r))){for(a=i;--a;){var d=l[a];if(!(d?S(d,y):e(n[a],y,r)))continue n}v&&v.push(y),h.push(g)}}return h}function Oe(n,t,r,e){return ue(n,function(n,u,i){t(e,r(n),u,i)}),e}function Ie(t,r,e){r=ku(r,t),t=Gi(t,r);var u=null==t?t:t[no(jo(r))];return null==u?X:n(u,t,e)}function Re(n){return cc(n)&&we(n)==Dn}function ze(n){return cc(n)&&we(n)==ft}function Ee(n){return cc(n)&&we(n)==Pn}function Se(n,t,r,e,u){ return n===t||(null==n||null==t||!cc(n)&&!cc(t)?n!==n&&t!==t:We(n,t,r,e,Se,u))}function We(n,t,r,e,u,i){var o=bh(n),f=bh(t),c=o?Mn:zs(n),a=f?Mn:zs(t);c=c==Dn?Yn:c,a=a==Dn?Yn:a;var l=c==Yn,s=a==Yn,h=c==a;if(h&&mh(n)){if(!mh(t))return!1;o=!0,l=!1}if(h&&!l)return i||(i=new wr),o||Oh(n)?pi(n,t,r,e,u,i):_i(n,t,c,r,e,u,i);if(!(r&hn)){var p=l&&bl.call(n,"__wrapped__"),_=s&&bl.call(t,"__wrapped__");if(p||_){var v=p?n.value():n,g=_?t.value():t;return i||(i=new wr),u(v,g,r,e,i)}}return!!h&&(i||(i=new wr),vi(n,t,r,e,u,i)); }function Le(n){return cc(n)&&zs(n)==Gn}function Ce(n,t,r,e){var u=r.length,i=u,o=!e;if(null==n)return!i;for(n=ll(n);u--;){var f=r[u];if(o&&f[2]?f[1]!==n[f[0]]:!(f[0]in n))return!1}for(;++u<i;){f=r[u];var c=f[0],a=n[c],l=f[1];if(o&&f[2]){if(a===X&&!(c in n))return!1}else{var s=new wr;if(e)var h=e(a,l,c,n,t,s);if(!(h===X?Se(l,a,hn|pn,e,s):h))return!1}}return!0}function Ue(n){return!(!fc(n)||Di(n))&&(uc(n)?kl:Zt).test(to(n))}function Be(n){return cc(n)&&we(n)==nt}function Te(n){return cc(n)&&zs(n)==tt; }function $e(n){return cc(n)&&oc(n.length)&&!!Kr[we(n)]}function De(n){return"function"==typeof n?n:null==n?La:"object"==typeof n?bh(n)?Ze(n[0],n[1]):qe(n):Fa(n)}function Me(n){if(!Mi(n))return Vl(n);var t=[];for(var r in ll(n))bl.call(n,r)&&"constructor"!=r&&t.push(r);return t}function Fe(n){if(!fc(n))return Zi(n);var t=Mi(n),r=[];for(var e in n)("constructor"!=e||!t&&bl.call(n,e))&&r.push(e);return r}function Ne(n,t){return n<t}function Pe(n,t){var r=-1,e=Hf(n)?il(n.length):[];return ys(n,function(n,u,i){ e[++r]=t(n,u,i)}),e}function qe(n){var t=ji(n);return 1==t.length&&t[0][2]?Ni(t[0][0],t[0][1]):function(r){return r===n||Ce(r,n,t)}}function Ze(n,t){return Bi(n)&&Fi(t)?Ni(no(n),t):function(r){var e=Mc(r,n);return e===X&&e===t?Nc(r,n):Se(t,e,hn|pn)}}function Ke(n,t,r,e,u){n!==t&&bs(t,function(i,o){if(u||(u=new wr),fc(i))Ve(n,t,o,r,Ke,e,u);else{var f=e?e(Ji(n,o),i,o+"",n,t,u):X;f===X&&(f=i),Er(n,o,f)}},qc)}function Ve(n,t,r,e,u,i,o){var f=Ji(n,r),c=Ji(t,r),a=o.get(c);if(a)return Er(n,r,a),X;var l=i?i(f,c,r+"",n,t,o):X,s=l===X; if(s){var h=bh(c),p=!h&&mh(c),_=!h&&!p&&Oh(c);l=c,h||p||_?bh(f)?l=f:Jf(f)?l=Tu(f):p?(s=!1,l=Iu(c,!0)):_?(s=!1,l=Wu(c,!0)):l=[]:gc(c)||dh(c)?(l=f,dh(f)?l=Rc(f):fc(f)&&!uc(f)||(l=Ei(c))):s=!1}s&&(o.set(c,l),u(l,c,e,i,o),o.delete(c)),Er(n,r,l)}function Ge(n,t){var r=n.length;if(r)return t+=t<0?r:0,Ci(t,r)?n[t]:X}function He(n,t,r){t=t.length?c(t,function(n){return bh(n)?function(t){return _e(t,1===n.length?n[0]:n)}:n}):[La];var e=-1;return t=c(t,z(mi())),A(Pe(n,function(n,r,u){return{criteria:c(t,function(t){ return t(n)}),index:++e,value:n}}),function(n,t){return Cu(n,t,r)})}function Je(n,t){return Ye(n,t,function(t,r){return Nc(n,r)})}function Ye(n,t,r){for(var e=-1,u=t.length,i={};++e<u;){var o=t[e],f=_e(n,o);r(f,o)&&fu(i,ku(o,n),f)}return i}function Qe(n){return function(t){return _e(t,n)}}function Xe(n,t,r,e){var u=e?d:y,i=-1,o=t.length,f=n;for(n===t&&(t=Tu(t)),r&&(f=c(n,z(r)));++i<o;)for(var a=0,l=t[i],s=r?r(l):l;(a=u(f,s,a,e))>-1;)f!==n&&Ll.call(f,a,1),Ll.call(n,a,1);return n}function nu(n,t){for(var r=n?t.length:0,e=r-1;r--;){ var u=t[r];if(r==e||u!==i){var i=u;Ci(u)?Ll.call(n,u,1):yu(n,u)}}return n}function tu(n,t){return n+Nl(Ql()*(t-n+1))}function ru(n,t,r,e){for(var u=-1,i=Gl(Fl((t-n)/(r||1)),0),o=il(i);i--;)o[e?i:++u]=n,n+=r;return o}function eu(n,t){var r="";if(!n||t<1||t>Wn)return r;do t%2&&(r+=n),t=Nl(t/2),t&&(n+=n);while(t);return r}function uu(n,t){return Ls(Vi(n,t,La),n+"")}function iu(n){return Ir(ra(n))}function ou(n,t){var r=ra(n);return Xi(r,Mr(t,0,r.length))}function fu(n,t,r,e){if(!fc(n))return n;t=ku(t,n); for(var u=-1,i=t.length,o=i-1,f=n;null!=f&&++u<i;){var c=no(t[u]),a=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(u!=o){var l=f[c];a=e?e(l,c,f):X,a===X&&(a=fc(l)?l:Ci(t[u+1])?[]:{})}Sr(f,c,a),f=f[c]}return n}function cu(n){return Xi(ra(n))}function au(n,t,r){var e=-1,u=n.length;t<0&&(t=-t>u?0:u+t),r=r>u?u:r,r<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=il(u);++e<u;)i[e]=n[e+t];return i}function lu(n,t){var r;return ys(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function su(n,t,r){ var e=0,u=null==n?e:n.length;if("number"==typeof t&&t===t&&u<=Tn){for(;e<u;){var i=e+u>>>1,o=n[i];null!==o&&!bc(o)&&(r?o<=t:o<t)?e=i+1:u=i}return u}return hu(n,t,La,r)}function hu(n,t,r,e){var u=0,i=null==n?0:n.length;if(0===i)return 0;t=r(t);for(var o=t!==t,f=null===t,c=bc(t),a=t===X;u<i;){var l=Nl((u+i)/2),s=r(n[l]),h=s!==X,p=null===s,_=s===s,v=bc(s);if(o)var g=e||_;else g=a?_&&(e||h):f?_&&h&&(e||!p):c?_&&h&&!p&&(e||!v):!p&&!v&&(e?s<=t:s<t);g?u=l+1:i=l}return Hl(i,Bn)}function pu(n,t){for(var r=-1,e=n.length,u=0,i=[];++r<e;){ var o=n[r],f=t?t(o):o;if(!r||!Gf(f,c)){var c=f;i[u++]=0===o?0:o}}return i}function _u(n){return"number"==typeof n?n:bc(n)?Cn:+n}function vu(n){if("string"==typeof n)return n;if(bh(n))return c(n,vu)+"";if(bc(n))return vs?vs.call(n):"";var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function gu(n,t,r){var e=-1,u=o,i=n.length,c=!0,a=[],l=a;if(r)c=!1,u=f;else if(i>=tn){var s=t?null:ks(n);if(s)return P(s);c=!1,u=S,l=new yr}else l=t?[]:a;n:for(;++e<i;){var h=n[e],p=t?t(h):h;if(h=r||0!==h?h:0,c&&p===p){for(var _=l.length;_--;)if(l[_]===p)continue n; t&&l.push(p),a.push(h)}else u(l,p,r)||(l!==a&&l.push(p),a.push(h))}return a}function yu(n,t){return t=ku(t,n),n=Gi(n,t),null==n||delete n[no(jo(t))]}function du(n,t,r,e){return fu(n,t,r(_e(n,t)),e)}function bu(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++i<u)&&t(n[i],i,n););return r?au(n,e?0:i,e?i+1:u):au(n,e?i+1:0,e?u:i)}function wu(n,t){var r=n;return r instanceof Ct&&(r=r.value()),l(t,function(n,t){return t.func.apply(t.thisArg,a([n],t.args))},r)}function mu(n,t,r){var e=n.length;if(e<2)return e?gu(n[0]):[]; for(var u=-1,i=il(e);++u<e;)for(var o=n[u],f=-1;++f<e;)f!=u&&(i[u]=Hr(i[u]||o,n[f],t,r));return gu(ee(i,1),t,r)}function xu(n,t,r){for(var e=-1,u=n.length,i=t.length,o={};++e<u;){r(o,n[e],e<i?t[e]:X)}return o}function ju(n){return Jf(n)?n:[]}function Au(n){return"function"==typeof n?n:La}function ku(n,t){return bh(n)?n:Bi(n,t)?[n]:Cs(Ec(n))}function Ou(n,t,r){var e=n.length;return r=r===X?e:r,!t&&r>=e?n:au(n,t,r)}function Iu(n,t){if(t)return n.slice();var r=n.length,e=zl?zl(r):new n.constructor(r); return n.copy(e),e}function Ru(n){var t=new n.constructor(n.byteLength);return new Rl(t).set(new Rl(n)),t}function zu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.byteLength)}function Eu(n){var t=new n.constructor(n.source,Nt.exec(n));return t.lastIndex=n.lastIndex,t}function Su(n){return _s?ll(_s.call(n)):{}}function Wu(n,t){return new n.constructor(t?Ru(n.buffer):n.buffer,n.byteOffset,n.length)}function Lu(n,t){if(n!==t){var r=n!==X,e=null===n,u=n===n,i=bc(n),o=t!==X,f=null===t,c=t===t,a=bc(t); if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&n<t||a&&r&&u&&!e&&!i||f&&r&&u||!o&&u||!c)return-1}return 0}function Cu(n,t,r){for(var e=-1,u=n.criteria,i=t.criteria,o=u.length,f=r.length;++e<o;){var c=Lu(u[e],i[e]);if(c){if(e>=f)return c;return c*("desc"==r[e]?-1:1)}}return n.index-t.index}function Uu(n,t,r,e){for(var u=-1,i=n.length,o=r.length,f=-1,c=t.length,a=Gl(i-o,0),l=il(c+a),s=!e;++f<c;)l[f]=t[f];for(;++u<o;)(s||u<i)&&(l[r[u]]=n[u]);for(;a--;)l[f++]=n[u++];return l; }function Bu(n,t,r,e){for(var u=-1,i=n.length,o=-1,f=r.length,c=-1,a=t.length,l=Gl(i-f,0),s=il(l+a),h=!e;++u<l;)s[u]=n[u];for(var p=u;++c<a;)s[p+c]=t[c];for(;++o<f;)(h||u<i)&&(s[p+r[o]]=n[u++]);return s}function Tu(n,t){var r=-1,e=n.length;for(t||(t=il(e));++r<e;)t[r]=n[r];return t}function $u(n,t,r,e){var u=!r;r||(r={});for(var i=-1,o=t.length;++i<o;){var f=t[i],c=e?e(r[f],n[f],f,r,n):X;c===X&&(c=n[f]),u?Br(r,f,c):Sr(r,f,c)}return r}function Du(n,t){return $u(n,Is(n),t)}function Mu(n,t){return $u(n,Rs(n),t); }function Fu(n,r){return function(e,u){var i=bh(e)?t:Lr,o=r?r():{};return i(e,n,mi(u,2),o)}}function Nu(n){return uu(function(t,r){var e=-1,u=r.length,i=u>1?r[u-1]:X,o=u>2?r[2]:X;for(i=n.length>3&&"function"==typeof i?(u--,i):X,o&&Ui(r[0],r[1],o)&&(i=u<3?X:i,u=1),t=ll(t);++e<u;){var f=r[e];f&&n(t,f,e,i)}return t})}function Pu(n,t){return function(r,e){if(null==r)return r;if(!Hf(r))return n(r,e);for(var u=r.length,i=t?u:-1,o=ll(r);(t?i--:++i<u)&&e(o[i],i,o)!==!1;);return r}}function qu(n){return function(t,r,e){ for(var u=-1,i=ll(t),o=e(t),f=o.length;f--;){var c=o[n?f:++u];if(r(i[c],c,i)===!1)break}return t}}function Zu(n,t,r){function e(){return(this&&this!==re&&this instanceof e?i:n).apply(u?r:this,arguments)}var u=t&_n,i=Gu(n);return e}function Ku(n){return function(t){t=Ec(t);var r=T(t)?G(t):X,e=r?r[0]:t.charAt(0),u=r?Ou(r,1).join(""):t.slice(1);return e[n]()+u}}function Vu(n){return function(t){return l(Ra(ca(t).replace($r,"")),n,"")}}function Gu(n){return function(){var t=arguments;switch(t.length){ case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=gs(n.prototype),e=n.apply(r,t);return fc(e)?e:r}}function Hu(t,r,e){function u(){for(var o=arguments.length,f=il(o),c=o,a=wi(u);c--;)f[c]=arguments[c];var l=o<3&&f[0]!==a&&f[o-1]!==a?[]:N(f,a); return o-=l.length,o<e?oi(t,r,Qu,u.placeholder,X,f,l,X,X,e-o):n(this&&this!==re&&this instanceof u?i:t,this,f)}var i=Gu(t);return u}function Ju(n){return function(t,r,e){var u=ll(t);if(!Hf(t)){var i=mi(r,3);t=Pc(t),r=function(n){return i(u[n],n,u)}}var o=n(t,r,e);return o>-1?u[i?t[o]:o]:X}}function Yu(n){return gi(function(t){var r=t.length,e=r,u=Y.prototype.thru;for(n&&t.reverse();e--;){var i=t[e];if("function"!=typeof i)throw new pl(en);if(u&&!o&&"wrapper"==bi(i))var o=new Y([],!0)}for(e=o?e:r;++e<r;){ i=t[e];var f=bi(i),c="wrapper"==f?Os(i):X;o=c&&$i(c[0])&&c[1]==(mn|yn|bn|xn)&&!c[4].length&&1==c[9]?o[bi(c[0])].apply(o,c[3]):1==i.length&&$i(i)?o[f]():o.thru(i)}return function(){var n=arguments,e=n[0];if(o&&1==n.length&&bh(e))return o.plant(e).value();for(var u=0,i=r?t[u].apply(this,n):e;++u<r;)i=t[u].call(this,i);return i}})}function Qu(n,t,r,e,u,i,o,f,c,a){function l(){for(var y=arguments.length,d=il(y),b=y;b--;)d[b]=arguments[b];if(_)var w=wi(l),m=C(d,w);if(e&&(d=Uu(d,e,u,_)),i&&(d=Bu(d,i,o,_)), y-=m,_&&y<a){return oi(n,t,Qu,l.placeholder,r,d,N(d,w),f,c,a-y)}var x=h?r:this,j=p?x[n]:n;return y=d.length,f?d=Hi(d,f):v&&y>1&&d.reverse(),s&&c<y&&(d.length=c),this&&this!==re&&this instanceof l&&(j=g||Gu(j)),j.apply(x,d)}var s=t&mn,h=t&_n,p=t&vn,_=t&(yn|dn),v=t&jn,g=p?X:Gu(n);return l}function Xu(n,t){return function(r,e){return Oe(r,n,t(e),{})}}function ni(n,t){return function(r,e){var u;if(r===X&&e===X)return t;if(r!==X&&(u=r),e!==X){if(u===X)return e;"string"==typeof r||"string"==typeof e?(r=vu(r), e=vu(e)):(r=_u(r),e=_u(e)),u=n(r,e)}return u}}function ti(t){return gi(function(r){return r=c(r,z(mi())),uu(function(e){var u=this;return t(r,function(t){return n(t,u,e)})})})}function ri(n,t){t=t===X?" ":vu(t);var r=t.length;if(r<2)return r?eu(t,n):t;var e=eu(t,Fl(n/V(t)));return T(t)?Ou(G(e),0,n).join(""):e.slice(0,n)}function ei(t,r,e,u){function i(){for(var r=-1,c=arguments.length,a=-1,l=u.length,s=il(l+c),h=this&&this!==re&&this instanceof i?f:t;++a<l;)s[a]=u[a];for(;c--;)s[a++]=arguments[++r]; return n(h,o?e:this,s)}var o=r&_n,f=Gu(t);return i}function ui(n){return function(t,r,e){return e&&"number"!=typeof e&&Ui(t,r,e)&&(r=e=X),t=Ac(t),r===X?(r=t,t=0):r=Ac(r),e=e===X?t<r?1:-1:Ac(e),ru(t,r,e,n)}}function ii(n){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=Ic(t),r=Ic(r)),n(t,r)}}function oi(n,t,r,e,u,i,o,f,c,a){var l=t&yn,s=l?o:X,h=l?X:o,p=l?i:X,_=l?X:i;t|=l?bn:wn,t&=~(l?wn:bn),t&gn||(t&=~(_n|vn));var v=[n,t,u,p,s,_,h,f,c,a],g=r.apply(X,v);return $i(n)&&Ss(g,v),g.placeholder=e, Yi(g,n,t)}function fi(n){var t=al[n];return function(n,r){if(n=Ic(n),r=null==r?0:Hl(kc(r),292),r&&Zl(n)){var e=(Ec(n)+"e").split("e");return e=(Ec(t(e[0]+"e"+(+e[1]+r)))+"e").split("e"),+(e[0]+"e"+(+e[1]-r))}return t(n)}}function ci(n){return function(t){var r=zs(t);return r==Gn?M(t):r==tt?q(t):I(t,n(t))}}function ai(n,t,r,e,u,i,o,f){var c=t&vn;if(!c&&"function"!=typeof n)throw new pl(en);var a=e?e.length:0;if(a||(t&=~(bn|wn),e=u=X),o=o===X?o:Gl(kc(o),0),f=f===X?f:kc(f),a-=u?u.length:0,t&wn){var l=e,s=u; e=u=X}var h=c?X:Os(n),p=[n,t,r,e,u,l,s,i,o,f];if(h&&qi(p,h),n=p[0],t=p[1],r=p[2],e=p[3],u=p[4],f=p[9]=p[9]===X?c?0:n.length:Gl(p[9]-a,0),!f&&t&(yn|dn)&&(t&=~(yn|dn)),t&&t!=_n)_=t==yn||t==dn?Hu(n,t,f):t!=bn&&t!=(_n|bn)||u.length?Qu.apply(X,p):ei(n,t,r,e);else var _=Zu(n,t,r);return Yi((h?ms:Ss)(_,p),n,t)}function li(n,t,r,e){return n===X||Gf(n,gl[r])&&!bl.call(e,r)?t:n}function si(n,t,r,e,u,i){return fc(n)&&fc(t)&&(i.set(t,n),Ke(n,t,X,si,i),i.delete(t)),n}function hi(n){return gc(n)?X:n}function pi(n,t,r,e,u,i){ var o=r&hn,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return!1;var a=i.get(n),l=i.get(t);if(a&&l)return a==t&&l==n;var s=-1,p=!0,_=r&pn?new yr:X;for(i.set(n,t),i.set(t,n);++s<f;){var v=n[s],g=t[s];if(e)var y=o?e(g,v,s,t,n,i):e(v,g,s,n,t,i);if(y!==X){if(y)continue;p=!1;break}if(_){if(!h(t,function(n,t){if(!S(_,t)&&(v===n||u(v,n,r,e,i)))return _.push(t)})){p=!1;break}}else if(v!==g&&!u(v,g,r,e,i)){p=!1;break}}return i.delete(n),i.delete(t),p}function _i(n,t,r,e,u,i,o){switch(r){case ct:if(n.byteLength!=t.byteLength||n.byteOffset!=t.byteOffset)return!1; n=n.buffer,t=t.buffer;case ft:return!(n.byteLength!=t.byteLength||!i(new Rl(n),new Rl(t)));case Nn:case Pn:case Hn:return Gf(+n,+t);case Zn:return n.name==t.name&&n.message==t.message;case nt:case rt:return n==t+"";case Gn:var f=M;case tt:var c=e&hn;if(f||(f=P),n.size!=t.size&&!c)return!1;var a=o.get(n);if(a)return a==t;e|=pn,o.set(n,t);var l=pi(f(n),f(t),e,u,i,o);return o.delete(n),l;case et:if(_s)return _s.call(n)==_s.call(t)}return!1}function vi(n,t,r,e,u,i){var o=r&hn,f=yi(n),c=f.length;if(c!=yi(t).length&&!o)return!1; for(var a=c;a--;){var l=f[a];if(!(o?l in t:bl.call(t,l)))return!1}var s=i.get(n),h=i.get(t);if(s&&h)return s==t&&h==n;var p=!0;i.set(n,t),i.set(t,n);for(var _=o;++a<c;){l=f[a];var v=n[l],g=t[l];if(e)var y=o?e(g,v,l,t,n,i):e(v,g,l,n,t,i);if(!(y===X?v===g||u(v,g,r,e,i):y)){p=!1;break}_||(_="constructor"==l)}if(p&&!_){var d=n.constructor,b=t.constructor;d!=b&&"constructor"in n&&"constructor"in t&&!("function"==typeof d&&d instanceof d&&"function"==typeof b&&b instanceof b)&&(p=!1)}return i.delete(n), i.delete(t),p}function gi(n){return Ls(Vi(n,X,_o),n+"")}function yi(n){return de(n,Pc,Is)}function di(n){return de(n,qc,Rs)}function bi(n){for(var t=n.name+"",r=fs[t],e=bl.call(fs,t)?r.length:0;e--;){var u=r[e],i=u.func;if(null==i||i==n)return u.name}return t}function wi(n){return(bl.call(Z,"placeholder")?Z:n).placeholder}function mi(){var n=Z.iteratee||Ca;return n=n===Ca?De:n,arguments.length?n(arguments[0],arguments[1]):n}function xi(n,t){var r=n.__data__;return Ti(t)?r["string"==typeof t?"string":"hash"]:r.map; }function ji(n){for(var t=Pc(n),r=t.length;r--;){var e=t[r],u=n[e];t[r]=[e,u,Fi(u)]}return t}function Ai(n,t){var r=B(n,t);return Ue(r)?r:X}function ki(n){var t=bl.call(n,Bl),r=n[Bl];try{n[Bl]=X;var e=!0}catch(n){}var u=xl.call(n);return e&&(t?n[Bl]=r:delete n[Bl]),u}function Oi(n,t,r){for(var e=-1,u=r.length;++e<u;){var i=r[e],o=i.size;switch(i.type){case"drop":n+=o;break;case"dropRight":t-=o;break;case"take":t=Hl(t,n+o);break;case"takeRight":n=Gl(n,t-o)}}return{start:n,end:t}}function Ii(n){var t=n.match(Bt); return t?t[1].split(Tt):[]}function Ri(n,t,r){t=ku(t,n);for(var e=-1,u=t.length,i=!1;++e<u;){var o=no(t[e]);if(!(i=null!=n&&r(n,o)))break;n=n[o]}return i||++e!=u?i:(u=null==n?0:n.length,!!u&&oc(u)&&Ci(o,u)&&(bh(n)||dh(n)))}function zi(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&bl.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Ei(n){return"function"!=typeof n.constructor||Mi(n)?{}:gs(El(n))}function Si(n,t,r){var e=n.constructor;switch(t){case ft:return Ru(n); case Nn:case Pn:return new e(+n);case ct:return zu(n,r);case at:case lt:case st:case ht:case pt:case _t:case vt:case gt:case yt:return Wu(n,r);case Gn:return new e;case Hn:case rt:return new e(n);case nt:return Eu(n);case tt:return new e;case et:return Su(n)}}function Wi(n,t){var r=t.length;if(!r)return n;var e=r-1;return t[e]=(r>1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(Ut,"{\n/* [wrapped with "+t+"] */\n")}function Li(n){return bh(n)||dh(n)||!!(Cl&&n&&n[Cl])}function Ci(n,t){var r=typeof n; return t=null==t?Wn:t,!!t&&("number"==r||"symbol"!=r&&Vt.test(n))&&n>-1&&n%1==0&&n<t}function Ui(n,t,r){if(!fc(r))return!1;var e=typeof t;return!!("number"==e?Hf(r)&&Ci(t,r.length):"string"==e&&t in r)&&Gf(r[t],n)}function Bi(n,t){if(bh(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!bc(n))||(zt.test(n)||!Rt.test(n)||null!=t&&n in ll(t))}function Ti(n){var t=typeof n;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==n:null===n}function $i(n){ var t=bi(n),r=Z[t];if("function"!=typeof r||!(t in Ct.prototype))return!1;if(n===r)return!0;var e=Os(r);return!!e&&n===e[0]}function Di(n){return!!ml&&ml in n}function Mi(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||gl)}function Fi(n){return n===n&&!fc(n)}function Ni(n,t){return function(r){return null!=r&&(r[n]===t&&(t!==X||n in ll(r)))}}function Pi(n){var t=Cf(n,function(n){return r.size===fn&&r.clear(),n}),r=t.cache;return t}function qi(n,t){var r=n[1],e=t[1],u=r|e,i=u<(_n|vn|mn),o=e==mn&&r==yn||e==mn&&r==xn&&n[7].length<=t[8]||e==(mn|xn)&&t[7].length<=t[8]&&r==yn; if(!i&&!o)return n;e&_n&&(n[2]=t[2],u|=r&_n?0:gn);var f=t[3];if(f){var c=n[3];n[3]=c?Uu(c,f,t[4]):f,n[4]=c?N(n[3],cn):t[4]}return f=t[5],f&&(c=n[5],n[5]=c?Bu(c,f,t[6]):f,n[6]=c?N(n[5],cn):t[6]),f=t[7],f&&(n[7]=f),e&mn&&(n[8]=null==n[8]?t[8]:Hl(n[8],t[8])),null==n[9]&&(n[9]=t[9]),n[0]=t[0],n[1]=u,n}function Zi(n){var t=[];if(null!=n)for(var r in ll(n))t.push(r);return t}function Ki(n){return xl.call(n)}function Vi(t,r,e){return r=Gl(r===X?t.length-1:r,0),function(){for(var u=arguments,i=-1,o=Gl(u.length-r,0),f=il(o);++i<o;)f[i]=u[r+i]; i=-1;for(var c=il(r+1);++i<r;)c[i]=u[i];return c[r]=e(f),n(t,this,c)}}function Gi(n,t){return t.length<2?n:_e(n,au(t,0,-1))}function Hi(n,t){for(var r=n.length,e=Hl(t.length,r),u=Tu(n);e--;){var i=t[e];n[e]=Ci(i,r)?u[i]:X}return n}function Ji(n,t){if(("constructor"!==t||"function"!=typeof n[t])&&"__proto__"!=t)return n[t]}function Yi(n,t,r){var e=t+"";return Ls(n,Wi(e,ro(Ii(e),r)))}function Qi(n){var t=0,r=0;return function(){var e=Jl(),u=In-(e-r);if(r=e,u>0){if(++t>=On)return arguments[0]}else t=0; return n.apply(X,arguments)}}function Xi(n,t){var r=-1,e=n.length,u=e-1;for(t=t===X?e:t;++r<t;){var i=tu(r,u),o=n[i];n[i]=n[r],n[r]=o}return n.length=t,n}function no(n){if("string"==typeof n||bc(n))return n;var t=n+"";return"0"==t&&1/n==-Sn?"-0":t}function to(n){if(null!=n){try{return dl.call(n)}catch(n){}try{return n+""}catch(n){}}return""}function ro(n,t){return r($n,function(r){var e="_."+r[0];t&r[1]&&!o(n,e)&&n.push(e)}),n.sort()}function eo(n){if(n instanceof Ct)return n.clone();var t=new Y(n.__wrapped__,n.__chain__); return t.__actions__=Tu(n.__actions__),t.__index__=n.__index__,t.__values__=n.__values__,t}function uo(n,t,r){t=(r?Ui(n,t,r):t===X)?1:Gl(kc(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=il(Fl(e/t));u<e;)o[i++]=au(n,u,u+=t);return o}function io(n){for(var t=-1,r=null==n?0:n.length,e=0,u=[];++t<r;){var i=n[t];i&&(u[e++]=i)}return u}function oo(){var n=arguments.length;if(!n)return[];for(var t=il(n-1),r=arguments[0],e=n;e--;)t[e-1]=arguments[e];return a(bh(r)?Tu(r):[r],ee(t,1)); }function fo(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),au(n,t<0?0:t,e)):[]}function co(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,0,t<0?0:t)):[]}function ao(n,t){return n&&n.length?bu(n,mi(t,3),!0,!0):[]}function lo(n,t){return n&&n.length?bu(n,mi(t,3),!0):[]}function so(n,t,r,e){var u=null==n?0:n.length;return u?(r&&"number"!=typeof r&&Ui(n,t,r)&&(r=0,e=u),ne(n,t,r,e)):[]}function ho(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r); return u<0&&(u=Gl(e+u,0)),g(n,mi(t,3),u)}function po(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==X&&(u=kc(r),u=r<0?Gl(e+u,0):Hl(u,e-1)),g(n,mi(t,3),u,!0)}function _o(n){return(null==n?0:n.length)?ee(n,1):[]}function vo(n){return(null==n?0:n.length)?ee(n,Sn):[]}function go(n,t){return(null==n?0:n.length)?(t=t===X?1:kc(t),ee(n,t)):[]}function yo(n){for(var t=-1,r=null==n?0:n.length,e={};++t<r;){var u=n[t];e[u[0]]=u[1]}return e}function bo(n){return n&&n.length?n[0]:X}function wo(n,t,r){ var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:kc(r);return u<0&&(u=Gl(e+u,0)),y(n,t,u)}function mo(n){return(null==n?0:n.length)?au(n,0,-1):[]}function xo(n,t){return null==n?"":Kl.call(n,t)}function jo(n){var t=null==n?0:n.length;return t?n[t-1]:X}function Ao(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return r!==X&&(u=kc(r),u=u<0?Gl(e+u,0):Hl(u,e-1)),t===t?K(n,t,u):g(n,b,u,!0)}function ko(n,t){return n&&n.length?Ge(n,kc(t)):X}function Oo(n,t){return n&&n.length&&t&&t.length?Xe(n,t):n; }function Io(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,mi(r,2)):n}function Ro(n,t,r){return n&&n.length&&t&&t.length?Xe(n,t,X,r):n}function zo(n,t){var r=[];if(!n||!n.length)return r;var e=-1,u=[],i=n.length;for(t=mi(t,3);++e<i;){var o=n[e];t(o,e,n)&&(r.push(o),u.push(e))}return nu(n,u),r}function Eo(n){return null==n?n:Xl.call(n)}function So(n,t,r){var e=null==n?0:n.length;return e?(r&&"number"!=typeof r&&Ui(n,t,r)?(t=0,r=e):(t=null==t?0:kc(t),r=r===X?e:kc(r)),au(n,t,r)):[]}function Wo(n,t){ return su(n,t)}function Lo(n,t,r){return hu(n,t,mi(r,2))}function Co(n,t){var r=null==n?0:n.length;if(r){var e=su(n,t);if(e<r&&Gf(n[e],t))return e}return-1}function Uo(n,t){return su(n,t,!0)}function Bo(n,t,r){return hu(n,t,mi(r,2),!0)}function To(n,t){if(null==n?0:n.length){var r=su(n,t,!0)-1;if(Gf(n[r],t))return r}return-1}function $o(n){return n&&n.length?pu(n):[]}function Do(n,t){return n&&n.length?pu(n,mi(t,2)):[]}function Mo(n){var t=null==n?0:n.length;return t?au(n,1,t):[]}function Fo(n,t,r){ return n&&n.length?(t=r||t===X?1:kc(t),au(n,0,t<0?0:t)):[]}function No(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===X?1:kc(t),t=e-t,au(n,t<0?0:t,e)):[]}function Po(n,t){return n&&n.length?bu(n,mi(t,3),!1,!0):[]}function qo(n,t){return n&&n.length?bu(n,mi(t,3)):[]}function Zo(n){return n&&n.length?gu(n):[]}function Ko(n,t){return n&&n.length?gu(n,mi(t,2)):[]}function Vo(n,t){return t="function"==typeof t?t:X,n&&n.length?gu(n,X,t):[]}function Go(n){if(!n||!n.length)return[];var t=0;return n=i(n,function(n){ if(Jf(n))return t=Gl(n.length,t),!0}),O(t,function(t){return c(n,m(t))})}function Ho(t,r){if(!t||!t.length)return[];var e=Go(t);return null==r?e:c(e,function(t){return n(r,X,t)})}function Jo(n,t){return xu(n||[],t||[],Sr)}function Yo(n,t){return xu(n||[],t||[],fu)}function Qo(n){var t=Z(n);return t.__chain__=!0,t}function Xo(n,t){return t(n),n}function nf(n,t){return t(n)}function tf(){return Qo(this)}function rf(){return new Y(this.value(),this.__chain__)}function ef(){this.__values__===X&&(this.__values__=jc(this.value())); var n=this.__index__>=this.__values__.length;return{done:n,value:n?X:this.__values__[this.__index__++]}}function uf(){return this}function of(n){for(var t,r=this;r instanceof J;){var e=eo(r);e.__index__=0,e.__values__=X,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t}function ff(){var n=this.__wrapped__;if(n instanceof Ct){var t=n;return this.__actions__.length&&(t=new Ct(this)),t=t.reverse(),t.__actions__.push({func:nf,args:[Eo],thisArg:X}),new Y(t,this.__chain__)}return this.thru(Eo); }function cf(){return wu(this.__wrapped__,this.__actions__)}function af(n,t,r){var e=bh(n)?u:Jr;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function lf(n,t){return(bh(n)?i:te)(n,mi(t,3))}function sf(n,t){return ee(yf(n,t),1)}function hf(n,t){return ee(yf(n,t),Sn)}function pf(n,t,r){return r=r===X?1:kc(r),ee(yf(n,t),r)}function _f(n,t){return(bh(n)?r:ys)(n,mi(t,3))}function vf(n,t){return(bh(n)?e:ds)(n,mi(t,3))}function gf(n,t,r,e){n=Hf(n)?n:ra(n),r=r&&!e?kc(r):0;var u=n.length;return r<0&&(r=Gl(u+r,0)), dc(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&y(n,t,r)>-1}function yf(n,t){return(bh(n)?c:Pe)(n,mi(t,3))}function df(n,t,r,e){return null==n?[]:(bh(t)||(t=null==t?[]:[t]),r=e?X:r,bh(r)||(r=null==r?[]:[r]),He(n,t,r))}function bf(n,t,r){var e=bh(n)?l:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ys)}function wf(n,t,r){var e=bh(n)?s:j,u=arguments.length<3;return e(n,mi(t,4),r,u,ds)}function mf(n,t){return(bh(n)?i:te)(n,Uf(mi(t,3)))}function xf(n){return(bh(n)?Ir:iu)(n)}function jf(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t), (bh(n)?Rr:ou)(n,t)}function Af(n){return(bh(n)?zr:cu)(n)}function kf(n){if(null==n)return 0;if(Hf(n))return dc(n)?V(n):n.length;var t=zs(n);return t==Gn||t==tt?n.size:Me(n).length}function Of(n,t,r){var e=bh(n)?h:lu;return r&&Ui(n,t,r)&&(t=X),e(n,mi(t,3))}function If(n,t){if("function"!=typeof t)throw new pl(en);return n=kc(n),function(){if(--n<1)return t.apply(this,arguments)}}function Rf(n,t,r){return t=r?X:t,t=n&&null==t?n.length:t,ai(n,mn,X,X,X,X,t)}function zf(n,t){var r;if("function"!=typeof t)throw new pl(en); return n=kc(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=X),r}}function Ef(n,t,r){t=r?X:t;var e=ai(n,yn,X,X,X,X,X,t);return e.placeholder=Ef.placeholder,e}function Sf(n,t,r){t=r?X:t;var e=ai(n,dn,X,X,X,X,X,t);return e.placeholder=Sf.placeholder,e}function Wf(n,t,r){function e(t){var r=h,e=p;return h=p=X,d=t,v=n.apply(e,r)}function u(n){return d=n,g=Ws(f,t),b?e(n):v}function i(n){var r=n-y,e=n-d,u=t-r;return w?Hl(u,_-e):u}function o(n){var r=n-y,e=n-d;return y===X||r>=t||r<0||w&&e>=_; }function f(){var n=fh();return o(n)?c(n):(g=Ws(f,i(n)),X)}function c(n){return g=X,m&&h?e(n):(h=p=X,v)}function a(){g!==X&&As(g),d=0,h=y=p=g=X}function l(){return g===X?v:c(fh())}function s(){var n=fh(),r=o(n);if(h=arguments,p=this,y=n,r){if(g===X)return u(y);if(w)return As(g),g=Ws(f,t),e(y)}return g===X&&(g=Ws(f,t)),v}var h,p,_,v,g,y,d=0,b=!1,w=!1,m=!0;if("function"!=typeof n)throw new pl(en);return t=Ic(t)||0,fc(r)&&(b=!!r.leading,w="maxWait"in r,_=w?Gl(Ic(r.maxWait)||0,t):_,m="trailing"in r?!!r.trailing:m), s.cancel=a,s.flush=l,s}function Lf(n){return ai(n,jn)}function Cf(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new pl(en);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Cf.Cache||sr),r}function Uf(n){if("function"!=typeof n)throw new pl(en);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2: return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function Bf(n){return zf(2,n)}function Tf(n,t){if("function"!=typeof n)throw new pl(en);return t=t===X?t:kc(t),uu(n,t)}function $f(t,r){if("function"!=typeof t)throw new pl(en);return r=null==r?0:Gl(kc(r),0),uu(function(e){var u=e[r],i=Ou(e,0,r);return u&&a(i,u),n(t,this,i)})}function Df(n,t,r){var e=!0,u=!0;if("function"!=typeof n)throw new pl(en);return fc(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u), Wf(n,t,{leading:e,maxWait:t,trailing:u})}function Mf(n){return Rf(n,1)}function Ff(n,t){return ph(Au(t),n)}function Nf(){if(!arguments.length)return[];var n=arguments[0];return bh(n)?n:[n]}function Pf(n){return Fr(n,sn)}function qf(n,t){return t="function"==typeof t?t:X,Fr(n,sn,t)}function Zf(n){return Fr(n,an|sn)}function Kf(n,t){return t="function"==typeof t?t:X,Fr(n,an|sn,t)}function Vf(n,t){return null==t||Pr(n,t,Pc(t))}function Gf(n,t){return n===t||n!==n&&t!==t}function Hf(n){return null!=n&&oc(n.length)&&!uc(n); }function Jf(n){return cc(n)&&Hf(n)}function Yf(n){return n===!0||n===!1||cc(n)&&we(n)==Nn}function Qf(n){return cc(n)&&1===n.nodeType&&!gc(n)}function Xf(n){if(null==n)return!0;if(Hf(n)&&(bh(n)||"string"==typeof n||"function"==typeof n.splice||mh(n)||Oh(n)||dh(n)))return!n.length;var t=zs(n);if(t==Gn||t==tt)return!n.size;if(Mi(n))return!Me(n).length;for(var r in n)if(bl.call(n,r))return!1;return!0}function nc(n,t){return Se(n,t)}function tc(n,t,r){r="function"==typeof r?r:X;var e=r?r(n,t):X;return e===X?Se(n,t,X,r):!!e; }function rc(n){if(!cc(n))return!1;var t=we(n);return t==Zn||t==qn||"string"==typeof n.message&&"string"==typeof n.name&&!gc(n)}function ec(n){return"number"==typeof n&&Zl(n)}function uc(n){if(!fc(n))return!1;var t=we(n);return t==Kn||t==Vn||t==Fn||t==Xn}function ic(n){return"number"==typeof n&&n==kc(n)}function oc(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=Wn}function fc(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function cc(n){return null!=n&&"object"==typeof n}function ac(n,t){ return n===t||Ce(n,t,ji(t))}function lc(n,t,r){return r="function"==typeof r?r:X,Ce(n,t,ji(t),r)}function sc(n){return vc(n)&&n!=+n}function hc(n){if(Es(n))throw new fl(rn);return Ue(n)}function pc(n){return null===n}function _c(n){return null==n}function vc(n){return"number"==typeof n||cc(n)&&we(n)==Hn}function gc(n){if(!cc(n)||we(n)!=Yn)return!1;var t=El(n);if(null===t)return!0;var r=bl.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&dl.call(r)==jl}function yc(n){ return ic(n)&&n>=-Wn&&n<=Wn}function dc(n){return"string"==typeof n||!bh(n)&&cc(n)&&we(n)==rt}function bc(n){return"symbol"==typeof n||cc(n)&&we(n)==et}function wc(n){return n===X}function mc(n){return cc(n)&&zs(n)==it}function xc(n){return cc(n)&&we(n)==ot}function jc(n){if(!n)return[];if(Hf(n))return dc(n)?G(n):Tu(n);if(Ul&&n[Ul])return D(n[Ul]());var t=zs(n);return(t==Gn?M:t==tt?P:ra)(n)}function Ac(n){if(!n)return 0===n?n:0;if(n=Ic(n),n===Sn||n===-Sn){return(n<0?-1:1)*Ln}return n===n?n:0}function kc(n){ var t=Ac(n),r=t%1;return t===t?r?t-r:t:0}function Oc(n){return n?Mr(kc(n),0,Un):0}function Ic(n){if("number"==typeof n)return n;if(bc(n))return Cn;if(fc(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=fc(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=R(n);var r=qt.test(n);return r||Kt.test(n)?Xr(n.slice(2),r?2:8):Pt.test(n)?Cn:+n}function Rc(n){return $u(n,qc(n))}function zc(n){return n?Mr(kc(n),-Wn,Wn):0===n?n:0}function Ec(n){return null==n?"":vu(n)}function Sc(n,t){var r=gs(n);return null==t?r:Cr(r,t); }function Wc(n,t){return v(n,mi(t,3),ue)}function Lc(n,t){return v(n,mi(t,3),oe)}function Cc(n,t){return null==n?n:bs(n,mi(t,3),qc)}function Uc(n,t){return null==n?n:ws(n,mi(t,3),qc)}function Bc(n,t){return n&&ue(n,mi(t,3))}function Tc(n,t){return n&&oe(n,mi(t,3))}function $c(n){return null==n?[]:fe(n,Pc(n))}function Dc(n){return null==n?[]:fe(n,qc(n))}function Mc(n,t,r){var e=null==n?X:_e(n,t);return e===X?r:e}function Fc(n,t){return null!=n&&Ri(n,t,xe)}function Nc(n,t){return null!=n&&Ri(n,t,je); }function Pc(n){return Hf(n)?Or(n):Me(n)}function qc(n){return Hf(n)?Or(n,!0):Fe(n)}function Zc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,t(n,e,u),n)}),r}function Kc(n,t){var r={};return t=mi(t,3),ue(n,function(n,e,u){Br(r,e,t(n,e,u))}),r}function Vc(n,t){return Gc(n,Uf(mi(t)))}function Gc(n,t){if(null==n)return{};var r=c(di(n),function(n){return[n]});return t=mi(t),Ye(n,r,function(n,r){return t(n,r[0])})}function Hc(n,t,r){t=ku(t,n);var e=-1,u=t.length;for(u||(u=1,n=X);++e<u;){var i=null==n?X:n[no(t[e])]; i===X&&(e=u,i=r),n=uc(i)?i.call(n):i}return n}function Jc(n,t,r){return null==n?n:fu(n,t,r)}function Yc(n,t,r,e){return e="function"==typeof e?e:X,null==n?n:fu(n,t,r,e)}function Qc(n,t,e){var u=bh(n),i=u||mh(n)||Oh(n);if(t=mi(t,4),null==e){var o=n&&n.constructor;e=i?u?new o:[]:fc(n)&&uc(o)?gs(El(n)):{}}return(i?r:ue)(n,function(n,r,u){return t(e,n,r,u)}),e}function Xc(n,t){return null==n||yu(n,t)}function na(n,t,r){return null==n?n:du(n,t,Au(r))}function ta(n,t,r,e){return e="function"==typeof e?e:X, null==n?n:du(n,t,Au(r),e)}function ra(n){return null==n?[]:E(n,Pc(n))}function ea(n){return null==n?[]:E(n,qc(n))}function ua(n,t,r){return r===X&&(r=t,t=X),r!==X&&(r=Ic(r),r=r===r?r:0),t!==X&&(t=Ic(t),t=t===t?t:0),Mr(Ic(n),t,r)}function ia(n,t,r){return t=Ac(t),r===X?(r=t,t=0):r=Ac(r),n=Ic(n),Ae(n,t,r)}function oa(n,t,r){if(r&&"boolean"!=typeof r&&Ui(n,t,r)&&(t=r=X),r===X&&("boolean"==typeof t?(r=t,t=X):"boolean"==typeof n&&(r=n,n=X)),n===X&&t===X?(n=0,t=1):(n=Ac(n),t===X?(t=n,n=0):t=Ac(t)),n>t){ var e=n;n=t,t=e}if(r||n%1||t%1){var u=Ql();return Hl(n+u*(t-n+Qr("1e-"+((u+"").length-1))),t)}return tu(n,t)}function fa(n){return Qh(Ec(n).toLowerCase())}function ca(n){return n=Ec(n),n&&n.replace(Gt,ve).replace(Dr,"")}function aa(n,t,r){n=Ec(n),t=vu(t);var e=n.length;r=r===X?e:Mr(kc(r),0,e);var u=r;return r-=t.length,r>=0&&n.slice(r,u)==t}function la(n){return n=Ec(n),n&&At.test(n)?n.replace(xt,ge):n}function sa(n){return n=Ec(n),n&&Wt.test(n)?n.replace(St,"\\$&"):n}function ha(n,t,r){n=Ec(n),t=kc(t); var e=t?V(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return ri(Nl(u),r)+n+ri(Fl(u),r)}function pa(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?n+ri(t-e,r):n}function _a(n,t,r){n=Ec(n),t=kc(t);var e=t?V(n):0;return t&&e<t?ri(t-e,r)+n:n}function va(n,t,r){return r||null==t?t=0:t&&(t=+t),Yl(Ec(n).replace(Lt,""),t||0)}function ga(n,t,r){return t=(r?Ui(n,t,r):t===X)?1:kc(t),eu(Ec(n),t)}function ya(){var n=arguments,t=Ec(n[0]);return n.length<3?t:t.replace(n[1],n[2])}function da(n,t,r){return r&&"number"!=typeof r&&Ui(n,t,r)&&(t=r=X), (r=r===X?Un:r>>>0)?(n=Ec(n),n&&("string"==typeof t||null!=t&&!Ah(t))&&(t=vu(t),!t&&T(n))?Ou(G(n),0,r):n.split(t,r)):[]}function ba(n,t,r){return n=Ec(n),r=null==r?0:Mr(kc(r),0,n.length),t=vu(t),n.slice(r,r+t.length)==t}function wa(n,t,r){var e=Z.templateSettings;r&&Ui(n,t,r)&&(t=X),n=Ec(n),t=Sh({},t,e,li);var u,i,o=Sh({},t.imports,e.imports,li),f=Pc(o),c=E(o,f),a=0,l=t.interpolate||Ht,s="__p += '",h=sl((t.escape||Ht).source+"|"+l.source+"|"+(l===It?Ft:Ht).source+"|"+(t.evaluate||Ht).source+"|$","g"),p="//# sourceURL="+(bl.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Zr+"]")+"\n"; n.replace(h,function(t,r,e,o,f,c){return e||(e=o),s+=n.slice(a,c).replace(Jt,U),r&&(u=!0,s+="' +\n__e("+r+") +\n'"),f&&(i=!0,s+="';\n"+f+";\n__p += '"),e&&(s+="' +\n((__t = ("+e+")) == null ? '' : __t) +\n'"),a=c+t.length,t}),s+="';\n";var _=bl.call(t,"variable")&&t.variable;if(_){if(Dt.test(_))throw new fl(un)}else s="with (obj) {\n"+s+"\n}\n";s=(i?s.replace(dt,""):s).replace(bt,"$1").replace(wt,"$1;"),s="function("+(_||"obj")+") {\n"+(_?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(u?", __e = _.escape":"")+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+s+"return __p\n}"; var v=Xh(function(){return cl(f,p+"return "+s).apply(X,c)});if(v.source=s,rc(v))throw v;return v}function ma(n){return Ec(n).toLowerCase()}function xa(n){return Ec(n).toUpperCase()}function ja(n,t,r){if(n=Ec(n),n&&(r||t===X))return R(n);if(!n||!(t=vu(t)))return n;var e=G(n),u=G(t);return Ou(e,W(e,u),L(e,u)+1).join("")}function Aa(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.slice(0,H(n)+1);if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,0,L(e,G(t))+1).join("")}function ka(n,t,r){if(n=Ec(n),n&&(r||t===X))return n.replace(Lt,""); if(!n||!(t=vu(t)))return n;var e=G(n);return Ou(e,W(e,G(t))).join("")}function Oa(n,t){var r=An,e=kn;if(fc(t)){var u="separator"in t?t.separator:u;r="length"in t?kc(t.length):r,e="omission"in t?vu(t.omission):e}n=Ec(n);var i=n.length;if(T(n)){var o=G(n);i=o.length}if(r>=i)return n;var f=r-V(e);if(f<1)return e;var c=o?Ou(o,0,f).join(""):n.slice(0,f);if(u===X)return c+e;if(o&&(f+=c.length-f),Ah(u)){if(n.slice(f).search(u)){var a,l=c;for(u.global||(u=sl(u.source,Ec(Nt.exec(u))+"g")),u.lastIndex=0;a=u.exec(l);)var s=a.index; c=c.slice(0,s===X?f:s)}}else if(n.indexOf(vu(u),f)!=f){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+e}function Ia(n){return n=Ec(n),n&&jt.test(n)?n.replace(mt,ye):n}function Ra(n,t,r){return n=Ec(n),t=r?X:t,t===X?$(n)?Q(n):_(n):n.match(t)||[]}function za(t){var r=null==t?0:t.length,e=mi();return t=r?c(t,function(n){if("function"!=typeof n[1])throw new pl(en);return[e(n[0]),n[1]]}):[],uu(function(e){for(var u=-1;++u<r;){var i=t[u];if(n(i[0],this,e))return n(i[1],this,e)}})}function Ea(n){ return Nr(Fr(n,an))}function Sa(n){return function(){return n}}function Wa(n,t){return null==n||n!==n?t:n}function La(n){return n}function Ca(n){return De("function"==typeof n?n:Fr(n,an))}function Ua(n){return qe(Fr(n,an))}function Ba(n,t){return Ze(n,Fr(t,an))}function Ta(n,t,e){var u=Pc(t),i=fe(t,u);null!=e||fc(t)&&(i.length||!u.length)||(e=t,t=n,n=this,i=fe(t,Pc(t)));var o=!(fc(e)&&"chain"in e&&!e.chain),f=uc(n);return r(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__; if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Tu(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,a([this.value()],arguments))})}),n}function $a(){return re._===this&&(re._=Al),this}function Da(){}function Ma(n){return n=kc(n),uu(function(t){return Ge(t,n)})}function Fa(n){return Bi(n)?m(no(n)):Qe(n)}function Na(n){return function(t){return null==n?X:_e(n,t)}}function Pa(){return[]}function qa(){return!1}function Za(){return{}}function Ka(){return""; }function Va(){return!0}function Ga(n,t){if(n=kc(n),n<1||n>Wn)return[];var r=Un,e=Hl(n,Un);t=mi(t),n-=Un;for(var u=O(e,t);++r<n;)t(r);return u}function Ha(n){return bh(n)?c(n,no):bc(n)?[n]:Tu(Cs(Ec(n)))}function Ja(n){var t=++wl;return Ec(n)+t}function Ya(n){return n&&n.length?Yr(n,La,me):X}function Qa(n,t){return n&&n.length?Yr(n,mi(t,2),me):X}function Xa(n){return w(n,La)}function nl(n,t){return w(n,mi(t,2))}function tl(n){return n&&n.length?Yr(n,La,Ne):X}function rl(n,t){return n&&n.length?Yr(n,mi(t,2),Ne):X; }function el(n){return n&&n.length?k(n,La):0}function ul(n,t){return n&&n.length?k(n,mi(t,2)):0}x=null==x?re:be.defaults(re.Object(),x,be.pick(re,qr));var il=x.Array,ol=x.Date,fl=x.Error,cl=x.Function,al=x.Math,ll=x.Object,sl=x.RegExp,hl=x.String,pl=x.TypeError,_l=il.prototype,vl=cl.prototype,gl=ll.prototype,yl=x["__core-js_shared__"],dl=vl.toString,bl=gl.hasOwnProperty,wl=0,ml=function(){var n=/[^.]+$/.exec(yl&&yl.keys&&yl.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),xl=gl.toString,jl=dl.call(ll),Al=re._,kl=sl("^"+dl.call(bl).replace(St,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ol=ie?x.Buffer:X,Il=x.Symbol,Rl=x.Uint8Array,zl=Ol?Ol.allocUnsafe:X,El=F(ll.getPrototypeOf,ll),Sl=ll.create,Wl=gl.propertyIsEnumerable,Ll=_l.splice,Cl=Il?Il.isConcatSpreadable:X,Ul=Il?Il.iterator:X,Bl=Il?Il.toStringTag:X,Tl=function(){ try{var n=Ai(ll,"defineProperty");return n({},"",{}),n}catch(n){}}(),$l=x.clearTimeout!==re.clearTimeout&&x.clearTimeout,Dl=ol&&ol.now!==re.Date.now&&ol.now,Ml=x.setTimeout!==re.setTimeout&&x.setTimeout,Fl=al.ceil,Nl=al.floor,Pl=ll.getOwnPropertySymbols,ql=Ol?Ol.isBuffer:X,Zl=x.isFinite,Kl=_l.join,Vl=F(ll.keys,ll),Gl=al.max,Hl=al.min,Jl=ol.now,Yl=x.parseInt,Ql=al.random,Xl=_l.reverse,ns=Ai(x,"DataView"),ts=Ai(x,"Map"),rs=Ai(x,"Promise"),es=Ai(x,"Set"),us=Ai(x,"WeakMap"),is=Ai(ll,"create"),os=us&&new us,fs={},cs=to(ns),as=to(ts),ls=to(rs),ss=to(es),hs=to(us),ps=Il?Il.prototype:X,_s=ps?ps.valueOf:X,vs=ps?ps.toString:X,gs=function(){ function n(){}return function(t){if(!fc(t))return{};if(Sl)return Sl(t);n.prototype=t;var r=new n;return n.prototype=X,r}}();Z.templateSettings={escape:kt,evaluate:Ot,interpolate:It,variable:"",imports:{_:Z}},Z.prototype=J.prototype,Z.prototype.constructor=Z,Y.prototype=gs(J.prototype),Y.prototype.constructor=Y,Ct.prototype=gs(J.prototype),Ct.prototype.constructor=Ct,Xt.prototype.clear=nr,Xt.prototype.delete=tr,Xt.prototype.get=rr,Xt.prototype.has=er,Xt.prototype.set=ur,ir.prototype.clear=or,ir.prototype.delete=fr, ir.prototype.get=cr,ir.prototype.has=ar,ir.prototype.set=lr,sr.prototype.clear=hr,sr.prototype.delete=pr,sr.prototype.get=_r,sr.prototype.has=vr,sr.prototype.set=gr,yr.prototype.add=yr.prototype.push=dr,yr.prototype.has=br,wr.prototype.clear=mr,wr.prototype.delete=xr,wr.prototype.get=jr,wr.prototype.has=Ar,wr.prototype.set=kr;var ys=Pu(ue),ds=Pu(oe,!0),bs=qu(),ws=qu(!0),ms=os?function(n,t){return os.set(n,t),n}:La,xs=Tl?function(n,t){return Tl(n,"toString",{configurable:!0,enumerable:!1,value:Sa(t), writable:!0})}:La,js=uu,As=$l||function(n){return re.clearTimeout(n)},ks=es&&1/P(new es([,-0]))[1]==Sn?function(n){return new es(n)}:Da,Os=os?function(n){return os.get(n)}:Da,Is=Pl?function(n){return null==n?[]:(n=ll(n),i(Pl(n),function(t){return Wl.call(n,t)}))}:Pa,Rs=Pl?function(n){for(var t=[];n;)a(t,Is(n)),n=El(n);return t}:Pa,zs=we;(ns&&zs(new ns(new ArrayBuffer(1)))!=ct||ts&&zs(new ts)!=Gn||rs&&zs(rs.resolve())!=Qn||es&&zs(new es)!=tt||us&&zs(new us)!=it)&&(zs=function(n){var t=we(n),r=t==Yn?n.constructor:X,e=r?to(r):""; if(e)switch(e){case cs:return ct;case as:return Gn;case ls:return Qn;case ss:return tt;case hs:return it}return t});var Es=yl?uc:qa,Ss=Qi(ms),Ws=Ml||function(n,t){return re.setTimeout(n,t)},Ls=Qi(xs),Cs=Pi(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(Et,function(n,r,e,u){t.push(e?u.replace(Mt,"$1"):r||n)}),t}),Us=uu(function(n,t){return Jf(n)?Hr(n,ee(t,1,Jf,!0)):[]}),Bs=uu(function(n,t){var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),mi(r,2)):[]}),Ts=uu(function(n,t){ var r=jo(t);return Jf(r)&&(r=X),Jf(n)?Hr(n,ee(t,1,Jf,!0),X,r):[]}),$s=uu(function(n){var t=c(n,ju);return t.length&&t[0]===n[0]?ke(t):[]}),Ds=uu(function(n){var t=jo(n),r=c(n,ju);return t===jo(r)?t=X:r.pop(),r.length&&r[0]===n[0]?ke(r,mi(t,2)):[]}),Ms=uu(function(n){var t=jo(n),r=c(n,ju);return t="function"==typeof t?t:X,t&&r.pop(),r.length&&r[0]===n[0]?ke(r,X,t):[]}),Fs=uu(Oo),Ns=gi(function(n,t){var r=null==n?0:n.length,e=Tr(n,t);return nu(n,c(t,function(n){return Ci(n,r)?+n:n}).sort(Lu)),e}),Ps=uu(function(n){ return gu(ee(n,1,Jf,!0))}),qs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),gu(ee(n,1,Jf,!0),mi(t,2))}),Zs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,gu(ee(n,1,Jf,!0),X,t)}),Ks=uu(function(n,t){return Jf(n)?Hr(n,t):[]}),Vs=uu(function(n){return mu(i(n,Jf))}),Gs=uu(function(n){var t=jo(n);return Jf(t)&&(t=X),mu(i(n,Jf),mi(t,2))}),Hs=uu(function(n){var t=jo(n);return t="function"==typeof t?t:X,mu(i(n,Jf),X,t)}),Js=uu(Go),Ys=uu(function(n){var t=n.length,r=t>1?n[t-1]:X;return r="function"==typeof r?(n.pop(), r):X,Ho(n,r)}),Qs=gi(function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Tr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Ct&&Ci(r)?(e=e.slice(r,+r+(t?1:0)),e.__actions__.push({func:nf,args:[u],thisArg:X}),new Y(e,this.__chain__).thru(function(n){return t&&!n.length&&n.push(X),n})):this.thru(u)}),Xs=Fu(function(n,t,r){bl.call(n,r)?++n[r]:Br(n,r,1)}),nh=Ju(ho),th=Ju(po),rh=Fu(function(n,t,r){bl.call(n,r)?n[r].push(t):Br(n,r,[t])}),eh=uu(function(t,r,e){var u=-1,i="function"==typeof r,o=Hf(t)?il(t.length):[]; return ys(t,function(t){o[++u]=i?n(r,t,e):Ie(t,r,e)}),o}),uh=Fu(function(n,t,r){Br(n,r,t)}),ih=Fu(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),oh=uu(function(n,t){if(null==n)return[];var r=t.length;return r>1&&Ui(n,t[0],t[1])?t=[]:r>2&&Ui(t[0],t[1],t[2])&&(t=[t[0]]),He(n,ee(t,1),[])}),fh=Dl||function(){return re.Date.now()},ch=uu(function(n,t,r){var e=_n;if(r.length){var u=N(r,wi(ch));e|=bn}return ai(n,e,t,r,u)}),ah=uu(function(n,t,r){var e=_n|vn;if(r.length){var u=N(r,wi(ah));e|=bn; }return ai(t,e,n,r,u)}),lh=uu(function(n,t){return Gr(n,1,t)}),sh=uu(function(n,t,r){return Gr(n,Ic(t)||0,r)});Cf.Cache=sr;var hh=js(function(t,r){r=1==r.length&&bh(r[0])?c(r[0],z(mi())):c(ee(r,1),z(mi()));var e=r.length;return uu(function(u){for(var i=-1,o=Hl(u.length,e);++i<o;)u[i]=r[i].call(this,u[i]);return n(t,this,u)})}),ph=uu(function(n,t){return ai(n,bn,X,t,N(t,wi(ph)))}),_h=uu(function(n,t){return ai(n,wn,X,t,N(t,wi(_h)))}),vh=gi(function(n,t){return ai(n,xn,X,X,X,t)}),gh=ii(me),yh=ii(function(n,t){ return n>=t}),dh=Re(function(){return arguments}())?Re:function(n){return cc(n)&&bl.call(n,"callee")&&!Wl.call(n,"callee")},bh=il.isArray,wh=ce?z(ce):ze,mh=ql||qa,xh=ae?z(ae):Ee,jh=le?z(le):Le,Ah=se?z(se):Be,kh=he?z(he):Te,Oh=pe?z(pe):$e,Ih=ii(Ne),Rh=ii(function(n,t){return n<=t}),zh=Nu(function(n,t){if(Mi(t)||Hf(t))return $u(t,Pc(t),n),X;for(var r in t)bl.call(t,r)&&Sr(n,r,t[r])}),Eh=Nu(function(n,t){$u(t,qc(t),n)}),Sh=Nu(function(n,t,r,e){$u(t,qc(t),n,e)}),Wh=Nu(function(n,t,r,e){$u(t,Pc(t),n,e); }),Lh=gi(Tr),Ch=uu(function(n,t){n=ll(n);var r=-1,e=t.length,u=e>2?t[2]:X;for(u&&Ui(t[0],t[1],u)&&(e=1);++r<e;)for(var i=t[r],o=qc(i),f=-1,c=o.length;++f<c;){var a=o[f],l=n[a];(l===X||Gf(l,gl[a])&&!bl.call(n,a))&&(n[a]=i[a])}return n}),Uh=uu(function(t){return t.push(X,si),n(Mh,X,t)}),Bh=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),n[t]=r},Sa(La)),Th=Xu(function(n,t,r){null!=t&&"function"!=typeof t.toString&&(t=xl.call(t)),bl.call(n,t)?n[t].push(r):n[t]=[r]},mi),$h=uu(Ie),Dh=Nu(function(n,t,r){ Ke(n,t,r)}),Mh=Nu(function(n,t,r,e){Ke(n,t,r,e)}),Fh=gi(function(n,t){var r={};if(null==n)return r;var e=!1;t=c(t,function(t){return t=ku(t,n),e||(e=t.length>1),t}),$u(n,di(n),r),e&&(r=Fr(r,an|ln|sn,hi));for(var u=t.length;u--;)yu(r,t[u]);return r}),Nh=gi(function(n,t){return null==n?{}:Je(n,t)}),Ph=ci(Pc),qh=ci(qc),Zh=Vu(function(n,t,r){return t=t.toLowerCase(),n+(r?fa(t):t)}),Kh=Vu(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Vh=Vu(function(n,t,r){return n+(r?" ":"")+t.toLowerCase()}),Gh=Ku("toLowerCase"),Hh=Vu(function(n,t,r){ return n+(r?"_":"")+t.toLowerCase()}),Jh=Vu(function(n,t,r){return n+(r?" ":"")+Qh(t)}),Yh=Vu(function(n,t,r){return n+(r?" ":"")+t.toUpperCase()}),Qh=Ku("toUpperCase"),Xh=uu(function(t,r){try{return n(t,X,r)}catch(n){return rc(n)?n:new fl(n)}}),np=gi(function(n,t){return r(t,function(t){t=no(t),Br(n,t,ch(n[t],n))}),n}),tp=Yu(),rp=Yu(!0),ep=uu(function(n,t){return function(r){return Ie(r,n,t)}}),up=uu(function(n,t){return function(r){return Ie(n,r,t)}}),ip=ti(c),op=ti(u),fp=ti(h),cp=ui(),ap=ui(!0),lp=ni(function(n,t){ return n+t},0),sp=fi("ceil"),hp=ni(function(n,t){return n/t},1),pp=fi("floor"),_p=ni(function(n,t){return n*t},1),vp=fi("round"),gp=ni(function(n,t){return n-t},0);return Z.after=If,Z.ary=Rf,Z.assign=zh,Z.assignIn=Eh,Z.assignInWith=Sh,Z.assignWith=Wh,Z.at=Lh,Z.before=zf,Z.bind=ch,Z.bindAll=np,Z.bindKey=ah,Z.castArray=Nf,Z.chain=Qo,Z.chunk=uo,Z.compact=io,Z.concat=oo,Z.cond=za,Z.conforms=Ea,Z.constant=Sa,Z.countBy=Xs,Z.create=Sc,Z.curry=Ef,Z.curryRight=Sf,Z.debounce=Wf,Z.defaults=Ch,Z.defaultsDeep=Uh, Z.defer=lh,Z.delay=sh,Z.difference=Us,Z.differenceBy=Bs,Z.differenceWith=Ts,Z.drop=fo,Z.dropRight=co,Z.dropRightWhile=ao,Z.dropWhile=lo,Z.fill=so,Z.filter=lf,Z.flatMap=sf,Z.flatMapDeep=hf,Z.flatMapDepth=pf,Z.flatten=_o,Z.flattenDeep=vo,Z.flattenDepth=go,Z.flip=Lf,Z.flow=tp,Z.flowRight=rp,Z.fromPairs=yo,Z.functions=$c,Z.functionsIn=Dc,Z.groupBy=rh,Z.initial=mo,Z.intersection=$s,Z.intersectionBy=Ds,Z.intersectionWith=Ms,Z.invert=Bh,Z.invertBy=Th,Z.invokeMap=eh,Z.iteratee=Ca,Z.keyBy=uh,Z.keys=Pc,Z.keysIn=qc, Z.map=yf,Z.mapKeys=Zc,Z.mapValues=Kc,Z.matches=Ua,Z.matchesProperty=Ba,Z.memoize=Cf,Z.merge=Dh,Z.mergeWith=Mh,Z.method=ep,Z.methodOf=up,Z.mixin=Ta,Z.negate=Uf,Z.nthArg=Ma,Z.omit=Fh,Z.omitBy=Vc,Z.once=Bf,Z.orderBy=df,Z.over=ip,Z.overArgs=hh,Z.overEvery=op,Z.overSome=fp,Z.partial=ph,Z.partialRight=_h,Z.partition=ih,Z.pick=Nh,Z.pickBy=Gc,Z.property=Fa,Z.propertyOf=Na,Z.pull=Fs,Z.pullAll=Oo,Z.pullAllBy=Io,Z.pullAllWith=Ro,Z.pullAt=Ns,Z.range=cp,Z.rangeRight=ap,Z.rearg=vh,Z.reject=mf,Z.remove=zo,Z.rest=Tf, Z.reverse=Eo,Z.sampleSize=jf,Z.set=Jc,Z.setWith=Yc,Z.shuffle=Af,Z.slice=So,Z.sortBy=oh,Z.sortedUniq=$o,Z.sortedUniqBy=Do,Z.split=da,Z.spread=$f,Z.tail=Mo,Z.take=Fo,Z.takeRight=No,Z.takeRightWhile=Po,Z.takeWhile=qo,Z.tap=Xo,Z.throttle=Df,Z.thru=nf,Z.toArray=jc,Z.toPairs=Ph,Z.toPairsIn=qh,Z.toPath=Ha,Z.toPlainObject=Rc,Z.transform=Qc,Z.unary=Mf,Z.union=Ps,Z.unionBy=qs,Z.unionWith=Zs,Z.uniq=Zo,Z.uniqBy=Ko,Z.uniqWith=Vo,Z.unset=Xc,Z.unzip=Go,Z.unzipWith=Ho,Z.update=na,Z.updateWith=ta,Z.values=ra,Z.valuesIn=ea, Z.without=Ks,Z.words=Ra,Z.wrap=Ff,Z.xor=Vs,Z.xorBy=Gs,Z.xorWith=Hs,Z.zip=Js,Z.zipObject=Jo,Z.zipObjectDeep=Yo,Z.zipWith=Ys,Z.entries=Ph,Z.entriesIn=qh,Z.extend=Eh,Z.extendWith=Sh,Ta(Z,Z),Z.add=lp,Z.attempt=Xh,Z.camelCase=Zh,Z.capitalize=fa,Z.ceil=sp,Z.clamp=ua,Z.clone=Pf,Z.cloneDeep=Zf,Z.cloneDeepWith=Kf,Z.cloneWith=qf,Z.conformsTo=Vf,Z.deburr=ca,Z.defaultTo=Wa,Z.divide=hp,Z.endsWith=aa,Z.eq=Gf,Z.escape=la,Z.escapeRegExp=sa,Z.every=af,Z.find=nh,Z.findIndex=ho,Z.findKey=Wc,Z.findLast=th,Z.findLastIndex=po, Z.findLastKey=Lc,Z.floor=pp,Z.forEach=_f,Z.forEachRight=vf,Z.forIn=Cc,Z.forInRight=Uc,Z.forOwn=Bc,Z.forOwnRight=Tc,Z.get=Mc,Z.gt=gh,Z.gte=yh,Z.has=Fc,Z.hasIn=Nc,Z.head=bo,Z.identity=La,Z.includes=gf,Z.indexOf=wo,Z.inRange=ia,Z.invoke=$h,Z.isArguments=dh,Z.isArray=bh,Z.isArrayBuffer=wh,Z.isArrayLike=Hf,Z.isArrayLikeObject=Jf,Z.isBoolean=Yf,Z.isBuffer=mh,Z.isDate=xh,Z.isElement=Qf,Z.isEmpty=Xf,Z.isEqual=nc,Z.isEqualWith=tc,Z.isError=rc,Z.isFinite=ec,Z.isFunction=uc,Z.isInteger=ic,Z.isLength=oc,Z.isMap=jh, Z.isMatch=ac,Z.isMatchWith=lc,Z.isNaN=sc,Z.isNative=hc,Z.isNil=_c,Z.isNull=pc,Z.isNumber=vc,Z.isObject=fc,Z.isObjectLike=cc,Z.isPlainObject=gc,Z.isRegExp=Ah,Z.isSafeInteger=yc,Z.isSet=kh,Z.isString=dc,Z.isSymbol=bc,Z.isTypedArray=Oh,Z.isUndefined=wc,Z.isWeakMap=mc,Z.isWeakSet=xc,Z.join=xo,Z.kebabCase=Kh,Z.last=jo,Z.lastIndexOf=Ao,Z.lowerCase=Vh,Z.lowerFirst=Gh,Z.lt=Ih,Z.lte=Rh,Z.max=Ya,Z.maxBy=Qa,Z.mean=Xa,Z.meanBy=nl,Z.min=tl,Z.minBy=rl,Z.stubArray=Pa,Z.stubFalse=qa,Z.stubObject=Za,Z.stubString=Ka, Z.stubTrue=Va,Z.multiply=_p,Z.nth=ko,Z.noConflict=$a,Z.noop=Da,Z.now=fh,Z.pad=ha,Z.padEnd=pa,Z.padStart=_a,Z.parseInt=va,Z.random=oa,Z.reduce=bf,Z.reduceRight=wf,Z.repeat=ga,Z.replace=ya,Z.result=Hc,Z.round=vp,Z.runInContext=p,Z.sample=xf,Z.size=kf,Z.snakeCase=Hh,Z.some=Of,Z.sortedIndex=Wo,Z.sortedIndexBy=Lo,Z.sortedIndexOf=Co,Z.sortedLastIndex=Uo,Z.sortedLastIndexBy=Bo,Z.sortedLastIndexOf=To,Z.startCase=Jh,Z.startsWith=ba,Z.subtract=gp,Z.sum=el,Z.sumBy=ul,Z.template=wa,Z.times=Ga,Z.toFinite=Ac,Z.toInteger=kc, Z.toLength=Oc,Z.toLower=ma,Z.toNumber=Ic,Z.toSafeInteger=zc,Z.toString=Ec,Z.toUpper=xa,Z.trim=ja,Z.trimEnd=Aa,Z.trimStart=ka,Z.truncate=Oa,Z.unescape=Ia,Z.uniqueId=Ja,Z.upperCase=Yh,Z.upperFirst=Qh,Z.each=_f,Z.eachRight=vf,Z.first=bo,Ta(Z,function(){var n={};return ue(Z,function(t,r){bl.call(Z.prototype,r)||(n[r]=t)}),n}(),{chain:!1}),Z.VERSION=nn,r(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){Z[n].placeholder=Z}),r(["drop","take"],function(n,t){Ct.prototype[n]=function(r){ r=r===X?1:Gl(kc(r),0);var e=this.__filtered__&&!t?new Ct(this):this.clone();return e.__filtered__?e.__takeCount__=Hl(r,e.__takeCount__):e.__views__.push({size:Hl(r,Un),type:n+(e.__dir__<0?"Right":"")}),e},Ct.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),r(["filter","map","takeWhile"],function(n,t){var r=t+1,e=r==Rn||r==En;Ct.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:mi(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),r(["head","last"],function(n,t){ var r="take"+(t?"Right":"");Ct.prototype[n]=function(){return this[r](1).value()[0]}}),r(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Ct.prototype[n]=function(){return this.__filtered__?new Ct(this):this[r](1)}}),Ct.prototype.compact=function(){return this.filter(La)},Ct.prototype.find=function(n){return this.filter(n).head()},Ct.prototype.findLast=function(n){return this.reverse().find(n)},Ct.prototype.invokeMap=uu(function(n,t){return"function"==typeof n?new Ct(this):this.map(function(r){ return Ie(r,n,t)})}),Ct.prototype.reject=function(n){return this.filter(Uf(mi(n)))},Ct.prototype.slice=function(n,t){n=kc(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Ct(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==X&&(t=kc(t),r=t<0?r.dropRight(-t):r.take(t-n)),r)},Ct.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Ct.prototype.toArray=function(){return this.take(Un)},ue(Ct.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Z[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t); u&&(Z.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Ct,c=o[0],l=f||bh(t),s=function(n){var t=u.apply(Z,a([n],o));return e&&h?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(f=l=!1);var h=this.__chain__,p=!!this.__actions__.length,_=i&&!h,v=f&&!p;if(!i&&l){t=v?t:new Ct(this);var g=n.apply(t,o);return g.__actions__.push({func:nf,args:[s],thisArg:X}),new Y(g,h)}return _&&v?n.apply(this,o):(g=this.thru(s),_?e?g.value()[0]:g.value():g)})}),r(["pop","push","shift","sort","splice","unshift"],function(n){ var t=_l[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Z.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(bh(u)?u:[],n)}return this[r](function(r){return t.apply(bh(r)?r:[],n)})}}),ue(Ct.prototype,function(n,t){var r=Z[t];if(r){var e=r.name+"";bl.call(fs,e)||(fs[e]=[]),fs[e].push({name:t,func:r})}}),fs[Qu(X,vn).name]=[{name:"wrapper",func:X}],Ct.prototype.clone=$t,Ct.prototype.reverse=Yt,Ct.prototype.value=Qt,Z.prototype.at=Qs, Z.prototype.chain=tf,Z.prototype.commit=rf,Z.prototype.next=ef,Z.prototype.plant=of,Z.prototype.reverse=ff,Z.prototype.toJSON=Z.prototype.valueOf=Z.prototype.value=cf,Z.prototype.first=Z.prototype.head,Ul&&(Z.prototype[Ul]=uf),Z},be=de();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(re._=be,define(function(){return be})):ue?((ue.exports=be)._=be,ee._=be):re._=be}).call(this); </script> </head> <body> <div class="container"> <div id="search" class="form-group"> <form> <div class="form-row" id="positive-selection-header-row"> <div class="form-group col-md-2" id="not-column"> <label for="not_1" style="display: flex; justify-content: center; align-items: center; margin-bottom:10px;">Not</label> </div> <div class="form-group col-md-2" id="regex-column"> <label for="filterInput">General RegExp</label> </div> <div class="form-group col-md-2" id="lodash-column"> <label for="lodash"><a href="https://www.geeksforgeeks.org/lodash-_-matches-method/">Lodash Match String</a></label> </div> <div class="form-group col-md-2" id="namespace-column"> <label for="namespace">Namespace</label> </div> <div class="form-group col-md-2" id="category-column"> <label for="category">Category</label> </div> </div> <small class="positive-filter-form form-text text-muted">For each line, if all inputs match an event it will be displayed. If any line matches, an event will displayed. Nots are evaluated last. Without any filter, everything is displayed.</small> </form> </div> </div> <div id="chart"></div> <div class="modal" id="myModal" tabindex="-1" role="dialog"> <div class="modal-dialog modal-lg" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title">Resource</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <pre><code id="myModalContent"></code></pre> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button> </div> </div> </div> </div> <script> var eventIntervals = EVENT_INTERVAL_JSON_GOES_HERE </script> <script> // Re-render the chart with input as a regexp. Timeout for event debouncing. var clearAndRenderChart = _.debounce(function(e) { document.getElementById("chart").innerHTML = ""; renderChart(); }, 250); notInputTemplate = ` + "`" + ` <input class="positive-selection-fields form-control form-control-sm" type="checkbox" id="not_INPUT_NUMBER" style="margin-top: 16px; margin-bottom: 18px;"> ` + "`" + ` regexInputTemplate = ` + "`" + ` <input class="positive-selection-fields form-control form-control-sm" type="text" id="filterInput_INPUT_NUMBER"> ` + "`" + ` lodashInputTemplate = ` + "`" + ` <input class="positive-selection-fields form-control form-control-sm" type="text" id="lodash_INPUT_NUMBER"> ` + "`" + ` namespaceInputTemplate = ` + "`" + ` <input class="positive-selection-fields form-control form-control-sm" type="text" id="namespace_INPUT_NUMBER"> ` + "`" + ` categoryInputTemplate = ` + "`" + ` <select class="positive-selection-fields form-control form-control-sm" type="text" id="category_INPUT_NUMBER"> <option value="" selected=true ></option> <option value="test_buckets">Test Buckets</option> <option value="operator_unavailable">Operator Unavailable</option> <option value="operator_degraded">Operator Degraded</option> <option value="operator_progressing">Operator Progressing</option> <option value="pods">Pods</option> <option value="pod_logs">Pod Logs</option> <option value="alerts">Alerts</option> <option value="node_state">Node State</option> <option value="endpoint_availability">Endpoint Availability</option> <option value="e2e_test_passed">e2e Test Passed</option> <option value="e2e_test_failed">e2e Test Failed</option> <option value="e2e_test_flaked">e2e Test Flaked</option> <option value="interesting_events">Interesting Events</option> <option value="certificate_rotation">Certificate Rotation</option> </select> ` + "`" + ` numPositiveSelectors = 10 for (i = 0; i < numPositiveSelectors; i++){ $( "#not-column" ).append(notInputTemplate.replaceAll("INPUT_NUMBER", i)) $( "#regex-column" ).append(regexInputTemplate.replaceAll("INPUT_NUMBER", i)) $( "#lodash-column" ).append(lodashInputTemplate.replaceAll("INPUT_NUMBER", i)) $( "#namespace-column" ).append(namespaceInputTemplate.replaceAll("INPUT_NUMBER", i)) $( "#category-column" ).append(categoryInputTemplate.replaceAll("INPUT_NUMBER", i)) } $( ".positive-selection-fields" ).on('input', clearAndRenderChart); $(document).on("keydown", "form", function(event) { return event.key != "Enter"; }); // Structure the locator data and then categorize the event _.forEach(eventIntervals.items, function(eventInterval) { // TODO Wasn't clear if an event is only supposed to be in one category or if it can show up in multiple, with the existing implementation // it can show up more than once if it passes more than one of the category checks. If it is meant to only be one category this // could be something simpler like eventInterval.category = "operator-degraded" instead. // Not hypthetical, found events that passed isPodLogs also passed isPods. // Categorizing the events once on page load will save time on filtering later eventInterval.categories = {}; eventInterval.categories.operator_unavailable = isOperatorAvailable(eventInterval); eventInterval.categories.operator_progressing = isOperatorProgressing(eventInterval); eventInterval.categories.operator_degraded = isOperatorDegraded(eventInterval); eventInterval.categories.pods = isPod(eventInterval); eventInterval.categories.pod_logs = isPodLog(eventInterval); eventInterval.categories.interesting_events = isInterestingOrPathological(eventInterval); eventInterval.categories.alerts = isAlert(eventInterval); eventInterval.categories.node_state = isNodeState(eventInterval); eventInterval.categories.e2e_test_failed = isE2EFailed(eventInterval); eventInterval.categories.e2e_test_flaked = isE2EFlaked(eventInterval); eventInterval.categories.e2e_test_passed = isE2EPassed(eventInterval); eventInterval.categories.endpoint_availability = isEndpointConnectivity(eventInterval); eventInterval.categories.certificate_rotation = isCertificateRotation(eventInterval); eventInterval.categories.test_buckets = isTestBucket(eventInterval); eventInterval.categories.uncategorized = !_.some(eventInterval.categories); // will save time later during filtering and re-rendering since we don't render any uncategorized events }); function isOperatorAvailable(eventInterval) { return eventInterval.locator.type === "ClusterOperator" && eventInterval.message.annotations["condition"] === "Available" && eventInterval.message.annotations["status"] === "False"; } function isOperatorDegraded(eventInterval) { return eventInterval.locator.type === "ClusterOperator" && eventInterval.message.annotations["condition"] === "Degraded" && eventInterval.message.annotations["status"] === "True"; } function isOperatorProgressing(eventInterval) { return eventInterval.locator.type === "ClusterOperator" && eventInterval.message.annotations["condition"] === "Progressing" && eventInterval.message.annotations["status"] === "True"; } function isPodLog(eventInterval) { if (eventInterval.source === 'PodLog') { return true } return eventInterval.source === 'EtcdLog'; } function isTestBucket(eventInterval) { return eventInterval.source === "TestBucket" } function testBucketValue(item) { const bucketName = item.locator.keys['test-bucket'] || 'Unknown' return [bucketName, "", "TestBucket"] } function isInterestingOrPathological(eventInterval) { return eventInterval.source === 'KubeEvent' && eventInterval.message.annotations["pathological"] === "true"; } function isPod(eventInterval) { // this check was added to keep the repeating events out fo the "pods" section if (eventInterval.message.annotations.hasOwnProperty("count")) { return false } // this check was added to avoid the events from the "interesting-events" section from being // duplicated in the "pods" section. if (isInterestingOrPathological(eventInterval)) { return false } if (eventInterval.locator.keys.hasOwnProperty("pod") && !eventInterval.locator.keys.hasOwnProperty("alert")) { return true } return false } function isPodLifecycle(eventInterval) { if (eventInterval.locator.keys.hasOwnProperty("pod") && (eventInterval.message.reason === "Created" || eventInterval.message.reason === "Scheduled" || eventInterval.message.reason === "GracefulDelete")) { return true } return false } function isContainerLifecycle(eventInterval) { if (eventInterval.locator.keys.hasOwnProperty("container") && (eventInterval.message.reason === "ContainerExit" || eventInterval.message.reason === "ContainerStart" || eventInterval.message.reason === "ContainerWait")) { return true } return false } function isContainerReadiness(eventInterval) { if (eventInterval.locator.keys.hasOwnProperty("container") && (eventInterval.message.reason === "Ready" || eventInterval.message.reason === "NotReady")) { return true } return false } function isKubeletReadinessCheck(eventInterval) { if (eventInterval.locator.keys.hasOwnProperty("container/") && (eventInterval.message.reason === "ReadinessFailed" || eventInterval.message.reason === "ReadinessErrored")) { return true } return false } function isKubeletStartupProbeFailure(eventInterval) { if (eventInterval.locator.keys.hasOwnProperty("container") && (eventInterval.message.reason === "StartupProbeFailed")) { return true } return false } function isE2EFailed(eventInterval) { if (eventInterval.source === "E2ETest" && eventInterval.message.annotations["status"] === "Failed") { return true } return false } function isE2EFlaked(eventInterval) { if (eventInterval.source === "E2ETest" && eventInterval.message.annotations["status"] === "Flaked") { return true } return false } function isE2EPassed(eventInterval) { if (eventInterval.source === "E2ETest" && eventInterval.message.annotations["status"] === "Passed") { return true } return false } function isEndpointConnectivity(eventInterval) { if (eventInterval.message.reason !== "DisruptionBegan" && eventInterval.message.reason !== "DisruptionSamplerOutageBegan") { return false } if (eventInterval.source === "Disruption") { return true } if (eventInterval.locator.keys["namespace"] === "e2e-k8s-service-lb-available") { return true } if (eventInterval.locator.keys.hasOwnProperty("route")) { return true } return false } function isNodeState(eventInterval) { return eventInterval.source === "NodeState" } function isAlert(eventInterval) { return eventInterval.source === "Alert" } function isCertificateRotation(eventInterval) { if (eventInterval.source != 'KubeEvent') { return false } if (eventInterval.message.reason === "CertificateUpdated") { return true }; if (eventInterval.message.reason === "CertificateRemoved") { return true }; if (eventInterval.message.reason === "CertificateUpdateFailed") { return true }; if (eventInterval.message.reason === "ConfigMapUpdated") { return true }; if (eventInterval.message.reason === "SignerUpdateRequired") { return true }; if (eventInterval.message.reason === "CABundleUpdateRequired") { return true }; if (eventInterval.message.reason === "TargetUpdateRequired") { return true }; if (eventInterval.message.reason === "CSRCreated") { return true }; if (eventInterval.message.reason === "CSRApproved") { return true }; if (eventInterval.message.reason === "CertificateRotationStarted") { return true }; if (eventInterval.message.reason === "ClientCertificateCreated") { return true }; if (eventInterval.message.reason === "NoValidCertificateFound") { return true }; return false; } function interestingEvents(item) { if (item.message.annotations["pathological"] === "true") { if (item.message.annotations["interesting"] === "true") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pathological known)` + "`" + `, "PathologicalKnown"]; } else { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pathological new)` + "`" + `, "PathologicalNew"]; } } // TODO: hack that can likely be removed when we get to structured intervals for these // Always show pod sandbox events even if they didn't make it to pathological if (item.message.annotations["interesting"] === "true" && item.message.humanMessage.includes("pod sandbox")) { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod sandbox)` + "`" + `, "PodSandbox"]; } } function podLogs(item) { if (item.level == "Warning") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod log)` + "`" + `, "PodLogWarning"]; } if (item.level == "Error") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod log)` + "`" + `, "PodLogError"]; } return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod log)` + "`" + `, "PodLogInfo"]; } // Used for the actual locators displayed on the right hand side of the chart. Based on the origin go code that does // similar for whenever we serialize a locator to display. function buildLocatorDisplayString(i) { let keys = Object.keys(i.keys); keys = sortKeys(keys); let annotations = []; for (let k of keys) { let v = i.keys[k]; if (k === 'LocatorE2ETestKey') { annotations.push(` + "`" + `${k}/${JSON.stringify(v)}` + "`" + `); } else { annotations.push(` + "`" + `${k}/${v}` + "`" + `); } } return annotations.join(' '); } function podStateValue(item) { let reason = item.message.reason if (isPodLifecycle(item)){ if (reason === "Created") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod lifecycle)` + "`" + `, "PodCreated"]; } if (reason === "Scheduled") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod lifecycle)` + "`" + `, "PodScheduled"]; } if (reason === "GracefulDelete") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (pod lifecycle)` + "`" + `, "PodTerminating"]; } } if (isContainerLifecycle(item)){ if (reason === "ContainerWait") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (container lifecycle)` + "`" + `, "ContainerWait"]; } if (reason === "ContainerStart") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (container lifecycle)` + "`" + `, "ContainerStart"]; } } if (isContainerReadiness(item)){ if (reason === "NotReady") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (container readiness)` + "`" + `, "ContainerNotReady"]; } if (reason === "Ready") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (container readiness)` + "`" + `, "ContainerReady"]; } } if (isKubeletReadinessCheck(item)){ if (reason === "ReadinessFailed") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (kubelet container readiness)` + "`" + `, "ContainerReadinessFailed"]; } if (reason === "ReadinessErrored") { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (kubelet container readiness)` + "`" + `, "ContainerReadinessErrored"]; } } if (isKubeletStartupProbeFailure(item)){ return [buildLocatorDisplayString(item.locator), ` + "`" + ` (kubelet container startupProbe)` + "`" + `, "StartupProbeFailed"]; } return [buildLocatorDisplayString(item.locator), "", "Unknown"]; } const rePhase = new RegExp("(^| )phase/([^ ]+)") function nodeStateValue(item) { let roles = "" if (item.message.annotations.hasOwnProperty('roles')) { roles = item.message.annotations.roles } if (item.message.reason === 'NotReady') { return [buildLocatorDisplayString(item.locator), ` + "`" + ` (${roles})` + "`" + `, "NodeNotReady"] } let m = item.message.annotations.phase; return [buildLocatorDisplayString(item.locator), ` + "`" + ` (${roles})` + "`" + `, m]; } function alertSeverity(item) { // the other types can be pending, so check pending first if (item.message.annotations["alertstate"] === "pending") { return [buildLocatorDisplayString(item.locator), "", "AlertPending"] } if (item.message.annotations["severity"] === "info") { return [buildLocatorDisplayString(item.locator), "", "AlertInfo"] } if (item.message.annotations["severity"] === "warning") { return [buildLocatorDisplayString(item.locator), "", "AlertWarning"] } if (item.message.annotations["severity"] === "critical") { return [buildLocatorDisplayString(item.locator), "", "AlertCritical"] } // color as critical if nothing matches so that we notice that something has gone wrong return [buildLocatorDisplayString(item.locator), "", "AlertCritical"] } function disruptionValue(item) { // We classify these disruption samples with this message if it thinks // it looks like a problem in the CI cluster running the tests, not the cluster under test. // (typically DNS lookup problems) if (item.message.reason === "DisruptionSamplerOutageBegan") { return [buildLocatorDisplayString(item.locator), "", "CIClusterDisruption"] } return [buildLocatorDisplayString(item.locator), "", "Disruption"] } function getDurationString(durationSeconds) { const seconds = durationSeconds % 60; const minutes = Math.floor(durationSeconds/60); var durationString = "["; if (minutes !== 0) { durationString += minutes + "m" } durationString += seconds + "s]"; return durationString; } function defaultToolTip(item) { if (!item.message || !item.message.annotations) { return ''; } const structuredMessage = item.message; const annotations = structuredMessage.annotations; const keyValuePairs = Object.entries(annotations).map(([key, value]) => { return ` + "`" + `${key}/${value}` + "`" + `; }); let tt = keyValuePairs.join(' ') + ' ' + structuredMessage.humanMessage; // TODO: can probably remove this once we're confident all displayed intervals have it set if ('display' in item) { tt = "display/" + item.display + " " + tt } if ('source' in item) { tt = "source/" + item.source + " " + tt } tt = tt + " " + getDurationString(((new Date(item.to)).getTime() - (new Date(item.from).getTime()))/1000); return tt } function sortKeys(keys) { // Ensure these keys appear in this order. Other keys can be mixed in and will appear at the end in alphabetical order. const orderedKeys = ["namespace", "node", "pod", "uid", "server", "container", "shutdown", "row"]; // Create a map to store the indices of keys in the orderedKeys array. // This will allow us to efficiently check if a key is in orderedKeys and find its position. const orderedKeyIndices = {}; orderedKeys.forEach((key, index) => { orderedKeyIndices[key] = index; }); // Define a custom sorting function that orders the keys based on the orderedKeys array. keys.sort((a, b) => { // Get the indices of keys a and b in orderedKeys. const indexA = orderedKeyIndices[a]; const indexB = orderedKeyIndices[b]; // If both keys exist in orderedKeys, sort them based on their order. if (indexA !== undefined && indexB !== undefined) { return indexA - indexB; } // If only one of the keys exists in orderedKeys, move it to the front. if (indexA !== undefined) { return -1; } else if (indexB !== undefined) { return 1; } // If neither key is in orderedKeys, sort alphabetically so we have predictable ordering. return a.localeCompare(b); }); return keys; } function segmentTooltipFunc(d) { return '<span style="max-inline-size: min-content; display: inline-block;">' + '<strong>' + d.labelVal + '</strong><br/>' + '<strong>From: </strong>' + new Date(d.timeRange[0]).toUTCString() + '<br>' + '<strong>To: </strong>' + new Date(d.timeRange[1]).toUTCString() + '</span>'; } function createTimelineData(timelineVal, timelineData, filteredEventIntervals, category) { const data = {} var now = new Date(); var earliest = filteredEventIntervals.reduce( (accumulator, currentValue) => !currentValue.from || accumulator < new Date(currentValue.from) ? accumulator : new Date(currentValue.from), new Date(now.getTime() + 1), ); var latest = filteredEventIntervals.reduce( (accumulator, currentValue) => !currentValue.to || accumulator > new Date(currentValue.to) ? accumulator : new Date(currentValue.to), new Date(now.getTime() - 1), ); filteredEventIntervals.forEach((item) => { if (!item.categories[category]) { return } var startDate = new Date(item.from) if (!item.from) { startDate = earliest; } var endDate = new Date(item.to) if (!item.to) { endDate = latest } let label = buildLocatorDisplayString(item.locator) let sub = "" let val = timelineVal if (typeof val === "function") { [label, sub, val] = timelineVal(item) } let section = data[label] if (!section) { section = {}; data[label] = section } let ranges = section[sub] if (!ranges) { ranges = []; section[sub] = ranges } ranges.push({ timeRange: [startDate, endDate], val: val, labelVal: defaultToolTip(item) }); }); for (const label in data) { const section = data[label] for (const sub in section) { const data = section[sub]; const totalDurationSeconds = data.reduce( (prev, curr) => prev + (curr.timeRange[1].getTime() - curr.timeRange[0].getTime())/1000, 0); timelineData.push({label: label + sub + " " + getDurationString(totalDurationSeconds), data: data}) } } } function renderChart() { var loc = window.location.href; var isSet = false var positiveSelectionRows = new Map(); var negativeSelectionRows = new Map(); for (let i = 0; i < numPositiveSelectors; i++){ var not = $("#not_"+i).is(":checked") var category = $("#category_"+i).val() var lodash = $("#lodash_"+i).val() var ns = $("#namespace_"+i).val() var regexStr = $("#filterInput_"+i).val() var currIsSet = (regexStr.length != 0 || lodash.length != 0 || ns.length != 0 || category.length != 0) console.log("value of not " + not) if (not){ negativeSelectionRows.set(i, { isSet: currIsSet, lodash: lodash, regexStr: regexStr, regex: new RegExp(regexStr), namespace: ns, category: category }) } else{ positiveSelectionRows.set(i, { isSet: currIsSet, lodash: lodash, regexStr: regexStr, regex: new RegExp(regexStr), namespace: ns, category: category }) } if (currIsSet) { isSet = true } } var filteredEvents; // if none of the inputs are set, nothing to filter so don't waste time looping through everything if (!isSet) { filteredEvents = eventIntervals.items; } else { // At least one of the inputs had a value, test any inputs that had values // This currently does an OR operation of the input fields filteredEvents = _.filter(eventIntervals.items, function(eventInterval) { // Go ahead and filter out uncategorized events if (eventInterval.categories.uncategorized) { return false; } var eventMatches = false; for (let [key, positiveSelectionRow] of positiveSelectionRows) { if (positiveSelectionRow.isSet){ matchRegex = positiveSelectionRow.regexStr.length == 0 || positiveSelectionRow.regex.test(buildLocatorDisplayString(eventInterval.locator)) matchNS = positiveSelectionRow.namespace.length == 0 || eventInterval.locator.keys.namespace && eventInterval.locator.namespace.includes(positiveSelectionRow.namespace) matchCategory = positiveSelectionRow.category.length == 0 || eventInterval.categories[positiveSelectionRow.category] matchLodash = true if (positiveSelectionRow.lodash.length > 0){ lodashMatches = _.filter([eventInterval], _.matches(JSON.parse(positiveSelectionRow.lodash))); matchLodash = (lodashMatches.length > 0) } matchesPositive = matchRegex && matchLodash && matchNS && matchCategory if (matchesPositive) { console.log("matched positive " + negativeSelectionRows.size) var exclude = false for (let [key, negativeSelectionRow] of negativeSelectionRows) { if (negativeSelectionRow.isSet){ console.log("checking negative") matchRegex = negativeSelectionRow.regexStr.length == 0 || negativeSelectionRow.regex.test(buildLocatorDisplayString(eventInterval.locator)) matchNS = negativeSelectionRow.namespace.length == 0 || eventInterval.locator.keys.namespace && eventInterval.locator.keys.namespace.includes(negativeSelectionRow.namespace) matchCategory = negativeSelectionRow.category.length == 0 || eventInterval.categories[negativeSelectionRow.category] matchLodash = true if (negativeSelectionRow.lodash.length > 0){ lodashMatches = _.filter([eventInterval], _.matches(JSON.parse(negativeSelectionRow.lodash))); matchLodash = (lodashMatches.length > 0) } matchesNegative = matchRegex && matchLodash && matchNS && matchCategory if (matchesNegative) { exclude = true break } } } if (exclude) { } else{ eventMatches = true; break } } } } return eventMatches; }); } var timelineGroups = []; timelineGroups.push({group: "test-buckets", data: []}); createTimelineData(testBucketValue, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "test_buckets"); timelineGroups.push({group: "operator-unavailable", data: []}); createTimelineData("OperatorUnavailable", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "operator_unavailable"); timelineGroups.push({group: "operator-degraded", data: []}); createTimelineData("OperatorDegraded", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "operator_degraded"); timelineGroups.push({group: "operator-progressing", data: []}); createTimelineData("OperatorProgressing", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "operator_progressing"); timelineGroups.push({group: "node-state", data: []}); createTimelineData(nodeStateValue, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "node_state"); // Sort the node-state intervals so rows are grouped by node timelineGroups[timelineGroups.length - 1].data.sort(function (e1 ,e2){ return e1.label < e2.label ? -1 : e1.label > e2.label; }) timelineGroups.push({group: "disruption", data: []}); createTimelineData(disruptionValue, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "endpoint_availability"); timelineGroups.push({group: "pods", data: []}); createTimelineData(podStateValue, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "pods"); timelineGroups[timelineGroups.length - 1].data.sort(function (e1 ,e2){ // I think I really want ordering by time in each of a few categories return e1.label < e2.label ? -1 : e1.label > e2.label; }); timelineGroups.push({group: "pod-logs", data: []}); createTimelineData(podLogs, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "pod_logs"); timelineGroups.push({group: "alerts", data: []}); createTimelineData(alertSeverity, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "alerts"); // leaving this for posterity so future me (or someone else) can try it, but I think ordering by name makes the // patterns shown by timing hide and timing appears more relevant to my eyes. // sort alerts alphabetically for display purposes, but keep the json itself ordered by time. // timelineGroups[timelineGroups.length - 1].data.sort(function (e1 ,e2){ // if (e1.label.includes("alert") && e2.label.includes("alert")) { // return e1.label < e2.label ? -1 : e1.label > e2.label; // } // return 0 // }) timelineGroups.push({group: "e2e-test-failed", data: []}); createTimelineData("Failed", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "e2e_test_failed"); timelineGroups.push({group: "e2e-test-flaked", data: []}); createTimelineData("Flaked", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "e2e_test_flaked"); timelineGroups.push({group: "e2e-test-passed", data: []}); createTimelineData("Passed", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "e2e_test_passed"); timelineGroups.push({group: "interesting-events", data: []}); createTimelineData(interestingEvents, timelineGroups[timelineGroups.length - 1].data, filteredEvents, "interesting_events"); timelineGroups.push({group: "certificate-rotation", data: []}) createTimelineData("CertificateRotation", timelineGroups[timelineGroups.length - 1].data, filteredEvents, "certificate_rotation") var segmentFunc = function (segment) { // Copy label to clipboard navigator.clipboard.writeText(segment.labelVal); // for (var i in data) { // if (data[i].group == segment.group) { // var groupdata = data[i].data // for (var j in groupdata) { // if (groupdata[j].label == segment.label) { // labeldata = groupdata[j].data // for (var k in labeldata) { // var startDate = new Date(labeldata[k].timeRange[0]) // var endDate = new Date(labeldata[k].timeRange[1]) // if (startDate.getTime() == segment.timeRange[0].getTime() && // endDate.getTime() == segment.timeRange[1].getTime()) { // $('#myModalContent').text(labeldata[k].extended) // $('#myModal').modal() // } // } // } // } // } // } } const el = document.querySelector('#chart'); const myChart = TimelinesChart(); var ordinalScale = d3.scaleOrdinal() .domain([ 'TestBucket', // test bucket intervals 'InterestingEvent', 'PathologicalKnown', "PathologicalNew", // interesting and pathological events 'AlertInfo', 'AlertPending', 'AlertWarning', 'AlertCritical', // alerts 'OperatorUnavailable', 'OperatorDegraded', 'OperatorProgressing', // operators 'Update', 'Drain', 'Reboot', 'OperatingSystemUpdate', 'NodeNotReady', // nodes 'Passed', 'Skipped', 'Flaked', 'Failed', // tests 'PodCreated', 'PodScheduled', 'PodTerminating','ContainerWait', 'ContainerStart', 'ContainerNotReady', 'ContainerReady', 'ContainerReadinessFailed', 'ContainerReadinessErrored', 'StartupProbeFailed', // pods 'CIClusterDisruption', 'Disruption', // disruption 'Degraded', 'Upgradeable', 'False', 'Unknown', 'PodLogInfo', 'PodLogWarning', 'PodLogError']) .range([ '#9370DB', // test bucket intervals - medium purple '#6E6E6E', '#0000ff', '#d0312d', // pathological and interesting events '#fada5e','#fada5e','#ffa500', '#d0312d', // alerts '#d0312d', '#ffa500', '#fada5e', // operators '#1e7bd9', '#4294e6', '#6aaef2', '#96cbff', '#fada5e', // nodes '#3cb043', '#ceba76', '#ffa500', '#d0312d', // tests '#96cbff', '#1e7bd9', '#ffa500', '#ca8dfd', '#9300ff', '#fada5e','#3cb043', '#d0312d', '#d0312d', '#c90076', // pods '#96cbff', '#d0312d', // disruption '#b65049', '#32b8b6', '#ffffff', '#bbbbbb', '#96cbff', '#fada5e', '#d0312d']); myChart. data(timelineGroups). useUtc(true). zQualitative(true). enableAnimations(false). leftMargin(240). rightMargin(1550). maxLineHeight(20). maxHeight(10000). zColorScale(ordinalScale). zoomX([new Date(eventIntervals.items[0].from), new Date(eventIntervals.items[eventIntervals.items.length - 1].to)]). onSegmentClick(segmentFunc). segmentTooltipContent(segmentTooltipFunc) (el); // force a minimum width for smaller devices (which otherwise get an unusable display) setTimeout(() => { if (myChart.width() < 3100) { myChart.width(3100) }}, 1) } renderChart(null) </script> </body> </html> `) func e2echartNonSpyglassE2eChartTemplateHtmlBytes() ([]byte, error) { return _e2echartNonSpyglassE2eChartTemplateHtml, nil } func e2echartNonSpyglassE2eChartTemplateHtml() (*asset, error) { bytes, err := e2echartNonSpyglassE2eChartTemplateHtmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "e2echart/non-spyglass-e2e-chart-template.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } var _e2echartTestRiskAnalysisHtml = []byte(`<html lang="en"> <head> <title>Risk Analysis</title> <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> <meta name="description" content="Risk analysis is performed by Sippy to attempt to determine if the failures in this job are abnormal when compared to results for similar jobs over the past week, and amidst on-going incidents in the CI infrastructure. Risk analysis API will not catch everything and is a relatively simple implementation today, please reach out to the Technical Release Team if you spot abnormalities or have suggestions."> </head> <body onLoad="buildTestCaseTable('#test_case_results'); buildDisruptionTable('#disruption_results')"> <p> <a target="_blank" href="TEST_RISK_ANALYSIS_SIPPY_URL_GOES_HERE">Link to Sippy</a> </p> <table id="test_case_results" border="1" width="100%"> </table> <p> </p> <h1>Disruption Analysis</h1> Disruption unit testing on individual job runs is relatively forgiving as it can generate a lot of noise. This table attempts to highlight risky results by color coding the observed disruption for this run against the percentiles over the past several weeks. Red indicates this job run exceeded the 99th percentile, yellow the 95th.<p/> If you're getting red results here, it might be a good idea to investigate the intervals chart for this job run, available in the spyglass panels on the prow job. This will show when the disruption occurred, the exact error messages returned, and what else was going on in the cluster at that time. Additional runs may help provide a clearer picture if the chart does not provide any insight. Feel free to reach out to TRT if you think you're seeing something alarming.<p/> <table id="disruption_results" border="1" width="100%"> </table> <p> </p> <script> var testResult = TEST_RISK_ANALYSIS_JSON_GOES_HERE var disruptionResult = TEST_DISRUPTION_ANALYSIS_JSON_GOES_HERE var testLinkPrefix = "https://sippy.dptools.openshift.org/sippy-ng/tests/" var testLinkSuffix = "/analysis?test=" function buildOpenBugs(openBugs) { td$ = $('<td/>') if (openBugs.length > 0) { cell$ = $('<ul/>') for (var i = 0; i < openBugs.length; i++) { li$ = $('<li>') bug = "<a target=\"_blank\" href=" + openBugs[i].url + ">" + openBugs[i].key + "</a>: " + openBugs[i].summary li$.append($('<li>').html(bug)) cell$.append(li$) } td$.append(cell$) } return td$ } function buildRiskReasons(reasons) { td$ = $('<td/>') if (reasons.length > 0) { cell$ = $('<ul/>') for (var i = 0; i < reasons.length; i++) { li$ = $('<li>') li$.append($('<li>').html(reasons[i])) cell$.append(li$) } td$.append(cell$) } return td$ } function buildRiskLevel(level) { td$ = $('<td/>') if (level.Level >= 10) { td$.css("background-color", "pink"); } else if (level.Level >= 5) { td$.css("background-color", "lightyellow"); } else { td$.css("background-color", "lightgreen"); } td$.append(level.Name) return td$ } // Build Test Case Table function buildTestCaseTable(selector) { if (!testResult.hasOwnProperty('OverallRisk')) { return; } // Add table headers addColumnHeaders(selector); // Build Overall Row var row$ = $('<tr/>'); row$.append($('<td/>').html("Overall")); row$.append(buildRiskLevel(testResult.OverallRisk.Level)) row$.append(buildRiskReasons(testResult.OverallRisk.Reasons)) row$.append(buildOpenBugs(testResult.OpenBugs)) $(selector).append(row$); // First sort the tests by risk factor testResult.Tests.sort(function(a, b){return b.Risk.Level.Level - a.Risk.Level.Level}) // Build rows for all tests for (var i = 0; i < testResult.Tests.length; i++) { var row$ = $('<tr/>'); testUrl = encodeURI(testLinkPrefix + testResult.CompareRelease + testLinkSuffix + testResult.Tests[i].Name) row$.append($('<td/>').html("<a target=\"_blank\" href=" + testUrl + ">" + testResult.Tests[i].Name + "</a>")); row$.append(buildRiskLevel(testResult.Tests[i].Risk.Level)) row$.append(buildRiskReasons(testResult.Tests[i].Risk.Reasons)) row$.append(buildOpenBugs(testResult.Tests[i].OpenBugs)) $(selector).append(row$); } } function addColumnHeaders(selector) { var headerTr$ = $('<tr/>'); headerTr$.append($('<th/>').html("Test Name")); headerTr$.append($('<th/>').html("Risk Level")); headerTr$.append($('<th/>').html("Risk Reason")); headerTr$.append($('<th/>').html("Open Bugs")); $(selector).append(headerTr$); } function buildDisruptionTable(selector) { addDisruptionColumnHeaders(selector); for (var i = 0; i < disruptionResult.Backends.length; i++) { var row$ = $('<tr/>'); row$.css("background-color", disruptionResult.Backends[i].RiskColor); row$.append(addSimpleCell(disruptionResult.Backends[i].BackendName)) row$.append(addSimpleCell(disruptionResult.Backends[i].ObservedDisruption)) row$.append(addSimpleCell(disruptionResult.Backends[i].P50.toFixed(2))) row$.append(addSimpleCell(disruptionResult.Backends[i].P75.toFixed(2))) row$.append(addSimpleCell(disruptionResult.Backends[i].P95.toFixed(2))) row$.append(addSimpleCell(disruptionResult.Backends[i].P99.toFixed(2))) row$.append(addSimpleCell(disruptionResult.Backends[i].JobRuns)) $(selector).append(row$); } } function addDisruptionColumnHeaders(selector) { var headerTr$ = $('<tr/>'); headerTr$.append($('<th/>').html("Backend Name")); headerTr$.append($('<th/>').html("Observed Disruption")); headerTr$.append($('<th/>').html("P50")); headerTr$.append($('<th/>').html("P75")); headerTr$.append($('<th/>').html("P95")); headerTr$.append($('<th/>').html("P99")); headerTr$.append($('<th/>').html("JobRuns")); $(selector).append(headerTr$); } function addSimpleCell(v) { td$ = $('<td/>') td$.append(v) return td$ } </script> </body> </html> `) func e2echartTestRiskAnalysisHtmlBytes() ([]byte, error) { return _e2echartTestRiskAnalysisHtml, nil } func e2echartTestRiskAnalysisHtml() (*asset, error) { bytes, err := e2echartTestRiskAnalysisHtmlBytes() if err != nil { return nil, err } info := bindataFileInfo{name: "e2echart/test-risk-analysis.html", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} a := &asset{bytes: bytes, info: info} return a, nil } // Asset loads and returns the asset for the given name. // It returns an error if the asset could not be found or // could not be loaded. func Asset(name string) ([]byte, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err) } return a.bytes, nil } return nil, fmt.Errorf("Asset %s not found", name) } // MustAsset is like Asset but panics when Asset would return an error. // It simplifies safe initialization of global variables. func MustAsset(name string) []byte { a, err := Asset(name) if err != nil { panic("asset: Asset(" + name + "): " + err.Error()) } return a } // AssetInfo loads and returns the asset info for the given name. // It returns an error if the asset could not be found or // could not be loaded. func AssetInfo(name string) (os.FileInfo, error) { cannonicalName := strings.Replace(name, "\\", "/", -1) if f, ok := _bindata[cannonicalName]; ok { a, err := f() if err != nil { return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err) } return a.info, nil } return nil, fmt.Errorf("AssetInfo %s not found", name) } // AssetNames returns the names of the assets. func AssetNames() []string { names := make([]string, 0, len(_bindata)) for name := range _bindata { names = append(names, name) } return names } // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ "examples/db-templates/mariadb-ephemeral-template.json": examplesDbTemplatesMariadbEphemeralTemplateJson, "examples/db-templates/mariadb-persistent-template.json": examplesDbTemplatesMariadbPersistentTemplateJson, "examples/db-templates/mysql-ephemeral-template.json": examplesDbTemplatesMysqlEphemeralTemplateJson, "examples/db-templates/mysql-persistent-template.json": examplesDbTemplatesMysqlPersistentTemplateJson, "examples/db-templates/postgresql-ephemeral-template.json": examplesDbTemplatesPostgresqlEphemeralTemplateJson, "examples/db-templates/postgresql-persistent-template.json": examplesDbTemplatesPostgresqlPersistentTemplateJson, "examples/db-templates/redis-ephemeral-template.json": examplesDbTemplatesRedisEphemeralTemplateJson, "examples/db-templates/redis-persistent-template.json": examplesDbTemplatesRedisPersistentTemplateJson, "examples/image-streams/image-streams-centos7.json": examplesImageStreamsImageStreamsCentos7Json, "examples/sample-app/application-template-dockerbuild.json": examplesSampleAppApplicationTemplateDockerbuildJson, "examples/sample-app/application-template-pullspecbuild.json": examplesSampleAppApplicationTemplatePullspecbuildJson, "examples/sample-app/application-template-stibuild.json": examplesSampleAppApplicationTemplateStibuildJson, "examples/sample-app/cleanup.sh": examplesSampleAppCleanupSh, "examples/sample-app/github-webhook-example.json": examplesSampleAppGithubWebhookExampleJson, "examples/quickstarts/cakephp-mysql-persistent.json": examplesQuickstartsCakephpMysqlPersistentJson, "examples/quickstarts/cakephp-mysql.json": examplesQuickstartsCakephpMysqlJson, "examples/quickstarts/dancer-mysql-persistent.json": examplesQuickstartsDancerMysqlPersistentJson, "examples/quickstarts/dancer-mysql.json": examplesQuickstartsDancerMysqlJson, "examples/quickstarts/django-postgresql-persistent.json": examplesQuickstartsDjangoPostgresqlPersistentJson, "examples/quickstarts/django-postgresql.json": examplesQuickstartsDjangoPostgresqlJson, "examples/quickstarts/httpd.json": examplesQuickstartsHttpdJson, "examples/quickstarts/nginx.json": examplesQuickstartsNginxJson, "examples/quickstarts/nodejs-postgresql-persistent.json": examplesQuickstartsNodejsPostgresqlPersistentJson, "examples/quickstarts/nodejs-postgresql.json": examplesQuickstartsNodejsPostgresqlJson, "examples/quickstarts/rails-postgresql-persistent.json": examplesQuickstartsRailsPostgresqlPersistentJson, "examples/quickstarts/rails-postgresql.json": examplesQuickstartsRailsPostgresqlJson, "examples/hello-openshift/Dockerfile": examplesHelloOpenshiftDockerfile, "examples/hello-openshift/go.mod": examplesHelloOpenshiftGoMod, "examples/hello-openshift/hello-pod.json": examplesHelloOpenshiftHelloPodJson, "examples/hello-openshift/hello-project.json": examplesHelloOpenshiftHelloProjectJson, "examples/jenkins/application-template.json": examplesJenkinsApplicationTemplateJson, "examples/jenkins/jenkins-ephemeral-template.json": examplesJenkinsJenkinsEphemeralTemplateJson, "examples/jenkins/jenkins-persistent-template.json": examplesJenkinsJenkinsPersistentTemplateJson, "examples/jenkins/pipeline/bluegreen-pipeline.yaml": examplesJenkinsPipelineBluegreenPipelineYaml, "examples/jenkins/pipeline/maven-pipeline.yaml": examplesJenkinsPipelineMavenPipelineYaml, "examples/jenkins/pipeline/nodejs-sample-pipeline.yaml": examplesJenkinsPipelineNodejsSamplePipelineYaml, "examples/jenkins/pipeline/openshift-client-plugin-pipeline.yaml": examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, "examples/jenkins/pipeline/samplepipeline.yaml": examplesJenkinsPipelineSamplepipelineYaml, "examples/quickstarts/cakephp-mysql.json/cakephp-mysql.json": examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson, "test/extended/testdata/aggregator/kube-system-auth-reader.yaml": testExtendedTestdataAggregatorKubeSystemAuthReaderYaml, "test/extended/testdata/aggregator/sample-apiserver-apiservice.yaml": testExtendedTestdataAggregatorSampleApiserverApiserviceYaml, "test/extended/testdata/aggregator/sample-apiserver-authdelegator.yaml": testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml, "test/extended/testdata/aggregator/sample-apiserver-authreader.yaml": testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml, "test/extended/testdata/aggregator/sample-apiserver-rc.yaml": testExtendedTestdataAggregatorSampleApiserverRcYaml, "test/extended/testdata/aggregator/sample-apiserver-sa.yaml": testExtendedTestdataAggregatorSampleApiserverSaYaml, "test/extended/testdata/aggregator/sample-apiserver-service.yaml": testExtendedTestdataAggregatorSampleApiserverServiceYaml, "test/extended/testdata/apiserver/operator-kube-apiserver-cr.yaml": testExtendedTestdataApiserverOperatorKubeApiserverCrYaml, "test/extended/testdata/builds/application-template-custombuild.json": testExtendedTestdataBuildsApplicationTemplateCustombuildJson, "test/extended/testdata/builds/build-postcommit/docker.yaml": testExtendedTestdataBuildsBuildPostcommitDockerYaml, "test/extended/testdata/builds/build-postcommit/imagestreams.yaml": testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml, "test/extended/testdata/builds/build-postcommit/sti.yaml": testExtendedTestdataBuildsBuildPostcommitStiYaml, "test/extended/testdata/builds/build-pruning/default-group-build-config.yaml": testExtendedTestdataBuildsBuildPruningDefaultGroupBuildConfigYaml, "test/extended/testdata/builds/build-pruning/default-legacy-build-config.yaml": testExtendedTestdataBuildsBuildPruningDefaultLegacyBuildConfigYaml, "test/extended/testdata/builds/build-pruning/errored-build-config.yaml": testExtendedTestdataBuildsBuildPruningErroredBuildConfigYaml, "test/extended/testdata/builds/build-pruning/failed-build-config.yaml": testExtendedTestdataBuildsBuildPruningFailedBuildConfigYaml, "test/extended/testdata/builds/build-pruning/failed-pipeline.yaml": testExtendedTestdataBuildsBuildPruningFailedPipelineYaml, "test/extended/testdata/builds/build-pruning/imagestream.yaml": testExtendedTestdataBuildsBuildPruningImagestreamYaml, "test/extended/testdata/builds/build-pruning/successful-build-config.yaml": testExtendedTestdataBuildsBuildPruningSuccessfulBuildConfigYaml, "test/extended/testdata/builds/build-pruning/successful-pipeline.yaml": testExtendedTestdataBuildsBuildPruningSuccessfulPipelineYaml, "test/extended/testdata/builds/build-quota/.s2i/bin/assemble": testExtendedTestdataBuildsBuildQuotaS2iBinAssemble, "test/extended/testdata/builds/build-quota/Dockerfile": testExtendedTestdataBuildsBuildQuotaDockerfile, "test/extended/testdata/builds/build-secrets/Dockerfile": testExtendedTestdataBuildsBuildSecretsDockerfile, "test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/assemble": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinAssemble, "test/extended/testdata/builds/build-secrets/s2i-binary-dir/.s2i/bin/run": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirS2iBinRun, "test/extended/testdata/builds/build-secrets/s2i-binary-dir/Gemfile": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirGemfile, "test/extended/testdata/builds/build-secrets/s2i-binary-dir/config.ru": testExtendedTestdataBuildsBuildSecretsS2iBinaryDirConfigRu, "test/extended/testdata/builds/build-secrets/test-configmap-2.json": testExtendedTestdataBuildsBuildSecretsTestConfigmap2Json, "test/extended/testdata/builds/build-secrets/test-configmap.json": testExtendedTestdataBuildsBuildSecretsTestConfigmapJson, "test/extended/testdata/builds/build-secrets/test-docker-build.json": testExtendedTestdataBuildsBuildSecretsTestDockerBuildJson, "test/extended/testdata/builds/build-secrets/test-is.json": testExtendedTestdataBuildsBuildSecretsTestIsJson, "test/extended/testdata/builds/build-secrets/test-s2i-build.json": testExtendedTestdataBuildsBuildSecretsTestS2iBuildJson, "test/extended/testdata/builds/build-secrets/test-secret-2.json": testExtendedTestdataBuildsBuildSecretsTestSecret2Json, "test/extended/testdata/builds/build-secrets/test-secret.json": testExtendedTestdataBuildsBuildSecretsTestSecretJson, "test/extended/testdata/builds/build-timing/Dockerfile": testExtendedTestdataBuildsBuildTimingDockerfile, "test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/assemble": testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinAssemble, "test/extended/testdata/builds/build-timing/s2i-binary-dir/.s2i/bin/run": testExtendedTestdataBuildsBuildTimingS2iBinaryDirS2iBinRun, "test/extended/testdata/builds/build-timing/s2i-binary-dir/Gemfile": testExtendedTestdataBuildsBuildTimingS2iBinaryDirGemfile, "test/extended/testdata/builds/build-timing/s2i-binary-dir/config.ru": testExtendedTestdataBuildsBuildTimingS2iBinaryDirConfigRu, "test/extended/testdata/builds/build-timing/test-docker-build.json": testExtendedTestdataBuildsBuildTimingTestDockerBuildJson, "test/extended/testdata/builds/build-timing/test-is.json": testExtendedTestdataBuildsBuildTimingTestIsJson, "test/extended/testdata/builds/build-timing/test-s2i-build.json": testExtendedTestdataBuildsBuildTimingTestS2iBuildJson, "test/extended/testdata/builds/cluster-config/invalid-build-cluster-config.yaml": testExtendedTestdataBuildsClusterConfigInvalidBuildClusterConfigYaml, "test/extended/testdata/builds/cluster-config/registry-blacklist.yaml": testExtendedTestdataBuildsClusterConfigRegistryBlacklistYaml, "test/extended/testdata/builds/cluster-config/registry-whitelist.yaml": testExtendedTestdataBuildsClusterConfigRegistryWhitelistYaml, "test/extended/testdata/builds/cluster-config.yaml": testExtendedTestdataBuildsClusterConfigYaml, "test/extended/testdata/builds/custom-build/Dockerfile": testExtendedTestdataBuildsCustomBuildDockerfile, "test/extended/testdata/builds/custom-build/Dockerfile.sample": testExtendedTestdataBuildsCustomBuildDockerfileSample, "test/extended/testdata/builds/custom-build/build.sh": testExtendedTestdataBuildsCustomBuildBuildSh, "test/extended/testdata/builds/docker-add/Dockerfile": testExtendedTestdataBuildsDockerAddDockerfile, "test/extended/testdata/builds/docker-add/docker-add-env/Dockerfile": testExtendedTestdataBuildsDockerAddDockerAddEnvDockerfile, "test/extended/testdata/builds/docker-add/docker-add-env/foo": testExtendedTestdataBuildsDockerAddDockerAddEnvFoo, "test/extended/testdata/builds/incremental-auth-build.json": testExtendedTestdataBuildsIncrementalAuthBuildJson, "test/extended/testdata/builds/jenkins-pipeline/jenkins-ephemeral.json": testExtendedTestdataBuildsJenkinsPipelineJenkinsEphemeralJson, "test/extended/testdata/builds/jenkins-pipeline/jenkins-rhel.yaml": testExtendedTestdataBuildsJenkinsPipelineJenkinsRhelYaml, "test/extended/testdata/builds/pullsecret/linked-nodejs-bc.yaml": testExtendedTestdataBuildsPullsecretLinkedNodejsBcYaml, "test/extended/testdata/builds/pullsecret/pullsecret-nodejs-bc.yaml": testExtendedTestdataBuildsPullsecretPullsecretNodejsBcYaml, "test/extended/testdata/builds/s2i-environment-build-app/.s2i/environment": testExtendedTestdataBuildsS2iEnvironmentBuildAppS2iEnvironment, "test/extended/testdata/builds/s2i-environment-build-app/Gemfile": testExtendedTestdataBuildsS2iEnvironmentBuildAppGemfile, "test/extended/testdata/builds/s2i-environment-build-app/config.ru": testExtendedTestdataBuildsS2iEnvironmentBuildAppConfigRu, "test/extended/testdata/builds/simple-pipeline-bc.yaml": testExtendedTestdataBuildsSimplePipelineBcYaml, "test/extended/testdata/builds/statusfail-assemble/.s2i/bin/assemble": testExtendedTestdataBuildsStatusfailAssembleS2iBinAssemble, "test/extended/testdata/builds/statusfail-badcontextdirs2i.yaml": testExtendedTestdataBuildsStatusfailBadcontextdirs2iYaml, "test/extended/testdata/builds/statusfail-failedassemble.yaml": testExtendedTestdataBuildsStatusfailFailedassembleYaml, "test/extended/testdata/builds/statusfail-fetchbuilderimage.yaml": testExtendedTestdataBuildsStatusfailFetchbuilderimageYaml, "test/extended/testdata/builds/statusfail-fetchimagecontentdocker.yaml": testExtendedTestdataBuildsStatusfailFetchimagecontentdockerYaml, "test/extended/testdata/builds/statusfail-fetchsourcedocker.yaml": testExtendedTestdataBuildsStatusfailFetchsourcedockerYaml, "test/extended/testdata/builds/statusfail-fetchsources2i.yaml": testExtendedTestdataBuildsStatusfailFetchsources2iYaml, "test/extended/testdata/builds/statusfail-genericreason.yaml": testExtendedTestdataBuildsStatusfailGenericreasonYaml, "test/extended/testdata/builds/statusfail-oomkilled.yaml": testExtendedTestdataBuildsStatusfailOomkilledYaml, "test/extended/testdata/builds/statusfail-postcommithook.yaml": testExtendedTestdataBuildsStatusfailPostcommithookYaml, "test/extended/testdata/builds/statusfail-pushtoregistry.yaml": testExtendedTestdataBuildsStatusfailPushtoregistryYaml, "test/extended/testdata/builds/subscription-content/build-imagestream.yaml": testExtendedTestdataBuildsSubscriptionContentBuildImagestreamYaml, "test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel7.yaml": testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel7Yaml, "test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel8.yaml": testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel8Yaml, "test/extended/testdata/builds/subscription-content/buildconfig-subscription-content-rhel9.yaml": testExtendedTestdataBuildsSubscriptionContentBuildconfigSubscriptionContentRhel9Yaml, "test/extended/testdata/builds/subscription-content/secret-template.txt": testExtendedTestdataBuildsSubscriptionContentSecretTemplateTxt, "test/extended/testdata/builds/test-auth-build.yaml": testExtendedTestdataBuildsTestAuthBuildYaml, "test/extended/testdata/builds/test-bc-with-pr-ref.yaml": testExtendedTestdataBuildsTestBcWithPrRefYaml, "test/extended/testdata/builds/test-build-app/Dockerfile": testExtendedTestdataBuildsTestBuildAppDockerfile, "test/extended/testdata/builds/test-build-app/Gemfile": testExtendedTestdataBuildsTestBuildAppGemfile, "test/extended/testdata/builds/test-build-app/config.ru": testExtendedTestdataBuildsTestBuildAppConfigRu, "test/extended/testdata/builds/test-build-cluster-config.yaml": testExtendedTestdataBuildsTestBuildClusterConfigYaml, "test/extended/testdata/builds/test-build-podsvc.json": testExtendedTestdataBuildsTestBuildPodsvcJson, "test/extended/testdata/builds/test-build-proxy.yaml": testExtendedTestdataBuildsTestBuildProxyYaml, "test/extended/testdata/builds/test-build-revision.json": testExtendedTestdataBuildsTestBuildRevisionJson, "test/extended/testdata/builds/test-build-search-registries.yaml": testExtendedTestdataBuildsTestBuildSearchRegistriesYaml, "test/extended/testdata/builds/test-build.yaml": testExtendedTestdataBuildsTestBuildYaml, "test/extended/testdata/builds/test-buildconfigsecretinjector.yaml": testExtendedTestdataBuildsTestBuildconfigsecretinjectorYaml, "test/extended/testdata/builds/test-cds-dockerbuild.json": testExtendedTestdataBuildsTestCdsDockerbuildJson, "test/extended/testdata/builds/test-cds-sourcebuild.json": testExtendedTestdataBuildsTestCdsSourcebuildJson, "test/extended/testdata/builds/test-context-build.json": testExtendedTestdataBuildsTestContextBuildJson, "test/extended/testdata/builds/test-custom-build.yaml": testExtendedTestdataBuildsTestCustomBuildYaml, "test/extended/testdata/builds/test-docker-app/Dockerfile": testExtendedTestdataBuildsTestDockerAppDockerfile, "test/extended/testdata/builds/test-docker-build-pullsecret.json": testExtendedTestdataBuildsTestDockerBuildPullsecretJson, "test/extended/testdata/builds/test-docker-build.json": testExtendedTestdataBuildsTestDockerBuildJson, "test/extended/testdata/builds/test-docker-no-outputname.json": testExtendedTestdataBuildsTestDockerNoOutputnameJson, "test/extended/testdata/builds/test-env-build.json": testExtendedTestdataBuildsTestEnvBuildJson, "test/extended/testdata/builds/test-image-stream.json": testExtendedTestdataBuildsTestImageStreamJson, "test/extended/testdata/builds/test-imagechangetriggers.yaml": testExtendedTestdataBuildsTestImagechangetriggersYaml, "test/extended/testdata/builds/test-imageresolution-custom-build.yaml": testExtendedTestdataBuildsTestImageresolutionCustomBuildYaml, "test/extended/testdata/builds/test-imageresolution-docker-build.yaml": testExtendedTestdataBuildsTestImageresolutionDockerBuildYaml, "test/extended/testdata/builds/test-imageresolution-s2i-build.yaml": testExtendedTestdataBuildsTestImageresolutionS2iBuildYaml, "test/extended/testdata/builds/test-imagesource-buildconfig.yaml": testExtendedTestdataBuildsTestImagesourceBuildconfigYaml, "test/extended/testdata/builds/test-nosrc-build.json": testExtendedTestdataBuildsTestNosrcBuildJson, "test/extended/testdata/builds/test-s2i-build-quota.json": testExtendedTestdataBuildsTestS2iBuildQuotaJson, "test/extended/testdata/builds/test-s2i-build.json": testExtendedTestdataBuildsTestS2iBuildJson, "test/extended/testdata/builds/test-s2i-no-outputname.json": testExtendedTestdataBuildsTestS2iNoOutputnameJson, "test/extended/testdata/builds/test-symlink-build.yaml": testExtendedTestdataBuildsTestSymlinkBuildYaml, "test/extended/testdata/builds/valuefrom/failed-docker-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromFailedDockerBuildValueFromConfigYaml, "test/extended/testdata/builds/valuefrom/failed-sti-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromFailedStiBuildValueFromConfigYaml, "test/extended/testdata/builds/valuefrom/successful-docker-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromSuccessfulDockerBuildValueFromConfigYaml, "test/extended/testdata/builds/valuefrom/successful-sti-build-value-from-config.yaml": testExtendedTestdataBuildsValuefromSuccessfulStiBuildValueFromConfigYaml, "test/extended/testdata/builds/valuefrom/test-configmap.yaml": testExtendedTestdataBuildsValuefromTestConfigmapYaml, "test/extended/testdata/builds/valuefrom/test-is.json": testExtendedTestdataBuildsValuefromTestIsJson, "test/extended/testdata/builds/valuefrom/test-secret.yaml": testExtendedTestdataBuildsValuefromTestSecretYaml, "test/extended/testdata/builds/volumes/configmap.yaml": testExtendedTestdataBuildsVolumesConfigmapYaml, "test/extended/testdata/builds/volumes/docker-buildconfig.yaml": testExtendedTestdataBuildsVolumesDockerBuildconfigYaml, "test/extended/testdata/builds/volumes/docker-deployment.yaml": testExtendedTestdataBuildsVolumesDockerDeploymentYaml, "test/extended/testdata/builds/volumes/docker-imagestream.yaml": testExtendedTestdataBuildsVolumesDockerImagestreamYaml, "test/extended/testdata/builds/volumes/s2i-buildconfig.yaml": testExtendedTestdataBuildsVolumesS2iBuildconfigYaml, "test/extended/testdata/builds/volumes/s2i-deployment.yaml": testExtendedTestdataBuildsVolumesS2iDeploymentYaml, "test/extended/testdata/builds/volumes/s2i-imagestream.yaml": testExtendedTestdataBuildsVolumesS2iImagestreamYaml, "test/extended/testdata/builds/volumes/secret.yaml": testExtendedTestdataBuildsVolumesSecretYaml, "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent-not-master.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventNotMasterJson, "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPusheventJson, "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54-not-master.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54NotMasterJson, "test/extended/testdata/builds/webhook/bitbucket/testdata/pushevent54.json": testExtendedTestdataBuildsWebhookBitbucketTestdataPushevent54Json, "test/extended/testdata/builds/webhook/generic/testdata/post-receive-git.json": testExtendedTestdataBuildsWebhookGenericTestdataPostReceiveGitJson, "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.json": testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsJson, "test/extended/testdata/builds/webhook/generic/testdata/push-generic-envs.yaml": testExtendedTestdataBuildsWebhookGenericTestdataPushGenericEnvsYaml, "test/extended/testdata/builds/webhook/generic/testdata/push-generic.json": testExtendedTestdataBuildsWebhookGenericTestdataPushGenericJson, "test/extended/testdata/builds/webhook/generic/testdata/push-gitlab.json": testExtendedTestdataBuildsWebhookGenericTestdataPushGitlabJson, "test/extended/testdata/builds/webhook/github/testdata/pingevent.json": testExtendedTestdataBuildsWebhookGithubTestdataPingeventJson, "test/extended/testdata/builds/webhook/github/testdata/pushevent-not-master-branch.json": testExtendedTestdataBuildsWebhookGithubTestdataPusheventNotMasterBranchJson, "test/extended/testdata/builds/webhook/github/testdata/pushevent.json": testExtendedTestdataBuildsWebhookGithubTestdataPusheventJson, "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent-not-master-branch.json": testExtendedTestdataBuildsWebhookGitlabTestdataPusheventNotMasterBranchJson, "test/extended/testdata/builds/webhook/gitlab/testdata/pushevent.json": testExtendedTestdataBuildsWebhookGitlabTestdataPusheventJson, "test/extended/testdata/cli/test-release-image-references.json": testExtendedTestdataCliTestReleaseImageReferencesJson, "test/extended/testdata/cluster/master-vert.yaml": testExtendedTestdataClusterMasterVertYaml, "test/extended/testdata/cluster/quickstarts/cakephp-mysql.json": testExtendedTestdataClusterQuickstartsCakephpMysqlJson, "test/extended/testdata/cluster/quickstarts/dancer-mysql.json": testExtendedTestdataClusterQuickstartsDancerMysqlJson, "test/extended/testdata/cluster/quickstarts/django-postgresql.json": testExtendedTestdataClusterQuickstartsDjangoPostgresqlJson, "test/extended/testdata/cluster/quickstarts/nodejs-postgresql.json": testExtendedTestdataClusterQuickstartsNodejsPostgresqlJson, "test/extended/testdata/cluster/quickstarts/rails-postgresql.json": testExtendedTestdataClusterQuickstartsRailsPostgresqlJson, "test/extended/testdata/cmd/hack/lib/cmd.sh": testExtendedTestdataCmdHackLibCmdSh, "test/extended/testdata/cmd/hack/lib/compress.awk": testExtendedTestdataCmdHackLibCompressAwk, "test/extended/testdata/cmd/hack/lib/constants.sh": testExtendedTestdataCmdHackLibConstantsSh, "test/extended/testdata/cmd/hack/lib/init.sh": testExtendedTestdataCmdHackLibInitSh, "test/extended/testdata/cmd/hack/lib/log/output.sh": testExtendedTestdataCmdHackLibLogOutputSh, "test/extended/testdata/cmd/hack/lib/log/stacktrace.sh": testExtendedTestdataCmdHackLibLogStacktraceSh, "test/extended/testdata/cmd/hack/lib/log/system.sh": testExtendedTestdataCmdHackLibLogSystemSh, "test/extended/testdata/cmd/hack/lib/test/junit.sh": testExtendedTestdataCmdHackLibTestJunitSh, "test/extended/testdata/cmd/hack/lib/util/environment.sh": testExtendedTestdataCmdHackLibUtilEnvironmentSh, "test/extended/testdata/cmd/hack/lib/util/misc.sh": testExtendedTestdataCmdHackLibUtilMiscSh, "test/extended/testdata/cmd/hack/lib/util/text.sh": testExtendedTestdataCmdHackLibUtilTextSh, "test/extended/testdata/cmd/hack/lib/util/trap.sh": testExtendedTestdataCmdHackLibUtilTrapSh, "test/extended/testdata/cmd/test/cmd/authentication.sh": testExtendedTestdataCmdTestCmdAuthenticationSh, "test/extended/testdata/cmd/test/cmd/builds.sh": testExtendedTestdataCmdTestCmdBuildsSh, "test/extended/testdata/cmd/test/cmd/config.sh": testExtendedTestdataCmdTestCmdConfigSh, "test/extended/testdata/cmd/test/cmd/deployments.sh": testExtendedTestdataCmdTestCmdDeploymentsSh, "test/extended/testdata/cmd/test/cmd/describer.sh": testExtendedTestdataCmdTestCmdDescriberSh, "test/extended/testdata/cmd/test/cmd/edit.sh": testExtendedTestdataCmdTestCmdEditSh, "test/extended/testdata/cmd/test/cmd/env.sh": testExtendedTestdataCmdTestCmdEnvSh, "test/extended/testdata/cmd/test/cmd/framework-test.sh": testExtendedTestdataCmdTestCmdFrameworkTestSh, "test/extended/testdata/cmd/test/cmd/get.sh": testExtendedTestdataCmdTestCmdGetSh, "test/extended/testdata/cmd/test/cmd/image-lookup.sh": testExtendedTestdataCmdTestCmdImageLookupSh, "test/extended/testdata/cmd/test/cmd/images.sh": testExtendedTestdataCmdTestCmdImagesSh, "test/extended/testdata/cmd/test/cmd/printer.sh": testExtendedTestdataCmdTestCmdPrinterSh, "test/extended/testdata/cmd/test/cmd/quota.sh": testExtendedTestdataCmdTestCmdQuotaSh, "test/extended/testdata/cmd/test/cmd/secrets.sh": testExtendedTestdataCmdTestCmdSecretsSh, "test/extended/testdata/cmd/test/cmd/set-data.sh": testExtendedTestdataCmdTestCmdSetDataSh, "test/extended/testdata/cmd/test/cmd/set-liveness-probe.sh": testExtendedTestdataCmdTestCmdSetLivenessProbeSh, "test/extended/testdata/cmd/test/cmd/setbuildhook.sh": testExtendedTestdataCmdTestCmdSetbuildhookSh, "test/extended/testdata/cmd/test/cmd/setbuildsecret.sh": testExtendedTestdataCmdTestCmdSetbuildsecretSh, "test/extended/testdata/cmd/test/cmd/testdata/application-template-custombuild.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateCustombuildJson, "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild-dc.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildDcJson, "test/extended/testdata/cmd/test/cmd/testdata/application-template-dockerbuild.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateDockerbuildJson, "test/extended/testdata/cmd/test/cmd/testdata/application-template-mix.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateMixJson, "test/extended/testdata/cmd/test/cmd/testdata/application-template-stibuild.json": testExtendedTestdataCmdTestCmdTestdataApplicationTemplateStibuildJson, "test/extended/testdata/cmd/test/cmd/testdata/external-service.yaml": testExtendedTestdataCmdTestCmdTestdataExternalServiceYaml, "test/extended/testdata/cmd/test/cmd/testdata/hello-openshift/hello-pod.json": testExtendedTestdataCmdTestCmdTestdataHelloOpenshiftHelloPodJson, "test/extended/testdata/cmd/test/cmd/testdata/idling-dc.yaml": testExtendedTestdataCmdTestCmdTestdataIdlingDcYaml, "test/extended/testdata/cmd/test/cmd/testdata/idling-deployment.yaml": testExtendedTestdataCmdTestCmdTestdataIdlingDeploymentYaml, "test/extended/testdata/cmd/test/cmd/testdata/idling-svc-route.yaml": testExtendedTestdataCmdTestCmdTestdataIdlingSvcRouteYaml, "test/extended/testdata/cmd/test/cmd/testdata/image-streams/image-streams-centos7.json": testExtendedTestdataCmdTestCmdTestdataImageStreamsImageStreamsCentos7Json, "test/extended/testdata/cmd/test/cmd/testdata/jenkins/jenkins-ephemeral-template.json": testExtendedTestdataCmdTestCmdTestdataJenkinsJenkinsEphemeralTemplateJson, "test/extended/testdata/cmd/test/cmd/testdata/modified-ruby-imagestream.json": testExtendedTestdataCmdTestCmdTestdataModifiedRubyImagestreamJson, "test/extended/testdata/cmd/test/cmd/testdata/multiport-service.yaml": testExtendedTestdataCmdTestCmdTestdataMultiportServiceYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json": testExtendedTestdataCmdTestCmdTestdataNewAppBcFromImagestreamimageJson, "test/extended/testdata/cmd/test/cmd/testdata/new-app/build-arg-dockerfile/Dockerfile": testExtendedTestdataCmdTestCmdTestdataNewAppBuildArgDockerfileDockerfile, "test/extended/testdata/cmd/test/cmd/testdata/new-app/circular-is.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppCircularIsYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/circular.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppCircularYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/imagestream-ref.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppImagestreamRefYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/installable-stream.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppInstallableStreamYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid-build-strategy.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppInvalidBuildStrategyYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json": testExtendedTestdataCmdTestCmdTestdataNewAppInvalidJson, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-minimal-expose.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateMinimalExposeJson, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-app-label.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithAppLabelJson, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd-ns.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdNsYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-crd.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithCrdYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-with-namespaces.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithNamespacesJson, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template-without-app-label.json": testExtendedTestdataCmdTestCmdTestdataNewAppTemplateWithoutAppLabelJson, "test/extended/testdata/cmd/test/cmd/testdata/new-app/template_multiple_resource_gvs.yaml": testExtendedTestdataCmdTestCmdTestdataNewAppTemplate_multiple_resource_gvsYaml, "test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-env.env": testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappEnvEnv, "test/extended/testdata/cmd/test/cmd/testdata/new-app/test-cmd-newapp-params.env": testExtendedTestdataCmdTestCmdTestdataNewAppTestCmdNewappParamsEnv, "test/extended/testdata/cmd/test/cmd/testdata/oauthaccesstoken.yaml": testExtendedTestdataCmdTestCmdTestdataOauthaccesstokenYaml, "test/extended/testdata/cmd/test/cmd/testdata/old-template.json": testExtendedTestdataCmdTestCmdTestdataOldTemplateJson, "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-no-extension-in-directory": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonNoExtensionInDirectory, "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/json-with-extension.json": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryJsonWithExtensionJson, "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/non-api-file": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryNonApiFile, "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/directory/yml-with-extension.yml": testExtendedTestdataCmdTestCmdTestdataResourceBuilderDirectoryYmlWithExtensionYml, "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/json-no-extension": testExtendedTestdataCmdTestCmdTestdataResourceBuilderJsonNoExtension, "test/extended/testdata/cmd/test/cmd/testdata/resource-builder/yml-no-extension": testExtendedTestdataCmdTestCmdTestdataResourceBuilderYmlNoExtension, "test/extended/testdata/cmd/test/cmd/testdata/rollingupdate-daemonset.yaml": testExtendedTestdataCmdTestCmdTestdataRollingupdateDaemonsetYaml, "test/extended/testdata/cmd/test/cmd/testdata/services.yaml": testExtendedTestdataCmdTestCmdTestdataServicesYaml, "test/extended/testdata/cmd/test/cmd/testdata/simple-deployment.yaml": testExtendedTestdataCmdTestCmdTestdataSimpleDeploymentYaml, "test/extended/testdata/cmd/test/cmd/testdata/statefulset.yaml": testExtendedTestdataCmdTestCmdTestdataStatefulsetYaml, "test/extended/testdata/cmd/test/cmd/testdata/templateinstance_objectkinds.yaml": testExtendedTestdataCmdTestCmdTestdataTemplateinstance_objectkindsYaml, "test/extended/testdata/cmd/test/cmd/testdata/templates/basic-users-binding.json": testExtendedTestdataCmdTestCmdTestdataTemplatesBasicUsersBindingJson, "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.env": testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookEnv, "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook.json": testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbookJson, "test/extended/testdata/cmd/test/cmd/testdata/templates/guestbook_list.json": testExtendedTestdataCmdTestCmdTestdataTemplatesGuestbook_listJson, "test/extended/testdata/cmd/test/cmd/testdata/templates/multiline.txt": testExtendedTestdataCmdTestCmdTestdataTemplatesMultilineTxt, "test/extended/testdata/cmd/test/cmd/testdata/templates/template-type-precision.json": testExtendedTestdataCmdTestCmdTestdataTemplatesTemplateTypePrecisionJson, "test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.env": testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsEnv, "test/extended/testdata/cmd/test/cmd/testdata/templates/template_required_params.yaml": testExtendedTestdataCmdTestCmdTestdataTemplatesTemplate_required_paramsYaml, "test/extended/testdata/cmd/test/cmd/testdata/test-bc.yaml": testExtendedTestdataCmdTestCmdTestdataTestBcYaml, "test/extended/testdata/cmd/test/cmd/testdata/test-buildcli.json": testExtendedTestdataCmdTestCmdTestdataTestBuildcliJson, "test/extended/testdata/cmd/test/cmd/testdata/test-deployment-config.yaml": testExtendedTestdataCmdTestCmdTestdataTestDeploymentConfigYaml, "test/extended/testdata/cmd/test/cmd/testdata/test-deployment.yaml": testExtendedTestdataCmdTestCmdTestdataTestDeploymentYaml, "test/extended/testdata/cmd/test/cmd/testdata/test-docker-build.json": testExtendedTestdataCmdTestCmdTestdataTestDockerBuildJson, "test/extended/testdata/cmd/test/cmd/testdata/test-image-stream.json": testExtendedTestdataCmdTestCmdTestdataTestImageStreamJson, "test/extended/testdata/cmd/test/cmd/testdata/test-image.json": testExtendedTestdataCmdTestCmdTestdataTestImageJson, "test/extended/testdata/cmd/test/cmd/testdata/test-multiarch-stream.yaml": testExtendedTestdataCmdTestCmdTestdataTestMultiarchStreamYaml, "test/extended/testdata/cmd/test/cmd/testdata/test-replication-controller.yaml": testExtendedTestdataCmdTestCmdTestdataTestReplicationControllerYaml, "test/extended/testdata/cmd/test/cmd/testdata/test-route.json": testExtendedTestdataCmdTestCmdTestdataTestRouteJson, "test/extended/testdata/cmd/test/cmd/testdata/test-s2i-build.json": testExtendedTestdataCmdTestCmdTestdataTestS2iBuildJson, "test/extended/testdata/cmd/test/cmd/testdata/test-service.json": testExtendedTestdataCmdTestCmdTestdataTestServiceJson, "test/extended/testdata/cmd/test/cmd/testdata/test-stream.yaml": testExtendedTestdataCmdTestCmdTestdataTestStreamYaml, "test/extended/testdata/cmd/test/cmd/triggers.sh": testExtendedTestdataCmdTestCmdTriggersSh, "test/extended/testdata/cmd/test/cmd/volumes.sh": testExtendedTestdataCmdTestCmdVolumesSh, "test/extended/testdata/custom-secret-builder/Dockerfile": testExtendedTestdataCustomSecretBuilderDockerfile, "test/extended/testdata/custom-secret-builder/build.sh": testExtendedTestdataCustomSecretBuilderBuildSh, "test/extended/testdata/deployments/custom-deployment.yaml": testExtendedTestdataDeploymentsCustomDeploymentYaml, "test/extended/testdata/deployments/deployment-example.yaml": testExtendedTestdataDeploymentsDeploymentExampleYaml, "test/extended/testdata/deployments/deployment-history-limit.yaml": testExtendedTestdataDeploymentsDeploymentHistoryLimitYaml, "test/extended/testdata/deployments/deployment-ignores-deployer.yaml": testExtendedTestdataDeploymentsDeploymentIgnoresDeployerYaml, "test/extended/testdata/deployments/deployment-image-resolution-is.yaml": testExtendedTestdataDeploymentsDeploymentImageResolutionIsYaml, "test/extended/testdata/deployments/deployment-image-resolution.yaml": testExtendedTestdataDeploymentsDeploymentImageResolutionYaml, "test/extended/testdata/deployments/deployment-min-ready-seconds.yaml": testExtendedTestdataDeploymentsDeploymentMinReadySecondsYaml, "test/extended/testdata/deployments/deployment-simple-sleep.yaml": testExtendedTestdataDeploymentsDeploymentSimpleSleepYaml, "test/extended/testdata/deployments/deployment-simple.yaml": testExtendedTestdataDeploymentsDeploymentSimpleYaml, "test/extended/testdata/deployments/deployment-trigger.yaml": testExtendedTestdataDeploymentsDeploymentTriggerYaml, "test/extended/testdata/deployments/deployment-with-ref-env.yaml": testExtendedTestdataDeploymentsDeploymentWithRefEnvYaml, "test/extended/testdata/deployments/failing-pre-hook.yaml": testExtendedTestdataDeploymentsFailingPreHookYaml, "test/extended/testdata/deployments/generation-test.yaml": testExtendedTestdataDeploymentsGenerationTestYaml, "test/extended/testdata/deployments/multi-ict-deployment.yaml": testExtendedTestdataDeploymentsMultiIctDeploymentYaml, "test/extended/testdata/deployments/paused-deployment.yaml": testExtendedTestdataDeploymentsPausedDeploymentYaml, "test/extended/testdata/deployments/readiness-test.yaml": testExtendedTestdataDeploymentsReadinessTestYaml, "test/extended/testdata/deployments/tag-images-deployment.yaml": testExtendedTestdataDeploymentsTagImagesDeploymentYaml, "test/extended/testdata/deployments/test-deployment-broken.yaml": testExtendedTestdataDeploymentsTestDeploymentBrokenYaml, "test/extended/testdata/deployments/test-deployment-test.yaml": testExtendedTestdataDeploymentsTestDeploymentTestYaml, "test/extended/testdata/edge_topologies/baremetalhost-template.yaml": testExtendedTestdataEdge_topologiesBaremetalhostTemplateYaml, "test/extended/testdata/edge_topologies/machine-template.yaml": testExtendedTestdataEdge_topologiesMachineTemplateYaml, "test/extended/testdata/egress-firewall/ovnk-egressfirewall-test.yaml": testExtendedTestdataEgressFirewallOvnkEgressfirewallTestYaml, "test/extended/testdata/egress-firewall/ovnk-egressfirewall-wildcard-test.yaml": testExtendedTestdataEgressFirewallOvnkEgressfirewallWildcardTestYaml, "test/extended/testdata/egress-router-cni/egress-router-cni-v4-cr.yaml": testExtendedTestdataEgressRouterCniEgressRouterCniV4CrYaml, "test/extended/testdata/egress-router-cni/egress-router-cni-v6-cr.yaml": testExtendedTestdataEgressRouterCniEgressRouterCniV6CrYaml, "test/extended/testdata/forcepull-test.json": testExtendedTestdataForcepullTestJson, "test/extended/testdata/gssapi/config/kubeconfig": testExtendedTestdataGssapiConfigKubeconfig, "test/extended/testdata/gssapi/config/oauth_config.json": testExtendedTestdataGssapiConfigOauth_configJson, "test/extended/testdata/gssapi/fedora/base/Dockerfile": testExtendedTestdataGssapiFedoraBaseDockerfile, "test/extended/testdata/gssapi/fedora/kerberos/Dockerfile": testExtendedTestdataGssapiFedoraKerberosDockerfile, "test/extended/testdata/gssapi/fedora/kerberos_configured/Dockerfile": testExtendedTestdataGssapiFedoraKerberos_configuredDockerfile, "test/extended/testdata/gssapi/proxy/Dockerfile": testExtendedTestdataGssapiProxyDockerfile, "test/extended/testdata/gssapi/proxy/configure.sh": testExtendedTestdataGssapiProxyConfigureSh, "test/extended/testdata/gssapi/proxy/gssapiproxy-buildconfig.yaml": testExtendedTestdataGssapiProxyGssapiproxyBuildconfigYaml, "test/extended/testdata/gssapi/proxy/gssapiproxy-deploymentconfig.yaml": testExtendedTestdataGssapiProxyGssapiproxyDeploymentconfigYaml, "test/extended/testdata/gssapi/proxy/gssapiproxy-imagestream.yaml": testExtendedTestdataGssapiProxyGssapiproxyImagestreamYaml, "test/extended/testdata/gssapi/proxy/gssapiproxy-service.yaml": testExtendedTestdataGssapiProxyGssapiproxyServiceYaml, "test/extended/testdata/gssapi/proxy/healthz": testExtendedTestdataGssapiProxyHealthz, "test/extended/testdata/gssapi/proxy/kadm5.acl": testExtendedTestdataGssapiProxyKadm5Acl, "test/extended/testdata/gssapi/proxy/kdc.conf": testExtendedTestdataGssapiProxyKdcConf, "test/extended/testdata/gssapi/proxy/krb5.conf": testExtendedTestdataGssapiProxyKrb5Conf, "test/extended/testdata/gssapi/proxy/proxy.conf": testExtendedTestdataGssapiProxyProxyConf, "test/extended/testdata/gssapi/scripts/gssapi-tests.sh": testExtendedTestdataGssapiScriptsGssapiTestsSh, "test/extended/testdata/gssapi/scripts/test-wrapper.sh": testExtendedTestdataGssapiScriptsTestWrapperSh, "test/extended/testdata/gssapi/ubuntu/base/Dockerfile": testExtendedTestdataGssapiUbuntuBaseDockerfile, "test/extended/testdata/gssapi/ubuntu/kerberos/Dockerfile": testExtendedTestdataGssapiUbuntuKerberosDockerfile, "test/extended/testdata/gssapi/ubuntu/kerberos_configured/Dockerfile": testExtendedTestdataGssapiUbuntuKerberos_configuredDockerfile, "test/extended/testdata/hello-builder/Dockerfile": testExtendedTestdataHelloBuilderDockerfile, "test/extended/testdata/hello-builder/scripts/assemble": testExtendedTestdataHelloBuilderScriptsAssemble, "test/extended/testdata/hello-builder/scripts/run": testExtendedTestdataHelloBuilderScriptsRun, "test/extended/testdata/idling-echo-server-deployment.yaml": testExtendedTestdataIdlingEchoServerDeploymentYaml, "test/extended/testdata/idling-echo-server-rc.yaml": testExtendedTestdataIdlingEchoServerRcYaml, "test/extended/testdata/idling-echo-server.yaml": testExtendedTestdataIdlingEchoServerYaml, "test/extended/testdata/image/deployment-with-annotation-trigger.yaml": testExtendedTestdataImageDeploymentWithAnnotationTriggerYaml, "test/extended/testdata/image/test-image.json": testExtendedTestdataImageTestImageJson, "test/extended/testdata/image-pull-secrets/dc-with-new-pull-secret.yaml": testExtendedTestdataImagePullSecretsDcWithNewPullSecretYaml, "test/extended/testdata/image-pull-secrets/dc-with-old-pull-secret.yaml": testExtendedTestdataImagePullSecretsDcWithOldPullSecretYaml, "test/extended/testdata/image-pull-secrets/pod-with-new-pull-secret.yaml": testExtendedTestdataImagePullSecretsPodWithNewPullSecretYaml, "test/extended/testdata/image-pull-secrets/pod-with-no-pull-secret.yaml": testExtendedTestdataImagePullSecretsPodWithNoPullSecretYaml, "test/extended/testdata/image-pull-secrets/pod-with-old-pull-secret.yaml": testExtendedTestdataImagePullSecretsPodWithOldPullSecretYaml, "test/extended/testdata/image_ecosystem/perl-hotdeploy/index.pl": testExtendedTestdataImage_ecosystemPerlHotdeployIndexPl, "test/extended/testdata/image_ecosystem/perl-hotdeploy/lib/My/Test.pm": testExtendedTestdataImage_ecosystemPerlHotdeployLibMyTestPm, "test/extended/testdata/image_ecosystem/perl-hotdeploy/perl.json": testExtendedTestdataImage_ecosystemPerlHotdeployPerlJson, "test/extended/testdata/ipsec/nmstate.yaml": testExtendedTestdataIpsecNmstateYaml, "test/extended/testdata/ipsec/nsconfig-machine-config.yaml": testExtendedTestdataIpsecNsconfigMachineConfigYaml, "test/extended/testdata/ipsec/nsconfig-reboot-none-policy.yaml": testExtendedTestdataIpsecNsconfigRebootNonePolicyYaml, "test/extended/testdata/kernel/rt-tests-environment.yaml": testExtendedTestdataKernelRtTestsEnvironmentYaml, "test/extended/testdata/kernel/rt-tests-pod.yaml": testExtendedTestdataKernelRtTestsPodYaml, "test/extended/testdata/ldap/groupsync/ad/blacklist_ldap.txt": testExtendedTestdataLdapGroupsyncAdBlacklist_ldapTxt, "test/extended/testdata/ldap/groupsync/ad/blacklist_openshift.txt": testExtendedTestdataLdapGroupsyncAdBlacklist_openshiftTxt, "test/extended/testdata/ldap/groupsync/ad/ldapgroupuids.txt": testExtendedTestdataLdapGroupsyncAdLdapgroupuidsTxt, "test/extended/testdata/ldap/groupsync/ad/osgroupuids.txt": testExtendedTestdataLdapGroupsyncAdOsgroupuidsTxt, "test/extended/testdata/ldap/groupsync/ad/sync-config-dn-everywhere.yaml": testExtendedTestdataLdapGroupsyncAdSyncConfigDnEverywhereYaml, "test/extended/testdata/ldap/groupsync/ad/sync-config-paging.yaml": testExtendedTestdataLdapGroupsyncAdSyncConfigPagingYaml, "test/extended/testdata/ldap/groupsync/ad/sync-config-partially-user-defined.yaml": testExtendedTestdataLdapGroupsyncAdSyncConfigPartiallyUserDefinedYaml, "test/extended/testdata/ldap/groupsync/ad/sync-config-user-defined.yaml": testExtendedTestdataLdapGroupsyncAdSyncConfigUserDefinedYaml, "test/extended/testdata/ldap/groupsync/ad/sync-config.yaml": testExtendedTestdataLdapGroupsyncAdSyncConfigYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_blacklist_sync.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_blacklist_syncYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_ldap_syncYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_dn_everywhere.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_dn_everywhereYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_partially_user_defined.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_partially_user_definedYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_prune.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_pruneYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_ldap_sync_user_defined.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_ldap_sync_user_definedYaml, "test/extended/testdata/ldap/groupsync/ad/valid_all_openshift_blacklist_sync.yaml": testExtendedTestdataLdapGroupsyncAdValid_all_openshift_blacklist_syncYaml, "test/extended/testdata/ldap/groupsync/ad/valid_whitelist_sync.yaml": testExtendedTestdataLdapGroupsyncAdValid_whitelist_syncYaml, "test/extended/testdata/ldap/groupsync/ad/valid_whitelist_union_sync.yaml": testExtendedTestdataLdapGroupsyncAdValid_whitelist_union_syncYaml, "test/extended/testdata/ldap/groupsync/ad/whitelist_ldap.txt": testExtendedTestdataLdapGroupsyncAdWhitelist_ldapTxt, "test/extended/testdata/ldap/groupsync/ad/whitelist_openshift.txt": testExtendedTestdataLdapGroupsyncAdWhitelist_openshiftTxt, "test/extended/testdata/ldap/groupsync/augmented-ad/blacklist_ldap.txt": testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_ldapTxt, "test/extended/testdata/ldap/groupsync/augmented-ad/blacklist_openshift.txt": testExtendedTestdataLdapGroupsyncAugmentedAdBlacklist_openshiftTxt, "test/extended/testdata/ldap/groupsync/augmented-ad/ldapgroupuids.txt": testExtendedTestdataLdapGroupsyncAugmentedAdLdapgroupuidsTxt, "test/extended/testdata/ldap/groupsync/augmented-ad/osgroupuids.txt": testExtendedTestdataLdapGroupsyncAugmentedAdOsgroupuidsTxt, "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-dn-everywhere.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigDnEverywhereYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-paging.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPagingYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-partially-user-defined.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigPartiallyUserDefinedYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config-user-defined.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigUserDefinedYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/sync-config.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdSyncConfigYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_blacklist_sync.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_blacklist_syncYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_syncYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_delete_prune.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_delete_pruneYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_dn_everywhere.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_dn_everywhereYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_partially_user_defined.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_partially_user_definedYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_prune.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_pruneYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_ldap_sync_user_defined.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_ldap_sync_user_definedYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_all_openshift_blacklist_sync.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_all_openshift_blacklist_syncYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_whitelist_sync.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_syncYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/valid_whitelist_union_sync.yaml": testExtendedTestdataLdapGroupsyncAugmentedAdValid_whitelist_union_syncYaml, "test/extended/testdata/ldap/groupsync/augmented-ad/whitelist_ldap.txt": testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_ldapTxt, "test/extended/testdata/ldap/groupsync/augmented-ad/whitelist_openshift.txt": testExtendedTestdataLdapGroupsyncAugmentedAdWhitelist_openshiftTxt, "test/extended/testdata/ldap/groupsync/rfc2307/blacklist_ldap.txt": testExtendedTestdataLdapGroupsyncRfc2307Blacklist_ldapTxt, "test/extended/testdata/ldap/groupsync/rfc2307/blacklist_openshift.txt": testExtendedTestdataLdapGroupsyncRfc2307Blacklist_openshiftTxt, "test/extended/testdata/ldap/groupsync/rfc2307/ldapgroupuids.txt": testExtendedTestdataLdapGroupsyncRfc2307LdapgroupuidsTxt, "test/extended/testdata/ldap/groupsync/rfc2307/osgroupuids.txt": testExtendedTestdataLdapGroupsyncRfc2307OsgroupuidsTxt, "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-dn-everywhere.yaml": testExtendedTestdataLdapGroupsyncRfc2307SyncConfigDnEverywhereYaml, "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-paging.yaml": testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPagingYaml, "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-partially-user-defined.yaml": testExtendedTestdataLdapGroupsyncRfc2307SyncConfigPartiallyUserDefinedYaml, "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-tolerating.yaml": testExtendedTestdataLdapGroupsyncRfc2307SyncConfigToleratingYaml, "test/extended/testdata/ldap/groupsync/rfc2307/sync-config-user-defined.yaml": testExtendedTestdataLdapGroupsyncRfc2307SyncConfigUserDefinedYaml, "test/extended/testdata/ldap/groupsync/rfc2307/sync-config.yaml": testExtendedTestdataLdapGroupsyncRfc2307SyncConfigYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_blacklist_sync.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_blacklist_syncYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_syncYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_dn_everywhere.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_dn_everywhereYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_partially_user_defined.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_partially_user_definedYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_prune.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_pruneYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_tolerating.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_toleratingYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_ldap_sync_user_defined.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_ldap_sync_user_definedYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_all_openshift_blacklist_sync.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_all_openshift_blacklist_syncYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_whitelist_sync.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_syncYaml, "test/extended/testdata/ldap/groupsync/rfc2307/valid_whitelist_union_sync.yaml": testExtendedTestdataLdapGroupsyncRfc2307Valid_whitelist_union_syncYaml, "test/extended/testdata/ldap/groupsync/rfc2307/whitelist_ldap.txt": testExtendedTestdataLdapGroupsyncRfc2307Whitelist_ldapTxt, "test/extended/testdata/ldap/groupsync/rfc2307/whitelist_openshift.txt": testExtendedTestdataLdapGroupsyncRfc2307Whitelist_openshiftTxt, "test/extended/testdata/ldap/ldapserver-config-cm.yaml": testExtendedTestdataLdapLdapserverConfigCmYaml, "test/extended/testdata/ldap/ldapserver-deployment.yaml": testExtendedTestdataLdapLdapserverDeploymentYaml, "test/extended/testdata/ldap/ldapserver-scripts-cm.yaml": testExtendedTestdataLdapLdapserverScriptsCmYaml, "test/extended/testdata/ldap/ldapserver-service.yaml": testExtendedTestdataLdapLdapserverServiceYaml, "test/extended/testdata/long_names/Dockerfile": testExtendedTestdataLong_namesDockerfile, "test/extended/testdata/long_names/fixture.json": testExtendedTestdataLong_namesFixtureJson, "test/extended/testdata/machine_config/kubeletconfig/gcKC.yaml": testExtendedTestdataMachine_configKubeletconfigGckcYaml, "test/extended/testdata/machine_config/machineconfig/0-infra-mc.yaml": testExtendedTestdataMachine_configMachineconfig0InfraMcYaml, "test/extended/testdata/machine_config/machineconfig/0-master-mc.yaml": testExtendedTestdataMachine_configMachineconfig0MasterMcYaml, "test/extended/testdata/machine_config/machineconfig/1-master-invalid-mc.yaml": testExtendedTestdataMachine_configMachineconfig1MasterInvalidMcYaml, "test/extended/testdata/machine_config/machineconfig/1-worker-invalid-mc.yaml": testExtendedTestdataMachine_configMachineconfig1WorkerInvalidMcYaml, "test/extended/testdata/machine_config/machineconfigpool/customMCP.yaml": testExtendedTestdataMachine_configMachineconfigpoolCustommcpYaml, "test/extended/testdata/machine_config/machineconfigpool/infra-mcp.yaml": testExtendedTestdataMachine_configMachineconfigpoolInfraMcpYaml, "test/extended/testdata/machine_config/machineconfigurations/managedbootimages-empty.yaml": testExtendedTestdataMachine_configMachineconfigurationsManagedbootimagesEmptyYaml, "test/extended/testdata/machine_config/machineconfigurations/nodedisruptionpolicy-rebootless-path.yaml": testExtendedTestdataMachine_configMachineconfigurationsNodedisruptionpolicyRebootlessPathYaml, "test/extended/testdata/machine_config/pinnedimage/customGCMCPpis.yaml": testExtendedTestdataMachine_configPinnedimageCustomgcmcppisYaml, "test/extended/testdata/machine_config/pinnedimage/customInvalidPis.yaml": testExtendedTestdataMachine_configPinnedimageCustominvalidpisYaml, "test/extended/testdata/machine_config/pinnedimage/customMCPpis.yaml": testExtendedTestdataMachine_configPinnedimageCustommcppisYaml, "test/extended/testdata/machine_config/pinnedimage/invalidPis.yaml": testExtendedTestdataMachine_configPinnedimageInvalidpisYaml, "test/extended/testdata/machine_config/pinnedimage/masterInvalidPis.yaml": testExtendedTestdataMachine_configPinnedimageMasterinvalidpisYaml, "test/extended/testdata/machine_config/pinnedimage/masterPis.yaml": testExtendedTestdataMachine_configPinnedimageMasterpisYaml, "test/extended/testdata/machine_config/pinnedimage/pis.yaml": testExtendedTestdataMachine_configPinnedimagePisYaml, "test/extended/testdata/marketplace/csc/02-csc.yaml": testExtendedTestdataMarketplaceCsc02CscYaml, "test/extended/testdata/marketplace/opsrc/02-opsrc.yaml": testExtendedTestdataMarketplaceOpsrc02OpsrcYaml, "test/extended/testdata/mixed-api-versions.yaml": testExtendedTestdataMixedApiVersionsYaml, "test/extended/testdata/multi-namespace-pipeline.yaml": testExtendedTestdataMultiNamespacePipelineYaml, "test/extended/testdata/multi-namespace-template.yaml": testExtendedTestdataMultiNamespaceTemplateYaml, "test/extended/testdata/multinetpolicy/deny-ingress-pod-a.yml": testExtendedTestdataMultinetpolicyDenyIngressPodAYml, "test/extended/testdata/net-attach-defs/bridge-nad.yml": testExtendedTestdataNetAttachDefsBridgeNadYml, "test/extended/testdata/net-attach-defs/macvlan-nad.yml": testExtendedTestdataNetAttachDefsMacvlanNadYml, "test/extended/testdata/net-attach-defs/whereabouts-nad.yml": testExtendedTestdataNetAttachDefsWhereaboutsNadYml, "test/extended/testdata/net-attach-defs/whereabouts-race-awake.yml": testExtendedTestdataNetAttachDefsWhereaboutsRaceAwakeYml, "test/extended/testdata/net-attach-defs/whereabouts-race-sleepy.yml": testExtendedTestdataNetAttachDefsWhereaboutsRaceSleepyYml, "test/extended/testdata/node/cnv-swap/cnv-hyperconverged.yaml": testExtendedTestdataNodeCnvSwapCnvHyperconvergedYaml, "test/extended/testdata/node/cnv-swap/cnv-namespace.yaml": testExtendedTestdataNodeCnvSwapCnvNamespaceYaml, "test/extended/testdata/node/cnv-swap/cnv-operatorgroup.yaml": testExtendedTestdataNodeCnvSwapCnvOperatorgroupYaml, "test/extended/testdata/node/cnv-swap/cnv-subscription.yaml": testExtendedTestdataNodeCnvSwapCnvSubscriptionYaml, "test/extended/testdata/node/cnv-swap/kubelet-limitedswap-dropin.yaml": testExtendedTestdataNodeCnvSwapKubeletLimitedswapDropinYaml, "test/extended/testdata/node/cnv-swap/kubelet-noswap-dropin.yaml": testExtendedTestdataNodeCnvSwapKubeletNoswapDropinYaml, "test/extended/testdata/node/kubeletconfig/loggingKC.yaml": testExtendedTestdataNodeKubeletconfigLoggingkcYaml, "test/extended/testdata/node/machineconfigpool/customMCP.yaml": testExtendedTestdataNodeMachineconfigpoolCustommcpYaml, "test/extended/testdata/node/nested_container/Dockerfile": testExtendedTestdataNodeNested_containerDockerfile, "test/extended/testdata/node/nested_container/containers.conf": testExtendedTestdataNodeNested_containerContainersConf, "test/extended/testdata/node/nested_container/run_tests.sh": testExtendedTestdataNodeNested_containerRun_testsSh, "test/extended/testdata/node/nested_container/skip_tests.sh": testExtendedTestdataNodeNested_containerSkip_testsSh, "test/extended/testdata/node/node_e2e/pod-dev-fuse.yaml": testExtendedTestdataNodeNode_e2ePodDevFuseYaml, "test/extended/testdata/node_tuning/nto-stalld.yaml": testExtendedTestdataNode_tuningNtoStalldYaml, "test/extended/testdata/oauthserver/cabundle-cm.yaml": testExtendedTestdataOauthserverCabundleCmYaml, "test/extended/testdata/oauthserver/oauth-network.yaml": testExtendedTestdataOauthserverOauthNetworkYaml, "test/extended/testdata/oauthserver/oauth-pod.yaml": testExtendedTestdataOauthserverOauthPodYaml, "test/extended/testdata/oauthserver/oauth-sa.yaml": testExtendedTestdataOauthserverOauthSaYaml, "test/extended/testdata/olm/operatorgroup.yaml": testExtendedTestdataOlmOperatorgroupYaml, "test/extended/testdata/olm/subscription.yaml": testExtendedTestdataOlmSubscriptionYaml, "test/extended/testdata/poddisruptionbudgets/always-allow-policy-pdb.yaml": testExtendedTestdataPoddisruptionbudgetsAlwaysAllowPolicyPdbYaml, "test/extended/testdata/poddisruptionbudgets/if-healthy-budget-policy-pdb.yaml": testExtendedTestdataPoddisruptionbudgetsIfHealthyBudgetPolicyPdbYaml, "test/extended/testdata/poddisruptionbudgets/nginx-with-delayed-ready-deployment.yaml": testExtendedTestdataPoddisruptionbudgetsNginxWithDelayedReadyDeploymentYaml, "test/extended/testdata/project/project-request-limits-quota.yaml": testExtendedTestdataProjectProjectRequestLimitsQuotaYaml, "test/extended/testdata/releases/payload-1/etcd-operator/image-references": testExtendedTestdataReleasesPayload1EtcdOperatorImageReferences, "test/extended/testdata/releases/payload-1/etcd-operator/manifest.yaml": testExtendedTestdataReleasesPayload1EtcdOperatorManifestYaml, "test/extended/testdata/releases/payload-1/image-registry/10_image-registry_crd.yaml": testExtendedTestdataReleasesPayload1ImageRegistry10_imageRegistry_crdYaml, "test/extended/testdata/releases/payload-1/image-registry/image-references": testExtendedTestdataReleasesPayload1ImageRegistryImageReferences, "test/extended/testdata/releases/payload-1/image-registry/manifest.yaml": testExtendedTestdataReleasesPayload1ImageRegistryManifestYaml, "test/extended/testdata/roles/empty-role.yaml": testExtendedTestdataRolesEmptyRoleYaml, "test/extended/testdata/roles/policy-clusterroles.yaml": testExtendedTestdataRolesPolicyClusterrolesYaml, "test/extended/testdata/roles/policy-roles.yaml": testExtendedTestdataRolesPolicyRolesYaml, "test/extended/testdata/router/ingress.yaml": testExtendedTestdataRouterIngressYaml, "test/extended/testdata/router/reencrypt-serving-cert.yaml": testExtendedTestdataRouterReencryptServingCertYaml, "test/extended/testdata/router/router-common.yaml": testExtendedTestdataRouterRouterCommonYaml, "test/extended/testdata/router/router-http-echo-server.yaml": testExtendedTestdataRouterRouterHttpEchoServerYaml, "test/extended/testdata/router/router-metrics.yaml": testExtendedTestdataRouterRouterMetricsYaml, "test/extended/testdata/run_policy/parallel-bc.yaml": testExtendedTestdataRun_policyParallelBcYaml, "test/extended/testdata/run_policy/serial-bc.yaml": testExtendedTestdataRun_policySerialBcYaml, "test/extended/testdata/run_policy/serial-latest-only-bc.yaml": testExtendedTestdataRun_policySerialLatestOnlyBcYaml, "test/extended/testdata/s2i-dropcaps/root-access-build.yaml": testExtendedTestdataS2iDropcapsRootAccessBuildYaml, "test/extended/testdata/s2i-dropcaps/rootable-ruby/Dockerfile": testExtendedTestdataS2iDropcapsRootableRubyDockerfile, "test/extended/testdata/s2i-dropcaps/rootable-ruby/adduser": testExtendedTestdataS2iDropcapsRootableRubyAdduser, "test/extended/testdata/s2i-dropcaps/rootable-ruby/assemble": testExtendedTestdataS2iDropcapsRootableRubyAssemble, "test/extended/testdata/sample-image-stream.json": testExtendedTestdataSampleImageStreamJson, "test/extended/testdata/samplepipeline-withenvs.yaml": testExtendedTestdataSamplepipelineWithenvsYaml, "test/extended/testdata/service-serving-cert/nginx-serving-cert.conf": testExtendedTestdataServiceServingCertNginxServingCertConf, "test/extended/testdata/servicecidr.yaml": testExtendedTestdataServicecidrYaml, "test/extended/testdata/signer-buildconfig.yaml": testExtendedTestdataSignerBuildconfigYaml, "test/extended/testdata/stable-busybox.yaml": testExtendedTestdataStableBusyboxYaml, "test/extended/testdata/templates/crunchydata-pod.json": testExtendedTestdataTemplatesCrunchydataPodJson, "test/extended/testdata/templates/guestbook.json": testExtendedTestdataTemplatesGuestbookJson, "test/extended/testdata/templates/guestbook_list.json": testExtendedTestdataTemplatesGuestbook_listJson, "test/extended/testdata/templates/templateinstance_badobject.yaml": testExtendedTestdataTemplatesTemplateinstance_badobjectYaml, "test/extended/testdata/templates/templateinstance_objectkinds.yaml": testExtendedTestdataTemplatesTemplateinstance_objectkindsYaml, "test/extended/testdata/templates/templateinstance_readiness.yaml": testExtendedTestdataTemplatesTemplateinstance_readinessYaml, "test/extended/testdata/templates/templateservicebroker_bind.yaml": testExtendedTestdataTemplatesTemplateservicebroker_bindYaml, "test/extended/testdata/test-buildcli.json": testExtendedTestdataTestBuildcliJson, "test/extended/testdata/test-cli-debug.yaml": testExtendedTestdataTestCliDebugYaml, "test/extended/testdata/test-deployment-config.yaml": testExtendedTestdataTestDeploymentConfigYaml, "test/extended/testdata/test-deployment.yaml": testExtendedTestdataTestDeploymentYaml, "test/extended/testdata/test-env-pod.json": testExtendedTestdataTestEnvPodJson, "test/extended/testdata/test-replication-controller.yaml": testExtendedTestdataTestReplicationControllerYaml, "test/extended/testdata/test-secret.json": testExtendedTestdataTestSecretJson, "test/extended/testdata/verifyservice-pipeline-template.yaml": testExtendedTestdataVerifyservicePipelineTemplateYaml, "e2echart/e2e-chart-template.html": e2echartE2eChartTemplateHtml, "e2echart/non-spyglass-e2e-chart-template.html": e2echartNonSpyglassE2eChartTemplateHtml, "e2echart/test-risk-analysis.html": e2echartTestRiskAnalysisHtml, } // AssetDir returns the file names below a certain // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: // // data/ // foo.txt // img/ // a.png // b.png // // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error // AssetDir("") will return []string{"data"}. func AssetDir(name string) ([]string, error) { node := _bintree if len(name) != 0 { cannonicalName := strings.Replace(name, "\\", "/", -1) pathList := strings.Split(cannonicalName, "/") for _, p := range pathList { node = node.Children[p] if node == nil { return nil, fmt.Errorf("Asset %s not found", name) } } } if node.Func != nil { return nil, fmt.Errorf("Asset %s not found", name) } rv := make([]string, 0, len(node.Children)) for childName := range node.Children { rv = append(rv, childName) } return rv, nil } type bintree struct { Func func() (*asset, error) Children map[string]*bintree } var _bintree = &bintree{nil, map[string]*bintree{ "e2echart": {nil, map[string]*bintree{ "e2e-chart-template.html": {e2echartE2eChartTemplateHtml, map[string]*bintree{}}, "non-spyglass-e2e-chart-template.html": {e2echartNonSpyglassE2eChartTemplateHtml, map[string]*bintree{}}, "test-risk-analysis.html": {e2echartTestRiskAnalysisHtml, map[string]*bintree{}}, }}, "examples": {nil, map[string]*bintree{ "db-templates": {nil, map[string]*bintree{ "mariadb-ephemeral-template.json": {examplesDbTemplatesMariadbEphemeralTemplateJson, map[string]*bintree{}}, "mariadb-persistent-template.json": {examplesDbTemplatesMariadbPersistentTemplateJson, map[string]*bintree{}}, "mysql-ephemeral-template.json": {examplesDbTemplatesMysqlEphemeralTemplateJson, map[string]*bintree{}}, "mysql-persistent-template.json": {examplesDbTemplatesMysqlPersistentTemplateJson, map[string]*bintree{}}, "postgresql-ephemeral-template.json": {examplesDbTemplatesPostgresqlEphemeralTemplateJson, map[string]*bintree{}}, "postgresql-persistent-template.json": {examplesDbTemplatesPostgresqlPersistentTemplateJson, map[string]*bintree{}}, "redis-ephemeral-template.json": {examplesDbTemplatesRedisEphemeralTemplateJson, map[string]*bintree{}}, "redis-persistent-template.json": {examplesDbTemplatesRedisPersistentTemplateJson, map[string]*bintree{}}, }}, "hello-openshift": {nil, map[string]*bintree{ "Dockerfile": {examplesHelloOpenshiftDockerfile, map[string]*bintree{}}, "go.mod": {examplesHelloOpenshiftGoMod, map[string]*bintree{}}, "hello-pod.json": {examplesHelloOpenshiftHelloPodJson, map[string]*bintree{}}, "hello-project.json": {examplesHelloOpenshiftHelloProjectJson, map[string]*bintree{}}, }}, "image-streams": {nil, map[string]*bintree{ "image-streams-centos7.json": {examplesImageStreamsImageStreamsCentos7Json, map[string]*bintree{}}, }}, "jenkins": {nil, map[string]*bintree{ "application-template.json": {examplesJenkinsApplicationTemplateJson, map[string]*bintree{}}, "jenkins-ephemeral-template.json": {examplesJenkinsJenkinsEphemeralTemplateJson, map[string]*bintree{}}, "jenkins-persistent-template.json": {examplesJenkinsJenkinsPersistentTemplateJson, map[string]*bintree{}}, "pipeline": {nil, map[string]*bintree{ "bluegreen-pipeline.yaml": {examplesJenkinsPipelineBluegreenPipelineYaml, map[string]*bintree{}}, "maven-pipeline.yaml": {examplesJenkinsPipelineMavenPipelineYaml, map[string]*bintree{}}, "nodejs-sample-pipeline.yaml": {examplesJenkinsPipelineNodejsSamplePipelineYaml, map[string]*bintree{}}, "openshift-client-plugin-pipeline.yaml": {examplesJenkinsPipelineOpenshiftClientPluginPipelineYaml, map[string]*bintree{}}, "samplepipeline.yaml": {examplesJenkinsPipelineSamplepipelineYaml, map[string]*bintree{}}, }}, }}, "quickstarts": {nil, map[string]*bintree{ "cakephp-mysql-persistent.json": {examplesQuickstartsCakephpMysqlPersistentJson, map[string]*bintree{}}, "cakephp-mysql.json": {examplesQuickstartsCakephpMysqlJson, map[string]*bintree{ "cakephp-mysql.json": {examplesQuickstartsCakephpMysqlJsonCakephpMysqlJson, map[string]*bintree{}}, }}, "dancer-mysql-persistent.json": {examplesQuickstartsDancerMysqlPersistentJson, map[string]*bintree{}}, "dancer-mysql.json": {examplesQuickstartsDancerMysqlJson, map[string]*bintree{}}, "django-postgresql-persistent.json": {examplesQuickstartsDjangoPostgresqlPersistentJson, map[string]*bintree{}}, "django-postgresql.json": {examplesQuickstartsDjangoPostgresqlJson, map[string]*bintree{}}, "httpd.json": {examplesQuickstartsHttpdJson, map[string]*bintree{}}, "nginx.json": {examplesQuickstartsNginxJson, map[string]*bintree{}}, "nodejs-postgresql-persistent.json": {examplesQuickstartsNodejsPostgresqlPersistentJson, map[string]*bintree{}}, "nodejs-postgresql.json": {examplesQuickstartsNodejsPostgresqlJson, map[string]*bintree{}}, "rails-postgresql-persistent.json": {examplesQuickstartsRailsPostgresqlPersistentJson, map[string]*bintree{}}, "rails-postgresql.json": {examplesQuickstartsRailsPostgresqlJson, map[string]*bintree{}}, }}, "sample-app": {nil, map[string]*bintree{ "application-template-dockerbuild.json": {examplesSampleAppApplicationTemplateDockerbuildJson, map[string]*bintree{}}, "application-template-pullspecbuild.json": {examplesSampleAppApplicationTemplatePullspecbuildJson, map[string]*bintree{}}, "application-template-stibuild.json": {examplesSampleAppApplicationTemplateStibuildJson, map[string]*bintree{}}, "cleanup.sh": {examplesSampleAppCleanupSh, map[string]*bintree{}}, "github-webhook-example.json": {examplesSampleAppGithubWebhookExampleJson, map[string]*bintree{}}, }}, }}, "test": {nil, map[string]*bintree{ "extended": {nil, map[string]*bintree{ "testdata": {nil, map[string]*bintree{ "aggregator": {nil, map[string]*bintree{ "kube-system-auth-reader.yaml": {testExtendedTestdataAggregatorKubeSystemAuthReaderYaml, map[string]*bintree{}}, "sample-apiserver-apiservice.yaml": {testExtendedTestdataAggregatorSampleApiserverApiserviceYaml, map[string]*bintree{}}, "sample-apiserver-authdelegator.yaml": {testExtendedTestdataAggregatorSampleApiserverAuthdelegatorYaml, map[string]*bintree{}}, "sample-apiserver-authreader.yaml": {testExtendedTestdataAggregatorSampleApiserverAuthreaderYaml, map[string]*bintree{}}, "sample-apiserver-rc.yaml": {testExtendedTestdataAggregatorSampleApiserverRcYaml, map[string]*bintree{}}, "sample-apiserver-sa.yaml": {testExtendedTestdataAggregatorSampleApiserverSaYaml, map[string]*bintree{}}, "sample-apiserver-service.yaml": {testExtendedTestdataAggregatorSampleApiserverServiceYaml, map[string]*bintree{}}, }}, "apiserver": {nil, map[string]*bintree{ "operator-kube-apiserver-cr.yaml": {testExtendedTestdataApiserverOperatorKubeApiserverCrYaml, map[string]*bintree{}}, }}, "builds": {nil, map[string]*bintree{ "application-template-custombuild.json": {testExtendedTestdataBuildsApplicationTemplateCustombuildJson, map[string]*bintree{}}, "build-postcommit": {nil, map[string]*bintree{ "docker.yaml": {testExtendedTestdataBuildsBuildPostcommitDockerYaml, map[string]*bintree{}}, "imagestreams.yaml": {testExtendedTestdataBuildsBuildPostcommitImagestreamsYaml, map[string]*bintree{}}, "sti.yaml": {testExtendedTestdataBuildsBuildPostcommitStiYaml, map[string]*bintree{}}, }}, "build-pruning": {nil, map[string]*bintree{ "default-group-build-config.yaml": {testExtendedTestdataBuildsBuildPruningDefa