Skip to content
Merged
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 ui-cra/src/components/Clusters/ClusterDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const ClusterDashboard = ({ clusterName }: Props) => {
const history = useHistory();

const handleClick = () =>
getKubeconfig(clusterName, `${clusterName}.kubeconfig`);
getKubeconfig(clusterName, currentCluster?.namespace || "", `${clusterName}.kubeconfig`);

const info = [
[
Expand Down
4 changes: 2 additions & 2 deletions ui-cra/src/contexts/Clusters/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ const ClustersProvider: FC = ({ children }) => {
);

const getKubeconfig = useCallback(
(clusterName: string, filename: string) => {
request('GET', `/v1/clusters/${clusterName}/kubeconfig`, {
(clusterName: string, clusterNamespace: string, filename: string) => {
request('GET', `/v1/clusters/${clusterName}/kubeconfig?cluster_namespace=${clusterNamespace}`, {
headers: {
Accept: 'application/octet-stream',
},
Expand Down
2 changes: 1 addition & 1 deletion ui-cra/src/contexts/Clusters/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ interface ClustersContext {
data: DeleteClustersPRRequestEnriched,
token: string,
) => Promise<any>;
getKubeconfig: (clusterName: string, fileName: string) => void;
getKubeconfig: (clusterName: string, clusterNamespace: string, fileName: string) => void;
getDashboardAnnotations: (cluster: GitopsClusterEnriched) => {
[key: string]: string;
};
Expand Down