Skip to content

Commit 5b904c2

Browse files
Merge pull request #6 from oracle-quickstart/wl_objects_p2
Collection support for StatefulSet, Job and CronJob objects.
2 parents d569ace + 9084cb1 commit 5b904c2

File tree

7 files changed

+78
-3
lines changed

7 files changed

+78
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 2022-07-13
4+
### Added
5+
- Collection support for StatefulSet, Job and CronJob objects.
6+
37
## 2022-05-18
48
### Added
59
- Metrics support from OCI Logging Analytics Fluentd Output Plugin.

logan/helm-chart/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 1.0.2
18+
version: 1.0.3
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

logan/helm-chart/templates/clusterrole-objects.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ rules:
1515
- watch
1616
- apiGroups:
1717
- apps
18+
- batch
1819
resources:
1920
- '*'
2021
verbs:
2122
- get
2223
- list
23-
- watch
24+
- watch

logan/helm-chart/values.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,39 @@ fluentd:
821821
resource_name deployments
822822
interval {{ .Values.objectsPollingFrequency }}
823823
</pull>
824+
<pull>
825+
resource_name stateful_sets
826+
interval {{ .Values.objectsPollingFrequency }}
827+
</pull>
828+
</source>
829+
830+
<source>
831+
@type kubernetes_objects
832+
tag k8s.*
833+
api_version v1
834+
api_endpoint apis/batch
835+
836+
<pull>
837+
resource_name jobs
838+
interval {{ .Values.objectsPollingFrequency }}
839+
</pull>
840+
<pull>
841+
resource_name cron_jobs
842+
interval {{ .Values.objectsPollingFrequency }}
843+
</pull>
844+
</source>
845+
846+
# To support cronJob Object collection for Kubernetes versions <= 1.19 where cronJob is available under v1beta1 api version
847+
<source>
848+
@type kubernetes_objects
849+
tag k8s.*
850+
api_version v1beta1
851+
api_endpoint apis/batch
852+
853+
<pull>
854+
resource_name cron_jobs
855+
interval {{ .Values.objectsPollingFrequency }}
856+
</pull>
824857
</source>
825858
826859
<filter k8s.**>

logan/kubernetes-resources/logs-collection/configmap-cri.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,6 @@ data:
593593
oci_la_log_source_name ${record.dig("kubernetes", "annotations", "oracle.com/oci_la_log_source_name") ? record.dig("kubernetes", "annotations", "oracle.com/oci_la_log_source_name") : "Kubernetes Container Generic Logs"}
594594
oci_la_entity_id ${record.dig("kubernetes", "annotations", "oracle.com/oci_la_entity_id") ? record.dig("kubernetes", "annotations", "oracle.com/oci_la_entity_id") : ""}
595595
oci_la_log_set ${record.dig("kubernetes", "annotations", "oracle.com/oci_la_log_set") ? record.dig("kubernetes", "annotations", "oracle.com/oci_la_log_set") : ""}
596-
message "${record['log']}"
597596
tag ${tag}
598597
</record>
599598
</filter>

logan/kubernetes-resources/objects-collection/configmap-objects.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,43 @@ data:
8787
resource_name deployments
8888
interval 5m
8989
</pull>
90+
<pull>
91+
resource_name stateful_sets
92+
interval 5m
93+
</pull>
94+
95+
</source>
96+
97+
<source>
98+
99+
@type kubernetes_objects
100+
tag k8s.*
101+
api_version v1
102+
api_endpoint apis/batch
103+
104+
<pull>
105+
resource_name jobs
106+
interval 5m
107+
</pull>
108+
<pull>
109+
resource_name cron_jobs
110+
interval 5m
111+
</pull>
112+
113+
</source>
114+
115+
# To support cronJob Object collection for Kubernetes versions <= 1.19 where cronJob is available under v1beta1 api version.
116+
<source>
117+
118+
@type kubernetes_objects
119+
tag k8s.*
120+
api_version v1beta1
121+
api_endpoint apis/batch
122+
123+
<pull>
124+
resource_name cron_jobs
125+
interval 5m
126+
</pull>
90127
91128
</source>
92129

logan/kubernetes-resources/objects-collection/fluentd-deployment.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rules:
2222
- watch
2323
- apiGroups:
2424
- apps
25+
- batch
2526
resources:
2627
- '*'
2728
verbs:

0 commit comments

Comments
 (0)