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

Adds new metadata values #40

Merged
merged 6 commits into from
Mar 17, 2024

Conversation

chentex
Copy link
Member

@chentex chentex commented Dec 4, 2023

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

  • Includes FIPS, Publish, and Architecture extraction

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please describe the System Under Test.
  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

@chentex chentex marked this pull request as draft December 4, 2023 15:46
@jtaleric
Copy link
Member

jtaleric commented Dec 4, 2023

Curious, what is Publish?

@chentex
Copy link
Member Author

chentex commented Dec 5, 2023

Curious, what is Publish?

It tells you if the cluster is External or Private facing, I'm open to new names

ocp-metadata/types.go Outdated Show resolved Hide resolved
@chentex chentex force-pushed the new-metadata-extraction branch from 4e3353c to 1f145f7 Compare February 22, 2024 10:18
@chentex chentex marked this pull request as ready for review February 22, 2024 10:19
@chentex chentex force-pushed the new-metadata-extraction branch 2 times, most recently from a40134e to d6b6c68 Compare February 22, 2024 10:24
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.06%. Comparing base (0140b10) to head (6e5e424).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   84.66%   86.06%   +1.40%     
==========================================
  Files           6        6              
  Lines         339      287      -52     
==========================================
- Hits          287      247      -40     
+ Misses         38       26      -12     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@rsevilla87 rsevilla87 left a comment

Choose a reason for hiding this comment

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

.

- Includes FIPS, Publish, and Architecture extraction

Signed-off-by: Vicente Zepeda Mas <[email protected]>
Signed-off-by: Vicente Zepeda Mas <[email protected]>
Signed-off-by: Vicente Zepeda Mas <[email protected]>
@chentex chentex force-pushed the new-metadata-extraction branch from e697c3d to 0af14b4 Compare February 22, 2024 11:03
Signed-off-by: Vicente Zepeda Mas <[email protected]>
@chentex chentex force-pushed the new-metadata-extraction branch from 0e2c177 to 46fc55e Compare February 27, 2024 17:48
Signed-off-by: Vicente Zepeda Mas <[email protected]>
@vishnuchalla
Copy link
Collaborator

Curious, what is Publish?

It tells you if the cluster is External or Private facing, I'm open to new names

if its just a bool, can we rename it as isPublic or something?

Copy link
Member

@rsevilla87 rsevilla87 left a comment

Choose a reason for hiding this comment

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

The current metadata implementation doesn't crash when used on vanilla kubernetes clusters (kind), I wonder if it's possible to follow this strategy with the new fields.

For example, the library was handling the error of the infra object in these lines:

if err != nil {
// If the infrastructure resource is not found we assume this is not an OCP cluster
if errors.IsNotFound(err) {
return nil, nil
}
return &infraJSON, err

Updates versions in missing actions

Signed-off-by: Vicente Zepeda Mas <[email protected]>
@chentex
Copy link
Member Author

chentex commented Mar 4, 2024

Resolved all the comments.

@chentex chentex requested a review from rsevilla87 March 4, 2024 15:02
Copy link
Member

@rsevilla87 rsevilla87 left a comment

Choose a reason for hiding this comment

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

lgtm,
works in OCP and Vanillla k8s

Vanilla k8s

$ go run main.go  | jq .
{
  "k8sVersion": "v1.29.2",
  "masterNodesCount": 1,
  "totalNodes": 1
}

OCP 4 .12

$ go run main.go  | jq .
{
  "platform": "AWS",
  "clusterType": "self-managed",
  "ocpVersion": "4.14.3",
  "ocpMajorVersion": "4.14",
  "k8sVersion": "v1.27.6+b49f9d1",
  "masterNodesType": "m6i.2xlarge",
  "masterNodesCount": 3,
  "workerNodesCount": 3,
  "totalNodes": 3,
  "sdnType": "OVNKubernetes",
  "clusterName": "ocp-ci-hq68v",
  "region": "us-west-2",
  "publish": "External",
  "workerArch": "amd64",
  "controlPlaneArch": "amd64",
  "ipsecMode": "Disabled"
}

@rsevilla87 rsevilla87 merged commit ec99247 into cloud-bulldozer:main Mar 17, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants