-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[controller] Add NFSStorageClass controller and validation webhook fo…
…r StorageClasses with provisioner nfs.csi.k8s.io (#4) Signed-off-by: Aleksandr Zimin <[email protected]>
- Loading branch information
1 parent
7ceb69d
commit a81dead
Showing
63 changed files
with
4,861 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,6 @@ __pycache__/ | |
*.py[cod] | ||
*$py.class | ||
.pytest_cache/ | ||
|
||
# dev | ||
images/controller/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright 2023 Flant JSC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from deckhouse import hook | ||
from lib.module import module | ||
from typing import Callable | ||
import json | ||
import os | ||
import unittest | ||
|
||
|
||
NAMESPACE = "d8-csi-nfs" | ||
MODULE_NAME = "csiNfs" | ||
|
||
def json_load(path: str): | ||
with open(path, "r", encoding="utf-8") as f: | ||
data = json.load(f) | ||
return data | ||
|
||
def get_dir_path() -> str: | ||
return os.path.dirname(os.path.abspath(__file__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python3 | ||
# | ||
# Copyright 2023 Flant JSC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
from lib.hooks.internal_tls import GenerateCertificateHook, TlsSecret, default_sans | ||
from lib.module import values as module_values | ||
from deckhouse import hook | ||
from typing import Callable | ||
import common | ||
|
||
def main(): | ||
hook = GenerateCertificateHook( | ||
TlsSecret( | ||
cn="webhooks", | ||
name="webhooks-https-certs", | ||
sansGenerator=default_sans([ | ||
"webhooks", | ||
f"webhooks.{common.NAMESPACE}", | ||
f"webhooks.{common.NAMESPACE}.svc"]), | ||
values_path_prefix=f"{common.MODULE_NAME}.internal.customWebhookCert" | ||
), | ||
cn="csi-nfs-webhooks", | ||
common_ca=True, | ||
namespace=common.NAMESPACE) | ||
|
||
hook.run() | ||
|
||
if __name__ == "__main__": | ||
main() |
Empty file.
Empty file.
Oops, something went wrong.