diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4c5dd8..770919b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - name: Install builder working-directory: ./collector run: | - go install go.opentelemetry.io/collector/cmd/builder@v0.97.0 + go install go.opentelemetry.io/collector/cmd/builder@v0.102.1 - name: Build working-directory: ./collector run: make build-linux diff --git a/collector/config-k8s/mid-statefulset.yaml b/collector/config-k8s/mid-statefulset.yaml index 1a8c27e..cd69e13 100644 --- a/collector/config-k8s/mid-statefulset.yaml +++ b/collector/config-k8s/mid-statefulset.yaml @@ -10,8 +10,8 @@ metadata: provider: ServiceNow spec: ports: - - port: 8097 - name: web + - port: 8097 + name: web type: ClusterIP selector: app: MIDServerManagement @@ -34,22 +34,22 @@ spec: deployment: servicenow-mid-statefulset provider: ServiceNow volumeClaimTemplates: - - metadata: - name: servicenow-mid-volumeclaim - namespace: servicenow - labels: - app: MIDServerManagement - deployment: servicenow-mid-statefulset - provider: ServiceNow - spec: - # works on Google Cloud - storageClassName: standard - accessModes: - - ReadWriteOnce - resources: - requests: - # Make sure to have enough disk space for the work, logs, extlib, scripts and other folders at the volume mounts below - storage: 1Gi + - metadata: + name: servicenow-mid-volumeclaim + namespace: servicenow + labels: + app: MIDServerManagement + deployment: servicenow-mid-statefulset + provider: ServiceNow + spec: + # works on Google Cloud + storageClassName: standard + accessModes: + - ReadWriteOnce + resources: + requests: + # Make sure to have enough disk space for the work, logs, extlib, scripts and other folders at the volume mounts below + storage: 1Gi template: metadata: labels: @@ -75,132 +75,132 @@ spec: # - name: containers: - - name: servicenow-mid-statefulset-container - # 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 - image: ghcr.io/lightstep/sn-collector/mid-experimental:main - imagePullPolicy: Always # other options: IfNotPresent, Never - ports: - - containerPort: 8097 - name: web - env: - # Define Environment variables - # You can put mid config parameter or wrapper config parameters here - # 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. - # 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. - - # - name: MID_CONFIG_mid__log__level - # value: debug - - # Put the mid profile id here if you are deploying MID Servers linked to a profile - # https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html - # - name: MID_CONFIG_mid_profile_id - # value: - - # Set MID Server name. The default value is _NAMESPACE_HOSTNAME_ which is a place holder and will be replaced by the actual k8s namespace - # and hostname when the container starts for the first time. See more details in the init script of the recipe - # Hostnames in statefulset follows the pattern -0 , -1, etc. - - name: MID_CONFIG_name - value: _NAMESPACE_HOSTNAME_ - - # Put your instance URL here - - name: MID_CONFIG_url - value: https://__INSTANCE_NAME__.service-now.com - - # For instance authentication, you can choose either (A) basic auth or (B) mutual auth (mTLS) - # If using mTLS, you don't need to provide user name and password. The sensitive data such as password - # or mutual auth private certificate should be passed by using Kubernetes secrets - # https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html - - # Option A: using basic authentication - # 1. Create a file named with the content - # mid.instance.password= - # 2. Create a secret named - # kubectl create secret generic --from-file= - # is the location where the mid secret volume is mounted to container file system - - name: MID_CONFIG_mid__instance__username - value: __USERNAME__ - - name: MID_SECRETS_FILE - value: /etc/secrets/mid.properties - - # Option B: using mutual auth (mTLS) - # 1. Make sure you have the mutual auth certificate file named which need to import to the MID Server keystore - # 2. Create a secret named - # kubectl create secret generic --from-file= - # 3. Uncomment the 2 lines below. is the location where the mid mutual auth secret volume is mounted to the container file system. - # - name: MID_MUTUAL_AUTH_PEM_FILE - # value: / - - - name: MID_CONTAINER_DEPLOYMENT_NAME - value: servicenow-mid-statefulset - - name: MID_CONTAINER_DEPLOYMENT_NAMESPACE - value: servicenow - - # wrapper config parameters - - name: MID_WRAPPER_wrapper__java__maxmemory - value: '2024' - - # https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - resources: - requests: - cpu: '1' - memory: 2Gi - limits: - cpu: '1' - memory: 4Gi - - # https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks - # config.xml and other configuration files are backed up by the preStop hook - lifecycle: - preStop: - exec: - command: - - /bin/sh - - -c - - /opt/snc_mid_server/pre_stop.sh - - volumeMounts: - - mountPath: /etc/secrets - name: servicenow-mid-statefulset-mnt-shared-secr - readOnly: true - - # - mountPath: - # name: -mnt-shared-secr - # readOnly: true - - # https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath - # 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. - # 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. - - mountPath: /opt/snc_mid_server/mid_container - name: servicenow-mid-volumeclaim - subPath: mid_container - - mountPath: /opt/snc_mid_server/agent/extlib - name: servicenow-mid-volumeclaim - subPath: agent/extlib - - mountPath: /opt/snc_mid_server/agent/logs - name: servicenow-mid-volumeclaim - subPath: agent/logs - - mountPath: /opt/snc_mid_server/agent/scripts - name: servicenow-mid-volumeclaim - subPath: agent/scripts - - mountPath: /opt/snc_mid_server/agent/security - name: servicenow-mid-volumeclaim - subPath: agent/security - - mountPath: /opt/snc_mid_server/agent/security_backup - name: servicenow-mid-volumeclaim - subPath: agent/security_backup - - mountPath: /opt/snc_mid_server/agent/work - name: servicenow-mid-volumeclaim - subPath: agent/work + - name: servicenow-mid-statefulset-container + # 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 + image: ghcr.io/lightstep/sn-collector/mid-experimental:main + imagePullPolicy: Always # other options: IfNotPresent, Never + ports: + - containerPort: 8097 + name: web + env: + # Define Environment variables + # You can put mid config parameter or wrapper config parameters here + # 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. + # 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. + + # - name: MID_CONFIG_mid__log__level + # value: debug + + # Put the mid profile id here if you are deploying MID Servers linked to a profile + # https://docs.servicenow.com/bundle/tokyo-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html + # - name: MID_CONFIG_mid_profile_id + # value: + + # Set MID Server name. The default value is _NAMESPACE_HOSTNAME_ which is a place holder and will be replaced by the actual k8s namespace + # and hostname when the container starts for the first time. See more details in the init script of the recipe + # Hostnames in statefulset follows the pattern -0 , -1, etc. + - name: MID_CONFIG_name + value: _NAMESPACE_HOSTNAME_ + + # Put your instance URL here + - name: MID_CONFIG_url + value: https://__INSTANCE_NAME__.service-now.com + + # For instance authentication, you can choose either (A) basic auth or (B) mutual auth (mTLS) + # If using mTLS, you don't need to provide user name and password. The sensitive data such as password + # or mutual auth private certificate should be passed by using Kubernetes secrets + # https://docs.servicenow.com/bundle/utah-servicenow-platform/page/product/mid-server/concept/containerized-mid-deployment.html + + # Option A: using basic authentication + # 1. Create a file named with the content + # mid.instance.password= + # 2. Create a secret named + # kubectl create secret generic --from-file= + # is the location where the mid secret volume is mounted to container file system + - name: MID_CONFIG_mid__instance__username + value: __USERNAME__ + - name: MID_SECRETS_FILE + value: /etc/secrets/mid.properties + + # Option B: using mutual auth (mTLS) + # 1. Make sure you have the mutual auth certificate file named which need to import to the MID Server keystore + # 2. Create a secret named + # kubectl create secret generic --from-file= + # 3. Uncomment the 2 lines below. is the location where the mid mutual auth secret volume is mounted to the container file system. + # - name: MID_MUTUAL_AUTH_PEM_FILE + # value: / + + - name: MID_CONTAINER_DEPLOYMENT_NAME + value: servicenow-mid-statefulset + - name: MID_CONTAINER_DEPLOYMENT_NAMESPACE + value: servicenow + + # wrapper config parameters + - name: MID_WRAPPER_wrapper__java__maxmemory + value: '2024' + + # https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + resources: + requests: + cpu: '1' + memory: 2Gi + limits: + cpu: '1' + memory: 4Gi + + # https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks + # config.xml and other configuration files are backed up by the preStop hook + lifecycle: + preStop: + exec: + command: + - /bin/sh + - -c + - /opt/snc_mid_server/pre_stop.sh + + volumeMounts: + - mountPath: /etc/secrets + name: servicenow-mid-statefulset-mnt-shared-secr + readOnly: true + + # - mountPath: + # name: -mnt-shared-secr + # readOnly: true + + # https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath + # 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. + # 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. + - mountPath: /opt/snc_mid_server/mid_container + name: servicenow-mid-volumeclaim + subPath: mid_container + - mountPath: /opt/snc_mid_server/agent/extlib + name: servicenow-mid-volumeclaim + subPath: agent/extlib + - mountPath: /opt/snc_mid_server/agent/logs + name: servicenow-mid-volumeclaim + subPath: agent/logs + - mountPath: /opt/snc_mid_server/agent/scripts + name: servicenow-mid-volumeclaim + subPath: agent/scripts + - mountPath: /opt/snc_mid_server/agent/security + name: servicenow-mid-volumeclaim + subPath: agent/security + - mountPath: /opt/snc_mid_server/agent/security_backup + name: servicenow-mid-volumeclaim + subPath: agent/security_backup + - mountPath: /opt/snc_mid_server/agent/work + name: servicenow-mid-volumeclaim + subPath: agent/work serviceAccountName: default # Specify volumes for basic auth secret or mutual auth secret volumes: - - name: servicenow-mid-statefulset-mnt-shared-secr - projected: - sources: - # Option A: Using basic auth - - secret: - name: servicenow-mid-secret - # Option B: Using mutual auth - # - secret: - # name: + - name: servicenow-mid-statefulset-mnt-shared-secr + projected: + sources: + # Option A: Using basic auth + - secret: + name: servicenow-mid-secret + # Option B: Using mutual auth + # - secret: + # name: diff --git a/readme.md b/readme.md index b4c87c8..f49f6d4 100644 --- a/readme.md +++ b/readme.md @@ -71,6 +71,7 @@ The following tables represent the supported components of the ServiceNow Collec | k8sobjects | [contrib][1] | | k8scluster | [contrib][1] | | kubeletstats | [contrib][1] | +| `lightstepreceiver` | under development | | filelog | [contrib][1] | | httpcheck | [contrib][1] | | `azuremonitor`* | [contrib][1] |