Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap EFK stack #22

Merged
merged 7 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,14 @@ status:
phase: Active

```
## Bootstrapping the EFK Stack

The following components were deployed in the previous sections to deploy a basic EFK stack.

* A _Namespace_ called `openshift-logging`
* A _Namespace_ called `openshift-operators-redhat`
* An _OperatorGroup_ for the cluster-logging-operator
* A _Subscription_ that subscribes the `openshift-logging` namespace with the OLM for the cluster-logging-operator
* An _OperatorGroup_ for the elasticsearch-operator
* A _Subscription_ that subscribes the `openshift-opeartors-redhat` namespace with the OLM for the elasticsearch operator
* A _ClusterLogging_ called instance that deploys an ephemeral EFK stack consisting of an elasticsearch cluster, fluentd forwarders, and a kibana deployment
14 changes: 14 additions & 0 deletions simple-bootstrap/0-namespaces/openshift-logging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Namespace
metadata:
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
openshift.io/node-selector: ""
labels:
config.example.com/name: simple-bootstrap
config.example.com/component: namespaces
openshift.io/cluster-monitoring: "true"
name: openshift-logging
spec:
14 changes: 14 additions & 0 deletions simple-bootstrap/0-namespaces/openshift-operators-redhat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Namespace
metadata:
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
openshift.io/node-selector: ""
labels:
config.example.com/name: simple-bootstrap
config.example.com/component: namespaces
openshift.io/cluster-monitoring: "true"
name: openshift-operators-redhat
spec:
33 changes: 33 additions & 0 deletions simple-bootstrap/1-operators/cluster-logging-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
labels:
config.example.com/name: simple-bootstrap
config.example.com/component: operators
name: openshift-logging
namespace: openshift-logging
spec:
targetNamespaces:
- openshift-logging
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
labels:
config.example.com/name: simple-bootstrap
config.example.com/component: operators
name: cluster-logging
namespace: openshift-logging
spec:
channel: "4.4"
name: "cluster-logging"
source: "redhat-operators"
sourceNamespace: openshift-marketplace
## startingCSV: left out in docs
32 changes: 32 additions & 0 deletions simple-bootstrap/1-operators/elasticsearch-operator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
labels:
config.example.com/name: simple-bootstrap
config.example.com/component: operators
name: openshift-operators-redhat
namespace: openshift-operators-redhat
spec: {}
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
labels:
config.example.com/name: simple-bootstrap
config.example.com/component: operators
name: elasticsearch-operator
namespace: openshift-operators-redhat
spec:
channel: "4.4"
installPlanApproval: "Automatic"
name: "elasticsearch-operator"
source: "redhat-operators"
sourceNamespace: openshift-marketplace
## startingCSV: left out in docs
31 changes: 31 additions & 0 deletions simple-bootstrap/3-operator-configs/clusterlogging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: "logging.openshift.io/v1"
kind: "ClusterLogging"
metadata:
name: "instance"
namespace: "openshift-logging"
annotations:
config.example.com/managed-by: gitops
config.example.com/scm-url: git@github.com:redhat-cop/declarative-openshift.git
labels:
config.example.com/component: operator-configs
config.example.com/name: simple-bootstrap
spec:
managementState: "Managed"
logStore:
type: "elasticsearch"
elasticsearch:
nodeCount: 3
redundancyPolicy: "SingleRedundancy"
storage: {}
visualization:
type: "kibana"
kibana:
replicas: 3
curation:
type: "curator"
curator:
schedule: "30 3 * * *"
collection:
logs:
type: "fluentd"
fluentd: {}