Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e5862ab
Merge pull request #34 from marklogic/main
pengzhouml Sep 27, 2024
548509c
MLE-11585 Version Check of Pathbased Routing (#35)
pengzhouml Oct 10, 2024
329fe71
MLE-11469 Enable TLS Configuration on Default App Servers (#38)
pengzhouml Oct 24, 2024
8b51be4
MLE-11468: Implementation and unit test for Ingress (#36)
barkhachoithani Oct 31, 2024
eb91fef
MKE-17358 E2E tests MakeFile and Infrastructure setup (#39)
pengzhouml Oct 31, 2024
79fc108
MLE-17882: Bugfix for group not being created correctly in Marklolgic…
pengzhouml Nov 15, 2024
bda8d9a
MLE-15924 Setup E2E test in Jenkins using Minikube (#42)
pengzhouml Nov 19, 2024
d4254c9
multigroup e2e test (#41)
barkhachoithani Nov 22, 2024
4706e50
MLE-17366: K8s Operator: E2E test to verify MarkLogic Cluster with hu…
barkhachoithani Dec 4, 2024
cad97fd
MLE-17367 E2E Test for TLS (#45)
pengzhouml Dec 13, 2024
74d049c
MLE-17368: K8s Operator: E2E test to verify Logging with a backend(Lo…
barkhachoithani Dec 17, 2024
c2d5e25
fixed alignement for ingress and additional fixes for ingress (#46)
barkhachoithani Dec 20, 2024
a375ef4
MLE-18387 Bug Fix for HAProxy only created in default namespace (#47)
pengzhouml Jan 7, 2025
b0e0ed8
MLE 17365 Test for HAProxy (#48)
pengzhouml Jan 21, 2025
bc568b5
MLE-19122: Bug Fix for App Servers App Services is not created on new…
pengzhouml Jan 23, 2025
7c86bde
MLE-19483: Add Additional Volumes and additional VolumeMounts (#52)
pengzhouml Jan 27, 2025
743bfdb
MLE-19690 Update go lib version to fix security vulnerabilities (#54)
pengzhouml Feb 5, 2025
3034425
MLE-17883: Verify/Validate Group name in the CRD sample and do not al…
pengzhouml Feb 6, 2025
d295d84
Bugfix MLE-19691 StorageClass when leave empty not pointing to defaul…
pengzhouml Feb 6, 2025
bd12204
MLE-17936: added value to specify imagePullSecrets (#49)
barkhachoithani Feb 6, 2025
09015c9
MLE-19767: impl for additional ports support (#55)
barkhachoithani Feb 7, 2025
b5ed9b9
mle-19593 upgrade image version for few security vulnerabilities (#56)
pengzhouml Feb 7, 2025
62fa922
MLE-19811 pathbased Routing bug fix (#57)
pengzhouml Feb 7, 2025
df2958c
MLE-19786 Fix Bug for HAProxy Service port is not updated for non pat…
pengzhouml Feb 7, 2025
d79fea2
MLE-19593 upgrade version of golang and haproxy image to fix security…
pengzhouml Feb 12, 2025
980b110
MLE-19843 Allow Using existing secret for MarkLogic Admin Credentials…
pengzhouml Feb 13, 2025
5bb83a5
change persistence API
Feb 14, 2025
563b6a7
MLE-19888: Allow multiple Persistence Volume and change the current S…
Feb 14, 2025
d635892
Merge pull request #62 from marklogic/features/MLE-19888-storage
rwinieski Feb 17, 2025
bdc4265
MLE-19813 Add Labels and Annotation to all the Object Created by Oper…
Feb 17, 2025
6043316
MLE-19900: fix to update k8 objs name in helm chart (#63)
barkhachoithani Feb 17, 2025
0b3aa63
Merge pull request #64 from marklogic/features/MLE-19813-custom-metadata
rwinieski Feb 18, 2025
fba05e9
MLE-19770: README updates for GA release (#60)
barkhachoithani Feb 18, 2025
5a5e2a8
MLE-19877 Set the Image Tag to 1.0.0 for GA Release (#65)
pengzhouml Feb 18, 2025
e3e845d
MLE-19933 Add Missing CRD Validation and NOTICE File (#66)
pengzhouml Feb 18, 2025
886573d
MLE-19889: rename repo and project to marklogic-operator-kubernetes (…
pengzhouml Feb 19, 2025
8018e2e
MLE-19990: StorageClassName Not Applied in Persistence Configuration …
pengzhouml Feb 19, 2025
91cb559
MLE-19883: Updating sample manifests (#69)
barkhachoithani Feb 19, 2025
a6fba1b
readme updates for GA (#70)
barkhachoithani Feb 20, 2025
5df6cef
MLE-16542 Update Github action and Helm Chart name for GA release (#71)
pengzhouml Feb 20, 2025
02c524f
MLE-20079 update API version to v1 (#72)
pengzhouml Feb 27, 2025
f01afb5
MLE-20079: update API version (#73)
pengzhouml Feb 27, 2025
5c73c1f
MLE-20108: remove trailing % in the instruction on getting credential…
pengzhouml Feb 28, 2025
815102b
MLE-20120: CRD Validation for update name (#75)
pengzhouml Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 7 additions & 37 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Release Charts

concurrency: release-helm

on:
push:
branches:
- main

jobs:
release:
permissions:
Expand All @@ -16,41 +12,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
path: 'src'
ref: 'main'
fetch-depth: 0

- name: Checkout
uses: actions/checkout@v3
with:
path: 'dest'
ref: 'gh-pages'
fetch-depth: 0

- name: Configure Git
run: |
cd dest
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v4

- name: Package Helm Charts
shell: bash
run: |
find src/charts/ -type f -name 'Chart.yaml' | sed -r 's|/[^/]+$||' | sort | uniq | xargs -L 1 helm dep up
for d in src/charts/*/ ; do
echo "$d"
helm package "$d" -u -d dest
done
- name: Push New Files
shell: bash
working-directory: dest
run: |
helm repo index . --url https://raw.githubusercontent.com/marklogic/marklogic-kubernetes-operator/gh-pages/
git add $(git ls-files -o --exclude-standard)
git add index.yaml
git commit -m "Updated from ref: $GITHUB_SHA"
git push
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.7.0
with:
charts_dir: 'charts'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing to MarkLogic-kubernetes-operator
# Contributing to marklogic-operator-kubernetes

Thank you for your interest in contributing to this project! We welcome contributions from the community to make this project better.

Expand Down Expand Up @@ -38,4 +38,4 @@ The MarkLogic kubernetes operator team will use the PRs for "inspiration" but no

**Important:** Please open an issue in the [Issue Tracker][] and get your proposed changes pre-approved by at least one of the project maintainers before you start coding. Nothing is more frustrating than seeing your hard work go to waste because your vision does not align with that of the project maintainers.

[Issue Tracker]: https://github.com/marklogic/marklogic-kubernetes-operator/issues
[Issue Tracker]: https://github.com/marklogic/marklogic-operator-kubernetes/issues
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.22 AS builder
FROM golang:1.23.6 AS builder
ARG TARGETOS
ARG TARGETARCH

Expand Down
31 changes: 28 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,22 @@ void runTests() {
sh "make test"
}

void runMinikubeSetup() {
sh '''
make e2e-setup-minikube
'''
}

void runE2eTests() {
//TODO: this is just a place holder as kuttl needs a proper environment
sh "echo make e2e-tests dockerImage=${params.dockerImage}"
sh '''
make e2e-test
'''
}

void runMinikubeCleanup() {
sh '''
make e2e-cleanup-minikube
'''
}

pipeline {
Expand Down Expand Up @@ -165,11 +178,23 @@ pipeline {
}
}

stage('Run-e2e-tests') {
stage('Run-Minikube-Setup') {
steps {
runMinikubeSetup()
}
}

stage('Run-e2e-Tests') {
steps {
runE2eTests()
}
}

stage('Cleanup Environment') {
steps {
runMinikubeCleanup()
}
}

}

Expand Down
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Copyright © 2024-2025 MarkLogic Corporation.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down
79 changes: 63 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,20 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 0.0.1
VERSION ?= 1.0.0

# VERIFY_HUGE_PAGES defines if hugepages test is enabled or not for e2e test
VERIFY_HUGE_PAGES ?= false

export E2E_DOCKER_IMAGE ?= $(IMG)
export E2E_KUSTOMIZE_VERSION ?= $(KUSTOMIZE_VERSION)
export E2E_CONTROLLER_TOOLS_VERSION ?= $(CONTROLLER_TOOLS_VERSION)
export E2E_MARKLOGIC_IMAGE_VERSION ?= progressofficial/marklogic-db:11.3.1-ubi-rootless-2.1.0
export E2E_KUBERNETES_VERSION ?= v1.31.0

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.31.0


# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand All @@ -28,8 +41,8 @@ BUNDLE_METADATA_OPTS ?= $(BUNDLE_CHANNELS) $(BUNDLE_DEFAULT_CHANNEL)
# This variable is used to construct full image tags for bundle and catalog images.
#
# For example, running 'make bundle-build bundle-push catalog-build catalog-push' will build and push both
# marklogic.com/marklogic-kubernetes-operator-bundle:$VERSION and marklogic.com/marklogic-kubernetes-operator-catalog:$VERSION.
IMAGE_TAG_BASE ?= ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/ml-marklogic-operator-dev/marklogic-kubernetes-operator
# marklogic.com/marklogic-operator-kubernetes-bundle:$VERSION and marklogic.com/marklogic-operator-kubernetes-catalog:$VERSION.
IMAGE_TAG_BASE ?= ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/ml-marklogic-operator-dev/marklogic-operator-kubernetes

# BUNDLE_IMG defines the image:tag used for the bundle.
# You can use it as an arg. (E.g make bundle-build BUNDLE_IMG=<some-registry>/<project-name-bundle>:<tag>)
Expand All @@ -51,9 +64,9 @@ endif
OPERATOR_SDK_VERSION ?= v1.34.2

# Image URL to use all building/pushing image targets
IMG ?= ml-marklogic-operator-dev.bed-artifactory.bedford.progress.com/marklogic-kubernetes-operator:1.0.0-ea2
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.28.3
# Image for dev: ml-marklogic-operator-dev.bed-artifactory.bedford.progress.com/marklogic-operator-kubernetes
IMG ?= progressofficial/marklogic-operator-kubernetes:$(VERSION)


# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
Expand Down Expand Up @@ -97,7 +110,7 @@ help: ## Display this help.

.PHONY: manifests
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
$(CONTROLLER_GEN) rbac:roleName=manager-role crd:generateEmbeddedObjectMeta=true webhook paths="./..." output:crd:artifacts:config=config/crd/bases

.PHONY: generate
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
Expand All @@ -115,10 +128,44 @@ vet: ## Run go vet against code.
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -v $$(go list ./... | grep -v /e2e) -coverprofile cover.out

# Utilize Kind or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
.PHONY: e2e-test # Run the e2e tests against a Kind k8s instance that is spun up.
e2e-test:
go test -v ./test/e2e
# Utilize minikube or modify the e2e tests to load the image locally, enabling compatibility with other vendors.
# To run specific e2e test with label, try go test -v ./test/e2e -count=1 -args --labels="type=tls-multi-node"
.PHONY: e2e-test # Run the e2e tests against a minikube k8s instance that is spun up.
e2e-test:
@echo "=====Check Huges pages test is enabled or not for e2e test"
ifeq ($(VERIFY_HUGE_PAGES), true)
@echo "=====Setting hugepages value to 1280 for hugepages-e2e test"
sudo sysctl -w vm.nr_hugepages=1280

@echo "=====Restart minikube cluster to apply hugepages value"
minikube stop
minikube start

@echo "=====Running e2e test including hugepages test"
go test -v -count=1 -timeout 30m ./test/e2e -verifyHugePages

@echo "=====Resetting hugepages value to 0"
sudo sysctl -w vm.nr_hugepages=0

@echo "=====Restart minikube cluster"
minikube stop
minikube start
else
@echo "=====Running e2e test without hugepages test"
go test -v -count=1 -timeout 30m ./test/e2e
endif

.PHONY: e2e-setup-minikube
e2e-setup-minikube: kustomize controller-gen build docker-build
minikube delete || true
minikube start --driver=docker --kubernetes-version=$(E2E_KUBERNETES_VERSION) --memory=8192 --cpus=2
minikube addons enable ingress
minikube image load $(IMG)

.PHONY: e2e-cleanup-minikube
e2e-cleanup-minikube:
@echo "=====Delete minikube cluster"
minikube delete

GOLANGCI_LINT = $(shell pwd)/bin/golangci-lint
GOLANGCI_LINT_VERSION ?= v1.54.2
Expand Down Expand Up @@ -151,8 +198,8 @@ run: manifests generate fmt vet ## Run a controller from your host.
# (i.e. docker build --platform linux/arm64). However, you must enable docker buildKit for it.
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
.PHONY: docker-build
docker-build: ## Build docker image with the manager.
$(CONTAINER_TOOL) build --platform="linux/amd64" -t ${IMG} .
docker-build: ## Build docker image with the manager. to build for linux, add --platform="linux/amd64"
$(CONTAINER_TOOL) buildx build -t ${IMG} .

.PHONY: docker-push
docker-push: ## Push docker image with the manager.
Expand Down Expand Up @@ -212,8 +259,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
ENVTEST ?= $(LOCALBIN)/setup-envtest

## Tool Versions
KUSTOMIZE_VERSION ?= v5.2.1
CONTROLLER_TOOLS_VERSION ?= v0.14.0
KUSTOMIZE_VERSION ?= v5.5.0
CONTROLLER_TOOLS_VERSION ?= v0.17.1

.PHONY: kustomize
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.
Expand Down Expand Up @@ -316,7 +363,7 @@ $(HELMIFY): $(LOCALBIN)
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@latest

helm: manifests kustomize helmify
$(KUSTOMIZE) build config/default | $(HELMIFY) charts/marklogic-operator
$(KUSTOMIZE) build config/default | $(HELMIFY) -image-pull-secrets -original-name charts/marklogic-operator-kubernetes

.PHONY: image-scan
image-scan: docker-build
Expand Down
Loading