initial commit
Some checks failed
CI Pipeline / Build and Test (push) Successful in 4s
Security Scanning / Trivy — Filesystem & Dependency Scan (push) Failing after 7s
Security Scanning / Gitleaks — Secret Scan (push) Failing after 7s
Security Scanning / Security Summary (push) Failing after 3s
Build and Publish TechDocs / build-and-publish (push) Successful in 1m2s
Some checks failed
CI Pipeline / Build and Test (push) Successful in 4s
Security Scanning / Trivy — Filesystem & Dependency Scan (push) Failing after 7s
Security Scanning / Gitleaks — Secret Scan (push) Failing after 7s
Security Scanning / Security Summary (push) Failing after 3s
Build and Publish TechDocs / build-and-publish (push) Successful in 1m2s
Change-Id: I8e318861a258686ddc53dda08858f74c573a6520
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
---
|
||||
# Source: opentelemetry-demo/charts/opensearch/templates/configmap.yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: opensearch-config
|
||||
labels:
|
||||
helm.sh/chart: opensearch-3.4.0
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
app.kubernetes.io/version: "3.4.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/component: opensearch
|
||||
data:
|
||||
opensearch.yml: |
|
||||
cluster.name: opensearch-cluster
|
||||
|
||||
# Bind to all interfaces because we don't know what IP address Docker will assign to us.
|
||||
network.host: 0.0.0.0
|
||||
|
||||
# Setting network.host to a non-loopback address enables the annoying bootstrap checks. "Single-node" mode disables them again.
|
||||
# Implicitly done if ".singleNode" is set to "true".
|
||||
# discovery.type: single-node
|
||||
|
||||
# Start OpenSearch Security Demo Configuration
|
||||
# WARNING: revise all the lines below before you go into production
|
||||
# plugins:
|
||||
# security:
|
||||
# ssl:
|
||||
# transport:
|
||||
# pemcert_filepath: esnode.pem
|
||||
# pemkey_filepath: esnode-key.pem
|
||||
# pemtrustedcas_filepath: root-ca.pem
|
||||
# enforce_hostname_verification: false
|
||||
# http:
|
||||
# enabled: true
|
||||
# pemcert_filepath: esnode.pem
|
||||
# pemkey_filepath: esnode-key.pem
|
||||
# pemtrustedcas_filepath: root-ca.pem
|
||||
# allow_unsafe_democertificates: true
|
||||
# allow_default_init_securityindex: true
|
||||
# authcz:
|
||||
# admin_dn:
|
||||
# - CN=kirk,OU=client,O=client,L=test,C=de
|
||||
# audit.type: internal_opensearch
|
||||
# enable_snapshot_restore_privilege: true
|
||||
# check_snapshot_restore_write_privileges: true
|
||||
# restapi:
|
||||
# roles_enabled: ["all_access", "security_rest_api_access"]
|
||||
# system_indices:
|
||||
# enabled: true
|
||||
# indices:
|
||||
# [
|
||||
# ".opendistro-alerting-config",
|
||||
# ".opendistro-alerting-alert*",
|
||||
# ".opendistro-anomaly-results*",
|
||||
# ".opendistro-anomaly-detector*",
|
||||
# ".opendistro-anomaly-checkpoints",
|
||||
# ".opendistro-anomaly-detection-state",
|
||||
# ".opendistro-reports-*",
|
||||
# ".opendistro-notifications-*",
|
||||
# ".opendistro-notebooks",
|
||||
# ".opendistro-asynchronous-search-response*",
|
||||
# ]
|
||||
######## End OpenSearch Security Demo Configuration ########
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
# Source: opentelemetry-demo/charts/opensearch/templates/poddisruptionbudget.yaml
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "opensearch-pdb"
|
||||
labels:
|
||||
helm.sh/chart: opensearch-3.4.0
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
app.kubernetes.io/version: "3.4.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/component: opensearch
|
||||
spec:
|
||||
maxUnavailable: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: opensearch
|
||||
labels:
|
||||
helm.sh/chart: opensearch-3.4.0
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
app.kubernetes.io/version: "3.4.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/component: opensearch
|
||||
annotations:
|
||||
{}
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 9200
|
||||
- name: transport
|
||||
protocol: TCP
|
||||
port: 9300
|
||||
- name: metrics
|
||||
protocol: TCP
|
||||
port: 9600
|
||||
---
|
||||
# Source: opentelemetry-demo/charts/opensearch/templates/service.yaml
|
||||
kind: Service
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: opensearch-headless
|
||||
labels:
|
||||
helm.sh/chart: opensearch-3.4.0
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
app.kubernetes.io/version: "3.4.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/component: opensearch
|
||||
annotations:
|
||||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
|
||||
spec:
|
||||
clusterIP: None # This is needed for statefulset hostnames like opensearch-0 to resolve
|
||||
# Create endpoints also if the related pod isn't ready
|
||||
publishNotReadyAddresses: true
|
||||
selector:
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
ports:
|
||||
- name: http
|
||||
port: 9200
|
||||
- name: transport
|
||||
port: 9300
|
||||
- name: metrics
|
||||
port: 9600
|
||||
@@ -0,0 +1,154 @@
|
||||
---
|
||||
# Source: opentelemetry-demo/charts/opensearch/templates/statefulset.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: opensearch
|
||||
labels:
|
||||
helm.sh/chart: opensearch-3.4.0
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
app.kubernetes.io/version: "3.4.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/component: opensearch
|
||||
annotations:
|
||||
majorVersion: "3"
|
||||
spec:
|
||||
serviceName: opensearch-headless
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
replicas: 1
|
||||
podManagementPolicy: Parallel
|
||||
updateStrategy:
|
||||
type: RollingUpdate
|
||||
template:
|
||||
metadata:
|
||||
name: "opensearch"
|
||||
labels:
|
||||
helm.sh/chart: opensearch-3.4.0
|
||||
app.kubernetes.io/name: opensearch
|
||||
app.kubernetes.io/instance: example
|
||||
app.kubernetes.io/version: "3.4.0"
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
app.kubernetes.io/component: opensearch
|
||||
annotations:
|
||||
configchecksum: 17d9fa0bb5acd5c7f6e4ff053d35a4bba83d971ccee521315964c59a0d83160
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 1000
|
||||
runAsUser: 1000
|
||||
automountServiceAccountToken: false
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
preferredDuringSchedulingIgnoredDuringExecution:
|
||||
- weight: 1
|
||||
podAffinityTerm:
|
||||
topologyKey: kubernetes.io/hostname
|
||||
labelSelector:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/instance
|
||||
operator: In
|
||||
values:
|
||||
- example
|
||||
- key: app.kubernetes.io/name
|
||||
operator: In
|
||||
values:
|
||||
- opensearch
|
||||
terminationGracePeriodSeconds: 120
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: opensearch-config
|
||||
- emptyDir: {}
|
||||
name: config-emptydir
|
||||
enableServiceLinks: true
|
||||
initContainers:
|
||||
- name: configfile
|
||||
image: "opensearchproject/opensearch:3.4.0"
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
#!/usr/bin/env bash
|
||||
cp -r /tmp/configfolder/* /tmp/config/
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
resources:
|
||||
{}
|
||||
volumeMounts:
|
||||
- mountPath: /tmp/config/
|
||||
name: config-emptydir
|
||||
- name: config
|
||||
mountPath: /tmp/configfolder/opensearch.yml
|
||||
subPath: opensearch.yml
|
||||
containers:
|
||||
- name: "opensearch"
|
||||
securityContext:
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
|
||||
image: "opensearchproject/opensearch:3.4.0"
|
||||
imagePullPolicy: "IfNotPresent"
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
periodSeconds: 5
|
||||
tcpSocket:
|
||||
port: 9200
|
||||
timeoutSeconds: 3
|
||||
startupProbe:
|
||||
failureThreshold: 30
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 10
|
||||
tcpSocket:
|
||||
port: 9200
|
||||
timeoutSeconds: 3
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 9200
|
||||
- name: transport
|
||||
containerPort: 9300
|
||||
- name: metrics
|
||||
containerPort: 9600
|
||||
resources:
|
||||
limits:
|
||||
memory: 1100Mi
|
||||
requests:
|
||||
cpu: 1000m
|
||||
memory: 100Mi
|
||||
env:
|
||||
- name: node.name
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: discovery.seed_hosts
|
||||
value: "opensearch-cluster-master-headless"
|
||||
- name: cluster.name
|
||||
value: "demo-cluster"
|
||||
- name: network.host
|
||||
value: "0.0.0.0"
|
||||
- name: OPENSEARCH_JAVA_OPTS
|
||||
value: "-Xms400m -Xmx400m"
|
||||
- name: node.roles
|
||||
value: "master,ingest,data,remote_cluster_client,"
|
||||
- name: discovery.type
|
||||
value: "single-node"
|
||||
- name: bootstrap.memory_lock
|
||||
value: "true"
|
||||
- name: DISABLE_INSTALL_DEMO_CONFIG
|
||||
value: "true"
|
||||
- name: DISABLE_SECURITY_PLUGIN
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- name: config-emptydir
|
||||
mountPath: /usr/share/opensearch/config/opensearch.yml
|
||||
subPath: opensearch.yml
|
||||
Reference in New Issue
Block a user