Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit 24fb1f9

Browse files
authored
Merge pull request #60 from jetstack/cluster-info-cmd
Implement basic cluster info command
2 parents bb9c924 + a3bec00 commit 24fb1f9

File tree

91 files changed

+31951
-495
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+31951
-495
lines changed

.github/workflows/go.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ jobs:
1212
env:
1313
GOPRIVATE: github.com/jetstack/*
1414
steps:
15-
- name: Configure js-operator repo pull access
16-
# js-operator is a private repo that this tool depends on to build,
15+
- name: Configure private repo pull access
1716
# the following configuration will grant this action permissions to pull
18-
# that contents of that repo during a go mod download step. The key in
19-
# DEPLOY_KEY_READ_JS_OPERATOR is the private key of a deploy key on
20-
# the js-operator repo granting read only access.
17+
# that contents of that private repos using the deploy keys in the repo secrets
2118
run: |
2219
mkdir ~/.ssh
2320
chmod 700 ~/.ssh
2421
2522
echo "${{ secrets.DEPLOY_KEY_READ_JS_OPERATOR }}" > ~/.ssh/js_operator_id
23+
echo "${{ secrets.DEPLOY_KEY_READ_VENAFI_ENHANCED_ISSUER }}" > ~/.ssh/venafi_enhanced_issuer_id
24+
echo "${{ secrets.DEPLOY_KEY_READ_EXTERNAL_ISSUER_LIB }}" > ~/.ssh/external_issuer_lib_id
25+
26+
chmod 600 ~/.ssh/venafi_enhanced_issuer_id
27+
chmod 600 ~/.ssh/external_issuer_lib_id
2628
chmod 600 ~/.ssh/js_operator_id
2729
2830
cat <<EOT >> ~/.ssh/config
@@ -31,10 +33,28 @@ jobs:
3133
IdentityFile ~/.ssh/js_operator_id
3234
IdentitiesOnly yes
3335
EOT
36+
37+
cat <<EOT >> ~/.ssh/config
38+
Host venafi-enhanced-issuer.github.com
39+
HostName github.com
40+
IdentityFile ~/.ssh/venafi_enhanced_issuer_id
41+
IdentitiesOnly yes
42+
EOT
43+
44+
cat <<EOT >> ~/.ssh/config
45+
Host external-issuer-lib.github.com
46+
HostName github.com
47+
IdentityFile ~/.ssh/external_issuer_lib_id
48+
IdentitiesOnly yes
49+
EOT
3450
3551
cat <<EOT >> ~/.gitconfig
3652
[url "[email protected]:jetstack/js-operator"]
3753
insteadOf = https://github.com/jetstack/js-operator
54+
[url "[email protected]:jetstack/venafi-enhanced-issuer"]
55+
insteadOf = https://github.com/jetstack/venafi-enhanced-issuer
56+
[url "[email protected]:jetstack/external-issuer-lib"]
57+
insteadOf = https://github.com/jetstack/external-issuer-lib
3858
EOT
3959
4060
- name: Install Go

.github/workflows/release.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ jobs:
99
env:
1010
GOPRIVATE: github.com/jetstack/*
1111
steps:
12-
- name: Configure js-operator repo pull access
13-
# js-operator is a private repo that this tool depends on to build,
12+
- name: Configure private repo pull access
1413
# the following configuration will grant this action permissions to pull
15-
# that contents of that repo during a go mod download step. The key in
16-
# DEPLOY_KEY_READ_JS_OPERATOR is the private key of a deploy key on
17-
# the js-operator repo granting read only access.
14+
# that contents of that private repos using the deploy keys in the repo secrets
1815
run: |
1916
mkdir ~/.ssh
2017
chmod 700 ~/.ssh
2118
2219
echo "${{ secrets.DEPLOY_KEY_READ_JS_OPERATOR }}" > ~/.ssh/js_operator_id
20+
echo "${{ secrets.DEPLOY_KEY_READ_VENAFI_ENHANCED_ISSUER }}" > ~/.ssh/venafi_enhanced_issuer_id
21+
echo "${{ secrets.DEPLOY_KEY_READ_EXTERNAL_ISSUER_LIB }}" > ~/.ssh/external_issuer_lib_id
22+
23+
chmod 600 ~/.ssh/venafi_enhanced_issuer_id
24+
chmod 600 ~/.ssh/external_issuer_lib_id
2325
chmod 600 ~/.ssh/js_operator_id
2426
2527
cat <<EOT >> ~/.ssh/config
@@ -28,10 +30,28 @@ jobs:
2830
IdentityFile ~/.ssh/js_operator_id
2931
IdentitiesOnly yes
3032
EOT
33+
34+
cat <<EOT >> ~/.ssh/config
35+
Host venafi-enhanced-issuer.github.com
36+
HostName github.com
37+
IdentityFile ~/.ssh/venafi_enhanced_issuer_id
38+
IdentitiesOnly yes
39+
EOT
40+
41+
cat <<EOT >> ~/.ssh/config
42+
Host external-issuer-lib.github.com
43+
HostName github.com
44+
IdentityFile ~/.ssh/external_issuer_lib_id
45+
IdentitiesOnly yes
46+
EOT
3147
3248
cat <<EOT >> ~/.gitconfig
3349
[url "[email protected]:jetstack/js-operator"]
3450
insteadOf = https://github.com/jetstack/js-operator
51+
[url "[email protected]:jetstack/venafi-enhanced-issuer"]
52+
insteadOf = https://github.com/jetstack/venafi-enhanced-issuer
53+
[url "[email protected]:jetstack/external-issuer-lib"]
54+
insteadOf = https://github.com/jetstack/external-issuer-lib
3555
EOT
3656
3757
- name: Install Go

docs/developer/cluster_status.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# `jsctl cluster status` command
2+
3+
The cluster status command shows the status resource definitions and resources
4+
in the cluster. This command exists to aid in the installation and maintenance
5+
of Jetstack Secure.
6+
7+
## A component is not being correctly identified
8+
9+
If an item in this part of the output:
10+
11+
```
12+
components:
13+
...
14+
```
15+
16+
appears to be incorrect, then you will need to alter the component's matching
17+
code. These are found in the `internal/kubernetes/status/components/` directory.
18+
19+
Updating the `Match` implementation will allow the component to be correctly
20+
identified, note, more information migth need to be supplied to the function
21+
to robustly identify the component. This will require updates to the
22+
`installedComponent` interface.

go.mod

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,34 @@ go 1.19
44

55
require (
66
github.com/Masterminds/semver v1.5.0
7-
github.com/cert-manager/cert-manager v1.9.1
8-
github.com/gofrs/uuid v4.3.0+incompatible
7+
github.com/Skyscanner/kms-issuer v1.0.1-0.20221007144244-feb19f32171b
8+
github.com/cert-manager/aws-privateca-issuer v1.2.2
9+
github.com/cert-manager/cert-manager v1.10.0
10+
github.com/cloudflare/origin-ca-issuer v0.6.1
11+
github.com/gofrs/uuid v4.3.1+incompatible
912
github.com/golang-jwt/jwt/v4 v4.4.2
10-
github.com/jetstack/js-operator v0.0.1-alpha.17
13+
github.com/jetstack/google-cas-issuer v0.6.0
14+
github.com/jetstack/js-operator v0.0.1-alpha.18
15+
github.com/jetstack/venafi-enhanced-issuer v0.1.6
1116
github.com/mitchellh/go-homedir v1.1.0
12-
github.com/spf13/cobra v1.5.0
17+
github.com/smallstep/step-issuer v0.6.1
18+
github.com/spf13/cobra v1.6.1
1319
github.com/spf13/pflag v1.0.5
14-
github.com/stretchr/testify v1.8.0
20+
github.com/stretchr/testify v1.8.1
1521
github.com/toqueteos/webbrowser v1.2.0
16-
golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1
17-
golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0
22+
golang.org/x/oauth2 v0.2.0
23+
golang.org/x/sync v0.1.0
1824
gopkg.in/yaml.v2 v2.4.0
19-
k8s.io/api v0.25.2
20-
k8s.io/apiextensions-apiserver v0.25.2
21-
k8s.io/apimachinery v0.25.2
22-
k8s.io/client-go v0.25.2
25+
k8s.io/api v0.25.3
26+
k8s.io/apiextensions-apiserver v0.25.3
27+
k8s.io/apimachinery v0.25.3
28+
k8s.io/client-go v0.25.3
2329
sigs.k8s.io/yaml v1.3.0
2430
)
2531

2632
require (
27-
cloud.google.com/go/compute v1.10.0 // indirect
33+
cloud.google.com/go/compute v1.12.1 // indirect
34+
cloud.google.com/go/compute/metadata v0.2.1 // indirect
2835
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
2936
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
3037
github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect
@@ -42,9 +49,11 @@ require (
4249
github.com/gogo/protobuf v1.3.2 // indirect
4350
github.com/golang/protobuf v1.5.2 // indirect
4451
github.com/google/gnostic v0.6.9 // indirect
52+
github.com/google/go-cmp v0.5.9 // indirect
4553
github.com/google/gofuzz v1.2.0 // indirect
4654
github.com/imdario/mergo v0.3.13 // indirect
4755
github.com/inconshreveable/mousetrap v1.0.1 // indirect
56+
github.com/jetstack/external-issuer-lib v0.0.0-20221107151228-a68398a7931b // indirect
4857
github.com/josharian/intern v1.0.0 // indirect
4958
github.com/json-iterator/go v1.1.12 // indirect
5059
github.com/mailru/easyjson v0.7.7 // indirect
@@ -53,23 +62,21 @@ require (
5362
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
5463
github.com/pmezard/go-difflib v1.0.0 // indirect
5564
github.com/russross/blackfriday/v2 v2.1.0 // indirect
56-
golang.org/x/crypto v0.0.0-20221005025214-4161e89ecf1b // indirect
57-
golang.org/x/net v0.0.0-20221004154528-8021a29435af // indirect
58-
golang.org/x/sys v0.0.0-20221006211917-84dc82d7e875 // indirect
59-
golang.org/x/term v0.0.0-20220919170432-7a66f970e087 // indirect
60-
golang.org/x/text v0.3.7 // indirect
61-
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
65+
golang.org/x/crypto v0.2.0 // indirect
66+
golang.org/x/net v0.2.0 // indirect
67+
golang.org/x/sys v0.2.0 // indirect
68+
golang.org/x/term v0.2.0 // indirect
69+
golang.org/x/text v0.4.0 // indirect
70+
golang.org/x/time v0.2.0 // indirect
6271
google.golang.org/appengine v1.6.7 // indirect
6372
google.golang.org/protobuf v1.28.1 // indirect
6473
gopkg.in/inf.v0 v0.9.1 // indirect
6574
gopkg.in/yaml.v3 v3.0.1 // indirect
6675
k8s.io/klog/v2 v2.80.1 // indirect
67-
k8s.io/kube-openapi v0.0.0-20220928191237-829ce0c27909 // indirect
68-
k8s.io/utils v0.0.0-20220922133306-665eaaec4324 // indirect
69-
sigs.k8s.io/gateway-api v0.5.0 // indirect
76+
k8s.io/kube-openapi v0.0.0-20221106113015-f73e7dbcfe29 // indirect
77+
k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect
78+
sigs.k8s.io/controller-runtime v0.13.1 // indirect
79+
sigs.k8s.io/gateway-api v0.5.1 // indirect
7080
sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect
7181
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
7282
)
73-
74-
// Remove this replace stanze once we depend on a version of cert-manager that has https://github.com/cert-manager/cert-manager/pull/5376
75-
replace sigs.k8s.io/gateway-api v0.5.0 => sigs.k8s.io/gateway-api v0.4.3

0 commit comments

Comments
 (0)