Skip to content

Commit

Permalink
feat: add spec tests for new installatio method
Browse files Browse the repository at this point in the history
refs: #2168

Signed-off-by: svteb <[email protected]>
  • Loading branch information
collivier authored and svteb committed Nov 11, 2024
1 parent bc1f193 commit 5f134ad
Show file tree
Hide file tree
Showing 126 changed files with 11,539 additions and 13 deletions.
1 change: 1 addition & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ jobs:
endpoint = ["http://localhost:5000"]
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"]
endpoint = ["http://localhost:5000"]
EOF
- name: Install Latest Kind
env:
KIND_VERSION: v0.22.0
Expand Down
4 changes: 4 additions & 0 deletions sample-cnfs/sample-bad-config/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
config_version: v2
deployments:
vorp: "glup 👽"
12 changes: 12 additions & 0 deletions sample-cnfs/sample-conflicting-deployments/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
config_version: v2
deployments:
helm_charts:
- name: nginx
helm_repo_name: bitnami
helm_repo_url: https://charts.bitnami.com/bitnami
helm_chart_name: nginx
helm_values: --set replicaCount=1
manifests:
- name: nginx
manifest_directory: manifests
40 changes: 40 additions & 0 deletions sample-cnfs/sample-conflicting-deployments/manifests/pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- image: bitnami/nginx:1.20
name: nginx
command:
- /opt/bitnami/scripts/nginx/entrypoint.sh
- /opt/bitnami/scripts/nginx/run.sh
livenessProbe:
tcpSocket:
port: 8080
readinessProbe:
tcpSocket:
port: 8080
resources: {}
ports:
- containerPort: 8080
- containerPort: 8443
dnsPolicy: Default

---
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
externalIPs:
- 2.2.2.2
20 changes: 20 additions & 0 deletions sample-cnfs/sample-elk-stack/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
config_version: "v2"

deployments:
helm_charts:
- name: elasticsearch
helm_repo_name: elastic
helm_repo_url: https://helm.elastic.co
helm_chart_name: elasticsearch
helm_values: "--set replicas=1"
- name: logstash
helm_repo_name: elastic
helm_repo_url: https://helm.elastic.co
helm_chart_name: logstash
helm_values: "--set replicaCount=1"
- name: kibana
helm_repo_name: elastic
helm_repo_url: https://helm.elastic.co
helm_chart_name: kibana
helm_values: "--set replicaCount=1"
12 changes: 12 additions & 0 deletions sample-cnfs/sample-nginx-redis/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
config_version: v2
deployments:
helm_charts:
- name: nginx
helm_repo_name: bitnami
helm_repo_url: https://charts.bitnami.com/bitnami
helm_chart_name: nginx
helm_values: --set replicaCount=1
manifests:
- name: redis
manifest_directory: redis-manifests
21 changes: 21 additions & 0 deletions sample-cnfs/sample-nginx-redis/redis-manifests/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:6.2
ports:
- containerPort: 6379
11 changes: 11 additions & 0 deletions sample-cnfs/sample-nginx-redis/redis-manifests/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
type: ClusterIP
selector:
app: redis
ports:
- port: 6379
targetPort: 6379
13 changes: 13 additions & 0 deletions sample-cnfs/sample-partial-deployment-failure/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
config_version: v2
deployments:
helm_charts:
- name: nginx
helm_repo_name: bitnami
helm_repo_url: https://charts.bitnami.com/bitnami
helm_chart_name: nginx
helm_values: --set replicaCount=1
- name: coredns
helm_chart_name: coredns
helm_repo_name: badrepo
helm_repo_url: https://bad-helm-repo.googleapis.com
10 changes: 10 additions & 0 deletions sample-cnfs/sample_multiple_deployments/cnf-testsuite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
config_version: v2
deployments:
helm_dirs:
- name: coredns
helm_directory: coredns
- name: memcached
helm_directory: memcached
- name: nginx
helm_directory: nginx
22 changes: 22 additions & 0 deletions sample-cnfs/sample_multiple_deployments/coredns/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
OWNERS
24 changes: 24 additions & 0 deletions sample-cnfs/sample_multiple_deployments/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
annotations:
artifacthub.io/changes: |
- kind: fix
description: Add default values to chart to fix cluster role name templating issue
apiVersion: v2
appVersion: 1.11.3
description: CoreDNS is a DNS server that chains plugins and provides Kubernetes DNS
Services
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
keywords:
- coredns
- dns
- kubedns
maintainers:
- name: mrueg
- name: haad
- name: hagaibarel
- name: shubham-cmyk
name: coredns
sources:
- https://github.com/coredns/coredns
type: application
version: 1.36.1
Loading

0 comments on commit 5f134ad

Please sign in to comment.