Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
bb966c0
To transfer it to other VM
Jun 9, 2022
c68227a
Working till outboundcheck
Jun 14, 2022
5fba5c1
Working for demo part
Jun 15, 2022
5cf400b
Code for Demo
Jun 20, 2022
046b4ce
Diagnoser First Draft
Jun 21, 2022
00c36d8
Revert "Diagnoser First Draft"
Jun 21, 2022
806e557
Revert "Revert "Diagnoser First Draft""
Jun 21, 2022
fbd4f10
Diagnoser First Draft (Removed Unwanted files)
Jun 21, 2022
a136ae4
Frist Draft Code ( removed extra files)
Jun 21, 2022
a024972
Diagnoser Code Draft - (Removed style issues - Iteration 1)
Jun 21, 2022
7310cfa
Diagnoser Code Draft - (Removed linter issues - Iteration 2)
Jun 21, 2022
0ec86e8
Diagnoser Code Draft - (Removed style issues - Iteration 3)
Jun 21, 2022
a69ca58
Diagnoser Code Draft - (Removed style issues - Iteration 4)
Jun 21, 2022
76697e0
@svagadia Diagnoser Code Draft - (Removed linter issue - Iteration 5)
Jun 22, 2022
cb91e2c
Diagnoser Code Draft - (Removed linter issue - Iteration 6)
Jun 22, 2022
6e7c320
Diagnoser Code Draft ( Code Changes Iteration 1 )
Jun 22, 2022
9b28cb5
First Draft Code ( Changed the current storage location )
Jun 22, 2022
25e07b1
Diagnoser Code Draft ( Changed agents_version_check )
Jun 22, 2022
e6efe35
Diagnoser First Draft - ( Storage Check and Exceptions added )
Jun 26, 2022
6ed328b
Diagnoser First Draft ( Added Event Logs )
Jun 26, 2022
4ee6418
Diagnoser Code ( Updated Filepaths )
Jun 28, 2022
ef010a7
Azure Arc Diagnostic - ( Deleted Unused Folder )
Jun 28, 2022
ae037c6
Azure Arc Diagnostic - ( Added proper exceptions )
Jun 28, 2022
ec1e6da
Added telemetry exceptions and other changes
Jun 29, 2022
9ad541d
Changed directory and added Diagnoser Results
Jun 30, 2022
4fd69b3
Added create_from_yaml Exception
Jun 30, 2022
4700b1a
Removing style issues Iteration 1
Jun 30, 2022
260341b
Removing style issues Iteration 2
Jun 30, 2022
a7123f2
Removed --debug issue
Jul 1, 2022
c6e713d
Edited Exceptions
Jul 1, 2022
4f476ca
Remove style issues iteration1
Jul 4, 2022
2f9d895
Resolved issues.
Jul 6, 2022
9e13c0d
Updated subprocess with Popen
Jul 6, 2022
d6e2904
Removed Static Analysis errors.
Jul 6, 2022
295c0f6
Update msi_cert_check name
Jul 6, 2022
f82180d
Added comments where required
Jul 6, 2022
649d213
Removed Style issue
Jul 6, 2022
6eb6083
Update _params.py
Jul 6, 2022
78ff3d1
Added proxycert condition
Jul 7, 2022
e560116
Working code for final demo.
Jul 8, 2022
912fe12
Added comments wherever required
Jul 10, 2022
01e3970
Removed Style issues
Jul 11, 2022
e0b1f59
Update _troubleshootutils.py
Jul 11, 2022
2491aec
Corrected the errors.
Jul 11, 2022
24f1bf9
Made necessary corrections.
Jul 11, 2022
f4f0ae1
Made corrections
Jul 11, 2022
e6ed83d
Update _troubleshootutils.py
Jul 11, 2022
0c8fa90
Made improvements
Jul 11, 2022
e90e9ab
Made corrections
Jul 11, 2022
04a318b
Update _troubleshootutils.py
Jul 12, 2022
2948119
Updated dns and outbound
Jul 12, 2022
567092e
Updated the filepath
Jul 12, 2022
d32e61a
Update _troubleshootutils.py
Jul 12, 2022
1fb8434
Resolved errors.
Jul 13, 2022
2dc46e1
Resolved errors.
Jul 13, 2022
af4b2c5
Resolved style issues
Jul 13, 2022
b688290
Updated Constants.py
Jul 13, 2022
68f0ec8
Updated print to logger.warning
Jul 13, 2022
e08b762
Updated security_policy_check
Jul 13, 2022
91cd6ed
Update _troubleshootutils.py
Jul 13, 2022
40f3d25
Made the changes
Jul 13, 2022
5b66e25
Removed unused variables
Jul 13, 2022
ab11adc
Update _constants.py
Jul 13, 2022
b6fcfc0
Update _troubleshootutils.py
Jul 13, 2022
3421ee1
Update _troubleshootutils.py
Jul 13, 2022
2080b2d
Updated the Diagnoser comment
Jul 13, 2022
e2d9b64
Updated agent_state
Jul 13, 2022
2ef3dd3
Updated the comments
Jul 14, 2022
3eebb1d
Updated _troubleshootutils.py
Jul 14, 2022
d1f2c34
Update _troubleshootutils.py
Jul 14, 2022
470da05
Update _troubleshootutils.py
Jul 14, 2022
f0ca8cc
Merge branch 'Azure:main' into troubleshoot
svagadia Jul 14, 2022
c2ce76d
Update _troubleshootutils.py
Jul 14, 2022
faf15f9
Updated MCR image
Jul 15, 2022
bcb1232
Removed typos
Jul 15, 2022
4c490c9
Updated folder names
Jul 15, 2022
72b584f
Update _troubleshootutils.py
Jul 15, 2022
a59490c
Updated the Version
Jul 15, 2022
63e6eea
Updated suggestions
Jul 15, 2022
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
52 changes: 52 additions & 0 deletions src/connectedk8s/TroubleshootTemplates/diagnoser_job.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: azure-arc-troubleshoot
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: default
name: secret-reader
rules:
- apiGroups: [""] # "" indicates the core API group
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: read-pods
namespace: default
subjects:
# You can specify more than one "subject"
- kind: ServiceAccount
name: azure-arc-troubleshoot
namespace: default
roleRef:
kind: Role #this must be Role or ClusterRole
name: secret-reader # this must match the name of the Role or ClusterRole you wish to bind to
namespace: default
---
apiVersion: batch/v1
kind: Job
metadata:
name: diagnosercontainer
namespace: default
labels:
app: networktest
spec:
template:
metadata:
labels:
app: networktest
spec:
serviceAccountName: azure-arc-troubleshoot
containers:
- name: networktest1
image: svacr1.azurecr.io/networktest:6.0
namespace: default
restartPolicy: Never
backoffLimit: 4

