-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add docker-registry example package #156
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
5cfa208
Add docker-registry example package
greghaynes eaed211
Fix docker-registry cnoe package reference
greghaynes b2e53af
Add registry ingress
greghaynes 817bfce
update registry container version and configure secret mount. Usernam…
jessesanford 8dc07e6
Docker registry fixes (#162)
jessesanford 306de0d
fix: Update backstage gitea location for catalog-info (#160)
csantanapr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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,21 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: docker-registry | ||
namespace: argocd | ||
labels: | ||
env: dev | ||
spec: | ||
project: default | ||
source: | ||
repoURL: cnoe://manifests | ||
targetRevision: HEAD | ||
path: "." | ||
destination: | ||
server: "https://kubernetes.default.svc" | ||
namespace: kube-system | ||
syncPolicy: | ||
syncOptions: | ||
- CreateNamespace=true | ||
automated: | ||
selfHeal: true |
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 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
nodes: | ||
- role: control-plane | ||
image: "kindest/node:v1.27.3" | ||
kubeadmConfigPatches: | ||
- | | ||
kind: InitConfiguration | ||
nodeRegistration: | ||
kubeletExtraArgs: | ||
system-reserved: memory=4Gi | ||
node-labels: "ingress-ready=true" | ||
extraPortMappings: | ||
- containerPort: 443 | ||
hostPort: 8443 | ||
protocol: TCP | ||
containerdConfigPatches: | ||
- |- | ||
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.cnoe.localtest.me:8443"] | ||
endpoint = ["https://registry.cnoe.localtest.me"] | ||
[plugins."io.containerd.grpc.v1.cri".registry.configs."registry.cnoe.localtest.me".tls] | ||
insecure_skip_verify = true |
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,7 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: docker-registry | ||
labels: | ||
kubernetes.io/metadata.name: docker-registry | ||
spec: |
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,24 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: docker-registry-pv | ||
namespace: docker-registry | ||
spec: | ||
capacity: | ||
storage: 5Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
hostPath: | ||
path: /tmp/repository | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: docker-registry-pvc | ||
namespace: docker-registry | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 5Gi |
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,77 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: docker-registry-auth | ||
namespace: docker-registry | ||
type: Opaque | ||
data: | ||
# Username: idpbuilder Password: idpbuilder | ||
htpasswd: aWRwYnVpbGRlcjokMnkkMTEkVkVoa09aRE90SFZFbDJUMnFobGVwZXBGc3NMOTMvZlhoRzNaTHFyN1QvblpjajJKeXFoNWU= | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: docker-registry-pod | ||
namespace: docker-registry | ||
labels: | ||
app: registry | ||
spec: | ||
containers: | ||
- name: registry | ||
image: registry:2.8.3 | ||
volumeMounts: | ||
- name: registry-vol | ||
mountPath: "/var/lib/registry" | ||
- name: auth-vol | ||
mountPath: "/auth/" | ||
# Uncomment the following to enable registry basic auth | ||
# env: | ||
# - name: REGISTRY_AUTH | ||
# value: "htpasswd" | ||
# - name: REGISTRY_AUTH_HTPASSWD_REALM | ||
# value: "Registry Realm" | ||
# - name: REGISTRY_AUTH_HTPASSWD_PATH | ||
# value: "/auth/htpasswd" | ||
volumes: | ||
- name: registry-vol | ||
persistentVolumeClaim: | ||
claimName: docker-registry-pvc | ||
- name: auth-vol | ||
secret: | ||
secretName: docker-registry-auth | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: docker-registry | ||
namespace: docker-registry | ||
spec: | ||
type: NodePort | ||
selector: | ||
app: registry | ||
ports: | ||
- port: 5000 | ||
targetPort: 5000 | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-body-size: "0" | ||
nginx.ingress.kubernetes.io/proxy-read-timeout: "600" | ||
nginx.ingress.kubernetes.io/proxy-send-timeout: "600" | ||
name: docker-registry | ||
namespace: docker-registry | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- host: registry.cnoe.localtest.me | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: docker-registry | ||
port: | ||
number: 5000 |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
rebase this is already fix in main
ea9c56e
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.
Yes this is the cherry-pick of that exact commit to this branch I needed it to make sure things were working correctly. The merge to main should be noOp here. Happy to remove it if that is more appropriate.