Skip to content

Commit bfb44c2

Browse files
authored
Fix yamllint errors, readme updates (#20)
* fix linting errors * add receiver to readme
1 parent ad0f84a commit bfb44c2

File tree

3 files changed

+145
-144
lines changed

3 files changed

+145
-144
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Install builder
2323
working-directory: ./collector
2424
run: |
25-
go install go.opentelemetry.io/collector/cmd/builder@v0.97.0
25+
go install go.opentelemetry.io/collector/cmd/builder@v0.102.1
2626
- name: Build
2727
working-directory: ./collector
2828
run: make build-linux

collector/config-k8s/mid-statefulset.yaml

Lines changed: 143 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ metadata:
1010
provider: ServiceNow
1111
spec:
1212
ports:
13-
- port: 8097
14-
name: web
13+
- port: 8097
14+
name: web
1515
type: ClusterIP
1616
selector:
1717
app: MIDServerManagement
@@ -34,22 +34,22 @@ spec:
3434
deployment: servicenow-mid-statefulset
3535
provider: ServiceNow
3636
volumeClaimTemplates:
37-
- metadata:
38-
name: servicenow-mid-volumeclaim
39-
namespace: servicenow
40-
labels:
41-
app: MIDServerManagement
42-
deployment: servicenow-mid-statefulset
43-
provider: ServiceNow
44-
spec:
45-
# works on Google Cloud
46-
storageClassName: standard
47-
accessModes:
48-
- ReadWriteOnce
49-
resources:
50-
requests:
51-
# Make sure to have enough disk space for the work, logs, extlib, scripts and other folders at the volume mounts below
52-
storage: 1Gi
37+
- metadata:
38+
name: servicenow-mid-volumeclaim
39+
namespace: servicenow
40+
labels:
41+
app: MIDServerManagement
42+
deployment: servicenow-mid-statefulset
43+
provider: ServiceNow
44+
spec:
45+
# works on Google Cloud
46+
storageClassName: standard
47+
accessModes:
48+
- ReadWriteOnce
49+
resources:
50+
requests:
51+
# Make sure to have enough disk space for the work, logs, extlib, scripts and other folders at the volume mounts below
52+
storage: 1Gi
5353
template:
5454
metadata:
5555
labels:
@@ -75,132 +75,132 @@ spec:
7575
# - name: <YOUR_REGISTRY_SECRET>
7676

7777
containers:
78-
- name: servicenow-mid-statefulset-container
79-
# Put your image URL where Kubernetes can pull the image from, i.e. midcontainerregistry.azurecr.io/mid:tokyo-07-08-2022_04-07-2023_0200
80-
image: ghcr.io/lightstep/sn-collector/mid-experimental:main
81-
imagePullPolicy: Always # other options: IfNotPresent, Never
82-
ports:
83-
- containerPort: 8097
84-
name: web
85-
env:
86-
# Define Environment variables
87-
# You can put mid config parameter or wrapper config parameters here
88-
# Env variable name for MID config parameter starts with MID_CONFIG_ followed by the config parameter name where a dot is replaced by double underscores.
89-
# Env variable name for Wrapper config parameter starts with MID_WRAPPER_ followed by the wrapper parameter name where a dot is replaced by double underscores.
90-
91-
# - name: MID_CONFIG_mid__log__level
92-
# value: debug
93-
94-
# Put the mid profile id here if you are deploying MID Servers linked to a profile
95-
# https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html
96-
# - name: MID_CONFIG_mid_profile_id
97-
# value: <YOUR_MID_PROFILE_ID>
98-
99-
# Set MID Server name. The default value is _NAMESPACE_HOSTNAME_ which is a place holder and will be replaced by the actual k8s namespace
100-
# and hostname when the container starts for the first time. See more details in the init script of the recipe
101-
# Hostnames in statefulset follows the pattern <YOUR_STATEFULSET_NAME>-0 , <YOUR_STATEFULSET_NAME>-1, etc.
102-
- name: MID_CONFIG_name
103-
value: _NAMESPACE_HOSTNAME_
104-
105-
# Put your instance URL here
106-
- name: MID_CONFIG_url
107-
value: https://__INSTANCE_NAME__.service-now.com
108-
109-
# For instance authentication, you can choose either (A) basic auth or (B) mutual auth (mTLS)
110-
# If using mTLS, you don't need to provide user name and password. The sensitive data such as password
111-
# or mutual auth private certificate should be passed by using Kubernetes secrets
112-
# https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html
113-
114-
# Option A: using basic authentication
115-
# 1. Create a file named <YOUR_MID_SECRET_PROPERTIES_FILENAME> with the content
116-
# mid.instance.password=<YOUR_MID_USER_PASSWORD>
117-
# 2. Create a secret named <YOUR_MID_SECRET_NAME>
118-
# kubectl create secret generic <YOUR_MID_SECRET_NAME> --from-file=<YOUR_MID_SECRET_PROPERTIES_FILENAME>
119-
# <MID_SECRET_MOUNT_PATH> is the location where the mid secret volume is mounted to container file system
120-
- name: MID_CONFIG_mid__instance__username
121-
value: __USERNAME__
122-
- name: MID_SECRETS_FILE
123-
value: /etc/secrets/mid.properties
124-
125-
# Option B: using mutual auth (mTLS)
126-
# 1. Make sure you have the mutual auth certificate file named <YOUR_MID_MUTUAL_AUTH_PEM_FILENAME> which need to import to the MID Server keystore
127-
# 2. Create a secret named <YOUR_MID_MUTUAL_AUTH_SECRET_NAME>
128-
# kubectl create secret generic <YOUR_MID_MUTUAL_AUTH_SECRET_NAME> --from-file=<YOUR_MID_MUTUAL_AUTH_PEM_FILENAME>
129-
# 3. Uncomment the 2 lines below. <MID_MUTUAL_AUTH_SECRET_MOUNT_PATH> is the location where the mid mutual auth secret volume is mounted to the container file system.
130-
# - name: MID_MUTUAL_AUTH_PEM_FILE
131-
# value: <MID_MUTUAL_AUTH_SECRET_MOUNT_PATH>/<YOUR_MID_MUTUAL_AUTH_PEM_FILENAME>
132-
133-
- name: MID_CONTAINER_DEPLOYMENT_NAME
134-
value: servicenow-mid-statefulset
135-
- name: MID_CONTAINER_DEPLOYMENT_NAMESPACE
136-
value: servicenow
137-
138-
# wrapper config parameters
139-
- name: MID_WRAPPER_wrapper__java__maxmemory
140-
value: '2024'
141-
142-
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
143-
resources:
144-
requests:
145-
cpu: '1'
146-
memory: 2Gi
147-
limits:
148-
cpu: '1'
149-
memory: 4Gi
150-
151-
# https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks
152-
# config.xml and other configuration files are backed up by the preStop hook
153-
lifecycle:
154-
preStop:
155-
exec:
156-
command:
157-
- /bin/sh
158-
- -c
159-
- /opt/snc_mid_server/pre_stop.sh
160-
161-
volumeMounts:
162-
- mountPath: /etc/secrets
163-
name: servicenow-mid-statefulset-mnt-shared-secr
164-
readOnly: true
165-
166-
# - mountPath: <MID_MUTUAL_AUTH_SECRET_MOUNT_PATH>
167-
# name: <YOUR_STATEFULSET_NAME>-mnt-shared-secr
168-
# readOnly: true
169-
170-
# https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath
171-
# Share one volume for multiple uses in a single pod. The volumeMounts.subPath property specifies a sub-path inside the referenced volume instead of its root.
172-
# MID Server application is installed in the /opt/snc_mid_server folder. Only subfolders which is not present or empty in the image can be mounted here.
173-
- mountPath: /opt/snc_mid_server/mid_container
174-
name: servicenow-mid-volumeclaim
175-
subPath: mid_container
176-
- mountPath: /opt/snc_mid_server/agent/extlib
177-
name: servicenow-mid-volumeclaim
178-
subPath: agent/extlib
179-
- mountPath: /opt/snc_mid_server/agent/logs
180-
name: servicenow-mid-volumeclaim
181-
subPath: agent/logs
182-
- mountPath: /opt/snc_mid_server/agent/scripts
183-
name: servicenow-mid-volumeclaim
184-
subPath: agent/scripts
185-
- mountPath: /opt/snc_mid_server/agent/security
186-
name: servicenow-mid-volumeclaim
187-
subPath: agent/security
188-
- mountPath: /opt/snc_mid_server/agent/security_backup
189-
name: servicenow-mid-volumeclaim
190-
subPath: agent/security_backup
191-
- mountPath: /opt/snc_mid_server/agent/work
192-
name: servicenow-mid-volumeclaim
193-
subPath: agent/work
78+
- name: servicenow-mid-statefulset-container
79+
# Put your image URL where Kubernetes can pull the image from, i.e. midcontainerregistry.azurecr.io/mid:tokyo-07-08-2022_04-07-2023_0200
80+
image: ghcr.io/lightstep/sn-collector/mid-experimental:main
81+
imagePullPolicy: Always # other options: IfNotPresent, Never
82+
ports:
83+
- containerPort: 8097
84+
name: web
85+
env:
86+
# Define Environment variables
87+
# You can put mid config parameter or wrapper config parameters here
88+
# Env variable name for MID config parameter starts with MID_CONFIG_ followed by the config parameter name where a dot is replaced by double underscores.
89+
# Env variable name for Wrapper config parameter starts with MID_WRAPPER_ followed by the wrapper parameter name where a dot is replaced by double underscores.
90+
91+
# - name: MID_CONFIG_mid__log__level
92+
# value: debug
93+
94+
# Put the mid profile id here if you are deploying MID Servers linked to a profile
95+
# https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html
96+
# - name: MID_CONFIG_mid_profile_id
97+
# value: <YOUR_MID_PROFILE_ID>
98+
99+
# Set MID Server name. The default value is _NAMESPACE_HOSTNAME_ which is a place holder and will be replaced by the actual k8s namespace
100+
# and hostname when the container starts for the first time. See more details in the init script of the recipe
101+
# Hostnames in statefulset follows the pattern <YOUR_STATEFULSET_NAME>-0 , <YOUR_STATEFULSET_NAME>-1, etc.
102+
- name: MID_CONFIG_name
103+
value: _NAMESPACE_HOSTNAME_
104+
105+
# Put your instance URL here
106+
- name: MID_CONFIG_url
107+
value: https://__INSTANCE_NAME__.service-now.com
108+
109+
# For instance authentication, you can choose either (A) basic auth or (B) mutual auth (mTLS)
110+
# If using mTLS, you don't need to provide user name and password. The sensitive data such as password
111+
# or mutual auth private certificate should be passed by using Kubernetes secrets
112+
# https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html
113+
114+
# Option A: using basic authentication
115+
# 1. Create a file named <YOUR_MID_SECRET_PROPERTIES_FILENAME> with the content
116+
# mid.instance.password=<YOUR_MID_USER_PASSWORD>
117+
# 2. Create a secret named <YOUR_MID_SECRET_NAME>
118+
# kubectl create secret generic <YOUR_MID_SECRET_NAME> --from-file=<YOUR_MID_SECRET_PROPERTIES_FILENAME>
119+
# <MID_SECRET_MOUNT_PATH> is the location where the mid secret volume is mounted to container file system
120+
- name: MID_CONFIG_mid__instance__username
121+
value: __USERNAME__
122+
- name: MID_SECRETS_FILE
123+
value: /etc/secrets/mid.properties
124+
125+
# Option B: using mutual auth (mTLS)
126+
# 1. Make sure you have the mutual auth certificate file named <YOUR_MID_MUTUAL_AUTH_PEM_FILENAME> which need to import to the MID Server keystore
127+
# 2. Create a secret named <YOUR_MID_MUTUAL_AUTH_SECRET_NAME>
128+
# kubectl create secret generic <YOUR_MID_MUTUAL_AUTH_SECRET_NAME> --from-file=<YOUR_MID_MUTUAL_AUTH_PEM_FILENAME>
129+
# 3. Uncomment the 2 lines below. <MID_MUTUAL_AUTH_SECRET_MOUNT_PATH> is the location where the mid mutual auth secret volume is mounted to the container file system.
130+
# - name: MID_MUTUAL_AUTH_PEM_FILE
131+
# value: <MID_MUTUAL_AUTH_SECRET_MOUNT_PATH>/<YOUR_MID_MUTUAL_AUTH_PEM_FILENAME>
132+
133+
- name: MID_CONTAINER_DEPLOYMENT_NAME
134+
value: servicenow-mid-statefulset
135+
- name: MID_CONTAINER_DEPLOYMENT_NAMESPACE
136+
value: servicenow
137+
138+
# wrapper config parameters
139+
- name: MID_WRAPPER_wrapper__java__maxmemory
140+
value: '2024'
141+
142+
# https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
143+
resources:
144+
requests:
145+
cpu: '1'
146+
memory: 2Gi
147+
limits:
148+
cpu: '1'
149+
memory: 4Gi
150+
151+
# https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks
152+
# config.xml and other configuration files are backed up by the preStop hook
153+
lifecycle:
154+
preStop:
155+
exec:
156+
command:
157+
- /bin/sh
158+
- -c
159+
- /opt/snc_mid_server/pre_stop.sh
160+
161+
volumeMounts:
162+
- mountPath: /etc/secrets
163+
name: servicenow-mid-statefulset-mnt-shared-secr
164+
readOnly: true
165+
166+
# - mountPath: <MID_MUTUAL_AUTH_SECRET_MOUNT_PATH>
167+
# name: <YOUR_STATEFULSET_NAME>-mnt-shared-secr
168+
# readOnly: true
169+
170+
# https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath
171+
# Share one volume for multiple uses in a single pod. The volumeMounts.subPath property specifies a sub-path inside the referenced volume instead of its root.
172+
# MID Server application is installed in the /opt/snc_mid_server folder. Only subfolders which is not present or empty in the image can be mounted here.
173+
- mountPath: /opt/snc_mid_server/mid_container
174+
name: servicenow-mid-volumeclaim
175+
subPath: mid_container
176+
- mountPath: /opt/snc_mid_server/agent/extlib
177+
name: servicenow-mid-volumeclaim
178+
subPath: agent/extlib
179+
- mountPath: /opt/snc_mid_server/agent/logs
180+
name: servicenow-mid-volumeclaim
181+
subPath: agent/logs
182+
- mountPath: /opt/snc_mid_server/agent/scripts
183+
name: servicenow-mid-volumeclaim
184+
subPath: agent/scripts
185+
- mountPath: /opt/snc_mid_server/agent/security
186+
name: servicenow-mid-volumeclaim
187+
subPath: agent/security
188+
- mountPath: /opt/snc_mid_server/agent/security_backup
189+
name: servicenow-mid-volumeclaim
190+
subPath: agent/security_backup
191+
- mountPath: /opt/snc_mid_server/agent/work
192+
name: servicenow-mid-volumeclaim
193+
subPath: agent/work
194194
serviceAccountName: default
195195

196196
# Specify volumes for basic auth secret or mutual auth secret
197197
volumes:
198-
- name: servicenow-mid-statefulset-mnt-shared-secr
199-
projected:
200-
sources:
201-
# Option A: Using basic auth
202-
- secret:
203-
name: servicenow-mid-secret
204-
# Option B: Using mutual auth
205-
# - secret:
206-
# name: <YOUR_MID_MUTUAL_AUTH_SECRET_NAME>
198+
- name: servicenow-mid-statefulset-mnt-shared-secr
199+
projected:
200+
sources:
201+
# Option A: Using basic auth
202+
- secret:
203+
name: servicenow-mid-secret
204+
# Option B: Using mutual auth
205+
# - secret:
206+
# name: <YOUR_MID_MUTUAL_AUTH_SECRET_NAME>

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ The following tables represent the supported components of the ServiceNow Collec
7171
| k8sobjects | [contrib][1] |
7272
| k8scluster | [contrib][1] |
7373
| kubeletstats | [contrib][1] |
74+
| `lightstepreceiver` | under development |
7475
| filelog | [contrib][1] |
7576
| httpcheck | [contrib][1] |
7677
| `azuremonitor`* | [contrib][1] |

0 commit comments

Comments
 (0)