Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation: CNF Installation (7) Verify new installation process #2177

Merged
merged 2 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
255 changes: 255 additions & 0 deletions sample-cnfs/sample_multiple_deployments/coredns/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{{- if .Values.isClusterService }}
CoreDNS is now running in the cluster as a cluster-service.
{{- else }}
CoreDNS is now running in the cluster.
It can be accessed using the below endpoint
{{- if contains "NodePort" .Values.serviceType }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "coredns.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "$NODE_IP:$NODE_PORT"
{{- else if contains "LoadBalancer" .Values.serviceType }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl get svc -w {{ template "coredns.fullname" . }}'

export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "coredns.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo $SERVICE_IP
{{- else if contains "ClusterIP" .Values.serviceType }}
"{{ template "coredns.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local"
from within the cluster
{{- end }}
{{- end }}

It can be tested with the following:

1. Launch a Pod with DNS tools:

kubectl run -it --rm --restart=Never --image=infoblox/dnstools:latest dnstools

2. Query the DNS server:

/ # host kubernetes
Loading
Loading