diff --git a/roles/kubernetes-apps/registry/defaults/main.yml b/roles/kubernetes-apps/registry/defaults/main.yml
index f3f55e2d7ac8fb4117ce2c168e721a76dfb448d6..bcbabfb23f6a76549de7050a306494d85b779eb0 100644
--- a/roles/kubernetes-apps/registry/defaults/main.yml
+++ b/roles/kubernetes-apps/registry/defaults/main.yml
@@ -5,3 +5,27 @@ registry_storage_access_mode: "ReadWriteOnce"
 registry_disk_size: "10Gi"
 registry_port: 5000
 registry_replica_count: 1
+# name of kubernetes secret for registry TLS certs
+registry_tls_secret: ""
+
+registry_htpasswd: ""
+
+# registry configuration
+# see: https://docs.docker.com/registry/configuration/#list-of-configuration-options
+registry_config:
+  version: 0.1
+  log:
+    fields:
+      service: registry
+  storage:
+    cache:
+      blobdescriptor: inmemory
+  http:
+    addr: :{{ registry_port }}
+    headers:
+      X-Content-Type-Options: [nosniff]
+  health:
+    storagedriver:
+      enabled: true
+      interval: 10s
+      threshold: 3
diff --git a/roles/kubernetes-apps/registry/tasks/main.yml b/roles/kubernetes-apps/registry/tasks/main.yml
index 6b8b5e7bcbd3c006b278169561f8aa280a3cb5f0..b9f0ee432c23094166d590f4e4e8e7de17adf4e2 100644
--- a/roles/kubernetes-apps/registry/tasks/main.yml
+++ b/roles/kubernetes-apps/registry/tasks/main.yml
@@ -15,6 +15,8 @@
       - { name: registry-sa, file: registry-sa.yml, type: sa }
       - { name: registry-proxy-sa, file: registry-proxy-sa.yml, type: sa }
       - { name: registry-svc, file: registry-svc.yml, type: svc }
+      - { name: registry-secrets, file: registry-secrets.yml, type: secrets }
+      - { name: registry-cm, file: registry-cm.yml, type: cm }
       - { name: registry-rs, file: registry-rs.yml, type: rs }
       - { name: registry-proxy-ds, file: registry-proxy-ds.yml, type: ds }
     registry_templates_for_psp:
diff --git a/roles/kubernetes-apps/registry/templates/registry-cm.yml.j2 b/roles/kubernetes-apps/registry/templates/registry-cm.yml.j2
new file mode 100644
index 0000000000000000000000000000000000000000..b633dfd68ce8f7b5f8c7058dfd10f21ad95daf81
--- /dev/null
+++ b/roles/kubernetes-apps/registry/templates/registry-cm.yml.j2
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: registry-config
+  namespace: {{ registry_namespace }}
+{% if registry_config %}
+data:
+  config.yml: |-
+    {{ registry_config | to_yaml(indent=2, width=1337) | indent(width=4) }}
+{% endif %}
diff --git a/roles/kubernetes-apps/registry/templates/registry-rs.yml.j2 b/roles/kubernetes-apps/registry/templates/registry-rs.yml.j2
index 9470db46db378d7b3094739a32fd95169183bf7b..47519f9d80f273f406a51d68ed55e237fdf800be 100644
--- a/roles/kubernetes-apps/registry/templates/registry-rs.yml.j2
+++ b/roles/kubernetes-apps/registry/templates/registry-rs.yml.j2
@@ -33,24 +33,60 @@ spec:
         - name: registry
           image: {{ registry_image_repo }}:{{ registry_image_tag }}
           imagePullPolicy: {{ k8s_image_pull_policy }}
+          command:
+          - /bin/registry
+          - serve
+          - /etc/docker/registry/config.yml
           env:
             - name: REGISTRY_HTTP_ADDR
               value: :{{ registry_port }}
             - name: REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY
               value: /var/lib/registry
+{% if registry_htpasswd != "" %}
+            - name: REGISTRY_AUTH
+              value: "htpasswd"
+            - name: REGISTRY_AUTH_HTPASSWD_REALM
+              value: "Registry Realm"
+            - name: REGISTRY_AUTH_HTPASSWD_PATH
+              value: "/auth/htpasswd"
+{% endif %}
+{% if registry_tls_secret != "" %}
+            - name: REGISTRY_HTTP_TLS_CERTIFICATE
+              value: /etc/ssl/docker/tls.crt
+            - name: REGISTRY_HTTP_TLS_KEY
+              value: /etc/ssl/docker/tls.key
+{% endif %}
           volumeMounts:
             - name: registry-pvc
               mountPath: /var/lib/registry
+            - name: registry-config
+              mountPath: /etc/docker/registry
+{% if registry_htpasswd != "" %}
+            - name: auth
+              mountPath: /auth
+              readOnly: true
+{% endif %}
+{% if registry_tls_secret != "" %}
+            - name: tls-cert
+              mountPath: /etc/ssl/docker
+              readOnly: true
+{% endif %}
           ports:
             - containerPort: {{ registry_port }}
               name: registry
               protocol: TCP
           livenessProbe:
             httpGet:
+{% if registry_tls_secret != "" %}
+              scheme: HTTPS
+{% endif %}
               path: /
               port: {{ registry_port }}
           readinessProbe:
             httpGet:
+{% if registry_tls_secret != "" %}
+              scheme: HTTPS
+{% endif %}
               path: /
               port: {{ registry_port }}
       volumes:
@@ -60,4 +96,20 @@ spec:
             claimName: registry-pvc
 {% else %}
           emptyDir: {}
+{% endif %}
+        - name: registry-config
+          configMap:
+            name: registry-config
+{% if registry_htpasswd != "" %}
+        - name: auth
+          secret:
+            secretName: registry-secret
+            items:
+            - key: htpasswd
+              path: htpasswd
+{% endif %}
+{% if registry_tls_secret != "" %}
+        - name: tls-cert
+          secret:
+            secretName: {{ registry_tls_secret }}
 {% endif %}
diff --git a/roles/kubernetes-apps/registry/templates/registry-secrets.yml.j2 b/roles/kubernetes-apps/registry/templates/registry-secrets.yml.j2
new file mode 100644
index 0000000000000000000000000000000000000000..80727d28acd6f2a21587f646309b7b931edd75f7
--- /dev/null
+++ b/roles/kubernetes-apps/registry/templates/registry-secrets.yml.j2
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Secret
+metadata:
+  name: registry-secret
+  namespace: {{ registry_namespace }}
+type: Opaque
+data:
+{% if registry_htpasswd != "" %}
+  htpasswd: {{ registry_htpasswd | b64encode }}
+{% endif %}