forked from opendatahub-io/notebooks
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #448 from atheo89/sync-k-main
Sync rhoai:main from odh:main
- Loading branch information
Showing
128 changed files
with
14,624 additions
and
13,851 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"cniVersion": "1.0.0", | ||
"name": "crio", | ||
"plugins": [ | ||
{ | ||
"type": "bridge", | ||
"bridge": "cni0", | ||
"isGateway": true, | ||
"ipMasq": true, | ||
"hairpinMode": true, | ||
"ipam": { | ||
"type": "host-local", | ||
"routes": [ | ||
{ "dst": "0.0.0.0/0" } | ||
], | ||
"ranges": [ | ||
[{ "subnet": "10.85.0.0/16" }] | ||
] | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# https://github.com/cri-o/cri-o/blob/main/docs/crio.conf.5.md | ||
|
||
[crio] | ||
storage_driver = "overlay" | ||
# storage_option = [ "overlay.mountopt=nodev,metacopy=on" ] | ||
|
||
# reuse podman's container storage because we have huge images that don't fit on disk twice | ||
root = "/home/runner/.local/share/containers/storage" | ||
# has to be the same as root! | ||
runroot = "/home/runner/.local/share/containers/storage" | ||
|
||
# https://stackoverflow.com/questions/62408028/kubelet-failed-to-createpodsandbox-for-coredns-failed-to-set-bridge-addr-c | ||
[crio.network] | ||
# the /etc/cni/net.d/11-crio-ipv4-bridge.conflist default IPs confilct with flannel, | ||
# older versions of kubernetes the kubelet was touching the cni, now only the container runtime touches | ||
# c.f. https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/#installation | ||
#network_dir = "/etc/cni/net.d-kube/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/env python3 | ||
import argparse | ||
import json | ||
import os | ||
import pathlib | ||
import typing | ||
import unittest | ||
|
||
import gha_pr_changed_files | ||
|
||
"""Determines whether we have deploy Makefile tests for this target or not | ||
https://github.com/openshift/release/blob/master/ci-operator/config/opendatahub-io/notebooks/opendatahub-io-notebooks-main.yaml#L1485 | ||
""" | ||
|
||
|
||
class Args(argparse.Namespace): | ||
"""Type annotation to have autocompletion for args""" | ||
target: str | ||
|
||
|
||
def main() -> None: | ||
parser = argparse.ArgumentParser("make_test.py") | ||
parser.add_argument("--target", type=str) | ||
args = typing.cast(Args, parser.parse_args()) | ||
|
||
has_tests = check_tests(args.target) | ||
|
||
if "GITHUB_ACTIONS" in os.environ: | ||
with open(os.environ["GITHUB_OUTPUT"], "at") as f: | ||
print(f"tests={json.dumps(has_tests)}", file=f) | ||
|
||
print(f"{has_tests=}") | ||
|
||
|
||
def check_tests(target: str) -> bool: | ||
if target.startswith("rocm-jupyter-minimal-") or target.startswith("rocm-jupyter-datascience-"): | ||
return False # we don't have specific tests for -minimal-, ... in ci-operator/config | ||
if '-intel-' in target: | ||
return False # RHOAIENG-8388: Intel tensorflow notebook failed to get tested on OCP-CI | ||
|
||
has_tests = False | ||
dirs = gha_pr_changed_files.analyze_build_directories(target) | ||
for d in reversed(dirs): # (!) | ||
kustomization = pathlib.Path(gha_pr_changed_files.PROJECT_ROOT) / d / "kustomize/base/kustomization.yaml" | ||
has_tests = has_tests or kustomization.is_file() | ||
break # TODO: check only the last directory (the top level layer) for now | ||
return has_tests | ||
|
||
|
||
class TestCheckTests(unittest.TestCase): | ||
def test_has_tests(self): | ||
assert check_tests("base-c9s-python-3.11") is False | ||
assert check_tests("jupyter-minimal-ubi9-python-3.9") is True | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
# kubeadm config print init-defaults > kubeadm.yaml | ||
# kubeadm init --cri-socket=/var/run/crio/crio.sock | ||
|
||
# https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta3/ | ||
# https://kubernetes.io/docs/reference/config-api/kubeadm-config.v1beta4/ | ||
apiVersion: kubeadm.k8s.io/v1beta3 | ||
bootstrapTokens: | ||
- groups: | ||
- system:bootstrappers:kubeadm:default-node-token | ||
token: abcdef.0123456789abcdef | ||
ttl: 24h0m0s | ||
usages: | ||
- signing | ||
- authentication | ||
kind: InitConfiguration | ||
localAPIEndpoint: | ||
bindPort: 6443 | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
# Need to have enough disk space for Kubelet, so move root-dir on the LVM volume | ||
# Note: the internets discourage from changing the default because storage plugins may then struggle | ||
# https://cep.dev/posts/adventure-trying-change-kubelet-rootdir/ | ||
root-dir: "/home/runner/.local/share/containers/kubelet-root-dir" | ||
criSocket: unix:///var/run/crio/crio.sock | ||
imagePullPolicy: IfNotPresent | ||
taints: null | ||
--- | ||
apiServer: | ||
timeoutForControlPlane: 4m0s | ||
apiVersion: kubeadm.k8s.io/v1beta3 | ||
certificatesDir: /etc/kubernetes/pki | ||
clusterName: kubernetes | ||
controllerManager: {} | ||
dns: {} | ||
etcd: | ||
local: | ||
dataDir: /var/lib/etcd | ||
imageRepository: registry.k8s.io | ||
kind: ClusterConfiguration | ||
networking: | ||
dnsDomain: cluster.local | ||
# this matches the default in /etc/cni/net.d/11-crio-ipv4-bridge.conflist | ||
podSubnet: 10.85.0.0/16 | ||
scheduler: {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# https://docs.podman.io/en/latest/markdown/podman-system-service.1.html | ||
# cat /usr/lib/systemd/system/podman.socket | ||
|
||
[Unit] | ||
Description=Podman API Service | ||
Requires=podman.socket | ||
After=podman.socket | ||
Documentation=man:podman-system-service(1) | ||
StartLimitIntervalSec=0 | ||
|
||
[Service] | ||
Delegate=true | ||
Type=exec | ||
KillMode=process | ||
Environment="PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/bin:/bin:/usr/sbin:/sbin" | ||
WorkingDirectory=/home/linuxbrew/.linuxbrew | ||
ExecStart=/home/linuxbrew/.linuxbrew/opt/podman/bin/podman --log-level=info system service | ||
|
||
[Install] | ||
WantedBy=default.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# cat /usr/lib/systemd/system/podman.socket | ||
|
||
[Unit] | ||
Description=Podman API Socket | ||
Documentation=man:podman-system-service(1) | ||
|
||
[Socket] | ||
ListenStream=%t/podman/podman.sock | ||
SocketMode=0666 | ||
|
||
[Install] | ||
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md | ||
|
||
# prevent this kyverno error | ||
# Failed to pull image "bitnami/kubectl:1.26.4": reading manifest 1.26.4 in quay.io/bitnami/kubectl: unauthorized: access to the requested resource is not authorized | ||
unqualified-search-registries = [ "docker.io" ] | ||
short-name-mode = "enforcing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.