8 changes: 8 additions & 0 deletions src/connectedk8s/azext_connectedk8s/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,11 @@
- name: Disable multiple features.
text: az connectedk8s disable-features -n clusterName -g resourceGroupName --features custom-locations azure-rbac
"""

helps['connectedk8s troubleshoot'] = """
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anraghun to review the help section

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

short-summary: Performs diagnostic checks on the arc-enabled kubernetes an Arc enabled Kubernetes cluster.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • name: Executes Performs diagnostic checks on an arc enabled kubernetes Arc enabled Kubernetes cluster

type: command
short-summary: Perform diagnostic check on the arc-enabled kubernetes cluster.
examples:
- name: Executes diagnostic checks on a connected kubernetes cluster
text: az connectedk8s troubleshoot -n clusterName -g resourceGroupName
"""
11 changes: 11 additions & 0 deletions src/connectedk8s/azext_connectedk8s/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@

def load_arguments(self, _):

with self.argument_context('connectedk8s troubleshoot') as c:
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group)
c.argument('cluster_name', options_list=['--name', '-n'], help='The name of the connected cluster.')
c.argument('kube_config', options_list=['--kube-config'], help='Path to the kube config file.')
c.argument('kube_context', options_list=['--kube-context'], help='Kubconfig context from current machine.')
c.argument('https_proxy', options_list=['--proxy-https'], arg_group='Proxy', help='Https proxy URL to be used.')
c.argument('http_proxy', options_list=['--proxy-http'], arg_group='Proxy', help='Http proxy URL to be used.')
c.argument('no_proxy', options_list=['--proxy-skip-range'], arg_group='Proxy', help='List of URLs/CIDRs for which proxy should not to be used.')
c.argument('proxy_cert', options_list=['--proxy-cert'], arg_group='Proxy', type=file_type, completer=FilesCompleter(), help='Path to the certificate file for proxy')

with self.argument_context('connectedk8s connect') as c:
c.argument('tags', tags_type)
c.argument('location', arg_type=get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group)
Expand Down
Loading