-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes Operator for Nessie #7967
base: main
Are you sure you want to change the base?
Conversation
c528161
to
d6d439d
Compare
operator/src/main/java/org/projectnessie/operator/resource/NessieSpec.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieImage.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieImage.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieImage.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieSpec.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/Nessie.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieAwsSecret.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieAuthentication.java
Outdated
Show resolved
Hide resolved
bd00481
to
02e994a
Compare
.../main/java/org/projectnessie/operator/dependent/HorizontalPodAutoscalerV2Beta1Dependent.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/helper/EventsHelper.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieVersionStore.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieAwsCredentials.java
Outdated
Show resolved
Hide resolved
operator/src/main/java/org/projectnessie/operator/resource/NessieImage.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really reviewing yet - just adding comments "randomly".
de7990f
to
68051e7
Compare
4a2d6f7
to
544c574
Compare
0c8f675
to
6d5185a
Compare
4f472c3
to
50869d6
Compare
Note about the helm chart, I feel we (devops) want to use operators if we can but want to do it using regular helm charts. There are a lot of operators support installation + configuration using helm chart. |
50869d6
to
3432a15
Compare
@dorsegal our plan is to distribute the operator using Helm charts initially. Operator Hub would be the ultimate goal, but that requires a lot more work. |
intTestImplementation(project(":nessie-keycloak-testcontainer")) | ||
intTestImplementation(project(":nessie-container-spec-helper")) | ||
|
||
intTestCompileOnly(libs.microprofile.openapi) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intTestCompileOnly(libs.microprofile.openapi) | |
intTestCompileOnly(libs.microprofile.openapi) | |
intTestCompileOnly(libs.immutables.value.annotations) |
# Version is managed by Renovate - do not edit. | ||
# See https://cloud.google.com/sdk/docs/downloads-docker#docker_image_options | ||
# Use debian_component_based because it supports linux/arm | ||
FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:483.0.0-debian_component_based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:483.0.0-debian_component_based | |
FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:484.0.0-debian_component_based |
@@ -0,0 +1,3 @@ | |||
# Dockerfile to provide the image name and tag to a test. | |||
# Version is managed by Renovate - do not edit. | |||
FROM rancher/k3s:v1.30.2-k3s2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM rancher/k3s:v1.30.2-k3s2 | |
FROM docker.io/rancher/k3s:v1.30.2-k3s2 |
@@ -0,0 +1,3 @@ | |||
# Dockerfile to provide the image name and tag to a test. | |||
# Version is managed by Renovate - do not edit. | |||
FROM mongo:7.0.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM mongo:7.0.12 | |
FROM docker.io/mongo:7.0.12 |
@@ -0,0 +1,3 @@ | |||
# Dockerfile to provide the image name and tag to a test. | |||
# Version is managed by Renovate - do not edit. | |||
FROM postgres:16.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM postgres:16.3 | |
FROM docker.io/postgres:16.3 |
.github/workflows/ci.yml
Outdated
@@ -446,6 +456,61 @@ jobs: | |||
job-name: 'int-test-quarkus' | |||
java-version: ${{ matrix.java-version }} | |||
|
|||
int-test-operator: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a heads-up - when it's merged.
import org.projectnessie.operator.reconciler.nessie.resource.options.AutoscalingOptions; | ||
|
||
@KubernetesDependent(labelSelector = NessieReconciler.DEPENDENT_RESOURCES_SELECTOR) | ||
public class HorizontalPodAutoscalerV2Beta1Dependent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷
...ator/src/intTest/java/org/projectnessie/operator/testinfra/K3sContainerLifecycleManager.java
Show resolved
Hide resolved
3432a15
to
170f350
Compare
container = createContainer(); | ||
container | ||
.withNetwork(Network.SHARED) | ||
.withLogConsumer(new Slf4jLogConsumer(logger)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.withLogConsumer(new Slf4jLogConsumer(logger)) | |
.withLogConsumer(new Slf4jLogConsumer(logger).withPrefix(container.getDockerImageName())) |
170f350
to
b724582
Compare
implements QuarkusTestResourceLifecycleManager { | ||
|
||
protected C container; | ||
protected String inDockerIpAddress; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
protected String inDockerIpAddress; | |
private String inDockerIpAddress; | |
protected String inDockerIpAddress() { | |
if (inDockerIpAddress == null) { | |
inDockerIpAddress = getInDockerIpAddress(); | |
} | |
return inDockerIpAddress; | |
} | |
inDockerIpAddress = | ||
Objects.requireNonNull( | ||
getInDockerIpAddress(), "could not determine container's in-docker IP address"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inDockerIpAddress = | |
Objects.requireNonNull( | |
getInDockerIpAddress(), "could not determine container's in-docker IP address"); |
|
||
@Override | ||
public Map<String, String> start() { | ||
Logger logger = LoggerFactory.getLogger(getClass()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger logger = LoggerFactory.getLogger(getClass()); | |
inDockerIpAddress = null; | |
Logger logger = LoggerFactory.getLogger(getClass()); |
Still can't get the integration tests to work. K3s doesn't work properly in rootless. There seem to be some ways to get that working - but currently hitting this error from k3s.
|
Yeah I'm not sure running a Kubernetes cluster inside a rootless container is even possible. |
b724582
to
35e7213
Compare
// Mitigate eviction issues in CI by setting eviction thresholds for nodefs very low | ||
commandParts.add("--kubelet-arg=eviction-hard=nodefs.available<1%,nodefs.inodesFree<1%"); | ||
// Enable rootless containers | ||
commandParts.add("--kubelet-arg=feature-gates=KubeletInUserNamespace=true"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commandParts.add("--kubelet-arg=feature-gates=KubeletInUserNamespace=true"); | |
commandParts.add("--kubelet-arg=feature-gates=KubeletInUserNamespace=true"); | |
commandParts.add("--rootless"); | |
commandParts.add("--snapshotter=fuse-overlayfs"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
K3s refuses to start for me:
2024-07-22 10:21:14 time="2024-07-22T08:21:14Z" level=warning msg="Running RootlessKit as the root user is unsupported."
2024-07-22 10:21:14 time="2024-07-22T08:21:14Z" level=warning msg="The host root filesystem is mounted as \"master:34\". Setting child propagation to \"\" is not supported."
2024-07-22 10:21:14 time="2024-07-22T08:21:14Z" level=fatal msg="failed to setup UID/GID map: failed to compute uid/gid map: open /etc/subuid: no such file or directory"
35e7213
to
99edd79
Compare
99edd79
to
934c2ce
Compare
Do you plan to have GC implemented as part of the operator? I think it can be useful to have CRD for it |
See here: #9415 So it's planned yes, but no ETA at the moment due to lack of interest from the community. |
No description provided.