Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

fix: Service annotations indent #76

Merged
merged 3 commits into from
Jan 24, 2024
Merged

Conversation

NEwa-05
Copy link
Collaborator

@NEwa-05 NEwa-05 commented Jan 23, 2024

What does this PR do?

This PR fixes an issue with whitespace not being chomped when adding annotation from the values.

More

  • Yes, I updated the tests accordingly
  • Yes, I ran make test and all the tests passed

Adapted the service annotations template nothing to change at the test level

Fixes: #77

@NEwa-05 NEwa-05 added kind/bug/fix a bug fix kind/enhancement a new or improved feature. labels Jan 23, 2024
@mloiseleur mloiseleur changed the title Fix - Service annotations indent fix: Service annotations indent Jan 24, 2024
Copy link
Collaborator

@darkweaver87 darkweaver87 left a comment

Choose a reason for hiding this comment

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

LGTM, @NEwa-05 do you agree with the modified tests ?

With your patch:

### Chart [ traefik-hub ] ./traefik-hub

 PASS  admission-controller test	traefik-hub/tests/admission-controller_test.yaml
 PASS  cluster-role-binding tests	traefik-hub/tests/cluster-role-binding_test.yaml
 PASS  config-map labels test	traefik-hub/tests/common_test.yaml
 PASS  deployment tests	traefik-hub/tests/deployment_test.yaml
 PASS  HPA tests	traefik-hub/tests/hpa_test.yaml
 PASS  IngressClass tests	traefik-hub/tests/ingress-class_test.yaml
 PASS  service-account tests	traefik-hub/tests/service-account_test.yaml
 PASS  service tests	traefik-hub/tests/service_test.yaml

Charts:      1 passed, 1 total
Test Suites: 8 passed, 8 total
Tests:       55 passed, 55 total
Snapshot:    0 passed, 0 total
Time:        2.294337379s

Without it:

### Chart [ traefik-hub ] ./traefik-hub

 PASS  admission-controller test	traefik-hub/tests/admission-controller_test.yaml
 PASS  cluster-role-binding tests	traefik-hub/tests/cluster-role-binding_test.yaml
 PASS  config-map labels test	traefik-hub/tests/common_test.yaml
 PASS  deployment tests	traefik-hub/tests/deployment_test.yaml
 PASS  HPA tests	traefik-hub/tests/hpa_test.yaml
 PASS  IngressClass tests	traefik-hub/tests/ingress-class_test.yaml
 PASS  service-account tests	traefik-hub/tests/service-account_test.yaml
 FAIL  service tests	traefik-hub/tests/service_test.yaml
	- should set service annotations and extraLabels
		Error: yaml: line 4: did not find expected key


Charts:      1 failed, 0 passed, 1 total
Test Suites: 1 failed, 7 passed, 8 total
Tests:       1 failed, 1 errored, 54 passed, 55 total
Snapshot:    0 passed, 0 total
Time:        2.28413652s

Error: plugin "unittest" exited with error

@NEwa-05
Copy link
Collaborator Author

NEwa-05 commented Jan 24, 2024

Agree with your change, LGTM then

Copy link
Member

@mmatur mmatur left a comment

Choose a reason for hiding this comment

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

LGTM

@traefiker traefiker merged commit faea85d into traefik:main Jan 24, 2024
1 check passed
@NEwa-05 NEwa-05 deleted the svc_annot branch January 24, 2024 08:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug/fix a bug fix kind/enhancement a new or improved feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FIx - Indentation issue with service annotations
5 participants