{"id":18733931,"url":"https://github.com/mgoltzsche/image-registry-operator","last_synced_at":"2025-10-27T00:24:26.829Z","repository":{"id":57519261,"uuid":"233705474","full_name":"mgoltzsche/image-registry-operator","owner":"mgoltzsche","description":"A kubernetes operator that manages image registries and access to them (alpha)","archived":false,"fork":false,"pushed_at":"2021-08-04T00:19:15.000Z","size":599,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T06:12:26.721Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgoltzsche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-13T22:19:04.000Z","updated_at":"2024-09-27T09:23:54.000Z","dependencies_parsed_at":"2022-09-06T03:42:22.521Z","dependency_job_id":null,"html_url":"https://github.com/mgoltzsche/image-registry-operator","commit_stats":null,"previous_names":["mgoltzsche/credential-manager"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mgoltzsche/image-registry-operator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fimage-registry-operator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fimage-registry-operator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fimage-registry-operator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fimage-registry-operator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgoltzsche","download_url":"https://codeload.github.com/mgoltzsche/image-registry-operator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgoltzsche%2Fimage-registry-operator/sbom","scorecard":{"id":639461,"data":{"date":"2025-08-11","repo":{"name":"github.com/mgoltzsche/image-registry-operator","commit":"f59b66ea5589b5798d44b711c5020c9e09aa0040"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2021-0061 / GHSA-r88r-gmrh-7j83","Warn: Project is vulnerable to: GO-2022-0956 / GHSA-6q6q-88xp-6f2r","Warn: Project is vulnerable to: GO-2020-0036 / GHSA-wxc4-f4m6-wwqv","Warn: Project is vulnerable to: GO-2024-2748 / GHSA-33c5-9fx5-fvjm","Warn: Project is vulnerable to: GO-2021-0065 / GHSA-jmrx-5g74-6v2f","Warn: Project is vulnerable to: GO-2021-0064 / GHSA-8cfg-vx93-jvxw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: build/Dockerfile:1","Warn: containerImage not pinned by hash: build/Dockerfile:8","Warn: containerImage not pinned by hash: build/Dockerfile:15","Warn: containerImage not pinned by hash: build/Dockerfile:25","Warn: containerImage not pinned by hash: build/Dockerfile:28","Warn: containerImage not pinned by hash: build/Dockerfile-auth:2","Warn: containerImage not pinned by hash: build/Dockerfile-auth:23","Warn: containerImage not pinned by hash: build/Dockerfile-auth:37","Warn: containerImage not pinned by hash: build/Dockerfile-auth:40","Warn: containerImage not pinned by hash: build/Dockerfile-makisu:1","Warn: containerImage not pinned by hash: build/Dockerfile-makisu:3","Warn: containerImage not pinned by hash: build/Dockerfile-makisu:17","Warn: containerImage not pinned by hash: build/Dockerfile-makisu:32","Warn: containerImage not pinned by hash: build/Dockerfile-nginx:1","Warn: containerImage not pinned by hash: build/Dockerfile-nginx:7: pin your Docker image by updating nginx to nginx@sha256:33e0bbc7ca9ecf108140af6288c7c9d1ecc77548cbfd3952fd8466a75edefe57","Warn: containerImage not pinned by hash: build/Dockerfile-nginx:17: pin your Docker image by updating nginx to nginx@sha256:33e0bbc7ca9ecf108140af6288c7c9d1ecc77548cbfd3952fd8466a75edefe57","Warn: pipCommand not pinned by hash: build/Dockerfile-auth:3","Warn: goCommand not pinned by hash: build/Dockerfile-auth:8","Info:   0 out of  16 containerImage dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned","Info:   0 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}}]},"last_synced_at":"2025-08-21T10:17:03.566Z","repository_id":57519261,"created_at":"2025-08-21T10:17:03.566Z","updated_at":"2025-08-21T10:17:03.566Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273064206,"owners_count":25039259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T15:11:49.089Z","updated_at":"2025-10-27T00:24:26.773Z","avatar_url":"https://github.com/mgoltzsche.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"image-registry-operator\n===\n\nA Kubernetes operator that maintains in-cluster docker registries, accounts\nas well as push and pull secrets.\nGranular authorization is supported by [cesanta/docker_auth](https://github.com/cesanta/docker_auth).  \n\n\n# Custom Resource Definitions\n\nThis operator supports the following CRDs:\n* `ImageRegistry` represents a [docker image registry](https://docs.docker.com/registry/) and [docker_auth](https://github.com/cesanta/docker_auth) service.\n* `ImageRegistryAccount` represents an account to access the registry. A registry only authenticates accounts contained in its namespace.\n* `ImagePushSecret` represents an `ImageRegistryAccount` in the referenced registry's namespace and an `Opaque` `Secret` with a docker config at key `config.json`.\n* `ImagePullSecret` represents an `ImageRegistryAccount` in the referenced registry's namespace and a `kubernetes.io/dockerconfigjson` `Secret`.\n\nBy default managed push and pull secrets are rotated every 24h.  \n\nBoth push and pull secrets contain additional keys:\n* `registry` - the registry's hostname _(to be used to define registry agnostic builds)_\n* `ca.crt` - the registry's CA certificate _(to support test installations using a self-signed CA)_\n* `username` - the registry's username\n* `password` - the registry's password\n\nA `Ready` condition is maintained by the operator for `ImageRegistry`, `ImagePushSecret` and `ImagePullSecret` resources\nreflecting its current status and the cause in case of an error.\n\n\n# Kubernetes cluster requirements\n\n* LoadBalancer support\n* LoadBalancer `Service` names must resolve on the nodes - see DNS section below.\n* optional: [cert-manager](https://cert-manager.io/) should be installed if a self-signed TLS certificate is not sufficient.\n\n\n# DNS\n\nAn `ImageRegistry`'s hostname looks as follows: `\u003cNAME\u003e.\u003cNAMESPACE\u003e.\u003cOPERATOR_DNS_ZONE\u003e`.  \n\nThe `OPERATOR_DNS_ZONE` is an environment variable that can be specified on the operator and defaults to `svc.cluster.local`.  \n\nRegistry name resolution inside your k8s cluster and on its nodes can be done using CoreDNS:\nCoreDNS' static IP (`10.96.0.10`) should be configured as first nameserver on every node (avoid DNS loops!).\n_For development purposes this can be done using [nodehack](https://github.com/mgoltzsche/nodehack) as `./deploy/minikube` shows._  \n\nFor DNS propagation outside your cluster [external-dns](https://github.com/kubernetes-sigs/external-dns) can be used - registry `Service` resources are already annotated correspondingly by the operator.\nAdditionally CoreDNS' [k8s_external](https://coredns.io/plugins/k8s_external/) plugin can be used to resolve public (registry) names inside the cluster (see `./deploy/coredns-public-zone`) making it independent from external DNS configuration.  \n\n\n# TLS\n\nThe operator maintains a self-signed CA certificate secret `image-registry-root-ca` in its own namespace.  \n\nBy default, if neither an issuer nor a secret name are specified, the operator uses it to sign the generated TLS certificate for an `ImageRegistry`.\nAlternatively an `ImageRegistry` can refer to an existing secret or a [cert-manager](https://cert-manager.io/)\n`Issuer` which the operator will then use to create a `Certificate`.  \n\n_Please note that, in case of a self-signed registry TLS CA, the CA certificate must be registered with the container runtime._\n_For development purposes this can be done using [nodehack](https://github.com/mgoltzsche/nodehack) as `./deploy/minikube` shows._\n\n\n# Authorization\n\nAuthorization can be specified per `ImageRegistry` using [docker_auth's ACL](https://github.com/cesanta/docker_auth/blob/master/docs/Labels.md).\n\n\n# Operator installation\n\nThere are multiple operator deployment variants.\nIn all variants listed here the `OPERATOR_DNS_ZONE` env var defaults to `svc.cluster.local`.\n\n## Install for single namespace\n\nInstall the operator namespace-scoped in the default namespace:\n```\nkubectl apply -k github.com/mgoltzsche/image-registry-operator/deploy/crds\nkubectl apply -k github.com/mgoltzsche/image-registry-operator/deploy/operator\n```\n\n## Install cluster-wide\n\nInstall the operator in the `image-registry-operator` namespace letting it watch all namespaces:\n```\nkubectl apply -k github.com/mgoltzsche/image-registry-operator/deploy/cluster-wide\n```\n\n## Install on Minikube\n\nCreate a Minikube (1.11) cluster using CRI-O:\n```\nminikube start --kubernetes-version=1.18.3 --network-plugin=cni --enable-default-cni --container-runtime=cri-o --bootstrapper=kubeadm\n```\n\nInstall the operator cluster-wide with [nodehack](https://github.com/mgoltzsche/nodehack) in the `image-registry-operator` namespace:\n```\nkubectl apply -k github.com/mgoltzsche/image-registry-operator/deploy/minikube\n```\n\n# Usage examples\n\nCreate an `ImageRegistry` (a self-signed TLS certificate is used if no secret or issuer is provided):\n```\nkubectl apply -f - \u003c\u003c-EOF\n\tapiVersion: registry.mgoltzsche.github.com/v1alpha1\n\tkind: ImageRegistry\n\tmetadata:\n\t  name: registry\n\tspec:\n\t  replicas: 1\n\t  tls: {}\n\t  # You may want to specify the TLS certificate\n\t  # by either providing a secret or referring to a cert-manager issuer:\n\t  #  secretName: my-registry-tls\n\t  #  issuerRef:\n\t  #    name: my-lets-encrypt-issuer\n\t  #    kind: Issuer\n\t  persistentVolumeClaim:\n\t    # You may want to use a different StorageClass here:\n\t    storageClassName: standard\n\t    accessModes:\n\t    - ReadWriteOnce # If \u003e1 replicas ever required ReadWriteMany must be set (which is the default)\n\t    resources:\n\t      requests:\n\t        storage: 1Gi\nEOF\n```\n\nCreate an `ImagePushSecret`:\n```\nkubectl apply -f - \u003c\u003c-EOF\n\tapiVersion: registry.mgoltzsche.github.com/v1alpha1\n\tkind: ImagePushSecret\n\tmetadata:\n\t  name: example\n\tspec:\n\t  registryRef: # when omitted operator's default registry is used\n\t    name: registry\n\t    #namespace: infra # another namespace's registry could be used\nEOF\n```\n\nCreate an `ImagePullSecret`:\n```\nkubectl apply -f - \u003c\u003c-EOF\n\tapiVersion: registry.mgoltzsche.github.com/v1alpha1\n\tkind: ImagePullSecret\n\tmetadata:\n\t  name: example\n\tspec:\n\t  registryRef:\n\t    name: registry\nEOF\n```\n\nCreate an `ImageBuildEnv` using the previously created secret:\n```\nkubectl apply -f - \u003c\u003c-EOF\n\tapiVersion: registry.mgoltzsche.github.com/v1alpha1\n\tkind: ImageBuildEnv\n\tmetadata:\n\t  name: example\n\tspec:\n\t  redis: true\n\t  secrets:\n\t  - secretName: imagepushsecret-example\nEOF\n```\n\nConfigure your local host to use the previously created `ImagePushSecret`'s Docker config:\n```\nkubectl get secret imagepushsecret-example -o jsonpath='{.data.\\.dockerconfigjson}' | base64 -d \u003e ~/.docker/config.json\n```\nTo use a self-signed registry cert (for development) configure `/etc/docker/daemon.json` with (docker needs to be restarted):\n```\n{\n  \"insecure-registries\" : [\"registry.default.svc.cluster.local\"]\n}\n```\nWhen running the registry in minikube you need to map the `registry` Service's IP on your host.\n\n\n# How to build\nBuild the operator as well as preconfigured [docker_auth](https://github.com/cesanta/docker_auth) and [nginx](https://www.nginx.com/) images (requires make and docker/podman):\n```\nmake operator docker_auth nginx\n```\n\n\n# How to test\n\n## Unit tests\n```\nmake unit-tests\n```\n\n## e2e tests\n\n### Start Minikube\n```\nmake start-minikube\n```\n\n### Test local changes\nTest the locally built operator binary without building/pushing it as new container image:\n```\nexport KUBECONFIG=$HOME/.kube/config\nmake containerized-operatorsdk-tests-local\n```\n\n### Test rollout with cert-manager\n```\nexport KUBECONFIG=$HOME/.kube/config\nkubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.15.1/cert-manager.yaml\nkubectl rollout status -w --timeout 120s -n cert-manager deploy cert-manager-webhook\nkubectl wait --for condition=established --timeout 20s crd issuers.cert-manager.io\nmake containerized-kubectl-tests\n```\n\n# Development \u0026 contributions\n\nContributions are welcome.\nChanges and large features should be discussed in an issue first though.\n\n## Source structure \u0026 generation\n\nThe operator skeleton has been generated using the [operator-sdk](https://github.com/operator-framework/operator-sdk):\n* The `deploy` directory contains the corresponding kubernetes manifests.\n* The `deploy/crds` directory is generated from `pkg/apis/registry/*/*_types.go`.\n* The `pkg/controller/*` directories contain the code that handles the corresponding CRD.\n\nThe CRDs in `deploy/crd` and `zz_*.go` files need to be regenerated as follows when an API type changes:\n```\nmake generate\n```\n\n## Test local operator changes interactively\n\n1) Follow the instructions above to install the operator on minikube and run the examples\n2) Run the operator using [skaffold](https://skaffold.dev/) (instantly redeploys on source changes):\n```\nskaffold dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fimage-registry-operator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgoltzsche%2Fimage-registry-operator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgoltzsche%2Fimage-registry-operator/lists"}