apiVersion: v1
data:
  repos-to-create: |-
    [
      {
        "name": "edp-nexus-maven-group",
        "repositoryType": "maven-proxy",
        "blob_store": "edp-maven",
        "remote_url": "{{ template "nexus.edpMavenRepoUrl" . }}",
        "layout_policy": "strict",
        "strict_content_validation": "true",
        "version_policy": "mixed",
        "write_policy": "allow"
      },
      {
        "name": "confluent.io",
        "repositoryType": "maven-proxy",
        "blob_store": "edp-maven",
        "remote_url": "http://packages.confluent.io/maven/",
        "layout_policy": "strict",
        "strict_content_validation": "true",
        "version_policy": "release",
        "write_policy": "allow"
      },
      {
        "name": "edp-maven-releases",
        "repositoryType": "maven-hosted",
        "blob_store": "edp-maven",
        "version_policy": "release",
        "layout_policy": "strict",
        "strict_content_validation": "true",
        "write_policy": "allow"
      },
      {
        "name": "edp-maven-snapshots",
        "repositoryType": "maven-hosted",
        "blob_store": "edp-maven",
        "version_policy": "snapshot",
        "layout_policy": "strict",
        "strict_content_validation": "true",
        "write_policy": "allow"
      },
      {
        "name": "edp-maven-proxy",
        "repositoryType": "maven-proxy",
        "blob_store": "edp-maven",
        "remote_url": "https://repo1.maven.org/maven2/",
        "layout_policy": "strict",
        "strict_content_validation": "true",
        "version_policy": "mixed",
        "write_policy": "allow"
      },
      {
        "name": "edp-maven-group",
        "repositoryType": "maven-group",
        "blob_store": "edp-maven",
        "layout_policy": "strict",
        "strict_content_validation": "true",
        "version_policy": "mixed",
        "write_policy": "allow",
        "member_repos": [
          "edp-maven-proxy",
          "edp-maven-releases",
          "edp-maven-snapshots",
          "edp-nexus-maven-group",
          "confluent.io"
        ]
      },
      {
        "name": "docker-registry",
        "httpPort": {{ .Values.nexus.dockerRegistry.hosted.httpPort }},
        "httpsPort": {{ .Values.nexus.dockerRegistry.hosted.httpsPort }},
        "repositoryType": "docker-hosted",
        "blob_store": "docker-registry",
        "v1Enabled": "true",
        "strict_content_validation": "true",
        "write_policy": "allow",
        "forceBasicAuth": "true"
      },
      {
        "name": "dockerhub-proxy",
        "indexType": "HUB",
        "indexURL": null,
        "httpPort": {{ .Values.nexus.dockerRegistry.dockerhub.httpPort }},
        "httpsPort": {{ .Values.nexus.dockerRegistry.dockerhub.httpsPort }},
        "repositoryType": "docker-proxy",
        "blob_store": "docker-registry",
        "strict_content_validation": "true",
        "v1Enabled": "true",
        "remoteURL": "https://registry-1.docker.io",
        "forceBasicAuth": "true",
        "remote_username": "{{ .Values.nexus.dockerRegistry.dockerhub.auth.username }}",
        "remote_password": "{{ .Values.nexus.dockerRegistry.dockerhub.auth.password }}"
      },
      {
        "name": "docker-group",
        "httpPort": {{ .Values.nexus.dockerRegistry.group.httpPort }},
        "httpsPort": {{ .Values.nexus.dockerRegistry.group.httpsPort }},
        "repositoryType": "docker-group",
        "blob_store": "docker-registry",
        "strict_content_validation": "true",
        "v1Enabled": "true",
        "forceBasicAuth": "true",
        "member_repos": [
              "docker-registry",
              "dockerhub-proxy"
            ]
      },
      {
        "name": "extensions",
        "repositoryType": "raw-hosted",
        "blob_store": "default",
        "strict_content_validation": "false",
        "write_policy": "allow"
      }
    ]
kind: ConfigMap
metadata:
  labels:
    app: nexus
  {{- include "nexus-operator.metaLabels" . | nindent 4 }}
  name: nexus-repos-to-create