3.2. 使用安全 HTTPS 连接创建示例 EventListener 资源
本节使用 pipelines-tutorial 示例来演示使用安全 HTTPS 连接创建示例 EventListener 资源。
流程
从 pipelines-tutorial 存储库中的 YAML 文件创建
TriggerBinding
资源:oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/01_binding.yaml
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/01_binding.yaml
Copy to Clipboard Copied! 从 pipelines-tutorial 存储库中的 YAML 文件创建
TriggerTemplate
资源:oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/02_template.yaml
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/02_template.yaml
Copy to Clipboard Copied! 直接从 pipelines-tutorial 存储库创建
Trigger
资源:oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/03_trigger.yaml
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/03_trigger.yaml
Copy to Clipboard Copied! 使用安全 HTTPS 连接创建
EventListener
资源:添加一个标签,在 Eventlistener 资源中启用安全
HTTPS
连接:oc label namespace <ns-name> operator.tekton.dev/enable-annotation=enabled
$ oc label namespace <ns-name> operator.tekton.dev/enable-annotation=enabled
Copy to Clipboard Copied! 从 pipelines-tutorial 存储库中的 YAML 文件创建
EventListener
资源:oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/04_event_listener.yaml
$ oc create -f https://raw.githubusercontent.com/openshift/pipelines-tutorial/master/03_triggers/04_event_listener.yaml
Copy to Clipboard Copied! 创建带有重新加密 TLS 终止的路由:
oc create route reencrypt --service=<svc-name> --cert=tls.crt --key=tls.key --ca-cert=ca.crt --hostname=<hostname>
$ oc create route reencrypt --service=<svc-name> --cert=tls.crt --key=tls.key --ca-cert=ca.crt --hostname=<hostname>
Copy to Clipboard Copied!