apiVersion: v1
kind: Secret
metadata:
name: es-secret
namespace: openshift-logging
type: Opaque
stringData:
username: admin
password: "S3cr3tP@ss!"
CRD (CustomResourceDafinition)
CR( Custom Resource)
왜 CR을 쓰나?
예시: Logging Operator의 ClusterLogForwarder CR
apiVersion: logging.openshift.io/v1
kind: ClusterLogForwarder
metadata:
name: instance
namespace: openshift-logging
spec:
outputs:
- name: elasticsearch-secure
type: elasticsearch
url: <https://es.example.com:9200>
secret:
name: es-secret # ↑ 위에서 만든 Secret을 참조
pipelines:
- name: app
inputRefs: [application]
outputRefs: [elasticsearch-secure]