Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
nstogner committed Aug 14, 2023
1 parent d7e9445 commit 33095d7
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 1,718 deletions.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
VERSION ?= v0.8.1
IMG ?= docker.io/substratusai/controller-manager:${VERSION}
IMG_GCPMANAGER ?= docker.io/substratusai/gcp-manager:${VERSION}
IMG_SCI_KIND ?= docker.io/substratusai/sci-kind:${VERSION}

# Set to false if you don't want GPU nodepools created
ATTACH_GPU_NODEPOOLS=true
Expand Down Expand Up @@ -36,6 +37,7 @@ ifeq ($(UNAME_M),arm64)
SKAFFOLD_ARCH := arm64
else
ifeq ($(UNAME_M),x86_64)
PROTOC_ARCH := aarch_64
SKAFFOLD_ARCH := amd64
else
PROTOC_ARCH := $(UNAME_M)
Expand Down Expand Up @@ -289,7 +291,9 @@ installation-scripts:
installation-manifests: manifests kustomize
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
cd config/gcpmanager && $(KUSTOMIZE) edit set image gcp-manager=${IMG_GCPMANAGER}
$(KUSTOMIZE) build config/install-gcp > install/kubernetes/system.yaml
cd config/sci-kind && $(KUSTOMIZE) edit set image sci=${IMG_SCI_KIND}
# TODO: Fix in another PR:
#$(KUSTOMIZE) build config/install-gcp > install/kubernetes/system.yaml
$(KUSTOMIZE) build config/install-kind > install/kubernetes/kind/system.yaml

.PHONY: prepare-release
Expand Down
1 change: 1 addition & 0 deletions config/install-kind/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ metadata:
data:
CLOUD: kind
CLUSTER_NAME: substratus
PRINCIPAL: unused
3 changes: 0 additions & 3 deletions config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,3 @@ images:
- name: controller
newName: docker.io/substratusai/controller-manager
newTag: v0.8.1
- name: gcp-manager
newName: docker.io/substratusai/gcp-manager
newTag: v0.6.5-alpha
12 changes: 6 additions & 6 deletions config/sci-kind/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
resources:
- ../sci
- ../sci
patches:
- path: deployment_patch.yaml
- path: service_patch.yaml
- path: deployment_patch.yaml
- path: service_patch.yaml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: sci
newName: docker.io/substratusai/sci-kind
newTag: v0.8.1
- name: sci
newName: docker.io/substratusai/sci-kind
newTag: v0.8.1
2 changes: 2 additions & 0 deletions examples/notebook/notebook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ metadata:
name: example
spec:
image: substratusai/base:latest
model:
name: facebook-opt-125m
params:
abc: xyz
x: 123
24 changes: 13 additions & 11 deletions install/kubernetes/kind/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ subjects:
---
apiVersion: v1
data:
allow-bundled-registry.sh: |
configure-cri.sh: |
#!/usr/bin/env bash
set -x
Expand All @@ -1484,17 +1484,19 @@ data:
EOF
fi
nsenter --target 1 --mount bash -c "systemctl is-active --quiet containerd && echo 'Restarting containerd' && systemctl restart containerd"
# Wait for containerd to be ready so that skaffold doesn't fail.
nsenter --target 1 --mount bash -c "while ! ctr -n k8s.io containers ls; do sleep 1; done"
fi
kind: ConfigMap
metadata:
name: allow-bundled-registry-script
name: configure-cri
namespace: substratus
---
apiVersion: v1
data:
ARTIFACT_BUCKET_URL: tar:///bucket
CLOUD: kind
CLUSTER_NAME: substratus
PRINCIPAL: unused
kind: ConfigMap
metadata:
name: system
Expand Down Expand Up @@ -1676,7 +1678,7 @@ spec:
app: registry
spec:
containers:
- image: registry:2
- image: docker.io/library/registry:2
name: registry
ports:
- containerPort: 5000
Expand Down Expand Up @@ -1740,27 +1742,27 @@ apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
app: allow-bundled-registry
name: allow-bundled-registry
app: configure-cri
name: configure-cri
namespace: substratus
spec:
selector:
matchLabels:
app: allow-bundled-registry
app: configure-cri
template:
metadata:
labels:
app: allow-bundled-registry
app: configure-cri
spec:
containers:
- image: gcr.io/google_containers/pause
name: pause
hostPID: true
initContainers:
- command:
- /scripts/allow-bundled-registry.sh
- /scripts/configure-cri.sh
image: ubuntu:22.04
name: allow-bundled-registry
name: configure-cri
securityContext:
privileged: true
volumeMounts:
Expand All @@ -1777,5 +1779,5 @@ spec:
name: etc
- configMap:
defaultMode: 484
name: allow-bundled-registry-script
name: configure-cri
name: scripts
Loading

0 comments on commit 33095d7

Please sign in to comment.