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

🐛 (fix) Removing Unused and Insecure Manifests for Prometheus #1524

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Dec 13, 2024

We are not using these manifests or supporting this option. Therefore, they should be removed, as they are not configured to use certificates and have insecureSkipVerify: false, which promotes an insecure setup by default.

If we want enable this option then we need configure it with:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    control-plane: operator-controller-controller-manager
  name: controller-manager-metrics-monitor
  namespace: system
spec:
  endpoints:
    - path: /metrics
      port: https
      scheme: https
      bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
      tlsConfig:
        insecureSkipVerify: false
        ca:
          secret:
            name: olmv1-cert
            key: ca.crt
        cert:
          secret:
            name: olmv1-cert
            key: tls.cert
        keySecret:
          name: olmv1-cert
          key: tls.key
  selector:
    matchLabels:
      control-plane: operator-controller-controller-manager

@camilamacedo86 camilamacedo86 requested a review from a team as a code owner December 13, 2024 22:39
Copy link

netlify bot commented Dec 13, 2024

Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit 85f94da
🔍 Latest deploy log https://app.netlify.com/sites/olmv1/deploys/675cb93e7fce8b0008c450e3
😎 Deploy Preview https://deploy-preview-1524--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@camilamacedo86 camilamacedo86 changed the title ⚠️ remove prometheus manifests 🐛 Improving Security: Removing Unused Manifests for Prometheus Dec 13, 2024
@camilamacedo86 camilamacedo86 force-pushed the remove-monitor-prometheues branch from bac6ff6 to 3b00bd8 Compare December 13, 2024 22:45
@camilamacedo86 camilamacedo86 changed the title 🐛 Improving Security: Removing Unused Manifests for Prometheus 🐛 (fix) Removing Unused and Insecure Manifests for Prometheus Dec 13, 2024
We are not using these manifests or supporting this option. Therefore, they should be removed, as they are not configured to use certificates and have insecureSkipVerify: false, which promotes an insecure setup by default.

If we want enable this option then we need configure it with:

```yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  labels:
    control-plane: operator-controller-controller-manager
  name: controller-manager-metrics-monitor
  namespace: system
spec:
  endpoints:
    - path: /metrics
      port: https
      scheme: https
      bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
      tlsConfig:
        insecureSkipVerify: false
        ca:
          secret:
            name: olmv1-cert
            key: ca.crt
        cert:
          secret:
            name: olmv1-cert
            key: tls.cert
        keySecret:
          name: olmv1-cert
          key: tls.key
  selector:
    matchLabels:
      control-plane: operator-controller-controller-manager
```
@camilamacedo86
Copy link
Contributor Author

/hold

Just to ensure that we all convey

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 13, 2024
Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 57.99%. Comparing base (61fe142) to head (85f94da).

❗ There is a different number of reports uploaded between BASE (61fe142) and HEAD (85f94da). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (61fe142) HEAD (85f94da)
unit 2 1
e2e 7 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1524       +/-   ##
===========================================
- Coverage   74.68%   57.99%   -16.70%     
===========================================
  Files          42       42               
  Lines        3271     3271               
===========================================
- Hits         2443     1897      -546     
- Misses        652     1270      +618     
+ Partials      176      104       -72     
Flag Coverage Δ
e2e 0.00% <ø> (-52.16%) ⬇️
unit 57.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant