Skip to content

Commit 54c498d

Browse files
authored
Merge branch 'master' into #20879
2 parents 59faded + f903a5c commit 54c498d

File tree

30 files changed

+814
-26
lines changed

30 files changed

+814
-26
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ KIC_VERSION ?= $(shell grep -E "Version =" pkg/drivers/kic/types.go | cut -d \"
2424
HUGO_VERSION ?= $(shell grep -E "HUGO_VERSION = \"" netlify.toml | cut -d \" -f2)
2525

2626
# Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions
27-
ISO_VERSION ?= v1.36.0-1748823857-20852
27+
ISO_VERSION ?= v1.36.0-1749153077-20895
2828

2929
# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
3030
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))

cmd/minikube/cmd/config/profile_list.go

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ import (
4040
"k8s.io/klog/v2"
4141
)
4242

43-
var profileOutput string
44-
var isLight bool
43+
var (
44+
profileOutput string
45+
isLight bool
46+
isDetailed bool
47+
)
4548

4649
var profileListCmd = &cobra.Command{
4750
Use: "list",
@@ -130,11 +133,17 @@ func profileStatus(p *config.Profile, api libmachine.API) cluster.State {
130133

131134
func renderProfilesTable(ps [][]string) {
132135
table := tablewriter.NewWriter(os.Stdout)
133-
table.Header([]string{"Profile", "VM Driver", "Runtime", "IP", "Port", "Version", "Status", "Nodes", "Active Profile", "Active Kubecontext"})
134-
table.SetAutoFormatHeaders(0)
135-
table.SetBorders(true)
136-
table.SetColumnSeparator("|")
137-
table.Bulk(ps)
136+
if isDetailed {
137+
table.SetHeader([]string{"Profile", "Driver", "Runtime", "IP", "Port", "Version",
138+
"Status", "Nodes", "Active Profile", "Active Kubecontext"})
139+
} else {
140+
table.SetHeader([]string{"Profile", "Driver", "Runtime", "IP", "Version", "Status",
141+
"Nodes", "Active Profile", "Active Kubecontext"})
142+
}
143+
table.SetAutoFormatHeaders(false)
144+
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
145+
table.SetCenterSeparator("|")
146+
table.AppendBulk(ps)
138147
table.Render()
139148
}
140149

@@ -164,7 +173,13 @@ func profilesToTableData(profiles []*config.Profile) [][]string {
164173
if p.ActiveKubeContext {
165174
k = "*"
166175
}
167-
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cpIP, strconv.Itoa(cpPort), k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes)), c, k})
176+
if isDetailed {
177+
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime,
178+
cpIP, strconv.Itoa(cpPort), k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes)), c, k})
179+
} else {
180+
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime,
181+
cpIP, k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes)), c, k})
182+
}
168183
}
169184
return data
170185
}
@@ -213,5 +228,6 @@ func profilesOrDefault(profiles []*config.Profile) []*config.Profile {
213228
func init() {
214229
profileListCmd.Flags().StringVarP(&profileOutput, "output", "o", "table", "The output format. One of 'json', 'table'")
215230
profileListCmd.Flags().BoolVarP(&isLight, "light", "l", false, "If true, returns list of profiles faster by skipping validating the status of the cluster.")
231+
profileListCmd.Flags().BoolVarP(&isDetailed, "detailed", "d", false, "If true, returns a detailed list of profiles.")
216232
ProfileCmd.AddCommand(profileListCmd)
217233
}

deploy/addons/assets.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,8 @@ var (
178178
// YakdAssets assets for yakd addon
179179
//go:embed yakd/*.yaml yakd/*.tmpl
180180
YakdAssets embed.FS
181+
182+
// Kubetail assets for kubetail addon
183+
//go:embed kubetail/*.yaml kubetail/*.tmpl
184+
KubetailAssets embed.FS
181185
)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
kind: ServiceAccount
2+
apiVersion: v1
3+
metadata:
4+
name: kubetail-cli
5+
namespace: kubetail-system
6+
labels:
7+
kubernetes.io/minikube-addons: kubetail
8+
addonmanager.kubernetes.io/mode: Reconcile
9+
app.kubernetes.io/name: kubetail
10+
app.kubernetes.io/version: "0.11.5"
11+
app.kubernetes.io/instance: kubetail
12+
app.kubernetes.io/component: cli
13+
---
14+
kind: ClusterRole
15+
apiVersion: rbac.authorization.k8s.io/v1
16+
metadata:
17+
name: kubetail-cli
18+
labels:
19+
kubernetes.io/minikube-addons: kubetail
20+
addonmanager.kubernetes.io/mode: Reconcile
21+
app.kubernetes.io/name: kubetail
22+
app.kubernetes.io/version: "0.11.5"
23+
app.kubernetes.io/instance: kubetail
24+
app.kubernetes.io/component: cli
25+
rules:
26+
- apiGroups: [""]
27+
resources: [nodes]
28+
verbs: [get, list, watch]
29+
- apiGroups: ["", apps, batch]
30+
resources: [cronjobs, daemonsets, deployments, jobs, pods, replicasets, statefulsets]
31+
verbs: [get, list, watch]
32+
- apiGroups: [""]
33+
resources: [pods/log]
34+
verbs: [list, watch]
35+
---
36+
kind: ClusterRoleBinding
37+
apiVersion: rbac.authorization.k8s.io/v1
38+
metadata:
39+
name: kubetail-cli
40+
labels:
41+
kubernetes.io/minikube-addons: kubetail
42+
addonmanager.kubernetes.io/mode: Reconcile
43+
app.kubernetes.io/name: kubetail
44+
app.kubernetes.io/version: "0.11.5"
45+
app.kubernetes.io/instance: kubetail
46+
app.kubernetes.io/component: cli
47+
roleRef:
48+
apiGroup: rbac.authorization.k8s.io
49+
kind: ClusterRole
50+
name: kubetail-cli
51+
subjects:
52+
- kind: ServiceAccount
53+
name: kubetail-cli
54+
namespace: kubetail-system
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: kubetail-cluster-agent
5+
namespace: kubetail-system
6+
labels:
7+
kubernetes.io/minikube-addons: kubetail
8+
addonmanager.kubernetes.io/mode: Reconcile
9+
app.kubernetes.io/name: kubetail
10+
app.kubernetes.io/version: "0.11.5"
11+
app.kubernetes.io/instance: kubetail
12+
app.kubernetes.io/component: cluster-agent
13+
data:
14+
config.yaml: |
15+
cluster-agent:
16+
addr: :50051
17+
logging:
18+
enabled: true
19+
format: json
20+
level: info
21+
tls:
22+
cert-file: null
23+
enabled: false
24+
key-file: null
25+
---
26+
kind: ServiceAccount
27+
apiVersion: v1
28+
automountServiceAccountToken: true
29+
metadata:
30+
name: kubetail-cluster-agent
31+
namespace: kubetail-system
32+
labels:
33+
kubernetes.io/minikube-addons: kubetail
34+
addonmanager.kubernetes.io/mode: Reconcile
35+
app.kubernetes.io/name: kubetail
36+
app.kubernetes.io/version: "0.11.5"
37+
app.kubernetes.io/instance: kubetail
38+
app.kubernetes.io/component: cluster-agent
39+
---
40+
kind: DaemonSet
41+
apiVersion: apps/v1
42+
metadata:
43+
name: kubetail-cluster-agent
44+
namespace: kubetail-system
45+
labels:
46+
kubernetes.io/minikube-addons: kubetail
47+
addonmanager.kubernetes.io/mode: Reconcile
48+
app.kubernetes.io/name: kubetail
49+
app.kubernetes.io/version: "0.11.5"
50+
app.kubernetes.io/instance: kubetail
51+
app.kubernetes.io/component: cluster-agent
52+
spec:
53+
selector:
54+
matchLabels:
55+
app.kubernetes.io/name: kubetail
56+
app.kubernetes.io/instance: kubetail
57+
app.kubernetes.io/component: cluster-agent
58+
template:
59+
metadata:
60+
labels:
61+
app.kubernetes.io/name: kubetail
62+
app.kubernetes.io/version: "0.11.5"
63+
app.kubernetes.io/instance: kubetail
64+
app.kubernetes.io/component: cluster-agent
65+
spec:
66+
automountServiceAccountToken: true
67+
serviceAccountName: kubetail-cluster-agent
68+
securityContext:
69+
fsGroup: 0
70+
containers:
71+
- name: kubetail-cluster-agent
72+
image: {{.CustomRegistries.Kubetail | default .ImageRepository | default .Registries.Kubetail }}{{.Images.KubetailClusterAgent}}
73+
securityContext:
74+
allowPrivilegeEscalation: false
75+
capabilities:
76+
add:
77+
- DAC_READ_SEARCH
78+
drop:
79+
- ALL
80+
readOnlyRootFilesystem: true
81+
runAsGroup: 1000
82+
runAsUser: 1000
83+
imagePullPolicy: IfNotPresent
84+
args:
85+
- --config=/etc/kubetail/config.yaml
86+
ports:
87+
- name: grpc
88+
protocol: TCP
89+
containerPort: 50051
90+
livenessProbe:
91+
grpc:
92+
port: 50051
93+
initialDelaySeconds: 5
94+
timeoutSeconds: 30
95+
periodSeconds: 3
96+
failureThreshold: 3
97+
readinessProbe:
98+
grpc:
99+
port: 50051
100+
initialDelaySeconds: 5
101+
timeoutSeconds: 30
102+
periodSeconds: 3
103+
failureThreshold: 3
104+
volumeMounts:
105+
- name: config
106+
mountPath: /etc/kubetail
107+
readOnly: true
108+
- name: varlog
109+
mountPath: /var/log
110+
readOnly: true
111+
- name: varlibdockercontainers
112+
mountPath: /var/lib/docker/containers
113+
readOnly: true
114+
volumes:
115+
- name: config
116+
configMap:
117+
name: kubetail-cluster-agent
118+
- name: varlog
119+
hostPath:
120+
path: /var/log
121+
- name: varlibdockercontainers
122+
hostPath:
123+
path: /var/lib/docker/containers
124+
tolerations:
125+
- effect: NoSchedule
126+
key: node-role.kubernetes.io/master
127+
operator: Exists
128+
- effect: NoSchedule
129+
key: node-role.kubernetes.io/control-plane
130+
operator: Exists
131+
---
132+
kind: Service
133+
apiVersion: v1
134+
metadata:
135+
name: kubetail-cluster-agent
136+
namespace: kubetail-system
137+
labels:
138+
kubernetes.io/minikube-addons: kubetail
139+
addonmanager.kubernetes.io/mode: Reconcile
140+
app.kubernetes.io/name: kubetail
141+
app.kubernetes.io/version: "0.11.5"
142+
app.kubernetes.io/instance: kubetail
143+
app.kubernetes.io/component: cluster-agent
144+
spec:
145+
clusterIP: None
146+
selector:
147+
app.kubernetes.io/name: kubetail
148+
app.kubernetes.io/instance: kubetail
149+
app.kubernetes.io/component: cluster-agent
150+
---
151+
kind: NetworkPolicy
152+
apiVersion: networking.k8s.io/v1
153+
metadata:
154+
name: kubetail-cluster-agent
155+
namespace: kubetail-system
156+
labels:
157+
kubernetes.io/minikube-addons: kubetail
158+
addonmanager.kubernetes.io/mode: Reconcile
159+
app.kubernetes.io/name: kubetail
160+
app.kubernetes.io/version: "0.11.5"
161+
app.kubernetes.io/instance: kubetail
162+
app.kubernetes.io/component: cluster-agent
163+
spec:
164+
podSelector:
165+
matchLabels:
166+
app.kubernetes.io/name: kubetail
167+
app.kubernetes.io/instance: kubetail
168+
app.kubernetes.io/component: cluster-agent
169+
ingress:
170+
- from:
171+
- podSelector:
172+
matchLabels:
173+
app.kubernetes.io/name: kubetail
174+
app.kubernetes.io/instance: kubetail
175+
app.kubernetes.io/component: cluster-api

0 commit comments

Comments
 (0)