Skip to content

Commit 114462c

Browse files
committed
Patch OraOperator, fix version
1 parent 1381243 commit 114462c

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.github/workflows/releases.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ jobs:
3939
echo "Tag validated: $TAG_NAME"
4040
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
4141
42-
- name: Inject Static Version into _version.py and version.tf
42+
- name: Inject Static Version into _version.py and versions.tf
4343
run: |
4444
echo "__version__ = \"$VERSION\"" > src/common/_version.py
45-
sed -i "s/app_version = \".*\"/app_version = \"$VERSION\"/" opentofu/versions.tf
45+
sed -i "s/app_version[[:space:]]*=[[:space:]]*\".*\"/app_version = \"$VERSION\"/" opentofu/versions.tf
4646
echo "Injected version:"
4747
cat src/common/_version.py
4848
cat opentofu/versions.tf

opentofu/cfgmgt/apply.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,35 @@ def apply_manifest():
124124
retry(apply_manifest_inner)
125125

126126

127+
def patch_oracle_operator_inner():
128+
"""Patch Oracle Database Operator deployment to disable readOnlyRootFilesystem"""
129+
print("🔧 Patching oracle-database-operator deployment...")
130+
cmd = [
131+
"kubectl",
132+
"-n",
133+
"oracle-database-operator-system",
134+
"patch",
135+
"deployment",
136+
"oracle-database-operator-controller-manager",
137+
"--type",
138+
"json",
139+
"-p",
140+
'[{"op": "replace", "path": "/spec/template/spec/containers/0/securityContext/readOnlyRootFilesystem", "value": false}]',
141+
]
142+
_, stderr, rc = run_cmd(cmd, capture_output=False)
143+
if rc == 0:
144+
print("✅ Oracle operator patched.\n")
145+
return True
146+
else:
147+
print(f"❌ Failed to patch operator:\n{stderr}")
148+
return False
149+
150+
151+
def patch_oracle_operator():
152+
"""Retry Enabled Patch Oracle Operator"""
153+
retry(patch_oracle_operator_inner)
154+
155+
127156
# --- Entry Point ---
128157
if __name__ == "__main__":
129158
parser = argparse.ArgumentParser(description="Apply a Helm chart and a Kubernetes manifest.")
@@ -132,4 +161,5 @@ def apply_manifest():
132161
args = parser.parse_args()
133162

134163
apply_manifest()
164+
patch_oracle_operator()
135165
apply_helm_chart(args.release_name, args.namespace)

0 commit comments

Comments
 (0)