Skip to content

Commit

Permalink
feat: add openshift provider
Browse files Browse the repository at this point in the history
  • Loading branch information
pehlicd committed Apr 19, 2024
1 parent 5362a00 commit db3d5aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ Workflow triggers can either be executed manually when an alert is activated or
          
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/servicenow-icon.png?raw=true"/>
</p>
<h3 align="center">Container Orchestration platforms</h2>
<p align="center">
<img width=32 height=32 src="https://github.com/keephq/keep/blob/main/keep-ui/public/icons/openshift-icon.png?raw=true"/>
</p>
## Getting Started
### Overview
Expand Down
3 changes: 2 additions & 1 deletion keep/providers/openshift_provider/openshift_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class OpenshiftProviderAuthConfig:


class OpenshiftProvider(BaseProvider):
"""Enrich alerts with data from Openshift."""
"""Perform rollout restart actions on Openshift."""

provider_id: str
PROVIDER_DISPLAY_NAME = "Openshift"
Expand Down Expand Up @@ -114,6 +114,7 @@ def _notify(self, kind: str, name: str, project_name: str):
"""Rollout restart the specified kind."""
client = self.__get_ocp_client()
client.project_name = project_name
self.logger.info(f"Performing rollout restart for {kind} {name} using openshift provider")
with oc.timeout(60 * 30), oc.tracking() as t, client:
if oc.get_config_context() is None:
self.logger.error(f'Current context not set! Logging into API server: {client.api_server}\n')
Expand Down

0 comments on commit db3d5aa

Please sign in to comment.