From 70b19f79d8ed57f18bb63c8dbda970584d683833 Mon Sep 17 00:00:00 2001 From: barkhachoithani Date: Wed, 19 Feb 2025 11:23:13 -0800 Subject: [PATCH 1/3] added manifests --- config/samples/complete.yaml | 362 +++++++++++++++--- config/samples/minimal-production.yaml | 207 ++++++++++ .../{quick_start.yaml => quick-start.yaml} | 25 +- 3 files changed, 516 insertions(+), 78 deletions(-) create mode 100644 config/samples/minimal-production.yaml rename config/samples/{quick_start.yaml => quick-start.yaml} (57%) diff --git a/config/samples/complete.yaml b/config/samples/complete.yaml index 6554a31..2340572 100644 --- a/config/samples/complete.yaml +++ b/config/samples/complete.yaml @@ -1,83 +1,319 @@ apiVersion: database.marklogic.com/v1alpha1 -kind: MarklogicGroup +kind: MarklogicCluster metadata: + name: ml-cluster + namespace: prod labels: - app.kubernetes.io/name: marklogicgroup - app.kubernetes.io/instance: marklogicgroup-sample + app.kubernetes.io/name: marklogiccluster + app.kubernetes.io/instance: marklogiccluster-complete app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/managed-by: kustomize app.kubernetes.io/created-by: marklogic-operator-kubernetes - name: marklogicgroup-sample + annotations: {} spec: - replicas: 1 - name: marklogic - image: "progressofficial/marklogic-db:11.3.0-ubi-rootless" - ## Configure the imagePullSecrets to pull the image from private repository that requires credential - # imagePullSecrets: [] + image: "progressofficial/marklogic-db:11.3.1-ubi-rootless-2.1.1" + imagePullPolicy: IfNotPresent + imagePullSecrets: + - name: regcred + ## It is recommended to use Kubernetes secrets to store the admin credentials + ## To create a secret, run the following command in the same namespace as the CR: + ## kubectl create secret generic admincreds --from-literal=username=admin --from-literal=password=admin + ## If you do not provide the admin credentials, the operator will generate a secret for you containing admin credentials auth: - adminUsername: user - adminPassword: pass - # storage: - # size: 10Gi - terminationGracePeriodSeconds: 9 - updateStrategy: OnDelete + secretName: admincreds clusterDomain: cluster.local - priorityClassName: "system-node-critical" - # groupConfig: - # name: "node" - enableConverters: true - hugePages: + persistence: enabled: true - mountPath: /dev/hugepages - nodeSelector: - node-role.kubernetes.io/master: "true" - affinity: - podAntiAffinity: - preferredDuringSchedulingIgnoredDuringExecution: - - weight: 100 - podAffinityTerm: - labelSelector: - matchExpressions: - - key: app.kubernetes.io/name - operator: In - values: - - marklogic - topologyKey: kubernetes.io/hostname + size: 100Gi + storageClassName: "gp3" + accessModes: + - ReadWriteOnce + annotations: {} + resources: + requests: + memory: "64Gi" + cpu: "8" + hugespages2Mi: "24Gi" + limits: + memory: "64Gi" + cpu: "8" + hugespages2Mi: "24Gi" +## To configure networkPolicy, set enabled: true and uncomment the following lines +## Below is an example of networkPolicy, update it as per your requirements +## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies + # networkPolicy: + # enabled: true + # policyTypes: + # - Ingress + # - Egress + # podSelector: {} + # ingress: {} + # egress: + # - to: + # - podSelector: + # matchLabels: + # app.kubernetes.io/name: marklogiccluster + # app.kubernetes.io/instance: marklogiccluster-prod-sample + # ports: + # - protocol: TCP + # port: 8000 +## Configuration for the HAProxy load balancer +## An out of box load balancer configured to handle cookie based session affinity that's required by most MarkLogic applications. + haproxy: + enabled: true + pathBasedRouting: true + frontendPort: 8080 + tcpPorts: + enabled: true + ports: + - name: odbc + type: TCP + port: 5432 + appServers: + - name: "app-service" + port: 8000 + path: "/console" + - name: "admin" + port: 8001 + path: "/adminUI" + - name: "manage" + port: 8002 + path: "/manage" + stats: + enabled: true + port: 1024 + resources: + requests: + memory: "4Gi" + cpu: "1" + limits: + memory: "4Gi" + cpu: "1" + ## Configure Ingress + ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ingress: + enabled: false + ingressClassName: "alb" + ## Ingress labels + ## ref: https://kubernetes.io/docs/concepts/overvsiew/working-with-objects/labels/ + labels: + app.kubernetes.io/name: marklogiccluster + app.kubernetes.io/instance: marklogiccluster-sample + ## Ingress annotations + ## Update the annotations as per your requirements + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + annotations: + alb.ingress.kubernetes.io/healthcheck-port: '80' + alb.ingress.kubernetes.io/healthcheck-path: /adminUI + alb.ingress.kubernetes.io/success-codes: '200-401' + alb.ingress.kubernetes.io/load-balancer-name: mlingress + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}]' + alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests + alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:XXXXXXXXXXX:certificate/XxXXXXXX-xxxx-XXXX-XXXX-XXXXXXXxxxxXXX + alb.ingress.kubernetes.io/target-type: ip + alb.ingress.kubernetes.io/group.name: mlingress-group + alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600,routing.http.xff_header_processing.mode=append + # Ingress hosts + # add default hosts and additional hosts + # ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules + host: "" + additionalHosts: [] + ## Ingress TLS + ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls + tls: [] + # secretName: your-certificate-name + # hosts: + # - marklogic.example.com + terminationGracePeriodSeconds: 10 + updateStrategy: OnDelete + podSecurityContext: + fsGroup: 2 + fsGroupChangePolicy: OnRootMismatch + securityContext: + runAsUser: 1000 + runAsNonRoot: true + allowPrivilegeEscalation: false +## Node Affinity for pod-node scheduling constraints +## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + affinity: {} +## Configure NodeSelector property for scheduling pods to nodes +## ref: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#create-a-pod-that-gets-scheduled-to-your-chosen-node + nodeSelector: {} + # disktype: ssd +## Configure POD Topology Spread Constraints to spread pods across cluster +## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ +## Preferred Topology Spread Constraints rule to evenly distribute Marklogic pods across worker nodes and zones topologySpreadConstraints: - maxSkew: 1 topologyKey: kubernetes.io/hostname whenUnsatisfiable: DoNotSchedule labelSelector: matchLabels: - app.kubernetes.io/name: marklogic + app.kubernetes.io/name: marklogiccluster - maxSkew: 1 topologyKey: topology.kubernetes.io/zone whenUnsatisfiable: ScheduleAnyway labelSelector: matchLabels: - app.kubernetes.io/name: marklogic - resources: - requests: - memory: "4Gi" - cpu: "1" - # When using huge pages requests should equal limits - # refer to https://kubernetes.io/docs/tasks/manage-hugepages/scheduling-hugepages/ for more information on huge pages - # hugepages-2Mi: 100Mi - limits: - memory: "4Gi" - cpu: "1" - # hugepages-2Mi: 100Mi - livenessProbe: - enabled: true - initialDelaySeconds: 31 - periodSeconds: 11 - timeoutSeconds: 6 - successThreshold: 1 - failureThreshold: 4 - readinessProbe: - enabled: true - initialDelaySeconds: 29 - periodSeconds: 9 - timeoutSeconds: 4 - successThreshold: 1 - failureThreshold: 2 \ No newline at end of file + app.kubernetes.io/name: marklogiccluster +## Configure priority class for pods +## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ + priorityClassName: "" +## Supply license information for MarkLogic server + license: + key: "" + licensee: "" +## Optionally install converters package on MarkLogic + enableConverters: false +## Configure TLS for App Servers +## If certSecretNames is not provided, self-signed temporary certificate will be generated. + tls: + enableOnDefaultAppServers: false + certSecretNames: [] + caSecretName: "" +## Configure options for log collection +## Log collection will collect all logs for each file type enabled, parse them, +## And export them to a logging backend specified in the outputs section below + # logCollection: + # enabled: true + # image: fluent/fluent-bit:3.1.1 + # files: + # errorLogs: true + # accessLogs: true + # requestLogs: true + # crashLogs: true + # auditLogs: true + # outputs: |- + # [OUTPUT] + # name loki + # match * + # host loki.loki.svc.cluster.local + # port 3100 + # labels job=fluent-bit + # http_user admin + # http_passwd admin + # additionalVolumes: + # - name: "logsdir" + # emptyDir: {} + ## specify additional list of volumeMounts + # additionalVolumeMounts: + # - name: "logsdir" + # mountPath: "/var/opt/MarkLogic/Logs" + # additionalVolumeClaimTemplates: [] + markLogicGroups: + - name: dnode + replicas: 3 + groupConfig: + name: dnode + enableXdqpSsl: true + isBootstrap: true + image: "progressofficial/marklogic-db:11.3.0-ubi-rootless" + imagePullPolicy: IfNotPresent + imagePullSecrets: + - name: regcred # secret name to pull the image from private repository + persistence: + enabled: true + size: 100Gi + storageClassName: "gp3" + accessModes: + - ReadWriteOnce + annotations: {} + service: + type: ClusterIP + additionalPorts: + - name: app1 + port: 8010 + targetPort: 8010 + protocol: TCP + - name: app2 + port: 8011 + targetPort: 8011 + protocol: TCP + annotations: {} + resources: + requests: + memory: "64Gi" + cpu: "8" + hugespages2Mi: "24Gi" + limits: + memory: "64Gi" + cpu: "8" + hugespages2Mi: "24Gi" + ## Configure Affinity property for scheduling pods to nodes + ## ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity + affinity: {} + ## Configure POD Topology Spread Constraints to spread pods across cluster + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/topology-spread-constraints/ + ## Preferred Topology Spread Constraints rule to evenly distribute Marklogic pods across worker nodes and zones + topologySpreadConstraints: + - maxSkew: 1 + topologyKey: kubernetes.io/hostname + whenUnsatisfiable: DoNotSchedule + labelSelector: + matchLabels: {} + - maxSkew: 1 + topologyKey: topology.kubernetes.io/zone + whenUnsatisfiable: ScheduleAnyway + labelSelector: + matchLabels: {} + ## Configure NodeSelector property for scheduling pods to nodes + ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/assign-pods-nodes/#create-a-pod-that-gets-scheduled-to-your-chosen-node + nodeSelector: {} + # disktype: ssd + ## Configure priority class for pods + ## ref: https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/ + priorityClassName: "" + hugePages: + enabled: true + mountPath: /dev/hugepages + ## Configure options for log collection + ## Log collection will collect all logs for each file type enabled, parse them, + ## And export them to a logging backend specified in the outputs section below + # logCollection: + # enabled: true + # image: fluent/fluent-bit:3.1.1 + # files: + # errorLogs: true + # accessLogs: true + # requestLogs: true + # crashLogs: true + # auditLogs: true + # outputs: |- + # [OUTPUT] + # name loki + # match * + # host loki.loki.svc.cluster.local + # port 3100 + # labels job=fluent-bit + # http_user admin + # http_passwd admin + ## Configuration for the HAProxy on the group level. + ## haproxy.enabled to false to make the group exclude from the backend of haproxy + haproxy: + enabled: false + - name: enode + replicas: 3 + groupConfig: + name: enode + enableXdqpSsl: true + isBootstrap: false + resources: + requests: + memory: "8Gi" + cpu: "8" + hugespages2Mi: "24Gi" + limits: + memory: "8Gi" + cpu: "8" + hugespages2Mi: "24Gi" + hugePages: + enabled: true + mountPath: /dev/hugepages + service: + type: ClusterIP + additionalPorts: + - name: app1 + port: 8012 + targetPort: 8012 + protocol: TCP + annotations: {} \ No newline at end of file diff --git a/config/samples/minimal-production.yaml b/config/samples/minimal-production.yaml new file mode 100644 index 0000000..a1dc570 --- /dev/null +++ b/config/samples/minimal-production.yaml @@ -0,0 +1,207 @@ +apiVersion: database.marklogic.com/v1alpha1 +kind: MarklogicCluster +metadata: + labels: + app.kubernetes.io/name: marklogiccluster + app.kubernetes.io/instance: marklogiccluster-production + app.kubernetes.io/part-of: marklogic-operator-kubernetes + app.kubernetes.io/created-by: marklogic-operator-kubernetes + annotations: {} + name: ml-cluster + namespace: prod +spec: + image: "progressofficial/marklogic-db:11.3.1-ubi-rootless-2.1.1" + ## It is recommended to use Kubernetes secrets to store the admin credentials + ## To create a secret, run the following command in the same namespace as the CR: + ## kubectl create secret generic admincreds --from-literal=username=admin --from-literal=password=admin + ## If you do not provide the admin credentials, the operator will generate a secret for you containing admin credentials + auth: + secretName: admincreds + tls: + enableOnDefaultAppServers: true + ## To configure networkPolicy, set enabled: true and uncomment the following lines + ## Below is an example of networkPolicy, update it as per your requirements + ## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies + # networkPolicy: + # enabled: true + # policyTypes: + # - Ingress + # - Egress + # podSelector: {} + # ingress: {} + # egress: + # - to: + # - podSelector: + # matchLabels: + # app.kubernetes.io/name: marklogiccluster + # app.kubernetes.io/instance: marklogiccluster-prod-sample + # ports: + # - protocol: TCP + # port: 8000 + +## Configuration for the HAProxy load balancer +## An out of box load balancer configured to handle cookie based session affinity that's required by most MarkLogic applications. + haproxy: + enabled: true + pathBasedRouting: true + frontendPort: 8080 + tcpPorts: + enabled: false + ports: + - name: odbc + type: TCP + port: 5432 + appServers: + - name: "app-service" + port: 8000 + path: "/console" + - name: "admin" + port: 8001 + path: "/adminUI" + - name: "manage" + port: 8002 + path: "/manage" + stats: + enabled: true + port: 1024 + resources: + requests: + memory: "4Gi" + cpu: "1" + limits: + memory: "4Gi" + cpu: "1" + ## Configure Ingress + ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ + ingress: + enabled: true + ingressClassName: "alb" + + ## Ingress labels + ## ref: https://kubernetes.io/docs/concepts/overvsiew/working-with-objects/labels/ + labels: + app.kubernetes.io/name: marklogiccluster + app.kubernetes.io/instance: marklogiccluster-production + + ## Ingress annotations + ## Update the annotations as per your requirements + ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ + annotations: + alb.ingress.kubernetes.io/healthcheck-port: '80' + alb.ingress.kubernetes.io/healthcheck-path: /adminUI + alb.ingress.kubernetes.io/success-codes: '200-401' + alb.ingress.kubernetes.io/load-balancer-name: mlingress + alb.ingress.kubernetes.io/scheme: internet-facing + alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}]' + alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests + alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:XXXXXXXXXXX:certificate/XxXXXXXX-xxxx-XXXX-XXXX-XXXXXXXxxxxXXX + alb.ingress.kubernetes.io/target-type: ip + alb.ingress.kubernetes.io/group.name: mlingress-group + alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600,routing.http.xff_header_processing.mode=append + + # Ingress hosts + # add default hosts and additional hosts + # ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules + host: "myhost.example.com" + additionalHosts: [] + + ## Ingress TLS + ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls + tls: [] + # secretName: your-certificate-name + # hosts: + # - marklogic.example.com + +## Configure options for log collection +## Log collection will collect all logs for each file type enabled, parse them, +## And export them to a logging backend specified in the outputs section below + # logCollection: + # enabled: true + # image: fluent/fluent-bit:3.1.1 + # files: + # errorLogs: true + # accessLogs: true + # requestLogs: true + # crashLogs: true + # auditLogs: true + # outputs: |- + # [OUTPUT] + # name loki + # match * + # host loki.loki.svc.cluster.local + # port 3100 + # labels job=fluent-bit + # http_user admin + # http_passwd admin + # additionalVolumes: + # - name: "logsdir" + # emptyDir: {} + + ## specify additional list of volumeMounts + # additionalVolumeMounts: + # - name: "logsdir" + # mountPath: "/var/opt/MarkLogic/Logs" + + +## Below is an example of markLogicGroups: dnode and enode with sample production configurations, update it as per your requirements + markLogicGroups: + - name: dnode + replicas: 3 + groupConfig: + name: dnode + isBootstrap: true + haproxy: + enabled: false + persistence: + enabled: true + size: 100Gi + resources: + requests: + memory: "64Gi" + cpu: "8" + hugepages-2Mi: 24Gi + limits: + memory: "64Gi" + cpu: "8" + hugepages-2Mi: 24Gi + hugePages: + enabled: true + mountPath: /dev/hugepages + service: + type: ClusterIP + additionalPorts: + - name: app1 + port: 8010 + targetPort: 8010 + protocol: TCP + - name: app2 + port: 8011 + targetPort: 8011 + protocol: TCP + annotations: {} + - name: enode + replicas: 3 + haproxy: + enabled: true + groupConfig: + name: enode + resources: + requests: + memory: "64Gi" + cpu: "8" + hugepages-2Mi: 24Gi + limits: + memory: "64Gi" + cpu: "8" + hugepages-2Mi: 24Gi + hugePages: + enabled: true + mountPath: /dev/hugepages + service: + type: ClusterIP + additionalPorts: + - name: app1 + port: 8012 + targetPort: 8012 + protocol: TCP + annotations: {} diff --git a/config/samples/quick_start.yaml b/config/samples/quick-start.yaml similarity index 57% rename from config/samples/quick_start.yaml rename to config/samples/quick-start.yaml index 77bfd79..3d0e180 100644 --- a/config/samples/quick_start.yaml +++ b/config/samples/quick-start.yaml @@ -1,30 +1,27 @@ apiVersion: database.marklogic.com/v1alpha1 kind: MarklogicCluster metadata: + name: single-node labels: app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-sample + app.kubernetes.io/instance: marklogiccluster-quickstart app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/managed-by: kustomize app.kubernetes.io/created-by: marklogic-operator-kubernetes - name: single-node - namespace: dev-env + annotations: {} spec: image: "progressofficial/marklogic-db:11.3.0-ubi-rootless" ## It is recommended to use Kubernetes secrets to store the admin credentials - ## If you do not provide the secret with admin credentials, the operator will generate a secret for you containing admin credentials - # auth: - # secretName: marklogic-admin-secret - # adminUsername: admin - # adminPassword: admin + ## To create a secret, run the following command in the same namespace as the CR: + ## kubectl create secret generic admincreds --from-literal=username=admin --from-literal=password=admin + ## If you do not provide the admin credentials, the operator will generate a secret for you containing admin credentials + persistence: + enabled: true + size: 10Gi markLogicGroups: - replicas: 1 name: node groupConfig: name: node - enableXdqpSsl: true - storage: - size: 10Gi resources: requests: memory: "4Gi" @@ -32,6 +29,4 @@ spec: limits: memory: "4Gi" cpu: 2000m - isBootstrap: true - - \ No newline at end of file + isBootstrap: true \ No newline at end of file From edbce1710be57b2c3c69e05533df71f2c2442ea3 Mon Sep 17 00:00:00 2001 From: barkhachoithani Date: Wed, 19 Feb 2025 11:27:58 -0800 Subject: [PATCH 2/3] removing old manifests --- config/samples/kustomization.yaml | 5 +- config/samples/marklogiccluster.yaml | 220 ----------------------- config/samples/marklogicgroup.yaml | 89 --------- config/samples/marklogicgroup_dnode.yaml | 30 ---- config/samples/marklogicgroup_enode.yaml | 31 ---- 5 files changed, 3 insertions(+), 372 deletions(-) delete mode 100644 config/samples/marklogiccluster.yaml delete mode 100644 config/samples/marklogicgroup.yaml delete mode 100644 config/samples/marklogicgroup_dnode.yaml delete mode 100644 config/samples/marklogicgroup_enode.yaml diff --git a/config/samples/kustomization.yaml b/config/samples/kustomization.yaml index 639e53e..fc79bac 100644 --- a/config/samples/kustomization.yaml +++ b/config/samples/kustomization.yaml @@ -1,5 +1,6 @@ ## Append samples of your project ## resources: -- marklogiccluster.yaml -- marklogicgroup.yaml +- quick-start.yaml +- minimal-production.yaml +- complete.yaml #+kubebuilder:scaffold:manifestskustomizesamples diff --git a/config/samples/marklogiccluster.yaml b/config/samples/marklogiccluster.yaml deleted file mode 100644 index fa3bcc1..0000000 --- a/config/samples/marklogiccluster.yaml +++ /dev/null @@ -1,220 +0,0 @@ -apiVersion: database.marklogic.com/v1alpha1 -kind: MarklogicCluster -metadata: - labels: - app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-sample - app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: marklogic-operator-kubernetes - name: ml-cluster -spec: - image: "progressofficial/marklogic-db:11.3.0-ubi-rootless" - # auth: - # secretName: - # adminUsername: user - # adminPassword: pass -# This is the cluster level configuration that will apply to all the groups - # persistence: - # enabled: true - # # size: 10Gi - # annotations: {} - # accessModes: - # - ReadWriteOnce - - # additionalVolumeClaimTemplates: - # - metadata: - # name: "logsdir" - # annotations: {} - # spec: - # accessModes: - # - ReadWriteOnce - # resources: - # requests: - # storage: 10Gi - - # additionalVolumeMounts: - # - name: "logsdir" - # mountPath: "/var/opt/MarkLogic/Logs" - - ## Configuration for the HAProxy load balancer - ## An out of box load balancer with configured to handle cookie based session affinity that required by most MarkLogic applications. - ## It also support multi-statement transaction and ODBC connections. - ## Uncomment the following lines to enable HAProxy configuration - # haproxy: - # enabled: true - # pathBasedRouting: false - # frontendPort: 8080 - # tcpPorts: - # enabled: true - # ports: - # - name: odbc - # type: TCP - # port: 5432 - # appServers: - # - name: "app-service" - # port: 8000 - # path: "/console" - # - name: "admin" - # port: 8001 - # path: "/adminUI" - # - name: "manage" - # port: 8002 - # path: "/manage" - # stats: - # enabled: true - # port: 1024 - # resources: - # requests: - # memory: "4Gi" - # cpu: "1" - # limits: - # memory: "4Gi" - # cpu: "1" - # # Configure Ingress - # # ref: https://kubernetes.io/docs/concepts/services-networking/ingress/ - # ingress: - # enabled: true - # ingressClassName: "alb" - - # ## Ingress labels - # ## ref: https://kubernetes.io/docs/concepts/overvsiew/working-with-objects/labels/ - # labels: - # app.kubernetes.io/name: marklogiccluster - # app.kubernetes.io/instance: marklogiccluster-sample - - # ## Ingress annotations - # ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ - # annotations: - # alb.ingress.kubernetes.io/healthcheck-port: '80' - # alb.ingress.kubernetes.io/healthcheck-path: /adminUI - # alb.ingress.kubernetes.io/success-codes: '200-401' - # alb.ingress.kubernetes.io/load-balancer-name: mlingress - # alb.ingress.kubernetes.io/scheme: internet-facing - # alb.ingress.kubernetes.io/listen-ports: '[{"HTTP":80}]' - # alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests - # # alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:XXXXXXXXXXX:certificate/XxXXXXXX-xxxx-XXXX-XXXX-XXXXXXXxxxxXXX - # alb.ingress.kubernetes.io/target-type: ip - # alb.ingress.kubernetes.io/group.name: mlingress-group - # alb.ingress.kubernetes.io/load-balancer-attributes: idle_timeout.timeout_seconds=600,routing.http.xff_header_processing.mode=append - - # # Ingress hosts - # # add default hosts and additional hosts - # # ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-rules - # host: "" - # additionalHosts: [] - - # ## Ingress TLS - # ## ref: https://kubernetes.io/docs/concepts/services-networking/ingress/#tls - # tls: - # secretName: your-certificate-name - # hosts: - # - marklogic.example.com - - # logCollection: - # enabled: true - # image: fluent/fluent-bit:3.2.5 - # files: - # errorLogs: true - # accessLogs: true - # requestLogs: true - # crashLogs: true - # auditLogs: true - # outputs: |- - # [OUTPUT] - # name loki - # match * - # host loki.loki.svc.cluster.local - # port 3100 - # labels job=fluent-bit - # http_user admin - # http_passwd admin - - ## To configure networkPolicy, set enabled: true and uncomment the following lines - ## Below is an example of networkPolicy, update it as per your requirements - ## ref: https://kubernetes.io/docs/concepts/services-networking/network-policies - # networkPolicy: - # enabled: true - # policyTypes: - # - Ingress - # - Egress - # podSelector: {} - # ingress: - # - from: - # - podSelector: - # matchLabels: - # app.kubernetes.io/name: marklogic - # app.kubernetes.io/instance: marklogic - # ports: - # - protocol: TCP - # port: 8000 - # egress: - # - to: - # - podSelector: - # matchLabels: - # app.kubernetes.io/name: marklogic - # app.kubernetes.io/instance: marklogicgroup - # ports: - # - protocol: TCP - # port: 8000 - tls: - enableOnDefaultAppServers: false - # additionalVolumes: - # - name: "logsdir" - # emptyDir: {} - - ## specify additional list of volumeMounts - # additionalVolumeMounts: - # - name: "logsdir" - # mountPath: "/var/opt/MarkLogic/Logs" - - markLogicGroups: - - replicas: 1 - name: dnode - groupConfig: - name: dnode - enableXdqpSsl: true - # service: - # ## service type could be ClusterIP, NodePort or LoadBalancer, default is ClusterIP - # type: ClusterIP - # # Uncomment the following lines to add additional ports to the service - # additionalPorts: - # - name: app1 - # port: 8010 - # targetPort: 8010 - # protocol: TCP - # - name: app2 - # port: 8011 - # targetPort: 8011 - # protocol: TCP - # # Uncomment the following lines to add annotations to the service - # annotations: {} - # storage: - # size: 10Gi - # resources: - # requests: - # memory: "5Gi" - # cpu: "1" - # limits: - # memory: "5Gi" - # cpu: "1" - isBootstrap: true - - replicas: 1 - haproxy: - enabled: false - name: enode - groupConfig: - name: enode - enableXdqpSsl: true - isBootstrap: false - # service: - # ## service type could be ClusterIP, NodePort or LoadBalancer, default is ClusterIP - # type: ClusterIP - # # Uncomment the following lines to add additional ports to the service - # additionalPorts: - # - name: app1 - # port: 8010 - # targetPort: 8010 - # protocol: TCP - # # Uncomment the following lines to add annotations to the service - # annotations: {} diff --git a/config/samples/marklogicgroup.yaml b/config/samples/marklogicgroup.yaml deleted file mode 100644 index 8abd281..0000000 --- a/config/samples/marklogicgroup.yaml +++ /dev/null @@ -1,89 +0,0 @@ -apiVersion: database.marklogic.com/v1alpha1 -kind: MarklogicGroup -metadata: - labels: - app.kubernetes.io/name: marklogicgroup - app.kubernetes.io/instance: marklogicgroup-sample - app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: marklogic-operator-kubernetes - name: marklogicgroup-sample -spec: - replicas: 1 - name: marklogic - image: "progressofficial/marklogic-db:11.3.0-ubi-rootless" - ## Configure the imagePullSecrets to pull the image from private repository that requires credential - # imagePullSecrets: [] - auth: - adminUsername: user - adminPassword: pass - # storage: - # size: 10Gi - terminationGracePeriodSeconds: 9 - updateStrategy: OnDelete - # groupConfig: - # name: "node" - # service: - # ## service type could be ClusterIP, NodePort or LoadBalancer, default is ClusterIP - # type: ClusterIP - ## Uncomment the following lines to add additional ports to the service - # additionalPorts: - # - name: app1 - # port: 8010 - # targetPort: 8010 - # protocol: TCP - ## Uncomment the following lines to add annotations to the service - # annotations: {} - -## Uncomment the following lines to specify the podSecurityContext and containerSecurityContext -## Note: Below values are set to default, please update them as per your requirements - # podSecurityContext: - # fsGroup: 2 - # fsGroupChangePolicy: OnRootMismatch - # securityContext: - # runAsUser: 1000 - # runAsNonRoot: true - # allowPrivilegeEscalation: false - - logCollection: - enabled: true - ## Configure the imagePullSecrets to pull the image from private repository that requires credential - # imagePullSecrets: [] - image: fluent/fluent-bit:3.2.5 - files: - errorLogs: true - accessLogs: true - requestLogs: true - crashLogs: true - auditLogs: true - outputs: |- - [OUTPUT] - name loki - match * - host loki.loki.svc.cluster.local - port 3100 - labels job=fluent-bit - http_user admin - http_passwd admin - - # resources: - # requests: - # memory: "6Gi" - # cpu: "2" - # limits: - # memory: "6Gi" - # cpu: "2" - # livenessProbe: - # enabled: true - # initialDelaySeconds: 31 - # periodSeconds: 11 - # timeoutSeconds: 6 - # successThreshold: 1 - # failureThreshold: 4 - # readinessProbe: - # enabled: true - # initialDelaySeconds: 29 - # periodSeconds: 9 - # timeoutSeconds: 4 - # successThreshold: 1 - # failureThreshold: 2 \ No newline at end of file diff --git a/config/samples/marklogicgroup_dnode.yaml b/config/samples/marklogicgroup_dnode.yaml deleted file mode 100644 index 8b15606..0000000 --- a/config/samples/marklogicgroup_dnode.yaml +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: operator.marklogic.com/v1alpha1 -kind: MarklogicGroup -metadata: - labels: - app.kubernetes.io/name: marklogicgroup - app.kubernetes.io/instance: marklogicgroup-sample - app.kubernetes.io/part-of: kubernetes-poc-artifacts - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: kubernetes-poc-artifacts - name: marklogic-dnode -spec: - replicas: 1 - name: dnode - image: "marklogicdb/marklogic-db:11.1.0-centos-1.1.1" - ## Configure the imagePullSecrets to pull the image from private repository that requires credential - # imagePullSecrets: [] - # storage: - # size: 10Gi - terminationGracePeriodSeconds: 9 - updateStrategy: OnDelete - license: - key: "3981-CE27-75BB-9D3C-B81C-E067-1B39-DDFE-0875-C37E-D3F0-A76C-34E5-2F86-76BB-ADDD-E677-CB3F-D5FE-4773-C3CD-5EE8-87BC-36E5-3F71-0C15" - licensee: "MarkLogic - Version 9 QA Test License" - resources: - requests: - memory: "6Gi" - cpu: "2" - limits: - memory: "6Gi" - cpu: "2" \ No newline at end of file diff --git a/config/samples/marklogicgroup_enode.yaml b/config/samples/marklogicgroup_enode.yaml deleted file mode 100644 index 711e5d1..0000000 --- a/config/samples/marklogicgroup_enode.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: operator.marklogic.com/v1alpha1 -kind: MarklogicGroup -metadata: - labels: - app.kubernetes.io/name: marklogicgroup - app.kubernetes.io/instance: marklogicgroup-sample - app.kubernetes.io/part-of: kubernetes-poc-artifacts - app.kubernetes.io/managed-by: kustomize - app.kubernetes.io/created-by: kubernetes-poc-artifacts - name: marklogic-enode -spec: - replicas: 1 - name: enode - bootstrapHost: "dnode-0.dnode.default.svc.cluster.local" - image: "marklogicdb/marklogic-db:11.1.0-centos-1.1.1" - ## Configure the imagePullSecrets to pull the image from private repository that requires credential - # imagePullSecrets: [] - # storage: - # size: 10Gi - terminationGracePeriodSeconds: 9 - updateStrategy: OnDelete - license: - key: "3981-CE27-75BB-9D3C-B81C-E067-1B39-DDFE-0875-C37E-D3F0-A76C-34E5-2F86-76BB-ADDD-E677-CB3F-D5FE-4773-C3CD-5EE8-87BC-36E5-3F71-0C15" - licensee: "MarkLogic - Version 9 QA Test License" - resources: - requests: - memory: "6Gi" - cpu: "2" - limits: - memory: "6Gi" - cpu: "2" \ No newline at end of file From 716ecaf9c9ff40a17cb132d17c887a0ba585c6e2 Mon Sep 17 00:00:00 2001 From: barkhachoithani Date: Wed, 19 Feb 2025 12:37:32 -0800 Subject: [PATCH 3/3] removed labels from sample manifests --- config/samples/complete.yaml | 9 +-------- config/samples/minimal-production.yaml | 10 +--------- config/samples/quick-start.yaml | 5 ----- 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/config/samples/complete.yaml b/config/samples/complete.yaml index 2340572..14e4ae7 100644 --- a/config/samples/complete.yaml +++ b/config/samples/complete.yaml @@ -3,11 +3,6 @@ kind: MarklogicCluster metadata: name: ml-cluster namespace: prod - labels: - app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-complete - app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/created-by: marklogic-operator-kubernetes annotations: {} spec: image: "progressofficial/marklogic-db:11.3.1-ubi-rootless-2.1.1" @@ -95,9 +90,7 @@ spec: ingressClassName: "alb" ## Ingress labels ## ref: https://kubernetes.io/docs/concepts/overvsiew/working-with-objects/labels/ - labels: - app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-sample + labels: {} ## Ingress annotations ## Update the annotations as per your requirements ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ diff --git a/config/samples/minimal-production.yaml b/config/samples/minimal-production.yaml index a1dc570..ac4606e 100644 --- a/config/samples/minimal-production.yaml +++ b/config/samples/minimal-production.yaml @@ -1,11 +1,6 @@ apiVersion: database.marklogic.com/v1alpha1 kind: MarklogicCluster metadata: - labels: - app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-production - app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/created-by: marklogic-operator-kubernetes annotations: {} name: ml-cluster namespace: prod @@ -79,10 +74,7 @@ spec: ## Ingress labels ## ref: https://kubernetes.io/docs/concepts/overvsiew/working-with-objects/labels/ - labels: - app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-production - + labels: {} ## Ingress annotations ## Update the annotations as per your requirements ## ref: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ diff --git a/config/samples/quick-start.yaml b/config/samples/quick-start.yaml index 3d0e180..d437b8e 100644 --- a/config/samples/quick-start.yaml +++ b/config/samples/quick-start.yaml @@ -2,11 +2,6 @@ apiVersion: database.marklogic.com/v1alpha1 kind: MarklogicCluster metadata: name: single-node - labels: - app.kubernetes.io/name: marklogiccluster - app.kubernetes.io/instance: marklogiccluster-quickstart - app.kubernetes.io/part-of: marklogic-operator-kubernetes - app.kubernetes.io/created-by: marklogic-operator-kubernetes annotations: {} spec: image: "progressofficial/marklogic-db:11.3.0-ubi-rootless"