CI: Cleanup what we gather from K8s

Seems like the set of resources we gather from K8s for CI gates
debugging purposes was outdated. This commit updates it to make sure
we're also getting NPs and KLBs, while removing Ingress, KuryrNet and
KuryrNetPolicy that are obsolete today.

Besides that KuryrNet and KuryrNetPolicy CRD definitions are removed as
we're not using them for a long time now.

Change-Id: Ia7ecd8f79b6ac0a8172cf108e228e2ea1cb7a0d5
This commit is contained in:
Michał Dulko 2022-03-08 12:52:31 +01:00
parent 3f66afa57f
commit 46f4544547
3 changed files with 4 additions and 182 deletions

View File

@ -1,45 +0,0 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kuryrnets.openstack.org
spec:
group: openstack.org
scope: Cluster
names:
plural: kuryrnets
singular: kuryrnet
kind: KuryrNet
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- name: SUBNET-CIDR
type: string
description: The subnet CIDR allocated to the namespace
jsonPath: .spec.subnetCIDR
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required:
- netId
- routerId
- subnetCIDR
- subnetId
properties:
netId:
type: string
populated:
type: boolean
routerId:
type: string
subnetCIDR:
type: string
subnetId:
type: string

View File

@ -1,133 +0,0 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: kuryrnetpolicies.openstack.org
spec:
group: openstack.org
scope: Namespaced
names:
plural: kuryrnetpolicies
singular: kuryrnetpolicy
kind: KuryrNetPolicy
versions:
- name: v1
served: true
storage: true
additionalPrinterColumns:
- name: SG-ID
type: string
description: The ID of the SG associated to the policy
jsonPath: .spec.securityGroupId
- name: Age
type: date
jsonPath: .metadata.creationTimestamp
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
required:
- egressSgRules
- ingressSgRules
- networkpolicy_spec
- podSelector
- securityGroupId
properties:
egressSgRules:
type: array
items:
type: object
required:
- security_group_rule
properties:
remote_ip_prefixes:
type: object
x-kubernetes-preserve-unknown-fields: true
namespace:
type: string
security_group_rule:
type: object
required:
- id
properties:
description:
type: string
direction:
type: string
ethertype:
type: string
id:
type: string
port_range_max:
type: integer
port_range_min:
type: integer
protocol:
type: string
remote_ip_prefix:
type: string
security_group_id:
type: string
ingressSgRules:
type: array
items:
type: object
required:
- security_group_rule
properties:
remote_ip_prefixes:
x-kubernetes-preserve-unknown-fields: true
type: object
namespace:
type: string
security_group_rule:
type: object
required:
- id
properties:
description:
type: string
direction:
type: string
ethertype:
type: string
id:
type: string
port_range_max:
type: integer
port_range_min:
type: integer
protocol:
type: string
remote_ip_prefix:
type: string
security_group_id:
type: string
networkpolicy_spec:
type: object
properties:
podSelector:
x-kubernetes-preserve-unknown-fields: true
type: object
policyTypes:
type: array
items:
type: string
ingress:
type: array
items:
x-kubernetes-preserve-unknown-fields: true
type: object
egress:
type: array
items:
x-kubernetes-preserve-unknown-fields: true
type: object
podSelector:
x-kubernetes-preserve-unknown-fields: true
type: object
securityGroupId:
type: string
securityGroupName:
type: string

View File

@ -29,17 +29,17 @@ sudo chown ${USER}:${USER} ${HOME}/.kube/config
KCTL="/usr/bin/kubectl --kubeconfig=${HOME}/.kube/config"
$KCTL get pods -o yaml --all-namespaces >> ${K8S_LOG_DIR}/pods.txt
$KCTL get svc -o yaml --all-namespaces >> ${K8S_LOG_DIR}/services.txt
$KCTL get endpoints -o yaml --all-namespaces >> ${K8S_LOG_DIR}/endpoints.txt
$KCTL get networkpolicies -o yaml --all-namespaces >> ${K8S_LOG_DIR}/networkpolicies.txt
$KCTL get cm -o yaml --all-namespaces >> ${K8S_LOG_DIR}/configmaps.txt
$KCTL get deploy -o yaml --all-namespaces >> ${K8S_LOG_DIR}/deployments.txt
$KCTL get ds -o yaml --all-namespaces >> ${K8S_LOG_DIR}/daemonsets.txt
$KCTL get nodes -o yaml --all-namespaces >> ${K8S_LOG_DIR}/nodes.txt
$KCTL get ingress -o yaml --all-namespaces >> ${K8S_LOG_DIR}/ingress.txt
$KCTL get namespaces -o yaml >> ${K8S_LOG_DIR}/namespaces.txt
$KCTL get kuryrnets -o yaml --all-namespaces >> ${K8S_LOG_DIR}/kuryrnets_crds.txt
$KCTL get events -o yaml --all-namespaces >> ${K8S_LOG_DIR}/events.txt
$KCTL get kuryrnetworks -o yaml --all-namespaces >> ${K8S_LOG_DIR}/kuryrnetworks_crds.txt
$KCTL get endpoints -o yaml --all-namespaces >> ${K8S_LOG_DIR}/endpoints.txt
$KCTL get kuryrnetpolicy -o yaml --all-namespaces >> ${K8S_LOG_DIR}/kuryrnetpolicy_crds.txt
$KCTL get kuryrport -o yaml --all-namespaces >> ${K8S_LOG_DIR}/kuryrport_crds.txt
$KCTL get kuryrloadbalancers -o yaml --all-namespaces >> ${K8S_LOG_DIR}/kuryrloadbalancer_crds.txt
$KCTL get kuryrnetworkpolicy -o yaml --all-namespaces >> ${K8S_LOG_DIR}/kuryrnetworkpolicy_crds.txt
sudo journalctl -o short-precise --unit kubelet | sudo tee ${K8S_LOG_DIR}/kubelet_log.txt > /dev/null
# Kubernetes pods logs