Skip to content

Commit

Permalink
chore(Tiltfile): add a development registry to Tilt
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrizio Sestito <fabrizio.sestito@suse.com>
  • Loading branch information
fabriziosestito committed Dec 3, 2024
1 parent aa94789 commit 7efc921
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
tilt_settings_file = "./tilt-settings.yaml"
settings = read_yaml(tilt_settings_file)

# Setup a development registry so we can push images to it
# and use them to test the scanner.
k8s_yaml('./hack/registry.yaml')

k8s_resource(
'dev-registry',
port_forwards=5000,
)

# Create the sbombastic namespace
# This is required since the helm() function doesn't support the create_namespace flag
load("ext://namespace", "namespace_create")
Expand Down
2 changes: 1 addition & 1 deletion examples/registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ metadata:
name: my-first-registry
namespace: default
spec:
uri: docker-registry.default.svc.cluster.local
uri: dev-registry.default.svc.cluster.local:5000
27 changes: 27 additions & 0 deletions hack/registry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: v1
kind: Pod
metadata:
name: dev-registry
namespace: default
labels:
app: dev-registry
spec:
containers:
- name: registry
image: registry:2.8.3
ports:
- containerPort: 5000
name: http
---
apiVersion: v1
kind: Service
metadata:
name: dev-registry
namespace: default
spec:
selector:
app: dev-registry
ports:
- protocol: TCP
port: 5000
targetPort: http

0 comments on commit 7efc921

Please sign in to comment.