Skip to content

Commit 91cb559

Browse files
MLE-19883: Updating sample manifests (#69)
* added manifests
1 parent 8018e2e commit 91cb559

File tree

9 files changed

+524
-475
lines changed

9 files changed

+524
-475
lines changed

config/samples/complete.yaml

Lines changed: 295 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,312 @@
11
apiVersion: database.marklogic.com/v1alpha1
2-
kind: MarklogicGroup
2+
kind: MarklogicCluster
33
metadata:
4-
labels:
5-
app.kubernetes.io/name: marklogicgroup
6-
app.kubernetes.io/instance: marklogicgroup-sample
7-
app.kubernetes.io/part-of: marklogic-operator-kubernetes
8-
app.kubernetes.io/managed-by: kustomize
9-
app.kubernetes.io/created-by: marklogic-operator-kubernetes
10-
name: marklogicgroup-sample
4+
name: ml-cluster
5+
namespace: prod
6+
annotations: {}
117
spec:
12-
replicas: 1
13-
name: marklogic
14-
image: "progressofficial/marklogic-db:11.3.0-ubi-rootless"
15-
## Configure the imagePullSecrets to pull the image from private repository that requires credential
16-
# imagePullSecrets: []
8+
image: "progressofficial/marklogic-db:11.3.1-ubi-rootless-2.1.1"
9+
imagePullPolicy: IfNotPresent
10+
imagePullSecrets:
11+
- name: regcred
12+
## It is recommended to use Kubernetes secrets to store the admin credentials
13+
## To create a secret, run the following command in the same namespace as the CR:
14+
## kubectl create secret generic admincreds --from-literal=username=admin --from-literal=password=admin
15+
## If you do not provide the admin credentials, the operator will generate a secret for you containing admin credentials
1716
auth:
18-
adminUsername: user
19-
adminPassword: pass
20-
# storage:
21-
# size: 10Gi
22-
terminationGracePeriodSeconds: 9
23-
updateStrategy: OnDelete
17+
secretName: admincreds
2418
clusterDomain: cluster.local
25-
priorityClassName: "system-node-critical"
26-
# groupConfig:
27-
# name: "node"
28-
enableConverters: true
29-
hugePages:
19+
persistence:
3020
enabled: true
31-
mountPath: /dev/hugepages
32-
nodeSelector:
33-
node-role.kubernetes.io/master: "true"
34-
affinity:
35-
podAntiAffinity:
36-
preferredDuringSchedulingIgnoredDuringExecution:
37-
- weight: 100
38-
podAffinityTerm:
39-
labelSelector:
40-
matchExpressions:
41-
- key: app.kubernetes.io/name
42-
operator: In
43-
values:
44-
- marklogic
45-
topologyKey: kubernetes.io/hostname
21+
size: 100Gi
22+
storageClassName: "gp3"
23+
accessModes:
24+
- ReadWriteOnce
25+
annotations: {}
26+
resources:
27+
requests:
28+
memory: "64Gi"
29+
cpu: "8"
30+
hugespages2Mi: "24Gi"
31+
limits:
32+
memory: "64Gi"
33+
cpu: "8"
34+
hugespages2Mi: "24Gi"
35+
## To configure networkPolicy, set enabled: true and uncomment the following lines
36+
## Below is an example of networkPolicy, update it as per your requirements
37+
## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies
38+
# networkPolicy:
39+
# enabled: true
40+
# policyTypes:
41+
# - Ingress
42+
# - Egress
43+
# podSelector: {}
44+
# ingress: {}
45+
# egress:
46+
# - to:
47+
# - podSelector:
48+
# matchLabels:
49+
# app.kubernetes.io/name: marklogiccluster
50+
# app.kubernetes.io/instance: marklogiccluster-prod-sample
51+
# ports:
52+
# - protocol: TCP
53+
# port: 8000
54+
## Configuration for the HAProxy load balancer
55+
## An out of box load balancer configured to handle cookie based session affinity that's required by most MarkLogic applications.
56+
haproxy:
57+
enabled: true
58+
pathBasedRouting: true
59+
frontendPort: 8080
60+
tcpPorts:
61+
enabled: true
62+
ports:
63+
- name: odbc
64+
type: TCP
65+
port: 5432
66+
appServers:
67+
- name: "app-service"
68+
port: 8000
69+
path: "/console"
70+
- name: "admin"
71+
port: 8001
72+
path: "/adminUI"
73+
- name: "manage"
74+
port: 8002
75+
path: "/manage"
76+
stats:
77+
enabled: true
78+
port: 1024
79+
resources:
80+
requests:
81+
memory: "4Gi"
82+
cpu: "1"
83+
limits:
84+
memory: "4Gi"
85+
cpu: "1"
86+
## Configure Ingress
87+
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/
88+
ingress:
89+
enabled: false
90+
ingressClassName: "alb"
91+
## Ingress labels
92+
## ref: https://kubernetes.io/docs/concepts/overvsiew/working-with-objects/labels/
93+
labels: {}
94+
## Ingress annotations
95+
## Update the annotations as per your requirements
96+
## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
97+
annotations:
98+
alb.ingress.kubernetes.io/healthcheck-port: '80'
99+
alb.ingress.kubernetes.io/healthcheck-path: /adminUI
100+
alb.ingress.kubernetes.io/success-codes: '200-401'
101+
alb.ingress.kubernetes.io/load-balancer-name: mlingress
102+
alb.ingress.kubernetes.io/scheme: internet-facing
103+
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}]'
104+
alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests
105+
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:XXXXXXXXXXX:certificate/XxXXXXXX-xxxx-XXXX-XXXX-XXXXXXXxxxxXXX
106+
alb.ingress.kubernetes.io/target-type: ip
107+
alb.ingress.kubernetes.io/group.name: mlingress-group
108+
alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600,routing.http.xff_header_processing.mode=append
109+
# Ingress hosts
110+
# add default hosts and additional hosts
111+
# ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules
112+
host: ""
113+
additionalHosts: []
114+
## Ingress TLS
115+
## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
116+
tls: []
117+
# secretName: your-certificate-name
118+
# hosts:
119+
# - marklogic.example.com
120+
terminationGracePeriodSeconds: 10
121+
updateStrategy: OnDelete
122+
podSecurityContext:
123+
fsGroup: 2
124+
fsGroupChangePolicy: OnRootMismatch
125+
securityContext:
126+
runAsUser: 1000
127+
runAsNonRoot: true
128+
allowPrivilegeEscalation: false
129+
## Node Affinity for pod-node scheduling constraints
130+
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
131+
affinity: {}
132+
## Configure NodeSelector property for scheduling pods to nodes
133+
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#create-a-pod-that-gets-scheduled-to-your-chosen-node
134+
nodeSelector: {}
135+
# disktype: ssd
136+
## Configure POD Topology Spread Constraints to spread pods across cluster
137+
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
138+
## Preferred Topology Spread Constraints rule to evenly distribute Marklogic pods across worker nodes and zones
46139
topologySpreadConstraints:
47140
- maxSkew: 1
48141
topologyKey: kubernetes.io/hostname
49142
whenUnsatisfiable: DoNotSchedule
50143
labelSelector:
51144
matchLabels:
52-
app.kubernetes.io/name: marklogic
145+
app.kubernetes.io/name: marklogiccluster
53146
- maxSkew: 1
54147
topologyKey: topology.kubernetes.io/zone
55148
whenUnsatisfiable: ScheduleAnyway
56149
labelSelector:
57150
matchLabels:
58-
app.kubernetes.io/name: marklogic
59-
resources:
60-
requests:
61-
memory: "4Gi"
62-
cpu: "1"
63-
# When using huge pages requests should equal limits
64-
# refer to https://kubernetes.io/docs/tasks/manage-hugepages/scheduling-hugepages/ for more information on huge pages
65-
# hugepages-2Mi: 100Mi
66-
limits:
67-
memory: "4Gi"
68-
cpu: "1"
69-
# hugepages-2Mi: 100Mi
70-
livenessProbe:
71-
enabled: true
72-
initialDelaySeconds: 31
73-
periodSeconds: 11
74-
timeoutSeconds: 6
75-
successThreshold: 1
76-
failureThreshold: 4
77-
readinessProbe:
78-
enabled: true
79-
initialDelaySeconds: 29
80-
periodSeconds: 9
81-
timeoutSeconds: 4
82-
successThreshold: 1
83-
failureThreshold: 2
151+
app.kubernetes.io/name: marklogiccluster
152+
## Configure priority class for pods
153+
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
154+
priorityClassName: ""
155+
## Supply license information for MarkLogic server
156+
license:
157+
key: ""
158+
licensee: ""
159+
## Optionally install converters package on MarkLogic
160+
enableConverters: false
161+
## Configure TLS for App Servers
162+
## If certSecretNames is not provided, self-signed temporary certificate will be generated.
163+
tls:
164+
enableOnDefaultAppServers: false
165+
certSecretNames: []
166+
caSecretName: ""
167+
## Configure options for log collection
168+
## Log collection will collect all logs for each file type enabled, parse them,
169+
## And export them to a logging backend specified in the outputs section below
170+
# logCollection:
171+
# enabled: true
172+
# image: fluent/fluent-bit:3.1.1
173+
# files:
174+
# errorLogs: true
175+
# accessLogs: true
176+
# requestLogs: true
177+
# crashLogs: true
178+
# auditLogs: true
179+
# outputs: |-
180+
# [OUTPUT]
181+
# name loki
182+
# match *
183+
# host loki.loki.svc.cluster.local
184+
# port 3100
185+
# labels job=fluent-bit
186+
# http_user admin
187+
# http_passwd admin
188+
# additionalVolumes:
189+
# - name: "logsdir"
190+
# emptyDir: {}
191+
## specify additional list of volumeMounts
192+
# additionalVolumeMounts:
193+
# - name: "logsdir"
194+
# mountPath: "/var/opt/MarkLogic/Logs"
195+
# additionalVolumeClaimTemplates: []
196+
markLogicGroups:
197+
- name: dnode
198+
replicas: 3
199+
groupConfig:
200+
name: dnode
201+
enableXdqpSsl: true
202+
isBootstrap: true
203+
image: "progressofficial/marklogic-db:11.3.0-ubi-rootless"
204+
imagePullPolicy: IfNotPresent
205+
imagePullSecrets:
206+
- name: regcred # secret name to pull the image from private repository
207+
persistence:
208+
enabled: true
209+
size: 100Gi
210+
storageClassName: "gp3"
211+
accessModes:
212+
- ReadWriteOnce
213+
annotations: {}
214+
service:
215+
type: ClusterIP
216+
additionalPorts:
217+
- name: app1
218+
port: 8010
219+
targetPort: 8010
220+
protocol: TCP
221+
- name: app2
222+
port: 8011
223+
targetPort: 8011
224+
protocol: TCP
225+
annotations: {}
226+
resources:
227+
requests:
228+
memory: "64Gi"
229+
cpu: "8"
230+
hugespages2Mi: "24Gi"
231+
limits:
232+
memory: "64Gi"
233+
cpu: "8"
234+
hugespages2Mi: "24Gi"
235+
## Configure Affinity property for scheduling pods to nodes
236+
## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
237+
affinity: {}
238+
## Configure POD Topology Spread Constraints to spread pods across cluster
239+
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/
240+
## Preferred Topology Spread Constraints rule to evenly distribute Marklogic pods across worker nodes and zones
241+
topologySpreadConstraints:
242+
- maxSkew: 1
243+
topologyKey: kubernetes.io/hostname
244+
whenUnsatisfiable: DoNotSchedule
245+
labelSelector:
246+
matchLabels: {}
247+
- maxSkew: 1
248+
topologyKey: topology.kubernetes.io/zone
249+
whenUnsatisfiable: ScheduleAnyway
250+
labelSelector:
251+
matchLabels: {}
252+
## Configure NodeSelector property for scheduling pods to nodes
253+
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#create-a-pod-that-gets-scheduled-to-your-chosen-node
254+
nodeSelector: {}
255+
# disktype: ssd
256+
## Configure priority class for pods
257+
## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/
258+
priorityClassName: ""
259+
hugePages:
260+
enabled: true
261+
mountPath: /dev/hugepages
262+
## Configure options for log collection
263+
## Log collection will collect all logs for each file type enabled, parse them,
264+
## And export them to a logging backend specified in the outputs section below
265+
# logCollection:
266+
# enabled: true
267+
# image: fluent/fluent-bit:3.1.1
268+
# files:
269+
# errorLogs: true
270+
# accessLogs: true
271+
# requestLogs: true
272+
# crashLogs: true
273+
# auditLogs: true
274+
# outputs: |-
275+
# [OUTPUT]
276+
# name loki
277+
# match *
278+
# host loki.loki.svc.cluster.local
279+
# port 3100
280+
# labels job=fluent-bit
281+
# http_user admin
282+
# http_passwd admin
283+
## Configuration for the HAProxy on the group level.
284+
## haproxy.enabled to false to make the group exclude from the backend of haproxy
285+
haproxy:
286+
enabled: false
287+
- name: enode
288+
replicas: 3
289+
groupConfig:
290+
name: enode
291+
enableXdqpSsl: true
292+
isBootstrap: false
293+
resources:
294+
requests:
295+
memory: "8Gi"
296+
cpu: "8"
297+
hugespages2Mi: "24Gi"
298+
limits:
299+
memory: "8Gi"
300+
cpu: "8"
301+
hugespages2Mi: "24Gi"
302+
hugePages:
303+
enabled: true
304+
mountPath: /dev/hugepages
305+
service:
306+
type: ClusterIP
307+
additionalPorts:
308+
- name: app1
309+
port: 8012
310+
targetPort: 8012
311+
protocol: TCP
312+
annotations: {}

config/samples/kustomization.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Append samples of your project ##
22
resources:
3-
- marklogiccluster.yaml
4-
- marklogicgroup.yaml
3+
- quick-start.yaml
4+
- minimal-production.yaml
5+
- complete.yaml
56
#+kubebuilder:scaffold:manifestskustomizesamples

0 commit comments

Comments
 (0)