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

Update notificationBlockList to support new API warning messages format #13107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shell/config/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export const DEFAULT_PERF_SETTING: PerfSettings = {
/**
* Show warnings in a notification if they're not in this block list
*/
notificationBlockList: ['299 - unknown field']
notificationBlockList: ['299 - unknown field', '299 - "unknown field']
}
},
serverPagination: {
Expand Down
4 changes: 2 additions & 2 deletions shell/plugins/steve/__tests__/header-warnings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('steve: header-warnings', () => {

function setupMocks(settings = {
separator: '299 - ',
notificationBlockList: ['299 - unknown field']
notificationBlockList: DEFAULT_PERF_SETTING.kubeAPI.warningHeader.notificationBlockList,
}) {
return {
dispatch: jest.fn(),
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('steve: header-warnings', () => {
const createKey = 'growl.kubeApiHeaderWarning.titleCreate';
const podSecurity = '299 - would violate PodSecurity "restricted:latest": unrestricted capabilities (container "container-0" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (container "container-0" must not set securityContext.runAsNonRoot=false), seccompProfile (pod or container "container-0" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")';
const deprecated = "299 - i'm deprecated";
const validation = '299 - unknown field "spec.containers[0].__active"';
const validation = '299 - "unknown field "spec.containers[0].__active"';

describe('no warnings', () => {
it('put, no header warning', () => {
Expand Down
Loading