Creating public repository
This commit is contained in:
85
single-inst-oss-pro-kubernetes/tests/deployment_test.yaml
Normal file
85
single-inst-oss-pro-kubernetes/tests/deployment_test.yaml
Normal file
@@ -0,0 +1,85 @@
|
||||
suite: deployment
|
||||
templates:
|
||||
- deployment.yaml
|
||||
- configmap-properties.yaml
|
||||
tests:
|
||||
- it: renders with defaults
|
||||
template: deployment.yaml
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: Deployment
|
||||
- equal:
|
||||
path: apiVersion
|
||||
value: apps/v1
|
||||
- equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-nexus-repository-manager
|
||||
- matchRegex:
|
||||
path: metadata.labels.[app.kubernetes.io/name]
|
||||
pattern: nexus-repository-manager
|
||||
- matchRegex:
|
||||
path: metadata.labels.[app.kubernetes.io/version]
|
||||
pattern: 3\.\d+\.\d+
|
||||
- matchRegex:
|
||||
path: spec.template.metadata.annotations.[checksum/configmap-properties]
|
||||
pattern: .+
|
||||
- equal:
|
||||
path: spec.replicas
|
||||
value: 1
|
||||
- equal:
|
||||
path: spec.strategy.type
|
||||
value: Recreate
|
||||
- matchRegex:
|
||||
path: spec.template.spec.containers[0].image
|
||||
pattern: sonatype/nexus3:3\.\d+\.\d+
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].securityContext
|
||||
value: null
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].imagePullPolicy
|
||||
value: IfNotPresent
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].env
|
||||
value:
|
||||
- name: INSTALL4J_ADD_VM_PARAMS
|
||||
value: -Xms2703M -Xmx2703M -XX:MaxDirectMemorySize=2703M -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
|
||||
- name: NEXUS_SECURITY_RANDOMPASSWORD
|
||||
value: "true"
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].ports
|
||||
value:
|
||||
- containerPort: 8081
|
||||
name: nexus-ui
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].livenessProbe
|
||||
value:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8081
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].readinessProbe
|
||||
value:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /
|
||||
port: 8081
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
- equal:
|
||||
path: spec.template.spec.containers[0].volumeMounts
|
||||
value:
|
||||
- mountPath: /nexus-data
|
||||
name: nexus-repository-manager-data
|
||||
- equal:
|
||||
path: spec.template.spec.volumes
|
||||
value:
|
||||
- name: nexus-repository-manager-data
|
||||
persistentVolumeClaim:
|
||||
claimName: RELEASE-NAME-nexus-repository-manager-data
|
144
single-inst-oss-pro-kubernetes/tests/ingress_test.yaml
Normal file
144
single-inst-oss-pro-kubernetes/tests/ingress_test.yaml
Normal file
@@ -0,0 +1,144 @@
|
||||
suite: ingress
|
||||
templates:
|
||||
- ingress.yaml
|
||||
tests:
|
||||
- it: renders with defaults
|
||||
set:
|
||||
ingress:
|
||||
enabled: true
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 1
|
||||
- isKind:
|
||||
of: Ingress
|
||||
- equal:
|
||||
path: apiVersion
|
||||
value: networking.k8s.io/v1
|
||||
- equal:
|
||||
path: metadata.labels.[app.kubernetes.io/instance]
|
||||
value: RELEASE-NAME
|
||||
- equal:
|
||||
path: metadata.labels.[app.kubernetes.io/managed-by]
|
||||
value: Helm
|
||||
- matchRegex:
|
||||
path: metadata.labels.[app.kubernetes.io/version]
|
||||
pattern: \d+\.\d+\.\d+
|
||||
- matchRegex:
|
||||
path: metadata.labels.[helm.sh/chart]
|
||||
pattern: nexus-repository-manager-\d+\.\d+\.\d+
|
||||
- equal:
|
||||
path: metadata.labels.[app.kubernetes.io/name]
|
||||
value: nexus-repository-manager
|
||||
- equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-nexus-repository-manager
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: spec
|
||||
value:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: repo.demo
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: RELEASE-NAME-nexus-repository-manager
|
||||
port:
|
||||
number: 8081
|
||||
- it: renders a second docker ingress
|
||||
set:
|
||||
ingress:
|
||||
enabled: true
|
||||
nexus:
|
||||
docker:
|
||||
enabled: true
|
||||
registries:
|
||||
- host: docker.repo.demo
|
||||
port: 5000
|
||||
secretName: registry-secret
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 2
|
||||
- isKind:
|
||||
of: Ingress
|
||||
- equal:
|
||||
path: apiVersion
|
||||
value: networking.k8s.io/v1
|
||||
- equal:
|
||||
path: metadata.labels.[app.kubernetes.io/instance]
|
||||
value: RELEASE-NAME
|
||||
- equal:
|
||||
path: metadata.labels.[app.kubernetes.io/managed-by]
|
||||
value: Helm
|
||||
- matchRegex:
|
||||
path: metadata.labels.[app.kubernetes.io/version]
|
||||
pattern: \d+\.\d+\.\d+
|
||||
- matchRegex:
|
||||
path: metadata.labels.[helm.sh/chart]
|
||||
pattern: nexus-repository-manager-\d+\.\d+\.\d+
|
||||
- equal:
|
||||
path: metadata.labels.[app.kubernetes.io/name]
|
||||
value: nexus-repository-manager
|
||||
- equal:
|
||||
path: metadata.annotations
|
||||
value:
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||
|
||||
- documentIndex: 0
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-nexus-repository-manager
|
||||
|
||||
- documentIndex: 1
|
||||
equal:
|
||||
path: metadata.name
|
||||
value: RELEASE-NAME-nexus-repository-manager-docker-5000
|
||||
- documentIndex: 1
|
||||
equal:
|
||||
path: spec
|
||||
value:
|
||||
rules:
|
||||
- host: docker.repo.demo
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: RELEASE-NAME-nexus-repository-manager-docker-5000
|
||||
port:
|
||||
number: 5000
|
||||
tls:
|
||||
- hosts:
|
||||
- docker.repo.demo
|
||||
secretName: registry-secret
|
||||
|
||||
- it: is disabled by default
|
||||
asserts:
|
||||
- hasDocuments:
|
||||
count: 0
|
||||
|
||||
- it: renders with tls config when provided
|
||||
set:
|
||||
ingress:
|
||||
enabled: true
|
||||
tls:
|
||||
- secretName: nexus-tls-local
|
||||
hosts:
|
||||
- repo.host
|
||||
asserts:
|
||||
- equal:
|
||||
path: spec.tls
|
||||
value:
|
||||
- secretName: nexus-tls-local
|
||||
hosts:
|
||||
- repo.host
|
Reference in New Issue
Block a user